Response Time Measurement

The application rtm controls response time experiments. It may be used to measure simple reaction time as well as choice reaction time to various sorts of signals. Available signal types are:

Different types of warning signals are possible. One of them is a countdown like the one used by Green, and von Gierke (1983). Actually, rtm may be used to run an experiment that is almost an exact replication of the Green et al. (1983) or the Green and von Gierke (1984) experiment, including exponentially distributed foreperiods.

Program Features

What Happens in a Trial

Many reaction time experiments follow the same procedural sequence. The application rtm is designed such that it uses a basic sequential pattern that is very general and may be adapted to many special cases by setting certain parameters. The following list contains a description of everything that happens within a single trial as it is run by rtm.

The above description is rather vague on the type of attention and response signals, the response key patterns and the feedback type. These functions are parametric and depend on the special configuration. The above scheme, however, is the same for any experiment run by rtm. The program may be adapted to special tasks by setting experimental parameters.

Preparation and Attention Signal

The preparation message prepmsg may be used to tell the subject that a new trial is starting. This either is automatic with a message duration of preptm ms or may be controlled by the subject, depending on how the flag A is set.

After the trial start there may be an attention signal. It starts attwait ms after the subject has released the start key or after intdsptime has passed if the procedure is automatic.

The attention signal type is given by attention. This may be a visual countdown of a pair of half disks moving in from the left and right edge of the screen until they meet at its center, or it may be a sequence of acoustic beeps. The number of attention signal steps is cdcount. On and off duration of each single step is defined by cdontime and cdofftime. For visual attention signals the size is cdsigradius, its final screen position is cdsigxpos and cdsigypos, and its luminance is cdlum. For acoustic signals the sound pitch is defined by cdfrequency and the volume by cdvolume. No attention signal is shown if cdcount is 0.

Random Foreperiod

The foreperiod starts when the attention signal is switched off and is finished when the signal starts. If the flag F is set then the foreperiod is a fixed interval of expectedwait ms. A random foreperiod has an initial fixed wait of minwait ms and a following approximately exponentially distributed random period with an expected duration of expectedwait ms. However, the total foreperiod is limited to maxwait ms. The actual duration of the foreperiod is stored in forewait for later use.

Signal Types

There are many different signal types available. The optic screen signals are synchronized with the vertical screen refresh. Acoustic signals are generated on the current audio device which my either be the built in speaker or an Adlib compatible sound board, depending on the state of the general parameter sounddevice.

The SIMPLEVISUAL signal type is a circular patch of radius sigradius on the screen with its color defined by sigcolx, sigcoly, and siglum. The DOUBLEVISUAL type contains 2 optic signals. The first one is like SIMPLEVISUAL and the second one is a ring around the first signal whose radius is sig2radius and whose color is defined by sig2colx, sig2coly, and sig2lum. The 2nd component's duration is sig2duration and its stimulus onset asynchrony is soa. LEFTVISUAL and RIGHTVISUAL are variants of SIMPLEVISUAL showing arrows pointing to the respective direction. Note, however, that the right arrow color is defined by sig2colx, sig2coly, and sig2lum. The types ONESTRING and TWOSTRINGS are string signals defined by sigtext and sig2text. The presentation method is like the one of SIMPLEVISUAL and DOUBLEVISUAL repsectively. Single string signals my be rotated by setting sigrotation to the required angle of rotation. They also may be displayed as mirror images by setting sigmirror to 1. Character size is given by textsize. and the character font is given by textfont. Note that the rotation and mirror transformations are not possible with textfont set to scrn.

The SIMPLEAUDIO signal type is a simple acoustic beep with its frequency defined by sigfrequency and its volume by sigvolume. Note that the volume parameter is only valid for Adlib devices.

The BIMODAL type combines SIMPLEAUDIO and SIMPLEVISUAL to get both a visual signal and an acoustic signal with stimulus onset asynchrony defined by soa which my be negative. BIMODSTRING also is a bimodal signal. However, here the optic signal is a string defined by sigtext.

Timing Parameters

Many variables of rtm are involved in controlling timing of the procedural sequence in a single trial. Table rtmtm lists all variables that control timing together with what happens during the respective interval of time.

Insert Table rtmtm here.

Response, Evaluation and Feedback

