retrieve response time within trial to adjust ISI
Sorry for double posting this question, but it might be a particular issue related to collecting my response with mousetrap:
This must be something really straightforward, but I am stuck here. I have a trial that presents a canvas with visual response options and a sound file, both initialized by a mouse click on a start button. While listening to the sound, participants have to click on one of the responses to proceed.
Each sound file has a certain length and I want participants to be able to give an early response if they want to but because I am also tracking their eye fixations, I do not want the canvas to proceed before the end of the sound file. I collect my mouse responses with the mousetrap plugin (interested in mouse trajectories). Apparently, the trajectories are not collected until the previous canvas/sound has finished, so I have to set the duration of canvas / sound = 0.
My idea is to present a second canvas with a duration defined by the length of the sound file minus the response time of the mouse click. However, if I try to retrieve the [response_time] it spits out the RT of the previous trial. How can I access the response time of the just made response and incorporate it into calculating the duration of the following canvas? Any suggestions? Sorry if this is a silly question. Any help would be highly appreciated.