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

Re: Simultaneous play record in Matlab on mac

This is not an answer to your question, but just a tip:  If 
you need to measure latency of any sort, note that in 
general you can't rely on any particular synchrony or known 
latency between the stimulus going to the sound card 
outputs, and the response from the card inputs.  

The way around this (for mono experiments anyway) is to 
monitor the output signal with one of the input channels, 
and use the other input channel for the response.  Inputs 
have perfect synchrony with each other, so you can measure 
the latency between the stimulus and response on their 
respective input channels.

If your stimulus has a very sharp rising edge that causes 
it to leak into the response chanel when wired this way, 
and you can't ameliorate it by re-routing and careful 
wiring, there is a sneaky work-around for this as well.  
Since both output channels have perfect synchrony with each 
other (just not with the input channels) you can generate a 
dummy stimulus on one output that is in exact synchrony 
with the real stimulus on the other, but which has a slower 
rise time.  As long as you can still find a reliable 
reference point anywhere on the dummy, you can deduce where 
the onset of the true stimulus is relative to this point, 
and correct the input-derived stimulus onset accordingly.

Best regards,

Bob Masta

On 25 Nov 2011 at 15:52, Stephanie Bertet wrote:

> Hi all,
> I am trying to do some impulse response measurements using Matlab on Mac.
> Is there a nice way to play and record simultaneously as it is done on Windows with Data acquisition toolbox or pa_wavplayrecord?
> Apparently it can be done with Psychtoolbox but does not work on 64 bits, and I am running out of ideas where to look.. Please, help!
> Thanks,
> Stephanie
> -----------------------
> Dr. Stéphanie Bertet
> Sonic Arts Research Centre
> Queen's University Belfast
> http://www.sarc.qub.ac.uk

Bob Masta
            D A Q A R T A
Data AcQuisition And Real-Time Analysis
Scope, Spectrum, Spectrogram, Signal Generator
    Science with your sound card!