A Multichannel Tachistoscope

The program tach simulates a multichannel tachistoscope. It sequentially switches through all its channels and presents the image associated with a channel. Currently the only image types available are text strings. It is, however, planned to extend tach to allow for rather arbitray image types, especially those that may be stored in PCX image files. The program tach uses extended memory to store the images to be displayed. This requires that HIMEM.SYS is installed and that there is enough XMS memory available.

Program Features

The program tries to control the display timing as good as is possible in a video display. The timing restrictions resulting from a video system are described in more detail later. They mainly result from the vertical refresh rate of the video system which currently is between 60 and 100 Hz on most of the available systems. Thus tach's timing is more restrictive than the timing of a projection tachistoscope. However, tach has many features which usually are not available with projection tachistoscopes: Stimulus intensities may be varied in up to 256 luminance steps; the intensities of different stimulus elements (targets, distractors, surround, mask) may easily be varied independently and even automatically by using adaptive procedures; stimulus colors may be defined in CIE chromaticity and luminance coordinates; response time windows may be synchronized with stimulus presentation; the stimulus material may easily be changed by simply editing text files or PCX image files.

One major advantage of tach compared to a projection tachistoscope is that there is considerable more freedom in defining the background and stimulus configurations. There is nothing like a constant background projection field and each image may have its own background. Thus it is no problem to "project" black letters on a bright background and the bright background may easily be kept constant across channel switching.

Display Fields

The screen represents tach's projection plane. The display area itself is a central rectangular field defined by fieldwidth and fieldheight.

The screen background color and luminance are defined by screencolx, screencoly, and screenlum. The display field color is defined by fieldcolx, fieldcoly, and fieldlum. All stimuli are displayed within the display field rectangle. Most of the time the actual stimulus area is much smaller than the display field. Thus there are two more parameters which should be defined such that they cover that part of the display field which is used by the stimulus image. These are imagewidth and imageheight. For optimum display speed and efficiency the area coverd by these parameters should be as small as possible, however, it must contain each variable stimulus element of any image used in the experiment. The size of the image field is responsible for the smallest display time possible. Thus if there are timing problems then the size of the image rectangle should be reduced.

If a mask is used then the masking area is defined by maskwidth and maskheight. The mask should at least cover the target stimulus area. It is not necessary but recommended that the mask is fully contained in the image rectangle.

Text Displays

Many applications need to display a sequence of words. This can be done by assigning a single word to each channel and present them sequentially. The tach program may be given a list of words which are then parsed into single units and assigned to channels. The words are given in the string parameter text. Words are separated by one or more blanks. Each word is presented separately. If more than a single word should be presented in a single channel then the words have to be chained together by underline characters. These keep words and other symbols together but are replaced by blank characters before the strings are displayed.

There frequently is a constant initial text or a constant trailing text to be displayed. These may be defined by the string parameters prefix and postfix. If these are defined they are presented in the first and last channel respectively. No underline character replacement is necessary in prefix and postfix.

All the words in text are initially considered to be distractor elements. There are two different ways to indicate the target stimulus. If a single word in text has the @-character as its first character then it is considered to be the target stimulus. If the parameter targetchannel is defined then it gives the number of the channel which contains the target stimulus. Channel numbers start with 0 and prefix is contained in the first channel if it is defined. tach will issue a warning message if no target stimulus is defined.


If the flag M is set then a mask is shown after the target stimulus. The mask area is defined by maskwidth and maskheight. The mask should cover the target stimulus area and need not be contained in the image rectangle. The mask is made up from a random pattern of rectangular dots. The dots are maskcellwidth screen pixels wide and maskcellheight screen pixels high. In order to be most efficient the width and height of the mask cells should be chosen to match the text character line elements.

The mask random pattern is generated anew for each trial if the flag R is set, otherwise the pattern is constant throughout the whole session. The mask dots' color is defined by maskcolx, maskcoly, and masklum. The mask ist switched on maskdelay ms after the target stimulus is switched off and remains visible for masktime ms. Note that the mask does not have its own display channel but is shown within the target signal channel. Thus the channeltime of the target signal channel has to be long enough to contain targettime, maskdelay, and masktime. This way to implement the mask allows more complicated and larger mask areas by simultanously giving rather precise control over the maskdelay parameter which usually is one of the most important timing parameters in tachistoscopic displays.

