[PD] iemlib-filters and Pentium-NaNs
Olaf Matthes
olaf.matthes at gmx.de
Fri Jul 19 10:33:55 CEST 2002
Thomas Musil schrieb:
> hi list
>
> did anybody watch this phenomenon:
Yes, with the cverb~ external.... After turning off the input signal CPU usage jumped up to 80 %
or more (for one object!) after a second or so. This is due to the architecture of the CPU that
switches to (slow) floating point mode. To prevent this just do the following
if(((*(unsigned int*)&sample)&0x7f800000)==0) sample=0.0
whereever a signal gets smaller without realy getting zeroe (like in the reverb tail of cverb~,
freeverb~ and the like).
Olaf
PS: I think there is a document at htt://musicdsp.org describing more / other methods of
undenormalisation
>
>
> the CPU is a PII 800 MHz;
> I tried under w2k and linux;
> a patch with some sample-loops and LFOs consumes 50% cpu-power.
> adding some (10 .. 20) filters of iemlib (like hp1~) it eats up to 100 % (after 5 minutes).
> in my test-patches, one filter takes about 0.1 to 0.2 %.
> I figured out, if there is no signal in, the IIR-filters produce NaNs.
> I think, Miller wrote in his sources of "d_filter.c" a NAN-protection.
> but it did not work very well for me.
> I added to each filter a white-noise-signal multiplied by "*~ 1e-10" (-200 dB),
> now the filters are cpu-power-stable. (I generate only once, and then i sended it with s~ and
> r~)
>
> Thomas Musil
More information about the Pd-list
mailing list