Howdy, Stranger!

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

Supported by

Sync timing with external software, mouse_response not accurate

Hello,

I am running an experiment where I need to sync the timing of responses in opensesame to external software. I have done this before however I seem to be having some difficulty with it this time around.

At a point in the opensesame sequence a trigger is sent to my external software to instruct it to begin recording using the inline script item. From that point the participant hears a signal (sampler item) to start the task and responds with two mouse clicks (using two mouse response items), the first one being when they start the task, the second being when they end the task. So, I need 4 time stamps, when the trigger was sent, the sampler, the first click and the second click. This is repeated 5 times in a loop, the trigger stopping at the end of each loop and starting again in the beginning of the next one.

However, I have found using the mouse response does not correctly sync with the external software. I should be able to find the difference between the first mouse response and the trigger to get the time the participant started the task in the external software. But it doesn’t.

I am also having an issue with the time taken to respond to the signal. Where calculating the difference just doesn’t seem to work. Where I have left it 4/5 seconds when testing the experiment, it comes up with a time like (15237.47 (mouse response) - 15221.56 (sampler) =) 15.9178ms as the time to respond to the signal. It’s as if the sampler occurs almost at the same time as the mouse click even though there should be a difference of about 4 seconds from when I have tested it.

I added a logger after each mouse click and using that instead of the mouse response item works perfectly (the external task is a movement task so I can see that the logger works instead as it corresponds with the movement). While I could run my experiment like this, I would like to resolve the mouse response issue.

Below is the experiment and I included the sequence of some of items in one loop and the timestamps with them.


Thank you,

Chloe

Comments

  • Hi Chloe,


    I should be able to find the difference between the first mouse response and the trigger to get the time the participant started the task in the external software. But it doesn’t.

    How big is the deviation? Is it consistent?

    Can you print out the current time at each checkpoint in your experiment? This would give you an idea of whether there is anything unexpected happening in the process. Also, you should be aware that the sampler can still play the sound even though the next item in the sequence (i.e. the mouse) has already been called. If you don't want that, you should set the sampler duration to sound. Maybe this helps?

    Eduard

Sign In or Register to comment.