Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

Duration time presentation stimuli

CélineGCélineG Posts: 11
edited January 2016 in OpenSesame

Hello !
I have prepare a Stroop modified task. I wish to reccord reaction time of participants. When the stimulus appears on the screen, participant have to choose between 4 keys on the keypad. Open Sesame reccords correct responses and reaction time.

My problem is that in the keyboard-response, the duration is "keypress". That means the stimulus disappear after the participant gives is answer. So, the presentation time of each stimuli change according the reaction time.

What I want is to have the same presentation time for each stimuli (1000ms).

Here is my code :

Sketchpad :

set duration 0
set description "Displays stimuli"
draw textline center=1 color="[Color_word]" font_bold=yes font_family=mono font_italic=no font_size=32 html=yes show_if=always text="[Word]" x=0 y=0 z_index=0

Keyboard_response :

set timeout 3000
set flush "yes"
set duration "keypress"
set description "Collects keyboard responses"
set correct_response "[Correct_response]"
set allowed_responses "q;s;l;m"

I tried to set duration in keyboard response as "1000" ms but it crashes (the task doesn't run).

Can somebody help me with this error ?

Thank you very much !



  • sebastiaansebastiaan Posts: 2,947
    edited 3:54PM

    Hi Céline,

    This sounds like a situation for the coroutines plug-in, which is described here (and needs to be installed separately):

    Essentially, you want to do two things simultaneously:

    1. Collect a keyboard response with a timeout of 3000 ms; and
    2. Show a target sketchpad, followed by a blank sketchpad 1000 ms later.

    In the coroutines plug-in, this would look as follows:


    Does that make sense?


    There's much bigger issues in the world, I know. But I first have to take care of the world I know.

  • vvogelvvogel Posts: 2
    edited January 27

    I had a similar problem and used your solution:

    instead of a "sequence" I added a "coroutine" but now I always get an error message!

    File "C:\Program Files (x86)\OpenSesame\lib\site-packages\libopensesame\item.py", line 235, in getattr
    raise AttributeError(u'%s not found' % var)
    AttributeError: canvas not found

    I really don't get the problem. What did I do wrong?

    Thanks in advance

    GoNo-Go.jpg 229.6K
  • sebastiaansebastiaan Posts: 2,947

    @vvogel Until recently there was a bug with feedback items within a coroutines. So that's what you're running into. I would either:

    • Use sketchpad items instead of feedback items; or
    • Grab the latest (soon-to-be released) OpenSesame 3.2 prerelease from http://osdoc.cogsci.nl/3.2


    There's much bigger issues in the world, I know. But I first have to take care of the world I know.

Sign In or Register to comment.