Stroop test with audio
in OpenSesame
I have a simple Stroop test and I want to play an audio file to serve as a distractor. How can I set it up to play the audio file only when the word and colour match or only when they don't match. Could it also be set to just play randomly? Any help would be appreciated.
Comments
Hi @mhairt,
To play a sound based on some condition, the simplest method is to condition the sound object to run using the "Run if" parameter of the sequence it forms part of.
If you want to be able to play a sound when word and color match or when they don't, and change this dynamically, the best option is to use coding (in Python or in Javascript) to set a variable accordingly (for example, you'd call it "playnow", which could be equal to 1 or 0. Then you'd set the "run if" parameter of the sound object to: [playnow]=1.
If you want to play the sound at random, you could use coding to generate a random integer value between 0 and 1 and use that as the "run if" condition. If you require more sophisticated quasi-randomization, then you'd probably have to program your quasi-randomization through code.
Best of luck,
Fabrice.
Sorry if these are stupid questions but I have only started using open Sesame.
This is what I have set up as the Stroop task.
I have added a run if statement for the audio
The experiment runs but the audio plays for every word. I am not sure of the block setting for playnow
Any tips on how to get it working?
I got it working like this
How would I now set it to play randomly?
Hi @mhairt,
What do you mean by "play randomly"?
Are you referring to the
new_sampler? Purely randomly ? Quasi-randomly ?Fabrice.