[PD] Playing and recording simultaneously

Mathieu Bouchard matju at artengine.ca
Sun Jul 4 22:12:47 CEST 2010


On Sun, 4 Jul 2010, Henrique wrote:

> However, I have a question about how Pure Data works when I 
> simultaneously play a waveform and record the output using a microfone 
> (that is required for the estimate). Is the clock frequency of the D/A 
> converter which produces the output syncrhonized with the clock 
> frequency of the A/D converter wich produces the recorded signal? That 
> is a very important question when trying to measure an acoustic 
> response, and I couldn't find the answer at puredata.info website.

The total delay is the sum of the logical delay as written in the audio 
settings dialogue of Pd, plus the digital in-delay and out-delay of the 
soundcard and/or driver, plus any analogue delay introduced by the 
soundcard due to filtering, plus the microphone's delay, plus the 
speaker's delay, plus the room's delay (relative to position and 
orientation of both speaker and microphone).

In the end, any digital delay can be counted by easy addition, whereas the 
analogue delays are frequency-dependent and thus have to be counted as 
filters. So, to measure a room's response, you'd first just subtract 
the digital delay, but after that, for the analogue effects, you'd need 
to deconvolve instead (but I suppose that you already know that).

It may be tricky to know the digital delay beforehand... but if you put 
the microphone and speaker really next (in)to each other, then just look 
in your recording for the point when the response begins, then it might be 
quite close to a digital delay, IF your impulsion contains enough 
high-frequencies. But I don't know how close it is, as I haven't tried it.

The total digital delay is soundcard-dependent, driver-dependent, and 
OS-dependent, on top of being dependent on a setting in pd.

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801


More information about the Pd-list mailing list