The rtm program does not allow keyboard responses, only the mouse or other response switches may be used for response input. The timing of the keyboard simply is such that no valid response time measurement is possible with keyboard response keys. Mouse response times also are rather uncertain, however, the mouse is acceptable if it is not moved or the mouse ball is removed such that no mouse movement signals are generated. The parameter switch controlls which key actually may be used for response and whether the response is a button push or a button release.

If there is a Soundblaster compatible board installed then rtm also supports voice key responses. These may be given via a microphone connected to the Soundblaster's microphone input port. The voice key works like a single response button. Its threshold value is defined by voicekeythreshold which is some value between 0 and 255. If the voice key is used then the procedural control responses are expected from the keyboard.

The response evaluation is controlled by evaluation. The RTIMEFEEDBACK evaluation shows feedbackmsg after each successive trial. Invalid trials result in either earlymsg or timeoumsg being shown instead of feedback. The message is visible for feedbacktime ms.

The CHECKDSP evaluation type compares the subject's response, which is stored in response with the current value of dspstate. If these are identical then corrmsg is shown for feedback and eval is set to 0. If dspstate and response are not equal then falsemsg ist shown for feedback and eval is set to 1.

Invalid trials are those where the "response" is given before the signal starts and those where the response is not given within timeout ms after signal onset, provided nogo is not set. If the parameter minrtime is nonzero then trials with rtime less than minrtime also are invalid.

Invalid trials result in an eval value of more that 1 and in a 0 response time in rtime in case of early and timeout responses. These trials are repeated later if the flag V is set. Also note that the feedback messages may contain parameter names enclosed between percent signs. These are then replaced by the current parameter values.

The parameter nogo is used to define no-go trials where there is a signal but there should not be a response. The feedback message for correct behavior in no-go trials is nogomsg.


The screen background colors are defined by bgcolx, bgcoly, and bglum. All message are white and their luminance is msglum. The color of the first signal is defined by sigcolx, sigcoly, and sigcoly the color of the second signal by sig2colx, sig2coly, and sig2coly.

Insert Figure rtmkeys here.

Stroop Response Keys

The parameter stroopkeys modifies the ONESTRING signal type. If it is nonzero then there is a display of color patches or color names (depending on the state of flag C) at the bottom of the screen as shown in Figure rtmkeys. The colors are defined by stroopkeycolors and the labels are defined by stroopkeylabels. Patch size is cdsigradius and patch array center position is cdsigxpos, cdsigypos. The color patch/label sequence is randomized for each trial and the response key numbers are set accordingly. This can be used to create a red, green, blue, and yellow response key array whose sequence is set anew for each trial. Note that this mechanism requires a switch response panel if more than the number of available mouse buttons are to be used. A non-zero value of stroopkeys activates the display. The value of stroopkeys gives the number of color patches/names to be used. If there are less patches/labels than possible then it is made sure that the correct response key is included in the array and that its position is randomized. The correct response key is identified by the current value of dspstate. The actual sequence of the color patches/labels is stored in the string parameter stroopkeysequence.

Program Parameters

attention (int)
Type of attention signal. These are available:

A visual countdown signal. The count down consists of two half disks, one left half and one right half that move in from the screen's border to its center in cdcount steps. Both halfes meet at the screen's center and form a circular disk there. The disk's radius is cdsigradius. The signal's color is identical to the background color defined by bgcolx and bgcoly. Its luminance is defined by cdlum. The variable cdontime gives the duration of a single ON period. The whole count down duration is given by cdcount * cdontime. The number of counts must not exceed 8.

An acoustic count down of a series of cdcount single beeps of frequency cdfrequency and volume cdvolume. Beep duration is cdontime, pause between beeps is cdofftime.

In this case the attention signal is the string sig2text at position sig2xpos, sig2ypos. If cdcount is non-negative then there also is an arrow rotated by cdcount 1/10 degree at position sigxpos, sigypos.

attwait (int)
The time between the trial start signal detection (either automatic or subject initiated, depending on the state of flag A) and the start of the attention signal.

bgcolx , bgcoly , bglum (float)
These are the CIE xy-coordinates and luminance of the screen background color.

cdcount (int)
Number of periods for a count down warning signal. No count down is shown if cdcount is 0.

cdfrequency (float)
The frequency of an acoustic attention signal given as a floating point number in Hertz.

cdofftime , cdontime (int)
Count down signal off and on period duration.

cdlum (float)
Optical count down attention signal luminance.

cdsigradius (int)
Radius of the count down signal dot.

cdsigxpos , cdsigypos (int)
Horizontal and vertical position of the attention signal.

