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

Re: Solutions for sending triggers in an AEP (EEG) experiment?

2008/9/6 Andreas Widmann <widmann@xxxxxxxxxxxxxx>:

> Sound is much more difficult with XP and MATLAB: The MATLAB builtin sound
> architecture is a nightmare with respect to timing. In our lab we use the
> DirectSound implementation provided by Cogent
> (http://www.vislab.ucl.ac.uk/cogent.php). We have best experience with with
> some older onboard AC'97 codecs providing (for sure not the best dynamic
> range and SNR but) excellent timing, with sub-millisecond jitter and latency
> in very low millisecond range.

That's very interesting, would you please elaborate a bit more on
that? What do you mean by "very low millisecond range"? Do you by-pass
the Windows kmixer, whose latency is 30 ms? I thought than only using
ASIO drivers or so-called "Kernel Streaming" which is available in
certain audio player application can by-pass the kmixer, and sound
produced with DirectSound has to have latency of ~30 ms.


As for "synchronizing" the parallel port with sound onset: I don't
know if it will help you, but in my (previous) setup (which was for
single unit recordings, actually), I used a feedback solution similar
to Daniel's: a square pulse combined with the audio stimulus into a
stereo file to be played together.  The pulse was then converted to
TTL with an optocoupler, and read into the same computer via the
printer port, which was also used to read TTL inputs from the spike
discriminator. I was able to poll the port frequently enough to have
>90% of poll-to-poll periods below 1 ms, and all (or close enough to
all) below 2 ms.  This was done with a custom-written software under
windows XP. So you could basically keep checking your printer port for
sound onset and upon detecting it immediately output your 8-bit
trigger via output lines of the printer port, if ~1ms accuracy is good
enough for you.


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, fax: +1 202 687-0617