DMDX Tutorial Revised
DMDX Tutorial Revised
Installing, setting up, and testing DMDX visit http://www.u.arizona.edu/~kforster/dmdx/dmdx.htm click on Downloads Download files DMDX.ZIP and DEMO.ZIP download and install DMDX from DMDX.ZIP download DMDX utils from dmdxutils.zip o from these utils you will want to copy over Analyze (and maybe also Concatenate and UnloadAZK) setting up and testing DMDX check your computers display settings o Right click on screen Personalize Display Settings; note display settings (e.g., 32 bit colors, 1280 by 800 pixels) o go to Advanced Settings Monitor; note screen refresh rate (e.g., 60Hz) You can run DMDX at these settings, but this screen resolution/color palette is probably overkill; if you set the display settings on DMDX a bit lower, you will lessen the chance of a display error. testing your DMDX o open TimeDX (select Help About) o select a video mode File Select Video Mode; find a VM that looks good and that has the desired refresh rate (for this demo, 800X600 (60Hz) 16 bit) press Do Test; ESC to finish; check to make sure everything is super fast, click OK press Just Select It o select a time video mode File Time Video Mode; a Refresh Rate screen will then come up, followed by a list of specs; check to make sure that the Refresh Interval makes sense given your screen refresh rate (e.g., if 60Hz refresh rate, then you should have ~16.666666ms refresh interval) press Save Last Used values in Registry; Done o testing DMDX Basic Test Millisecond Timer Test; press Start; let it work for a while (maybe for 100,000 callbacks); press Stop to finish * gives an indication of timing accuracy -- most callback latencies should be around 1ms (i.e. .9->1.1 ms) with a standard deviation of no more than .3 ms
Running an experiment open DMDX o Browse for the experiment file (in this case LPGdemo.rtf) o make sure Ignore unknown RTF is checked o run a Syntax Check (no error messages should display) o enter a Subject ID o press Run o Enjoy! (And be aware of how this demo and the tasks in it are structured.) [Now lets take a look at the azk file for this session.]
Comment [J1]: <fd N> sets the default frame duration; in this case at 30 refresh cycles, or 30x16.6666ms=500ms. Comment [J2]: <d 0> specifies the exact time in refresh cycles between a request and first frame of the next item; in this case, there will be no intervening refresh cycles. Comment [J3]: If <cr> is used, DMDX will proceed immediately to the next request without delay. Comment [J4]: These video mode specs (<vm 800,600,16,60>) should match with one that you selected in TimeDX. Comment [J5]: <fbp 0> will make it so that there are no decimal places on your RT feedback. Comment [J6]: No data is collected for zero items. The default spacebar is used to advance here. Comment [J7]: Put quotes around any text you want to present. Comment [J8]: Use commas to separate out different sections of text. Comment [J9]: The default is to display text in the middle of the screen. <ln 1> will put the next bit of text one line down from the middle. Comment [J10]: End each line of code with a semi-colon. Comment [J11]: The minus sign specifies the default left shift key as the correct answer for item #1000. Comment [J12]: 1000 is the item # here. Comment [J13]: The ######### frame will be presented for the default frame duration of 500ms. Comment [J14]: / delimits frames within a trial. Comment [J15]: The tanastre frame will be presented for 3 refresh cycles (indicated by %3), or 50ms; this is the prime. Comment [J16]: The TANESTRE frame will again be presented for the default frame duration of 500ms; the * indicates that response time and accuracy will be recorded for this frame; this is the target. Comment [J17]: The plus sign specifies the default right shift key as the correct answer for item# 2000.
Unpacking an rtf *When in doubt, use DMDX Help: open DMDX click on Help, use keyword search * ----Copy this script into a new .rtf file in WordPad and see if it works.
<fd 30> <d 0> <cr> <vm 800,600,16,60> <fbp 0> 0 "Press the SPACEBAR to begin the demo items.", <ln 1> "(This might be a good time to talk about default input keys.)"; 0 "The first demo is a lexical decision task.", <ln 1> "The task is to decide whether the UPPER CASE", <ln 2> "letters make a word or not."; 0 "Press the RIGHT SHIFT key ", <ln 1> "if the letters make a word."; 0 "Press the LEFT SHIFT key ", <ln 1> "if the letters do NOT make a word."; 0 "Try to respond as quickly as possible,", <ln 1> "but not so quickly that you make errors."; 0 "Press the SPACEBAR to begin the demo."; -1000 +2000 -3000 +4000 "#########" "#########" "#########" "#########" / / / / %3 %3 %3 %3 "tanastre" / * "TANESTRE" /; "inbection" / * "INFECTION" /; "itflomed" / * "UMBROLTA" /; "clooping" / * "AUDITION" /;
0 "Now let's try a grammaticality judgment task."; 0 "Read each sentence and decide whether it is 'good' or 'bad'.";
0 "Press the RIGHT SHIFT key ", <ln 1> "if it is a good sentence."; 0 "Press the LEFT SHIFT key ", <ln 1> "if it is a bad sentence."; 0 "Try to respond as quickly as possible,", <ln 1> "but not so quickly that you make errors."; 0 "Press the SPACEBAR to begin the demo."; -5000 +6000 +7000 -8000 "+" "+" "+" "+" / / / / %210 %210 %210 %210 * * * * "Who "Who "Who "Who did did did did John believe the claim that Bill met?" /; Mary think kissed Fred?" /; Bob tell the story about cheese to?" /; Edward say that kicked Andy?" /;
Comment [J18]: Fixation mark for the default frame duration of 500ms. Comment [J19]: Sentence presented for 210x16.6666666=3500ms.
0 "The next demo experiment looks into sentence comprehension."; 0 "Two words will be shown side by side,", <ln 1> "and the task is to choose which one best continues the sentence."; 0 "Press the LEFT SHIFT key to select the word on the left.", <ln 1> "Press the RIGHT SHIFT key to select the word on the right."; 0 "Select the best word as quickly as you can,", <ln 1> "but without making too many errors."; 0 "Press the SPACEBAR to begin the demo."; =9000 %60"READY"/ *"The x-x-x" c <nfb 1>; -9001 *"woman disturb"<biw 9251> c; -9002 *"could me"<biw 9251> c; +9003 *"among not"<biw 9251> c; +9004 *"organization find"<biw 9251> c; +9005 *"behind. Bill."<biw 9251> c; 9000 %60"CORRECT"/<branch 9250> ; 9251 %60 "< < error > >"/@2 %60"Please proceed to the next item."/; 9250 c; =10000 %60"READY"/ *"Mary x-x-x" c; -10001 *"called move"<biw 10251> c; +10002 *"ones the"<biw 10251> c; -10003 *"applicant turned"<biw 10251> c; +10004 *"cancer she"<biw 10251> c; -10005 *"will two"<biw 10251> c; -10006 *"interview winter"<biw 10251> c; -10007 *"yesterday. of."<biw 10251> c; 10000 %60"CORRECT"/<branch 10250> ; 10251 %60 "< < error > >"/@2 %60"Please proceed to the next item."/; 10250 c; =11000 +11001 +11002 +11003 %60"READY"/ *"The x-x-x" c; *"learn nephew"<biw 11251> c; *"been of"<biw 11251> c; *"understand the"<biw 11251> c;
Comment [J20]: Ready message for 1 second. Comment [J21]: This toggles off feedback; to toggle back on, use <nfb 0>. Comment [J22]: If the wrong selection is made, it will branch to 9251, the error message. <biw> means branch if wrong. Comment [J23]: No response is necessary/called for by non-zero items without a +/-. Comment [J24]: If the Correct feedback message is displayed, this will branch over the error message.
-11004 *"maid be"<biw 11251> c; -11005 *"cut map"<biw 11251> c; +11006 *"remembered. himself."<biw 11251> c; 11000 %60"CORRECT"/<branch 11250> ; 11251 %60 "< < error > >"/@2 %60"Please proceed to the next item."/; 11250 c; =12000 %60"READY"/ *"David x-x-x" c; +12001 *"wild caught"<biw 12251> c; -12002 *"the paced"<biw 12251> c; -12003 *"fish afford"<biw 12251> c; -12004 *"he did "<biw 12251> c; +12005 *"hike will"<biw 12251> c; -12006 *"cook is"<biw 12251> c; -12007 *"tomorrow. ask."<biw 12251> c; 12000 %60"CORRECT"/<branch 12250> ; 12251 %60 "< < error > >"/@2 %60"Please proceed to the next item."/; 12250 c; 0 "That's the end. Thank you.";
Comment [J25]: <vm desktop> will just take whatever video mode the computer is running. Comment [J26]: Specifies the keyboard as the input device. Comment [J27]: <vg N> is a variable grouping parameter. This will make it so that all items within the 1000-1999, 2000-2999, 3000-3999, etc. range are treated as a single item for scrambling/randomization. This is not important for the lexical decision items or the grammaticality judgment items, but it is crucial for the third set of items the maze task items. We want all of the items that make up each sentence to be treated as a unit when the items in the experiment are randomized. Comment [J28]: <s 4> will randomize the presentation order of each set of four items; it will also randomize the order of the items in each set. Comment [J29]: <umb> unmaps the default buttons (or the currently specified buttons). Comment [J30]: <mr +#57> maps the response for zero items to the spacebar; <mpr +#157> maps the + response to the right CTRL key; <mnr +#29> maps the response to the left CTRL key. Comment [J31]: Use dollar signs around anything that you dont want scrambled. Comment [J32]: Notice that frame durations cannot be specified as numbers of refresh cycles (e.g., %3) for the web version. You have to specify the millisecond values you want for each frame with <%ms N>. These values should be multiples of your refresh rate, i.e., multiples of 16.66666. Comment [J33]: <nfb 0> is toggling on feedback. I toggle this on and off (see below) for every item, because I dont know which item is going to occur when I only know that all of the items of each type will occur together (because I set the scrambling parameter at 4).
----Now try the web version on the LPG website. It will be largely the same as the experiment above, but you will get to see the web version in action and get a sense of how items are scrambled in DMDX. Note that even though this was written as an example of a WebDMDX script, it should work just fine as an rtf on regular old DMDX. Copy it into a new rtf and see, if you would like.
<fd 30> <d 0> <cr> <vm desktop> <id #keyboard> <fbp 0> <vg 1000> <s 4> <umb> <mr +#57> <mpr +#157> <mnr +#29> $ 0 "We'll do the same items, but over the web and scrambled.", <ln 1> "This time, we'll use the left and right CTRL keys though,", <ln 2> "not the shift keys, for positive and negative responses."; <ln 3> "Press the SPACEBAR to begin.";$ -1000 +2000 -3000 +4000 "#########" "#########" "#########" "#########" / / / / <%ms <%ms <%ms <%ms 50> 50> 50> 50> "tanastre" / * "TANESTRE" / "inbection" / * "INFECTION" "itflomed" / * "UMBROLTA" / "clooping" / * "AUDITION" / <nfb 0>; / <nfb 0>; <nfb 0>; <nfb 0>;
$0 "Press the SPACEBAR to begin the next set.";$ -5000 "+" <nfb 0>; +6000 "+" +7000 "+" 0>; -8000 "+" / <%ms 3500> * "Who did John believe the claim that Bill met?" / / <%ms 3500> * "Who did Mary think kissed Fred?" / <nfb 0>; / <%ms 3500> * "Who did Bob tell the story about cheese to?" / <nfb / <%ms 3500> * "Who did Edward say that kicked Andy?" / <nfb 0>;
$0 "Press the SPACEBAR to begin the next set.";$ =9000 <%ms 1000>"READY"/ *"The x-x-x" c <nfb 1>; -9001 *"woman disturb"<biw 9251> c; -9002 *"could me"<biw 9251> c; +9003 *"among not"<biw 9251> c; +9004 *"organization find"<biw 9251> c; +9005 *"behind. Bill."<biw 9251> c; 9000 <%ms 1000>"CORRECT"/<branch 9250> ; 9251 <%ms 1000> "< < error > >"/@2 <%ms 1000>"Please proceed to the next item."/; 9250 c; =10000 <%ms 1000>"READY"/ *"Mary x-x-x" c <nfb 1>; -10001 *"called move"<biw 10251> c; +10002 *"ones the"<biw 10251> c; -10003 *"applicant turned"<biw 10251> c; +10004 *"cancer she"<biw 10251> c; -10005 *"will two"<biw 10251> c; -10006 *"interview winter"<biw 10251> c; -10007 *"yesterday. of."<biw 10251> c; 10000 <%ms 1000>"CORRECT"/<branch 10250> ; 10251 <%ms 1000> "< < error > >"/@2 <%ms 1000>"Please proceed to the next item."/; 10250 c; =11000 <%ms 1000>"READY"/ *"The x-x-x" c <nfb 1>; +11001 *"learn nephew"<biw 11251> c; +11002 *"been of"<biw 11251> c; +11003 *"understand the"<biw 11251> c; -11004 *"maid be"<biw 11251> c; -11005 *"cut map"<biw 11251> c; +11006 *"remembered. himself."<biw 11251> c; 11000 <%ms 1000>"CORRECT"/<branch 11250> ; 11251 <%ms 1000> "< < error > >"/@2 <%ms 1000>"Please proceed to the next item."/; 11250 c; =12000 <%ms 1000>"READY"/ *"David x-x-x" c <nfb 1>; +12001 *"wild caught"<biw 12251> c; -12002 *"the paced"<biw 12251> c; -12003 *"fish afford"<biw 12251> c; -12004 *"he did "<biw 12251> c; +12005 *"hike will"<biw 12251> c; -12006 *"cook is"<biw 12251> c; -12007 *"tomorrow. ask."<biw 12251> c; 12000 <%ms 1000>"CORRECT"/<branch 12250> ; 12251 <%ms 1000> "< < error > >"/@2 <%ms 1000>"Please proceed to the next item."/; 12250 c; $0 "That's the end. Thank you for participating.", @1 "Please press the spacebar to send off your results.; 0 e "Sending results in now..."L;$
Comment [J34]: Here I am toggling off feedback.