Skip to content

Overview of the application

These pages contain documentation of the MUSic-related Citizen Science Listening Experiments (MUSCLE) infrastructure. This application has been set up to run online listening experiments for music research. It presents questions, and typically audio stimuli, to participants, and collects their feedback.

The application consists of a backend in Django (Python), and a frontend in React (TypeScript). Upon load, the frontend makes a call to the backend’s experiment endpoint. A call to {your-url}/{slug} will locate experiment object associated with the slug, and present a consent form to the user (registered through views in the participant app), and will then proceed to present experiment blocks, the logic of which is handled of rules files, located in experiment.rules. The rules files present a number of different actions to the user (experiment.actions), which can present information, audio players, forms, feedback, or combinations of these, to the user.

When a block is started, a Session object for the current participant is created, and the rules file’s next_round function will serialize the configured actions for the frontend’s repeated calls to session/next_round. When the user gives responses, these will be registered through the result/score endpoint in the result app. The result is tied to either a Session (useful for responses to trials within a block), or to a Participant (useful for demographic information about the user, such as educational or musical background). The profile questions are configured in the question app.

Much of the textual content of an experiment can be configured through a graphical user interface (referred to as the admin interface): the description and background of the experiment, links to external sites and demographic questions. Everything that is tied to the logic of an experiment block itself, is set through the rules file. All content presented to users can be localized, either through the admin interface, or through the Python codebase.