[PD] [OT] gallery installation sound

Charles Henry czhenry at gmail.com
Tue Feb 13 18:19:57 CET 2007

> Usually acoustic measurements are done with impulses, AFAIK.  An ideal
> impulse actually has all frequencies in it, so it's useful for that kind of
> thing.  Plus it's easy to differentiate between the initial signal and the
> room effects just based on time.
> .hc

Impulses are okay, but there are better ways.  An impulse is difficult
to deal with because of signal to noise ratio.  A simple look at room
reverb as a convolution operator gives a good way to compute the
effects of room reverberation using any length of audio signals that
cover the audio frequency range (noise will do fine, frequency sweeps,
The principle of maximum length sequence spectrum analysis is that the
autocovariance function of a maximum length sequence is an impulse.

k(t) is the room reverberation signal
x(t) is the reference signal, (must cover the whole freq range)
m(t) is the received signal
n(t) is noise

key assumption: the correlation between x(t) and n(t) is zero, on average

given x*k (t) +n(t)=m(t)---->we want to find k(t)

the adjoint of a convolution operator  is cross-covariance, a function
of time.  Cross-covariance is the equivalent of convolution by a
time-reversed copy of a signal.  Lastly, convolution operators are

x*k (t) = m(t)-n(t)
This equation is handled in the least square error sense by applying
the adjoint to each side of the equation, and inverting the adj(X)*X
operator on the LHS.

xcov(x(t), x*k(t))= xcov(x(t),m(t))-xcov(x(t),n(t))
xcov(x(t), x(t))*k(t)= xcov(x(t),m(t))              /\-the noise
cancels out, on average
k(t)=xcov(x(t),x(t))^-1 xcov(x(t),m(t))

In the fourier domain, K(f)=(X(f)*conj(X(f)))^-1 (conj(X(f))M(f))

I've been working on a patch to make this work since I've been reading
this thread....but I'm having some trouble in Pd lately.  The
cross-covariance function requires fft and ifft.  Capturing the room
response has to occur on *large* block sizes (2x the length of the
room reverberation you want to recover)

The patch undoubtedly has errors (especially with the syncing of
signals).  I was unable to test it yet.
There are two externals, xcov~ and maxval~ (these are very very
standard in terms of comiling) and z~ from zexy and expr~
Anyway, it needs help, and I'm not getting it done fast enough...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reverb_meas.pd
Type: application/octet-stream
Size: 5768 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20070213/1c7f8711/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: maxval~.c
Type: text/x-csrc
Size: 1470 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20070213/1c7f8711/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xcov~.c
Type: text/x-csrc
Size: 5385 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20070213/1c7f8711/attachment-0001.c>

More information about the Pd-list mailing list