Sync timing with external software, mouse_response not accurate
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.