How to give a sound feedback in builderview

Hi all!
I am tying to give a feedback after a trial but failed.When the subject press the right button,the corresponding right sound will play at the same time .But I have no idea how to achieve it.
Any idea for this problem?

Thanks in advance!

Hi,

You’ll have to adapt it to your own experiment, but the basic principle is:

if resp.corr:
 soundfile = "correct.wav"
else:
 soundfile = "incorrect.wav"

And then in your sound1 component you must set the Sound property to $soundfile

There’s an example of how to do this for a text message in the stroopExtended demo. It only changes the text of a message, but you can apply this principle to any property.

2 Likes

Really appreciate it ! I try today in the way you told me and I make it.:grinning:
Thanks for your help !