[PD] Clipping Detector

Mathieu Bouchard matju at sympatico.ca
Mon Feb 3 18:35:57 CET 2003


On Mon, 3 Feb 2003, matthew jones wrote:
> > There's [>~] (in Zexy, I guess)
> does this not output an audio signal type?  I need it to output a (data
> type) 1 or bang when the input signal==1, else not send anything at all...
> sorry, I know this is childsplay really, I just haven't learnt how to do
> externals yet.

I don't know signal objects very much, but if you can raise your signal to
a large enough even power, then all values very close to +1 or -1 will be
mapped very very close to +1, and all others will be mapped very close to
0.

e.g. if you do x**300, then:

x = +1.000 and -1.000 stay   1.000
x = +0.995 and -0.995 become 0.222
x = +0.990 and -0.990 become 0.049
x = +0.980 and -0.980 become 0.0023

then if you detect the volume of the resulting signal (root-mean-square
for example), it should be proportional to the percentage of clipping.

________________________________________________________________
Mathieu Bouchard                       http://artengine.ca/matju





More information about the Pd-list mailing list