[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: reaction time measures

Bob made several excellent points, I'd like to make a few comments.
Some of them will be based on my thoughts rather than experiences, so
critique is welcome. I decided to share the thoughts because I believe
that they may be useful for many list members. Even if other people
demonstrate that I am wrong, at least it will save some from going
wrong way.

On 09/06/07, Bob Masta <audio@xxxxxxxxxxx> wrote:

Auditory stimuli and their responses can have microsecond precision (the precision of the sound card timing clock) because they are buffered in hardware on the sound card. Windows latencies may cause a buffer to be transferred at an indeterminate time, but the timing of the samples is unaffected since the sound card keeps filling buffers according to its own clock.

I think that you could do the same with visual stimuli by attaching a sensor (photoresistor, photodiode) to an area somewhere near the border of your screen and displaying a marker in this area along with your stimulus. The signal from the sensor could go to your soundcard's input (via an appropriate circuit) for recording in one channel, and behavioral responses would be recorded on the other channel. This requires some external hardware, but I believe it could be small, especially if you use a USB port to power it.

  The easiest way to do this is to put (say) the stimulus
on the Left input and the response on the Right.  (The Left and Right channels
are sampled synchronously.)

The only problem which I can see is what to do if you need more independent response lines, like two buttons. One solution which I can think of would be to use a multichannel sound card. Though it will be seen by the system as a number of separate stereo soundcards, all stereo pairs should be synchronized. This would have to be checked however, and a way would have to found to avoid Windows losing the synchronization information.

Another solution one would be to double-wire buttons, so they produce
a timing pulse on soundcard's input (identical for both buttons) and
another pulse on a multiline  TTL input (like the parallel printer
port), used to distinguish which button was pressed. This may not work
if the subject presses two buttons in the same time.
On the other hand, using multiline TTL input will simplify programming
feedback from the program, if such is needed. It's easier, I believe,
to display "RIGHT" or "WRONG" based on which TTL line was signalled,
that to analyze the incoming soundcard input online.

Finally, if tens-of-microseconds accuracy is not needed, a solution
like I'm using may be the most convenient.  I take advantage of the
perfect channel synchronization in a soundcard by playing an auditory
stimulus to the left channel and a square pulse to the right channel,
combined into a stereo file.
The pulse is fed (via an optocoupler circuit) to a printer port's TTL
line. Other input, such as behavioral responses, is fed to other lines
of the printer port, and the port is scanned and timed with approx.
millisecond accuracy. The coupler-based auditory stimulus loop might
be replaced with the photodiode detector circuit, which I described
above for visual stimulus timing (assuming the photodiode solution
would work at all).

 (They may even proceed at slightly different sample rates,
if you choose a sample rate that is not the native rate for the card!)

With a typical sample rate of 48000 Hz,
you will get a timing resolution of 20.833 microseconds.

I just want to add that 48kHz is the native sampling rate for most lower-level cards, and it's better to avoid anything else.

I hope that these comments and ideas will be helpful for somebody.


Pawel Kusmierek PhD
Department of Physiology and Biophysics
Georgetown University Medical Center
The Research Building WP23
3970 Reservoir Road NW
Washington, DC 20007
phone: +1 202 687-8851 or 8028