From the original SynthMaker forum (2004–2014), with its members’ names and dates.
Tom7777 ·
Sometimes if i try and code DSP i can usually code basic things now but i often get denormals, is there any tips on making the code have none and also is there any good custom built modules that will always remove them. I know theres a few already such as the DC Block module but this does not always work.
rl ·
insert a little amount of noise in your audio path?
Shifrin ·
In the code component you can use the +/- technique to remove denormals, say you had :-
out = a*b + c*d + e*f;
You could add a line to make this :-
out = a*b + c*d + e*f;
out = out + 1e-18 - 1e-18;
Shif.
oddson ·
The part I think I get:
Elimination by quantification...
The number approching the denormal value is lost in the addition/subtraction and it goes to zero (a sort of rounding effect?).
Some questions:
Isn't it better to catch these on the input of the code module you're having trouble with?
Is there any extra computational load having a separate code module to denorm?
Is there any other significant source of denorm numbers other than feedback loops?
rl ·
Isn't it better to catch these on the input of the code module you're having trouble with?
-> it depends on whether your algos introduce denormals
Is there any extra computational load having a separate code module to denorm?
-> a little, but far better than a FPU switching to denormal mode
Is there any other significant source of denorm numbers other than feedback loops?
-> mostly feedback loops, but also possible in other situations
Here is a good and exhaustive lecture:
http://ldesoras.free.fr/doc/articles/denormal-en.pdf
oddson ·
rl wrote: Isn't it better to catch these on the input of the code module you're having trouble with?
-> it depends on whether your algos introduce denormals
I thought this would stop them from getting created. If not, couldn't you use a slightly larger number to prevent a number from turning into a denormal before it happens? 😕
I know we're talking about 1 iteration of the code... so I guess it wouldn't make any significant difference.
@Devs
Is there any way the code component could be denormal proofed?
Or it is part of the SM way to leave you as many options as possible.
Anyway I've got some feedback loops that almost certainly are causing denormals so thanks all! :D
Wrote something here? To have a post removed or your name hidden, write to [email protected].