Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Using keyboard response for reaction time AFTER playing audio-visual material

Hi Guys,

I am designing an experiment on OS. I want my participants to listen to and read a sentence. Then they choose an answer using keyboard keys. Timeout is 10 secs.
The problem is the timeout begins once the audio-visual material is being played, but I want the time out to begin AFTER the end of the audio-visual material in order to record reaction time accurately. I don't want RT to include the duration of the sentence. Is there a way to do this?

Much appreciated


  • Hi Samoel,

    In attachment an example of how it could work, essential line in the code is:
    while sound1.is_playing() == True:

    This checks if the sampler is still producing sound, and the experiment does not move on until the sound has stopped, hope this helps,

  • Hi Roelof,

    Many thanks for the reply. I am a complete newbie when it comes to inline script and could not figure out how to do it. I dragged an inline script item but the experiment fails as I am missing sth obviously. I attached my file and I do very much appreciate if you can have a look at it for me.

    Many thanks again

  • Hi Samoel,

    Right, the inline script only works if that is how you want to play the sound, right now you are using the sampler item from the menu on the left, which seems to work very well in your experiment.

    It looks like the problem can be solved by changing the duration of the sample (called sound) to 'sound' which you already did for the beep noise.

    I also added a time out screen that shows up after 10 seconds if no response has been given,
    this works via the 'run if' column that you can see when you click on the 'EIT_sequence'

    Good luck,

    (I also changed the following which you might have to change back:
    -fade out set to 4000 ms for the sound
    -fixation duration set at 500 ms)

Sign In or Register to comment.