Building time reproduction task
in OpenSesame
Hey I wish to build a time reproduction tasks where the participants are required to reproduce the duration of a standard stimulus. They need to long press a key. It would be great if you vould help me in how to insert a long key press response and how to log the same.
Thanks in advance for your response.
Comments
Hi Saumya,
I am not 100% sure, but this sounds like a usecase for the keyrelease functionality:
So you would need to 2 keyboard items. In the first one you set it to keypress (to start the measurement), and directly after a keyrelease. (Potentially the first one is unnecessary, try it out!)
Eduard
I tried similarly building the experiment but my screen is getting stuck at the reproduction phase. Van you please guide me regarding the same?
Thanks
Can you share your experiment? A screenshot is not quite sufficient to spot the problem.
Eduard
I have attached the experiment for your reference. Thanks a lot for your help.
Hi @Saumya,
I checked your experiment and there are a number of issues:
spacebarbutspace(see the list available keys button in the keyboard_response item)Hope this helps,
Eduard
Hey!
Thanks a lot for your suggestions.I have made the necessary changes. I had another query I want my participants to press the spacebar as the cue appears and continue the keypress till they reproduce the duration in the new sketchpad. Can you help me regarding the same as well?
If you need keyrelease across sketchpads, you need to use an inline_script to present visual stimuli and a poll the key release function.
Something like that:
# define the Canvas objects cv1 = Canvas() cv2 = Canvas() # define the Keyboard kb = Keyboard() # draw somethign onto the Canvas cv1.text("Canvas1') cv2.text("Canvas1') # define duration of canvasses cv1_offset = 1495 cv2_offset = 2995 # start presentation start_time = cv1.show() while True: # if no response after 2nd canvas, thats a timeout if clock.time() - start_time> cv2_offset: response = none break # time to shwo the second canvas if clock.time() - start_time> cv1_offset: cv2.show() # poll the response and break if there is a key release response, time = kb.get_key_release(timeout=5) if response: breakI haven't tested it, but this should give you the idea.
Eduard
Thanks a lot