Trial duration based on Frames instead of Time


Author
Message
Sadek
Sadek
Associate Member (99 reputation)Associate Member (99 reputation)Associate Member (99 reputation)Associate Member (99 reputation)Associate Member (99 reputation)Associate Member (99 reputation)Associate Member (99 reputation)Associate Member (99 reputation)Associate Member (99 reputation)
Group: Forum Members
Posts: 7, Visits: 32
Hello,

This is a two-part question. Is there a way to specify the duration of the trial by number of frames instead of time? All my parameters are based on stimulus frames (e.g. the insertstimulusframe and beginresponseframe), but the only parameter I can't seem to set by frame is the trialduration (or timeout). I suppose one way to do this is to calculate the duration of the trial based on the total number of frames I would like there to be. However, the issue with this is that if I choose to run the experiment using Inquisit Web, the trialduration value would depend on each monitor's refresh rate (sure, only a few ms off). To avoid this, I would prefer to have the trial duration based on the monitor's refresh rate and avoid any timing hiccups between trials. After collecting all the data, I can separate participants based on their monitor's refresh rate and work from there.

Second, there seems to be a weird timing discrepancy (an issue I have noticed in other threads - and partially a reason why I am structuring my experiment by frame instead of time). Below is a simple series of stimuli (adapted from a previous thread - not an experiment, but rather a proof of concept). I have added the clock feature so I can track when the stimuli appear/disappear. At 60 frames between each stimuli (i.e. 1 second), everything shows up as expected with the exception of the final stimuli (the blank [can also be clearscreen]). Any particular reason why it is delayed? My only guess is that something about indicating when the response can be allowed (beginresponseframe = 180) messes with the timing of the stimulus frames. I notice that if i remove the beginresponseframe variable, there is no time lag between the stimuli and everything is executed every second. If I change the beginresponseframe to earlier, things get messier.. Perhaps I am missing some bit of code..? Or using the wrong bit of code..?

Note: these settings below are based on a monitor with a refresh rate of 60Hz. If you have a monitor with a higher refresh rate (e.g. 100Hz), it will require adjustments to when the frame is presented for each stimuli. Which makes me think that perhaps web-based experiments that are time sensitive should incorporate an ifelse statement checking the monitor's refresh rate and adjusting the experiment's parameters accordingly. Just a side thought since we are increasingly incorporating online testing instead of the usual 'one monitor in the lab sort of gig'.

Thank you for your time and help.
____________________________

<clock stopwatch>
/ mode = stopwatch
/ txcolor = white
/ txbgcolor = black
/ format = "s:zzz"
/ position = (50%, 90%)
</clock>

<block myblock>
/ trials = [1-4=example]
</block>

<trial example>
/ontrialbegin = [
    trial.example.insertstimulusframe(text.target, 60);
    trial.example.insertstimulusframe(shape.square_out, 120);
    trial.example.insertstimulusframe(shape.square_in, 180);
    trial.example.insertstimulusframe(shape.blank, 240);
]
/ ontrialend = [trial.example.resetstimulusframes(); ]
/ stimulusframes = [1 = fixation, clock.stopwatch]
/ beginresponseframe = 180
/ validresponse = (57)
</trial>

<text fixation>
/ items = ("+")
</text>
<shape square_out>
/ shape = rectangle
/ color = orangered
/ size = (210px, 210px)
</shape>
<shape square_in>
/ shape = rectangle
/ color = black
/ size = (200px, 200px)
</shape>
<text target>
/ items = ("TARGET")
/ txcolor = red
</text>
<shape blank>
/ shape = rectangle
/ color = white
/ size = (100%, 100%)
</shape>

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Sadek - 5 Years Ago
Dave - 5 Years Ago
Sadek - 5 Years Ago
Dave - 5 Years Ago
Dave - 5 Years Ago
                         Interesting that these are the timing values that output. I don't know...
Sadek - 5 Years Ago
                             Run <clock stopwatch> / mode = stopwatch / txcolor = white /...
Dave - 5 Years Ago
                                 This is the onset of stimulus. There is a ~500ms lag. Just in case the...
Sadek - 5 Years Ago
                                     Huh, that's really odd. What's the Inquisit version installed (Help...
Dave - 5 Years Ago
                                         Yes it is odd! The version is 6.2.2 64bit (build 5929). I do have...
Sadek - 5 Years Ago
Sadek - 5 Years Ago
Dave - 5 Years Ago

Reading This Topic

Explore
Messages
Mentions
Search