cdvolume (float)
The volume of an acoustic attention signal (currently not used).

textfont (string)
Name of font which is used for writing the string signals.

textsize (int)
Size of characters for string signals.

earlymsg (string)
Warning message for anticipatory responses before the signal starts.

eval (int)
Result of the response evaluation. See evaluation how it works. The value 0 indicates a correct reponse, while nonzero values generally indicate false or illegal responses.

evaluation (int)
Type of response evaluation and feedback to provide for the subject. Currently available are:

This function simply shows the string defined by feedbackmsg on any valid trial. The string may contain parameter names enclosed in percent signes like "%rtime%" which are replaced by the current parameter values, In case of an anticipation the string earlymsg is displayed, and in case of a miss, the string timeoutmsg is used. The message is visible for feedbacktime ms.

This is similar to the RTIMEFEEDBACK case. However, instead of a feedbackmsg there are two messages available here, one for correct and one for false responses (corrmsg, falsemsg). The corrmsg is used if the response pattern response is identical to the current value of dspstate, otherwise falsemsg is used. Thus dspstate may be used to define the correct response for each display. If response is not equal to dspstate then the parameter eval is set to 1 otherwise it is 0.

expectedwait (int)
Expected value of the foreperiod waiting time. For random waiting times this is automatically equal to the square root of the waiting time variance. Note that the waiting time is only approximately exponential, since a real exponential distribution would allow infinite waiting times. The longest wait for our experiment is limited to maxwait. The random waiting time generator draws samples until the time drawn ist less than maxwait. If minwait is nonzero, then its value is added to the random time output of the random number generator. If the flag F is set, then expectedwait gives the fixed time between the warning signal and the response signal onset in milliseconds.

feedbackmsg (string)
This is the string that makes up the feedback message in case evaluation is set to RTIMEFEEDBACK. See evaluation for a description how it works.

flags (string)
The application rtm uses the following flags:

If A is set, then trials are started automatically after each feedback period. The default is to wait until the subject starts the trial by pressing a response switch.

If this flag is set then the response key indicators activated by stroopkeys for ONESTRING signal types are color patches with colors defined by stroopkeycolors. If C is not set then the labels in stroopkeylabels are used.

The flag F controls whether a random waiting time is used or there is a fixed time between attention signal and response signal onset. If F is set, then there is a fixed foreperiod.

Repeat all invalid trials if this flag is set. Trials are repeated by inserting them into the remaining list of trials of the current block at a random position.

forewait (int)
Actual foreperiod waiting time. This value is computed from the actual warning signal offset to actual response signal onset. There may be up to 20 msec difference between the theoretical random wait and the actual wait given in forewait, because of the time required for synchronization between the video display system and other timing events.

frametime (float)
The time between two successive retrace signals of the video system. This variable is only for output purpose. rtm contains a function that measures the video frame duration in order to compute valid stimulus onset asynchronies. The value measured is returned to the user by setting frametime.

ifc (int)
For coding the type of interference in the data file trials. The program does not use ifc, but one may use it as a trial parameter to make data analysis easier.

maxwait , minwait (int)
maxwait is the maximum foreperiod waiting time and minwait is the minimum waiting time. The waiting time distribution is random if the flag F is not set which is the default. The random number generator draws an approximately exponentially distributed number w which has expectancy and variance expectedwait. Numbers are drawn until a value is found that is smaller than maxwait. The final value for the waiting time is w + minwait.

nogo (int)
Should be set nonzero to create a nogo-trial. In this case the subject is expected to not respond and thus creating a time out situation. If nogo is set then this is accepted to be a correct "response" and nogomsg is used as a feedback message.

nogomsg (string)
Feedback message for correct behavior in nogo trials.

prepmsg (string)
Message to tell the subject that a new trial may be started.

preptm (int)
If a trial is not initiated by the subject, but is automatically started as may be requested by setting the flag A, then the preparation message prepmsg is visible for preptm ms.

rasterdelay (float)
The time between the start of a vertical retrace period and actual stimulus onset on the screen. The time only depends on a signal's position on the screen. The default for rtm is to set rasterdelay to the delay between start of retrace and a line at the center of the screen. On an IBM VGA in 350-line mode this is about 6 milliseconds. The value of rasterdelay is used for computing correct stimulus onset asynchronies between visual and acoustic signals.

