[solved] SOA - stimulus onset asynchronies
In my experiment, I would like to vary parametrically the onset asynchronies of two stimuli (auditory and visual stimuli). For example, the range of stimulus onset asynchronies would be: -100 ms; -50 ms; 0; 50 ms; +100 ms.
How could I manage this problem in OpenSesame?
Thanks in advance!
Comments
Have a look at this thread, it contains the code that should (in principle) be able to do it, as well as a link to a setup that would allow you to do audiovisual experiments with high timing accuracy.
Good luck!
Thank you Edwin and, of course, Raquel for your help. However, I still have some problems, maybe since I’m noob about programming!
In my experiment, as I told you, I have a circle and a auditory stimulus that are presented for different SOA.
Here my few script lines:
...
...
… I’m not sure if circle.win() is a correct command. In fact, the debug output is:
I am not able to write the right command to view the stimulus on the screen, according to the SOA. Any suggestion?
It seems like the indentation isn't right, which means that you either have too little or too many spaces/tabs in front of the code. Directly after an if statement, Python expects there to be a tab. And if you continue the statement, it expects there to be a
eliforelsecommand on the same level of indentation. An example:This is code that works:
This is code that does not work:
And this doesn't either:
So to fix the code you posted, you should decrease the indentation of your "elif" in line 6:
If that does not work, remove all of the spaces in front of all the lines of code. Then insert tabs in all lines, apart from the lines that begin with
if,eliforelse.Good luck!
Also, it just occurred to me that you will most likely not have the beep and the circle set up in a similar way as Raquel has. We should fix that too!
Add the following to an
inline_scriptitem somewhere at the start of your experiment:Now use a slightly adjusted script to present the stimuli:
Please do note the potential pitfalls mentioned in the thread I linked to! Sound timing is different to get precisely right (not just for OpenSesame, by the way).
Edwin, thank you for your precious help: the experiment works perfectly!
Greetings!
@};- @};- @};-
Very good to hear, I'll mark this as solved. Good luck with your study!