Likert scale and Matrix components for stimulus rating (online experiment)

Hi there,

I’m new to PsychoPy and Python coding in general, and I’m hoping any of you could help with the below please:

I’m working solely on Builder at the moment and the aim is to have an online experiment (hosted on Pavlovia) for participants (recruited via Prolific) to first answer a few Likert-scale questions on their trust propensity (I prefer to keep my experiment all in one place, hence not using Qualtrics), and then start the trials, which they will have to listen to one audio file at a time and respond to a series of questions, specifically Matrix-style questions relating to each audio file.

My concerns and questions:

  1. For the trust propensity questions I want to use a Likert scale. However, I can only find the Slider component on Builder, which although looks similar to a Likert scale, it seems to act on a continuous manner, rather than work in an ordinal manner. Is it possible to adjust this through the Slider settings on builder so only the actual 7-points on the slider can be selected rather than anything in between?

  2. For the audio stimuli, I would like the audio to appear on screen with it’s equivalent “play”, “pause”, “stop” features, so participants can listen to the audio again if they want to, before rating it. Is that possible through the Builder Sound component? Because so far the sound component automatically plays the sound on the background, without any replayability control by participants.

  3. Just to confirm, PsychoPy and Pavlovia do not compress my audio files right?

  4. For the audio stimuli again, when it comes to responding to questions relating to each audio file: I need to use a Matrix question with radio buttons, where each item of the question can be scored from most to least (1 - 7). Is it possible to do that using only the Builder (e.g. by modifying the Sliding component), and if so, how? Or will I need to code the matrix question manually using the Coder?

  5. If I have to implement a Likert scale and/or a Matrix question using the Coder, that code will need to be compatible for use in my online experiment (i.e. to be successfully translated from PsychoPy to PsychoJS). Is that feasible, and if yes, how (any likert scale / matrix code snippets available please)? Any potential problems that could arise using this approach?

  6. Is there a way to track response time by measuring how many seconds it took participants to move from one “audio stimulis and responses” to the next?

Many thanks,

Example of what I’m trying to achieve for each audio stimulus:

P.S. Apologies if this is a duplicated topic. I’ve already looked at other forum topics but I couldn’t find any tackling my questions. When it comes to Matrices, most topics seem to be relating on how to change the position of stimuli using a matrix-style visualisation rather than an actual question on a Matrix-question form with items and scoring/response.

Hi :slight_smile:

So for items 1, 4 and 5, I made a minimal demo on how you can achieve a rating matrix. This would work locally and online
rating_matrix_demo.psyexp (38.4 KB)

For item 6, if you look at the csv output, for each individual slider, the response time will be recorded (see slider1.rt and slider2.rt) and the time starts from when the first stimulus is presented so you can assume the total response time to be the last RT of the last item within your matrix if that works for you? If not, you would need to code a custom clock - achievable via code component within the builder
639909_rating_matrix_demo_2022-12-01_11h26.59.319.csv (825 Bytes)

For item 2, play, pause and stop can be achieved via code component within the builder as well Sound - for audio playback — PsychoPy v2022.2.4

As for item 3, I’m checking with the dev team and will get back to you when I hear back from them.

Hi @suelynnmah,

Thank you so much for your response! Thanks to your guidance I’ve managed to create my Likert scale and Matrix :smiley:

I’ve also managed to make my sound (audio file) play when a user clicks on a “play” image. This mouse click will not end the routine, there is another mouse click for that, and this mouse component is only activated for the “play” image, no other stimuli. However my issue now is that the sound plays only once, despite clicking multiple times on the play image. I need the audio file to play from the beginning each time the user clicks the image.

To play the sound I added a start condition “len(mouse.clicked_name) > 0” and it works fine. However it only plays once through mouse click, even thought the correct image name is registered multiple times in the clicked_name list.

To tackle the issue of ‘only playing the first time that I click on the “play” image’ I tried the below, but did not work.

I tried the code below in the “each frame” section of the code component (i tested it in “each frame” and not in “end routine” section because the mouse component for playing audio is not for terminating the routine):

if len(mouse.clicked_name) > 0:
        mouse.clicked_name = []
        sound_1.status = NOT_STARTED

So basically, what I’m attempting above is:
If the play image has been clicked, which would be the only thing registered in the clicked_name list of this mouse, then:
Empty the clicked_name list, to reset it and check that it registers the new play image click the second time round.
Set the audio file (sound_1) to “not started” again, because for the start condition PsychoPy seems to automatically add “sound_1.status == NOT_STARTED and …” before my given start condition “len(mouse.clicked_name) > 0”.
And finally, make sure that the audio file has stopped playing.

However, instead of (1) stopping the file from playing when finished and (2) allowing me to play the audio again from the start when I click on the image for a second/third/… time, it simply appears to be constantly checking the start and frame conditions in a loop after the first mouse click, which causes the audio file to play indefinitely in a loop.

Any ideas why this is happening and how can I fix it please? I don’t want the audio to loop, ever. Only to stop (if it hasn’t yet) and re-play from the start each time the user clicks on my “play” image. I already have a ‘1 second’ stop-time limit on the sound component.

Many thanks again,

P.S. If it helps, in the Builder settings, I’m using the PsychoPy version “2022.2.4” which I think is the latest one. And I tried both “PTB” and “sounddevice” audio libraries.

Hi, sorry for the delay in reply. It turns out that there’s a bug with pausing and stopping sounds but the dev team are currently working on it.

As a workaround, I have created something similar with Pavlovia surveys that allows you to present audio (play/pause/stop) via html audio tag and have the likert scale underneath. I’ve attached an example Pavlovia Survey

If you are happy with it, I can share with you how to do it.

Best wishes,
Sue Lynn