Onset Delay of -1, What does this mean?

440 views
Skip to first unread message

Jenna Luque

unread,
Sep 22, 2015, 11:42:39 AM9/22/15
to E-Prime
Hello:

I am trying to set up an experiment with a lot of sound files. To make loading them all easier, I concatenated them all into one long sound file. So, each trial consists of a sound file with 6 words in it. Prior to the sound file, there is a crosshair. I am prereleasing on the crosshair to try to lessen the onset delays for my sound, as of now they range from 50-150. However, any prerelease value that gets the delays down, also results in at least some of the delays being -1. Since a -1 delay is not possible, I believe that this has some deeper meaning. I cannot find that deeper meaning in the manual (all it says there is that -1 can be used in duration to signal forever) or online. 

On another note, in order to get my trigger to play on Curry 7 at the onset of the sixth and final word, I am setting my sound event duration to the sound up to the sixth and final word, then having a an inline send the trigger, and then having a crosshair come back up while the sound is playing. I there an easier way to do this? An example to be clear: The long sound file lasts 5000ms, but the final word starts playing at 4500ms. So, I have the sound file play with a duration of 4500ms, then an inline sends the trigger, and then a crosshair comes up for 500ms. 

Thanks for any help you can give me. The first question is more dire, and the second is just so that I can make a more elegant experiment (what I have is working). 

-Jen
-Jenna Silver Luque
 University of South Florida

David McFarlane

unread,
Jul 19, 2016, 3:56:59 PM7/19/16
to e-p...@googlegroups.com
The question of negative OnsetDelay values comes up from time to time,
so I will try to answer it here.

First, note that

OnsetDelay = OnsetTime - TargetOnsetTime

(as explained at https://groups.google.com/d/topic/e-prime/OeiZ00V9SRc ).

So suppose you want to present some visual stimuli, and you have a
display with a frame rate of 60 Hz. That means that it starts a new
visual frame about once every 17 ms.

Now suppose you want one stimulus to last for 100 ms, followed by
another visual stimulus. Well, you cannot quite do that, because 100 ms
is not an integral multiple of the frame period. If the first stimulus
has its Duration set at 100 and starts at the onset of a frame period
(OnsetSync = "vertical blank"), then you could have it remain through 6
frame periods, and then get replaced by the next stimulus at the start
of the 7th frame period. That means that the first stimulus would
remain displayed for about 102 ms, and the second stimulus would have an
OnsetDelay of about 2 ms (assuming sufficient PreRelease to eliminate
other delays).

But now suppose that you set the Duration of the first stimulus to 103
ms, just one ms past the full 6 frames. Well, in that case, E-Prime
might have to wait through another full frame to start the next
stimulus, resulting in an OnsetDelay of 16 ms, almost a full frame late!

Instead, E-Prime can predict the the start of the next frame and "look
ahead". If E-Prime sees that the next frame will start just 1 ms before
the TargetOnsetTime of the stimulus, then it will go ahead and start the
stimulus onset early. And in that case, you get an OnsetDelay of -1!

So that's all it means, nothing impossible or mysterious. It just means
that E-Prime recognized that it would be better to start the stimulus a
little ahead of its TargetOnsetTime rather than wait through another
full frame period.

At least that's how it worked up until EP2.0.10. 2.0.10 adds a new
wrinkle -- the DisplayDevice includes a new property called "Refresh
Alignment". This sets the "look ahead" to a percentage of the refresh
period, instead of always 1 ms -- see
http://www.pstnet.com/support/kb.asp?TopicID=3027 for some details. I
suppose that means that now under some circumstances we might get even
larger negative OnsetDelay values, but I have not tested or seen this
myself yet.

I hope that helps.

---------------
David McFarlane
E-Prime training online:
http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter: @EPrimeMaster (https://twitter.com/EPrimeMaster)

David McFarlane

unread,
Jul 19, 2016, 4:27:52 PM7/19/16
to e-p...@googlegroups.com
Jen,

Now to address your second issue about setting up an output signal
("trigger") to occur at a specific time during the sound stimulus.

What you have done seems quite adequate. I suppose you could also use
the OnsetSignal mechanism to output the signal at the start of the
crosshair -- see OnsetSignalPort and related topics in the E-Basic Help
facility.

But if you have a recent version of E-Prime Professional (2.0.10 or
later), then you may do this using the much superior Task Events
feature. Using this facility, you may set a signal to occur at some
given delay from the onset of your sound stimulus (and even follow that
with a signal offset to occur at a later delay). See
http://www.pstnet.com/support/kb.asp?TopicID=4803 , and the appropriate
chapter in the New Features Guide.

-- David McFarlane


On 2015-09-22 11:42 AM, Jenna Luque wrote:
Reply all
Reply to author
Forward
0 new messages