DMDX Experiment Software
DMDX is a script interpreting system for screen control, stimulus presentation, and timing for cognitive experiments. It is free, but currently only runs on Windows machines. To make DMDX work properly, you need to have Microsoft’s DirectX gaming software already installed on your system.
You can read the DMDX paper if you’d like:
Forster, K. I., & Forster, J. C. (2003). DMDX: A windows display program with millisecond accuracy. Behavior Research Methods, Instruments, & Computers, 35, 116-124.
Downloading and Installing
1) Install Microsoft DirectX to your system
- Unzip it, and run Setup.exe to install
3) Run TimeDX. You will find this by clicking Run>Programs>DMDX>TimeDX. TimeDX does some tests on your system display and refresh characteristics, and stores these values for DMDX to use.
To start the program, run Run>Programs>DMDX>DMDX. DMDX interprets script files that you have stored in Rich Text Format (.rtf), which you can create with either Word or WordPad.
To test the system, download this sample script file, and this graphic. Load the script file (Priming.rtf) into DMDX and click “Run.” By default, the left shift key is a “yes” response, and the right shift key is a “no” response. You will go through two very simple trials of priming.
The first line of the script file looks complicated, but it just describes the default behavior of the system, and you can use this header for most experiments:
<ep> <cr> <fd 1> <d 59> <t 1500> <id keyboard> <dbc 210210210> <dfs 36> <dwc 0 ><vm 1024,768,768,16,60> <nfb><eop>
<ep> just means “extended parameters” …i.e. the parameters are more than one line. <eop> is the end of the parameters.
<cr> “continuous responding” …without this, the system will stop after each trial until the subject pushes a button for the next trial to commence.
<fd 1> this says “frame duration = 1” Each tick is about 17ms, so when we want something up for 34ms, we would ask for 2 frames here.
<d 59> delay from end of one item to the start of the next item, also measured in ticks.
<t 1500> Time out in milliseconds. This tells the system how long to wait for a response before moving onto the next item.
<id keyboard> input
device will be the keyboard (could be foot pedal, voice key, etc.)
<dbc 210210210> default background color…I think this number is a shade of black
<dfs 36> default font size = 36
<dwc 0> default writing color = white
<vm 1024,768,768,16,60> video mode (here I’m using a display monitor w/ 1024x768 resolution at 16bits of color and running at 60Hz)
<nfb> “no feeback” Without this, DMDX will automatically present accuracy and reaction time to the subject after each trial.
The Input File:
Each trial in your input file has a number assigned to it. If the correct response is yes/same/true, then the trial starts with a +
If the correct response is no/diff/false, then the trial starts with a –
0 is a special number that is used for resting periods. So the first trial in our script above is:
+1<ms% 500> " + "/ <ms% 300> “NURSE”/ <ms% 300> “####### “/* <ms% 500> “DOCTOR” /;
This is item number 1, and the response should be correct (assume the response is whether or not the second target is a word). First, a fixation cross (+) is presented for 500ms. Then the “/” signifies the beginning of a new frame, so the fixation cross is replace with the word NURSE for 300ms, and NURSE is then replace with a hash mask “#######” for 300ms, and then the target DOCTOR is presented. At the beginning of the DOCTOR frame, you’ll notice the asterisk (*). This is a signal to start the timer, and the timer is stopped when a key is pressed for the response.
You probably want to have longer stimulus files than just two items. This script is a piece of an experiment I ran years ago…your task is simply to respond as quickly as possible whether the two letters presented are the same or different (the manipulation is case-sensitive single unit and bigram frequency). You’ll notice that I have them organized into blocks of 20; after each block, the subject can rest. In the header, I now note how many items there are N416 and how many I would like scrambled <s 416>. The system will decide a random order to present my items, but will still break them into blocks of 20 random items (sampled without replacement, so there will be no duplication). Also notice that I didn’t declare a default font size, but just made the lowercase letters in a larger font than the uppercase ones in my rtf file. DMDX is pretty WYSIWYG….if you type the word into the input file in bold red, it will be presented to your subjects in bold red. You can even embed images right into your input file.
The Output File:
When the experiment is complete, you will have an “.azk” output file that has the prefix the same as the prefix from your input file (e.g., Priming.azk). This file contains your output for each subject. For each subject, the item number from your input file is given, and the reaction time. If there is a negative beside the RT, that means the response was incorrect (i.e., you listed the correct response as +, and the subject’s answer was -).
You can find some useful scripts for manipulating output files at Matt Davis’ site.
More Tutorials and Examples: