Listening to keyboard response
in OpenSesame
Dear OpenSesame community,
It might be quite basic but I still can't figure it out myself (due to my limited programming abilities).
I want to run 2 canvases (one after another) and to play sound between them.
Now, I want the participants to be able to press the keyboard in any time, while if they press before the sound, the trial will be over. The second canvas (after the sound) must be shown to 2 seconds either way (regardless to pressing any key). Importantly, I would like to log the response time of the response and the key pressed identity (space, 'l' etc.) for any case.
I hope I'm somewhat clear enough. Can anyone help?
Thanks!
Comments
Hi,
Your description is not entirely clear to me, but my first impression is that coroutines might be what you're looking for. Coroutines allow you to do multiple things, such as presenting stimuli and collecting key presses, in parallel.
See also:
Does that help at all?
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi,
We'll need some more information.
Firstly, what do the participants respond to? What is their task? What is the purpose of Sketchpad 1, of the sound, and of Sketchpad 2?
Cheers,
Lotje
Did you like my answer? Feel free to

Dear Lotje and Sebastiaan,
Thank you so much for your comments! Please forgive me for not being fully clear.
I'm working on sort of a go/no go task. in this specific case I'm working on the No-go trials.
I'm presenting a letter (for 100 msec) and then play a no-go tone (and the letter is still on the screen after the tone, that's the second sketchpad). if the participant is very quick and responds to the letter before the tone (even mistakenly), then the trial must be over and the next trial must begin (no tone or second sketchpad will be presented). if the participant responds after the tone, then he must wait for a 2000 msec for the trial to be over. Either way the responses keys are the same along the trial.
I tried to use the coroutines Sebastiaan kindly suggested. It seems like the right way to approach it but I'm not fully understands how the programming of this feature works...