response (int)
This is the response pattern that we get from the response keys. In case there are multiple response keys available, response may be used to control the feedback message. The response pattern is also used to identify anticipations and misses and is evaluated by the response evaluation procedure. response is the actual response pattern while eval is the result of the response pattern avaluation.

rtime (int)
Response time. This is the actual time between signal onset and response. If optic signals are used, then they always are switched on at the start of vertical retrace periods. Thus response times always are measured from the start of the video frame if the optic signal is the main response signal. Acoustic signals are not bound to synchronization and thus may start at arbitrary points in time.

sigcolx , sigcoly , siglum , sig2colx , sig2coly , sig2lum (float)
These are the CIE xy-coordinates and luminance values of the signal colors. sigcolx and sigcoly are for the first and standard optic response signal. If there are two optic response signals, the sig2colx and sig2coly describe the second signal's color.

sigfrequency (float)
The frequency of an acoustic response signal in Hertz. Note that this is a float variable.

sigmirror (int)
Indicates that a single text string signal should be shown as its mirror image. This requires textfont to be a vector font.

signal (int)
Type of response signal. The signal duration is defined by dsptime. The following signal types are available:

A circular patch of radius sigradius on the screen with its color defined by sigcolx, sigcoly, and siglum.

A simple audible beep with its frequency defined by sigfrequency and its volume by sigvolume.

This combines SIMPLEAUDIO and SIMPLEVISUAL to get a visual signal that is accompanied by an audible signal. The stimulus onset asynchrony between both signals is given by the variable soa. Signal parameters are taken from the simple signal specifications. soa is the time by which the acoustic signal lags behind the optic. Negative values of soa mean that the acoustic signal comes first and the optic signal second.

This is a signal that may be used to analyze metacontrast effects on reaction times. The main signal is a circular patch of radius sigradius on the screen with its color defined by sigcolx, sigcoly, and siglum. The masking signal is a ring around the first signal whose radius is sig2radius and whose color is defined by sig2colx, sig2coly, and sig2lum. The masking signal's duration is sig2duration and its stimulus onset asynchrony is soa. Note that video synchronization makes it necessary to only use approximate multiples of frametime for visual signals and stimulus onset asynchronies in the double visual signal task.

This is a single visual signal like the one of SIMPLEVISUAL but made up of the text string sigtext.

This is a double visual signal where both signals are verbal material. The first signal is sigtext and the second signal is sig2text. Both are presented as if they were double visual signals of the case DOUBLEVISUAL, thus all parameters of these apply.

This is a visual signal whose only difference from SIMPLEVISUAL is that it forms a left pointing filled arrow. The arrow color is defined by sigcolx, sigcoly, siglum.

Similar to LEFTVISUAL. The right arrow color is defined by sig2colx, sig2coly, sig2lum.

This is a bimodal signal of the string in sigtext and a simple audio signal.

sigradius , sig2radius (int)
Optic response signal patch radius. The optical signal is a circular patch at the screen's center. sigradius is the signal patch's radius in 1/10 mm. The second optical signal also is a circular patch, it is put on the screen before the first optical signal, thus if they are at the same position, it appears to be a ring around the first signal.

sigrotation (int)
If nonzero the single text string signals are rotated by sigrotation 1/10 degrees counterclockwise. This requires textfont to be a vector font.

sigtext , sig2text (string)
The strings that make up the first and second signal in case the signal type is a single or double string.

sigtime , sig2time (int)
The response signals' duration. If any of the signal duration variables is 0, then the respective signal is response terminated.

sigvolume (float)
The volume of an acoustic response signal, given as a floating point number. Requires a sound board to be present.

sigxpos , sigypos , sig2xpos , sig2ypos (int)
Horizontal and vertical center position for optic signals.

soa (int)
Stimulus onset asynchrony between the two components of two component signals.

stroopkeycolors (int)
The color patches which are shown with non-zero stroopkeys values get their colors from the stdcolors array of color coordinates. The parameter stroopkeycolors contains the indices of the colors in stdcolors which are to be used for the color patches. Simply redefine stdcolors for getting any arbitrary color assignement for the color key patches. Note that the number of entries in stroopkeycolors must be exactly 4.

stroopkeylabels (string)
This array of strings contains the labels of the response key positions which are shown if stroopkeys is nonzero. Note that the number of entries in stroopkeylabels must be exactly 4.

stroopkeys (int)
This parameter modifies the ONESTRING signal type. If it is nonzero then there is a display of color patches or color names (depending on the state of flag C) shown at the bottom of the screen. The value of stroopkeys gives the number of color patches/names to be used.

