set a fixed duration of a sequence of items
in OpenSesame
Hi!
I am trying to understand how to set a sequence of items (e.g., stimulus display - mouse response - blank screen) that lasts always 10 seconds. This is means that, for instance, if the mouse response lasts 3 seconds, the blank screen will last 7 seconds.
Could you help me?
Thank you very much
Comments
Hi @Lara94 ,
The best way to do this depends on the specifics of your experiment.
In some cases, the
coroutinesitem will be useful because it allows you to specify a fixed duration. However, usingcoroutinescan also make things a bit more complex than necessary.An alternative would be to use a
feedbackitem for the blank screen, and then use a simple Python expression to specify that the duration should be 10,000 ms minus the response time, like so:You would probably also want to specify a timeout of 10,000 ms in the
mouse_response.Note that you need to use a
feedbackitem in this case, because for asketchpaditem the duration is evaluated during the Prepare phase, so before any response is given.— Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!