The first consideration
has to do with the duration of a frame.
When you specify a
frame duration
you are not actually specifying a frame duration, you are specifying the time at
which to schedule the next
frame for display. Sounds straight forward and tautological even, however if there
is no
next frame in an item DMDX simply displays that frame and moves on to the next item,
regardless of any frame duration specification. Assuming we want a 40 tick presentation
(a tick being the time from one vertical retrace of the monitor to the next) for three items the obvious solution to the above problem of a rigidly controlled
fixed length display sequence is not the following:
d10
f30
<cr>
0 "start";
1 "first";
2 "second";
3 "third";
0 "stopped" l;
The actual duration of the sequence
from "start"
to "stopped"
is 33 ticks, 10 ticks per item for the delay parameter and 1 tick to display the
word. Once the word is displayed DMDX moves on to the next item, the request time
(from which the delay is taken from) is the first time DMDX examines the display
queue finding no more elements needing processing (because of the continuous running),
so the f30 is meaningless in this example.
The solution then is to give DMDX another frame:
d10 f29 <cr>
0 "start";
1 "first"/!;
2 "second"/!;
3 "third"/!;
0 "stopped" l;
Here the duration is now our desired
120 ticks, 10 ticks per item for the delay, 29 ticks per item for the words and
1 tick per item for the frame that doesn't erase what's already on the screen.
Using <Delay period> it becomes the more intuitive solution (the f1 is in
there simply because you're required to provide it):
<Delay period 40> f1 <cr>
0 "start";
1 "first";
2 "second";
3 "third";
0 "stopped" l;
Note that we would get a display error on the
"first" frame if we didn't request the end of the
"start" instruction within 39 or so ticks however the
period code looks for frames that would be late
after an instruction and reschedules them.
The next hurdle people encounter is displaying bitmaps, here
the image can take a large portion of a second to load (or used to on hardware
prevalent when this note was written in the late nineties or early noughties,
these days it's less than a tenth of a second on most hardware and even less on
newer stuff) so determining a value for
the delay can be problematic. The solution is a simple extension of the first item
file but to deliberately have the delay determine almost the entire duration of
the display. Assuming we want a 3 second ISI and the refresh rate is 60Hz the following
is required for a 9 second sequence:
d179 f30 <cr>
0 "start";
1 g "first";
2 g "second";
3 g "third";
0 "stopped" l;
The
f30 is superfluous,
it isn't used but it's always a good idea to specify (later versions of
DMDX
require it). Here each image is loaded
as the previous is displayed allowing ample time to read the image files from disk.
The solution using <Delay period> would be the same
except that you'd have <Delay period 180> instead of
d179.
Should individual frame require presentation for longer (or shorter)
periods the delay can be overridden in individual frames, here we want second.bmp
to be displayed for 6 seconds for a total sequence length of 12 seconds:
d179 f30 <cr>
0 "start";
1 g "first";
2 g "second";
3 d359 g "third";
0 "stopped" l;
The above example will also
work with <Delay period>, but the
d option's value will be 360 instead of 359 -- note
you're not using <Delay period 360> in the
item, you're using
d360 or <Delay 360>.
So:
Gathering RTs is more complicated (without using
period).
You have to ensure that the display determines the duration of the item and you must
set the subject RT timeout
lower than the item display duration. While theoretically you could leave the feedback
enabled as it should
have a constant display interval I don't think it's ever been put to the acid test
and who knows what you'd have to do with the delay value (although of course
using period provided you allow for the
half second
or so of the feedback then having feedback is straight forward):
d10 f29 <cr>
t490 <nfb>
0 "start";
1 * "first"/!;
2 * "second"/!;
3 * "third"/!;
0 "stopped" l;
Here
f29 actually
does something. It will be gathering responses for a tad less than half a second
followed by 11 ticks of time to assemble the next item during which the display
will not have changed. As usual using <Delay period>
it's straight forward:
<Delay period 40>
f1 <cr>
t490
<nfb>
0 "start";
1 * "first";
2 * "second";
3 * "third";
0 "stopped" l;
Lastly, gathering RTs and
displaying bitmaps requires sectioning each item into two distinct portions, an
active part where an RT is gathered and a passive part that is loading the next
bitmap:
d59 f120 <cr> t1990 <nfb>
0 "start";
1 * g "first"/!;
2 * g "second"/!;
3 * g "third"/!;
0 "stopped" l;
Here we still have a three second
per item display, the first two seconds of which can have a response made and the
last second is buffering time to load the next bitmap while the display still shows
the previous bitmap. A non-event using <Delay period>
just bearing in mind that you don't want the timeout do be the full three
seconds, leaving it a bit short so there's time to load bitmaps and so on:
<delay period 180> f1 <cr> t2500 <nfb>
0 "start";
1 * g "first";
2 * g "second";
3 * g "third";
0 "stopped" l;
DMDX Index.