I’m working on a speech perception study in which participants will hear a sound and they have to rate it as being: [X sound, sounds more like X, Y sound, sounds more like Y, or a totally different sound].
I thought of using a scale in which participants:
can click on the ends only if they think the sound is perfect X or perfect Y (categorical).
Or press anywhere on the line between X and Y to indicate that the sound is more like X or more like Y (continuous), where I can see how close it is to one end based on where the participant located the point on the line.
Or if the sound is different from both X and Y to be able to click on another option on the same screen that says “other sound”.
Can I do that in Psychopy?
Yes, PsychoPy is perfect for what you are describing.
You can create two sliders, one categorical and one continuous. Then, depending on a condition, show one or the other.
I created an example with 12 loops, six loops with condition 1, and 6 loops with condition 2.
I also added two sliders, one categorical and one continuous.
Each one of the conditions has three categorical and three continuous sliders:
Depending on the structure of your conditions, you might only use one condition, which is Slider_Type. You can change the conditions however fits your experiment.
Here’s an experiment example you can download and view: Slider.zip (90.7 KB)
According to the docs, labels are being created as a text box. Inserting images won’t work.
I tried testing it, and if you try to insert images as your labels, you get a string declaring the class of the image.
# Make labels
self.labelObjs = 
if self.labels is not None:
for n, label in enumerate(self.labels):
# Skip blank labels
if label is None:
# Create textbox for each label
obj = TextBox2(
self.win, label, font=self.font,
pos=self.labelParams['pos'][n], size=self.labelParams['size'][n], padding=self.labelParams['padding'][n], units=self.units,
color=self._foreColor.copy(), fillColor=None, colorSpace=self.colorSpace,
borderColor="red" if debug else None,
You can try to find the positions of the labels and place images under the ticks. I don’t see a better solution…
The issue is that I need to have the instructions in Arabic, not in English. The instructions appear in Arabic without a problem but the ticks’ labels on the scale show weird symbols when I type in Arabic. So, I thought that I can use images created in Paint with Arabic text on them.
I am not exactly sure why. I think it has something to do with the font. Note that it sometimes worked and sometimes didn’t work on my machine, so make sure you check it a couple of times before declaring it a viable solution.
In the instructions at the top of the screen, the words in Arabic were correct. I managed to do that by choosing ‘Arabic’ as the language style in the Formatting tab of the text added. However, I didn’t know how to do that for the ticks’ labels on the slider.
In the first option, I tried to reverse the letters of the words, but the result was that the order of the letters was correct but they were not connected as they should be in Arabic words.
Also, as you can see in the second image, the markers on the slider are shifted out of the circles. What should I do to position them at the center of the circle?
I used the following code in ‘Begin Routine’:
slider = visual.Slider(win,flip=False,style= ‘radio’,size=(0.1,0.55), pos=(0.7,-0.06),labels=(“السلام عليكم”, “السلام عليكم”, “مالسلا”), font=“Arial”)
Are the labels okay now with the fix I sent, or it doesn’t work as intended? I got a little confused.
Are you saying that right now, the text of the label is backward?
You can place text instead of labels, it’s a pain to position, but it will work. Using Arabic is problematic without the language style.
Try to check this question about slider labels:
You can find many more questions referring to the same issue. Try to search there first; the solution is probably there