By sdeanda - 2/7/2015
I've run into a strange issue when repeating trials. I've copied my code below.
I have two trials that run back-to-back (the prime trial and target trial, see below). I was successful in repeating these pairs of trials using keyboard input. However, when I incorporate a video that plays 500 ms into one of the trials, the repeated trial lags a significant amount of time (on the order of seconds) to play the video. Note that this only happens when I repeat the trial. Any help is appreciated!!
<trial prime> /ontrialbegin = [values.itemnumber = counter.mycounter.selectedvalue] /stimulusframes= [1 = soundWAVfile; 500 = video] /trialduration = 3000 </trial>
<trial target> /stimulustimes = [400 = soundWAVfile2; 800= picture] /timeout = 3700 /recorddata = true /inputdevice = keyboard /validresponse = ( 19) /responsetrial = (19, repeatprime) </trial>
<trial repeatprime> /stimulusframes= [1 = soundWAVfile; 500 = video] /trialduration = 3000 /validresponse = (anyresponse) /responsetrial = (anyresponse, repeatTarget) </trial>
<trial repeatTarget> /stimulustimes = [400 = soundWAVfile2; 800= picture] /timeout = 3700 </trial>
|
By Dave - 2/7/2015
/stimulusframes= [1 = soundWAVfile; 500 = video]
You're a using *stimulusframes* here, not *stimulustimes*. I.e., you aren't displaying the video at 500 *ms* into the trial, but at 500 *frames*. Depending on your display's refresh rate, a single frame lasts between 10-20ms, i.e. the video is displayed somewhere between 5 to 10 seconds into the trial.
|
By sdeanda - 2/7/2015
That makes sense. But why would the prime trial run fine but not repeatprime?
|
By Dave - 2/7/2015
They behave absolutely identically -- or rather as expected -- for me (using arbitrary files I have plugged in, I don't have the ones you're using obviously).
What do the relevant stimulusonset columns in your data file report as onsets for the two different trials?
|
By sdeanda - 2/12/2015
Sorry for the delayed response. I finally got a chance to go back and look at this. You were right about "stimulusframes" and "stimulustimes"! That fixed it. Thanks for the help!
|
By Dave - 2/12/2015
Great -- thanks for taking the time to update the thread!
|