Preparation for the Presentation

There are several ways to control the subject's attention and prepare her for the stimulus presentation.

There generally is a time interval of intdsptime ms between trials. The preparation message dspmsg may be inserted before the interval intdsptime and an acoustic attention signal followed by a short waiting period may be inserted after the intdsptime interval.

If the parameter dsptm is nonzero then the message dspmsg is presented before a trial starts. dsptm controls whether the presentation time of dspmsg is fixed or is limited by the subject pressing a response button.

Each trial starts with a waiting interval of intdsptime ms. After the intdsptime interval has passed there may be an attention signal of atttime ms duration with another wait of sigwait ms following the attention signal. The signal and the following wait are given if atttime is nonzero. The attention signal is acoustic if the flag A is set.

Stimulus presentation starts after the intdsptime interval or, if the attention signal is inserted, after the sigwait period. The end of a trial is marked by the subject's response or by the end of the feedback message if there is one.

The Display Sequence

Each of tach's channels contains a single image. One of the channels contains a "target" image while all other channels contain "distractor" images. The channels are shown sequentially. Every channel has a time interval of channeltime ms associated with it. The image of each channel is switched on at the beginning of its time intervall and it is displayed for disttime or targettime ms, depending on whether the channel is a distractor channel or the target channel. The only difference between the distractor and the target channels is that it is possible to insert a mask into the time interval of the target channel. The mask is switched on maskdelay ms after the target image has been removed during the target channel's time interval. The mask is shown for masktime ms.


The parameter channeltime defines the time slot for each channel. This is the time while each channel has access to the display. The channeltime is not equal to the display duration since the display duration may be controlled separately by the parameters targettime and disttime respectiveley. In addition to the target and distractor display time the maskdelay and masktime also are contained in channeltime since the target stimulus and its mask are contained in the same channel.

