[PD] measuring distance between speaker and microphon

Patco megalegoland at yahoo.fr
Wed Feb 14 14:32:15 CET 2007

Roman Haefeli a écrit :
> hi all
> i'd like to create a patch, that measures the distance between the
> speaker and the microphone. my first problem is, that i don't know which
> kind of signal would be suitable for that purpose. the simplest is to
> use a dirac impulse. but on the receiver-side it's hard to separate
> unwanted artefacts from the impulse itself. also it would be nice, if it
> would be possible to detect the signal reliably at different amplitudes,
> since the amplitude heavily changes when moving the mic closer to and
> farer from the speaker. i am looking for a method, that allows higher
> precision than the usual block-size (which introduces a grid of ~0.5m @
> 44100Hz, which is not very accurate). also should it be possible to
> detect the signal correctly, when there was reverberation added from a
> room. i know, there are ultrasonic-bases devices to measure a distance
> to a wall, but i don't have clue how they work, but it makes me hope,
> that something similar is possible with pd. any hints are much
> appreciated.
> roman 
> ___________________________________________________________ 
> Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
you could use the patch you've made last month for am-radio and use it 
to measure latency...

[message bang(
[t           b                  b]
|                                |
[modulator]               |
|                                |
[am-radio]                 |
|                                |
[dac~]                       |
[adc~ 1]                   |
|                               |
[demodulator]          |
|                              |
[route message]      |
|                             |
[timer                       ]

obviously the message is translated into voltage levels by a modulator 
and a demodulator.
In the equation, you will need to substract the latency of the soundcard.
hope you get what I mean, and find something in this way,


Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.

More information about the Pd-list mailing list