stroopkeysequence (string)
If this parameter is defined to be a trial argument then the actual sequence of Stroop response key patches/colors is stored in this string as a sequence of response event numbers.

switch (int)
Defines the type of response that is expected. We assume that there is a panel of response switches available. If there is only a single response switch, use it as if it were the left one of a double switch. Double switch panels are handled as if they were the inner two of a quadruple switch panel. Left and right positions refer to double switch panels. The following values of switch are possible:

The response is a release of the left button.

Release the right button.

Release any one of the buttons.

The response is by pressing the left button.

Press the right button.

Press any one of the buttons available.

Voice key response to signal. Control inputs are expected from the keyboard.

timeout (int)
Time out limit. If the subject does not respond within timeout milliseconds, then the trial is stopped and a warning is printed on the screen.

timeoutmsg (string)
Warning message if the subject has not responded within timeout milliseconds after signal onset.

Example Experiments

Simple Visual or Acoustic Signals

The simple experiments selected by SIMPLEVISUAL or SIMPLEAUDIO use visual or acoustic signals. Signal intensity, size, and duration may be controlled by experimental variables.

Here is a an example parameter file. It runs a simple reaction time experiment where there are different signal luminance values. Each display contains information about the signal luminance, the actual foreperiod duration, the response time and the response pattern. Each signal luminance is presented 20 times and the luminance values used are values between 10 and 50 cd/qm in steps of 10 cd/qm. The attention signal is a single acoustic beep. There is only one block.

Parameter file erzv.x from directory \pxl\app\rtm

Two Choice Reaction Times and Donders C Response

Use LEFTVISUAL and RIGHTVISUAL to create a two coice reaction time experiment. A Donders C type experiment may be created by a proper combination of left/right signals and the appropriate response mechanism selected by switch.

Parameter file rz2.x from directory \pxl\app\rtm

Metacontrast and Response Time

The double visual signal created by DOUBLEVISUAL may be used to run an experiment similar to classical metacontrast experiments. The first signal is a small patch, the second signal is a ring around the first one. Stimulus onset asynchrony, signal colors and intensity may be controlled by experimental variables. The subject's task is to respond as soon as there is something visible. The signal parameters may be adjusted such that the subject is not aware of the existence of the first signal, but reports to respond to the second one. The response times, however, show that the subject actually responds to the first signal.

Parameter file meta.x from directory \pxl\app\rtm

Facilitation and Time Order Judgements

The signal type BIMODAL uses two signals, one optical and the other acoustical. The signals may have variable stimulus onset asynchronies and arbitrary intensities and duration. This type of signal is used in time order judgements, where the subject has to tell which of the two signals was first, depending on the actual delay. This type of double signal has also been used to test whether a redundant signal has any effect on the response time to some other signal.

Parameter file colonius.x from directory \pxl\app\rtm

Stroop Interference in Color Naming

The signal type TWOSTRINGS may be used to create an experiment that models the one described by Treisman and Fearnley (1969). These authors used paper cards with two possibly colored words printed on the cards. The subjects had to sort the cards according to different criteria. The standard Stroop interference task requires a colored word in the upper half of the card and a color name in the lower half. The subject has to decide whether the color of the first word is named by the second word. Our implementation presents one single card on the screen for each trial. The subject has two response switches. The first one has to be pressed if the top word's color is named by the bottom word. The second switch has to be used if the bottom word does not name the top word's color. We measure response time and report correct/incorrect responses. Response feedback may include a correct/incorrect message and the response time.

The following parameter file example defines a Stroop color name comparison task. It uses macro preprocessing and range expansion to combine all colors and words needed.

Parameter file stroop.x from directory \pxl\app\rtm

Polson's Mental Chronometry Tasks with Letter Comparisons

The TWOSTRINGS task may also be used to compare single letters and run choice experiments in the sense of Polson's mental chronometry.

Parameter file samediff.x from directory \pxl\app\rtm

Stroop Interference in Counting Numbers

Setting the signal type to ONESTRING may be used to create a numeric Stroop interference task. Here the cards contain a sequence of characters and the subject's task is to count the characters and respond with the correct number. sigtext contains the sequence of characters. The feedback function CHECKDSP can be used to create a corresponding feedback message.

Parameter file nstroop.x from directory \pxl\app\rtm

Back to table of contents

Author: Hans Irtel