For cases where the channel time slots must not be equal for each channel one may define channeltime to be a range valued parameter. In this case it has to give the time for each channel explicitly. If channeltime is of type integer range it must not be used as a trial argument.The tach program has been written to give the highest precision in display timing which is posssible on a PC. In order to make sure that the timing actually works as intended there are many time checks built into the program. However, it only makes sense to check the display timing if the rest of the system is set up such that proper timing is possible. The following points should be observerd: \beginenumerate

  • Remove any networking software from the system.
  • Disable any mouse movements. The best thing is to completely disconnect the mouse from the system or not loading the mouse driver.
  • If any disk caching program like SMARTDRV is used then the write behind cache should be disabled. With SMARTDRV this can be done by giving the command
       smartdrv /x
    on the DOS command line. If the write behind cache is not disabled then there may be disk access delays while tach is trying to control display timing. \endenumerateThe over all best strategy is to use an absolutely simple and plain PC with nothing but a minimal MS-DOS system installed. The only device drivers that are necessary to run tach are a keyboard driver and HIMEM.SYS for XMS memory access.

    Video System Synchronization

    The video display related events of tach are synchronized with the vertical refresh cycle of the system. This affects channel switching, stimulus on- and offset and mask on- and offset. Due to the cyclic nature of the display all these events are fixed to time intervals which are integer multiples of the video frame duration. The video frame duration can be figured out by running tach and then checking the parameter frametime in the data file. It gives the duration of a single video frame in milliseconds. tach cannot create any time intervals related to display events which are less than frametime ms long. This does, however, not affect timing events which are unrelated to the video system.

    How to Check Timing

    The program tach may be compiled such that several time checking parameters are generated. These parameters are set during run time and may be inserted into the data file protocol. For a correct interpretation of the timing parameters one has to take into account how these parameters are set. Although they describe a single channel procedure they are set several times while a multiple channel display is run. Thus the parameters always reflect only the last channel of a multiple channel display.

    The following parameters are available: \begindescription

  • [ttputimage] The time needed to write the display image into screen memory.
  • [ttchannelon] The time interval between the point when the last display loop started and when the channel was switched on. If a display contains multiple cycles then this time corresponds to the time interval between the end of the previous stimulus/mask display and the beginning of the current display. It thus should be equal to channeltime minus the sum of targettime, maskdelay, and masktime whenever the previous display contained a mask and should be equal to channeltime minus targettime or channeltime minus disttime depending on whether the last display contained a target or a distractor item.
  • [tttargeton] The time between channel onset and stimulus item onset. This time should be near 0.
  • [tttargetoff] The time between channel onset and stimulus item offset. This interval should be equal to targettime or disttime whatever has been shown as the last item.
  • [ttloopdone] The time between channel onset and the end of the display loop. This time should be equal to the sum of targettime/disttime, maskdelay, and masktime.
  • [ttdrawing] The time needed to draw the display image onto the screen, including the mask.
  • [ttsaving] The time needed to save the display image from screen into memory. \enddescriptionThe timing parameters ttdrawing and ttsaving are the maxima of all images used in a single trial.

    Adaptive Stimulus Luminance

    The stimulus parameters may be adjusted by adaptive procedures. There is, however, a restriction due to the methode how adaptive procedures are implemented in PXL. The point is that a "yes" response never results in an increase of stimulus intensity and a "no" response never results in a decrease of stimulus intensity. This is correct as long as the probability of a "yes" response is monotone increasing with stimulus intensity. This is no longer the case if the screen background is bright and the stimulus is dark. In this case the psychometric function is monotone decreasing with stimulus intensity. The solution to this problem is to invert the meaning of PXL's "yes"- and "no"-keys. This can either be done by subject instruction or by exchanging the definitions of yeskey and nokey.

    Response Question and Time Mesaurement

    A question may be shown after the stimulus text has been displayed and the response interval starts. The question text is stored in question. It is shown until the response key is pressed. Its position is defined by questposx and questposy.

    The response time is stored in the parameter rtime. By default the response time refers to the time interval between target stimulus onset and response onset. If the flag L is set then the target/distractor distinction is ignored and the response time interval always begins with the stimulus onset of the last channel's stimulus onset. If the parameter question is used then response time is measured starting from the display of question.

    While the response time is always computed relative to the defined stimulus onset, the program will only then start to watch for a response when the display sequence is finished. This might lead to rather large measurement errors in cases where the stimulus duration is long and response times are short. For those cases the flag I should be set. If this is done then tach will also record response events during stimulus presentation. If the flag I is set then tach uses interrupt driven response event collection. This is always available for keyboard and mouse response events. It is also available for response switches which are connected to the printer port, but the switches must trigger the printer port's interrupt line according to the schema described in Chapter timing. Interrupt driven response events are not available for switches connected to the game port. The disadvantage of setting the flag I is that it might affect the precision of stimulus presentation timing. Thus it is recommended to avoid setting the flag if it is possible.

    The Subject Paced Reading Mode

    If the flag P is set then the display mode of tach changes to a subject paced reading task. This means that the whole text, including prefix and postfix, is written to the screen but remains invisible until each single word is sequentially requested by the subject pressing a response key. Each word has its natural position in the sentence. The first word is shown immediately after the trial starts which usually will be after dspmsg has been shown. Thus it might be a good idea to set prefix to something like ">" in order to tell the subject where the first word will appear on the screen. After the last word has been removed the usual trial response mechanisms may be used. In subject paced reading mode the actual visibility times for each single word are stored as range element values in the parameter channeltime. Note that the subject paced reading mode usually will require that a rather small textsize must be used. textsize = 1 selects the built in screen font. The target marker is ignored in subject paced reading mode.

    Sentences which do not fit into a single screen line may be separated into multiple lines of text. This has to be indicated in text explicitly by putting the character & in front of a word. This word will then become the first word of a new line. Line skip is set by the parameter lineskip. The code of the key which is used for pacing through the list of words is defined by pacekeycode. Key code number may be found out by using the demo program event. By default the pace key is the cursor down key for keyboard input and the center button for mouse input.

    Program Parameters

    atttime (int)
    Duration of attention signal.

    channeltime (int)
    Time interval for each channel.

    distcolx , distcoly , distlum (float)
    Distractor items color and luminance.

    disttime (int)
    Visibility time of distractor items.

    fieldcolx , fieldcoly , fieldlum (float)
    Display field color and luminance.

    fieldheight , fieldwidth (int)
    Display field height and width. If fieldwidth is 0 then no display field is used.

    flags (string)

    Give an acoustic attention signal.

    Clear the whole screen not only the display field if necessary.

    Use interrupt driven response collection while the stimulus display is still running.

    Always start the response time measurement interval from the last channel's start time instead of the target channel.

    Schow a mask after the target item.

    Run the program in subject paced reading mode.

    Renew the mask pattern after each trial.

    Simulate a slide projector by projecting the display field simultanously with the stimulus items. Thus the display field behaves like the surround field of a slide. If the flag is OFF then the display field stays on continously and is replaced by stimulus elements.

    If this flag is set than the display channel switching is not controlled by the program timing but by the subject. The subject has to step through the channels by successively pressing the response button. This simply extends each channeltime intervall until a response button is pressed.

    Do not expect any response event from the subject after stimulus display.

    Use an acoustic cue to request the response after the display is finished.

    frametime (float)
    Effective video frame duration as measured during run time.

    imageheight , imagewidth (int)
    Recording/display image rectangle height and width. This rectangle defines how much memory is needed to store the images.

    lineskip (int)
    Vertical line skip for multiple line text in subject paced reading mode.

    maskcolx , maskcoly , masklum (float)
    Mask color and luminance.

    maskdelay (int)
    Time between target stimulus offset and mask onset.

    masktime (int)
    Mask duration.

    maskheight , maskwidth (int)
    Mask rectangle height and width.

    maskcellheight , maskcellwidth (int)
    Height and width of the dot cells which make up the mask. Values give number of pixels.

    pacekeycode (int)
    Integer number which gives the key code of the key which is used for pacing in subject paced reading mode.

    postfix (string)
    Postfix display text. This item is added to the display list after text.

    prefix (string)
    Prefix display text. This item is added to the display list before text.

    question (string)
    Question text which may be shown while the program is waiting for a response. If this string is nonempty then the response time is measured from its visibility onset.

    questposx , questposy (int)
    Screen position of the question.

    screencolx , screencoly , screenlum (float)
    Display screen background color and luminance.

    sigwait (int)
    Time between attention signal offset and start of stimulus presentation.

    stimposx , stimposy (int)
    Stimulus position on the screen. The screen center is the coordinate system' origin.

    targetchannel (int)
    Channel containing a target stimulus. Channel numbers start with 0 and include the prefix and postfix channels.

    targetcolx , targetcoly , targetlum (float)
    Target stimulus color and luminance.

    targettime (int)
    Visibility time of target items.

    task (int)
    Task type.

    text (string)
    String of display items. Single items are separated by blanks. Underscore characters are replaced by blanks for display but may be used to keep multiple words together in a single channel.

    textrefpoint (int)
    Positioning reference point for text (should never be changed).

    ttputimage (float)
    Time needed to put the image on screen.

    ttchannelon (float)
    Time between start of display loop and channel switch.

    tttargeton (float)
    Time between channel switch and target/distractor pattern onset (should be less than 1 ms).

    tttargetoff (float)
    Time between channel switch and target/distractor offset. Should be equal to targettime or distractortime respectively.

    ttloopdone (float)
    Time between channel switch and end of display loop. Should either be equal to disttime or to the sum of targettime, maskdelay, and masktime.

    ttdrawing (float)
    Time needed to draw a stimulus image.

    ttsaving (float)
    Time needed to save stimulus image in memory.

    Example Experiments

    Here is a series of experiments on subliminal priming after Dagenbach, Carr and Wilhelmsen (1989).

    Parameter file dagen1.x from directory \pxl\app\tach

    Parameter file dagen2.x from directory \pxl\app\tach

    Parameter file dagen3.x from directory \pxl\app\tach

    Parameter file dagen4.x from directory \pxl\app\tach

    Back to table of contents

    Author: Hans Irtel