FreeVerb outputting denormals?

Running SC 3.13 on Apple Silicon, I’m experiencing the following behaviour: after sending a signal into FreeVerb, then waiting around 30 seconds, I get a stream of denormals until I send another signal into the Bus or free the synth.

b = Bus.audio(s,2);

SynthDef(\verb,{
	var sig = In.ar(\in.kr(),2);
	sig = FreeVerb.ar(sig,1,0.9,0.99);
	Out.ar(\out.kr(),sig)
}).add;

x = Synth(\verb,[\in, b]);

(
p = Pbind(
	\dur,0.1,
	\legato,Pseq([0.2],20),
	\out,b
).play
)

// now wait 30 seconds or so...

...
CheckBadValues: normal found in Synth 1044, ID 0 (previous 355 values were denormal)
CheckBadValues: denormal found in Synth 1044, ID 0 (previous 1 values were normal)
CheckBadValues: normal found in Synth 1044, ID 0 (previous 92 values were denormal)
CheckBadValues: denormal found in Synth 1044, ID 0 (previous 1 values were normal)
...

In this example Synth 1044 was a synth from the SafetyNet quark; after using CheckBadValues before and after FreeVerb it seems to be the source of the junk. I’m going to posit this is a bug and not a feature? :smirk: can anyone else reproduce this behaviour?

Have you tried adding a very small noise signal to the input of the reverb? Something like PinkNoise.ar(0.0000001) or the like? Reverbs get nervous with “pure silence”.

1 Like

Relatable…

That seemed to do the trick - weird that I’ve never experienced that before…encountered this behaviour with code that I’ve been running for several years now! But thanks for the fix! :slight_smile:

Can you explain this a bit more? Is it something to be aware when making our own reverb/delay effects? Is it something to do with feedback?

Thanks,
Paul

1 Like

Silent.ar should also do the trick…

Pure Silence isn’t the exact problem. It is Pure Silence AFTER something has already been fed into the system, and you start getting the tail levels of a reverb as they approach zero. Theoretically - a reverb should never reach zero ONCE a signal has been fed into it. So - silence after an input is where we get the denormals. Zero in to a reverb is fine as long as it stays zeroes. But then - that’s a worthless reverb :smiley:

  • Josh

I don’t think so… the point, to avoid denormals, is to add a very small non-zero signal. Silent.ar renders as DC.ar(0) – therefore sig + Silent.ar(1) will be equivalent to sig and the reverb result would be unchanged, denormals and all.

In any case… FreeVerb seems not to do anything about denormals.

At the server level, there’s sc_SetDenormalFlags() (“// Set denormal FTZ [‘flush-to-zero’] mode on CPUs that need/support it”). On my machine (Intel CPU), I don’t get denormals – so this is definitely working in some/many environments. Perhaps Apple Silicon needs different flags…?

hjh

Bumping this thread as I’ve noticed more Ugens spitting out denormals…This snippet spits out a bunch of denormals upon instantiation and then settles down after a second or so:

(
{
    SinOsc.ar(200).dup.cubed.cubed * 0.1;
}.play;
)

Removing the second .cubed method seems to fix it… which would suggest some more close-to-zero numbers being the issue, wouldn’t it? Perhaps someone with better knowledge of the server can help me out here?