DSP, MMX registers and floating point de-normalization
Archive · 20089 old posts
From the original SynthMaker forum (2004–2014), with its members’ names and dates.
steph_tsf ·
Hi,
I got lucky, this code is actually working flawless.
Of course, it needs the coefficients, calculated using green math on Excel based on omega, alpha and Q, and supplied by float labels (entered the values manually) to the code module.
A quick and dirty way, but quite effective !
1) Why the trick "input = input + epsilon;" at the beginning ?
2) Why the trick "input = input - epsilon;" at the end ?
3) What is the definition of de-normalization ?
4) As there are 3 MMX registers used here, can I use the "Pack4" feature ?
5) Can somebody give an example of code compatible with "Pack4" feature and how do we get the required "Pack4" symbol as connector instead of the "stream" connector ?
Any reply welcome.
Steph
infuzion ·
1-2) search for "denormalization" or "denormal" & "CPU" on the forum
3) search for "denormalization" in Google
4) Oui
5) SM's Toolbox:Effect:Compressor
Acrobat ·
how do we get the required "Pack4" symbol as connector instead of the "stream" connector ?
right-clicking on the source/target connection.. 🙂
steph_tsf ·
Hello infuzion,
Unfortunately, using the seaches you advised, I got no help about the exact meaning of the specific SynthMaker "tricks" I was referring. To me it still looks like a "kitchen receipt".
I am still searching detailed info about the "trick".
Surely a few weblinks would have been more effective.
As an example :
Intel is now writing about the x87 hardware FTZ (Flush-to-Zero ) and DAZ (Denormals Are Zero ) modes in the context of both the x87 and SSE and SSE2 XMM registers.
http://softwarecommunity.intel.com/arti ... g/2088.htm
Dated January 22, 2008.
However, with SSE and SSE2, a hardware Flush-to-Zero (FTZ) mode is possible. Some of the later processors that support SSE2 also support Denormals-Are-Zero (DAZ) modes. To determine whether a processor supports the DAZ mode, a software check must be performed (see Application Note 485 in References for further information). Both of these modes are less precise than using the IEEE 754 standard method, and so they are not compatible with the standard, but do provide substantially faster execution times when absolute accuracy according to the standard is not needed.
FTZ and DAZ modes both handle the cases when invalid floating-point data occurs or is processed with underflow or denormal conditions. See Table 1 for a layout of what floating point numbers look like in these cases. The difference between a number that is handled by FTZ and DAZ is very subtle. FTZ handles underflow conditions while DAZ handles denormals. An underflow condition occurs when a computation results in a denormal. In this case, FTZ mode sets the output to zero. DAZ fixes the cases when denormals are used as input, either as constants or by reading invalid memory into registers. DAZ mode sets the inputs of the calculation to zero before computation. FTZ can then be said to handle SSE Output Assists while DAZ handles SSE Input Assists.
Could it be, from this, that there will be cleaner ways to deal with denormalization ?
Remember the reason I have opened this post is to concentrate info about the denormalization "tricks" here, precisely.
Instead of having to deal with hundreds of webpages not specifically related to SynthMaker.
Let us continue.
Steph
MyCo ·
There are only 2 methods to get around denormals, you can find both here:
Smallest small volume null? (bitmask help?)
The first method is clipping which means: Set value to zero when its absolute value is below a clipping value.
The second method is the round off hack, which uses CPU internal rounding functions to round denormals to normals. This goes like this: denormal+normal = normal, normal-normal=normal
There is nothing more to know about the "tricks", to understand what denormals are, read this:
http://en.wikipedia.org/wiki/Denormals
but first you have to know how floating values are represented in modern processors:
http://en.wikipedia.org/wiki/IEEE_float ... t_standard
To detect denormals, you can use my stream inspector:
A geek toy: Stream inspector
Got enough infos now? 🙂
infuzion ·
steph_tsf, MyCo is right & has great advice!
Here is another older post:
Runaway CPU / Polyphony / Denormal Problem ?
I understand that the CPU can be made to help rid of denormals also. We users don't have access to CPU flag-setting in SM as far as I know. Could be a good suggestion.
--
BTW, what kind of filter is that? How is it unique?
cheers
steph_tsf ·
Hi MyCo,
Hi infuzion,
Woaw ! Now this is fantastic !
Especially the stream analyzer, tracking de-normalization.
SynthMaker contributors are fantastic people.
Now I know about de-normalization.
By the way, the IIR filter taken as example at the beginning of this post is a quick and dirty one, absolutely not "unique" and only for illustration purpose.
It is not optimized, there is still a d0 coefficient (different to one) put into the resonating cell (dénominator).
The resonating cell calculation is at the begining, so we can reuse its result (z0,z1,z2) when calculating the various summation networks after it.
That'all, nothing complicated, nothing "unique".
Steph
infuzion ·
Yes, MyCo's tool is very nice!
This filter does seem more complicated than others I've seen.
How do you get all the coeff please?
steph_tsf ·
Hello infuzion,
This filter does seem more complicated than others I've seen.
How do you get all the coeff please?
.
I am using an Excel spreadsheet using RBJ GreenMaths.
Just added one topic about that here.
RBJ Filters - Audio Biquad - GreenMaths in Excel
Regards,
Steph
Wrote something here? To have a post removed or your name hidden, write to [email protected].