TranscendingMusicAudio Blog

Transcending Perspective – topics on audio, industry, music, entertainment, etc

Tag Archives: truncation

            Up until this point we discussed dither as a saving grace to the detriments of truncation and its delegating characteristics to quantization error. We do have another problem though. That is when we are digitally mixing and processing our signal. Anytime we do processing to the signal we increase the chance of quantization error. For any change to the binary code that represented its signal, there must be a reacting counter arrangement of those one’s and zero’s. There is a rearrangement and this gives rise to more chance of quantization error. Obviously the more bits one has to work with the least chance of misrepresentation. So better than 16-bit we got 24 bit. What is better than 24 bit then? We’ve got 32-bit and not only 32-bit fixed like 16 and 24 but floating in this case. Floating as opposed to fixed is another way of representing the data of the signal.
           
            Floating-point numbers differ from Integer numbers in that they can scale themselves internally to be able to represent very big and very small numbers without losing significant detail. The fixed bit depth obviously have a fixed finite range: a 16-bit fixed can represent 65535 different discrete values. A 24-bit number can represent 16777216 different discrete values. And a 32-bit fixed number can represent 4294967296 different discrete values. Sounds great but all these fixed numbers have the same disadvantage. The disadvantage is that just as we said earlier, analog represents infinite amount of points in exemplifying its signal. So no matter how high these bit depths are, they certainly are not as high as infinity! As the number represented by the analog gets smaller and smaller the fixed bit depths try and represent this scaling but nevertheless due to their nature of finite, they fail in doing so accurately. Therefore the error in representing a small analogue sample increases as the number gets smaller as the number can only be a fixed amount represented by binary code rather than a specific “in-between” value.
           
           Floating-point offers us this nuance. It is an envoy with a decimal point where the decimal can move. This then gives us the flexibility of representing these fractional or “in-between” parts. Internally, inside a 32 bit floating point number 24 bits are to represent the number required between 0.0000000 and 0.999999, and the remaining 8 bits are used to scale the number to the right range. So a floating-point number has the capability to represent prodigious numbers and maintain the accuracy with the more specific or exact aspects of the number.

             Single and double precision floating point formats get translated to 80 bit extended precision floating point format (64 bit mantissa, 15 bit exponent) for calculations and the result gets rounded to 32 or 64 bit. (They are not always rounded. It depends on compiler flags, code and some other things).What this means in Sonar is that the full signal path is at 64 bit float [1] (53 bit Mantissa, 11 bit exponent) and calculations are done at 80 bit extended precision. Depending on the situation, results may remain at 80 bit between calculations.

            32 bit float DAWs also benefit from the 80 bit extended format. (But the results will be rounded to 32 bit float instead of 64 bit float).

Share

Tagged with , , , , .

            Do we need to add noise to a signal? As an engineer, one learns to capture the cleanest signal possible with sufficient headroom and well away from the noise floor. So why does one need to add dithering to a signal when it is inherently noise? So that we can preserve its linearity as much as possible.

            The question is when do we then apply dither? The first case we add dither is usually at any digital to analog conversion. In this conversion we have a converter that will represent our analog wave form as a binary code or one’s and zero’s. Well, keeping in mind that analog is an infinite amount of points representing the signal and digital is finite, then dither here can be used as almost “filler” for those “missing” points. In this scenario dither is like a smoothing agent for the conversion of an infinite state to an finite state. These days, practically all good quality converters automatically add this small amount of dither to the signal. There is a more prominent area of the audio process where dither is really utilized. This brings us to truncation.         
           
            Truncation is the cutting off of the last eight bits of our digital signal. These are the same bits that are part of the digital finite representation of our signal as aforementioned. But why in the world would someone truncate bits off of their signal? Truncation is our enemy! It removes the quietest part of our dynamic range so that long fades, reverb tails, and anything else that trickles into the depths of the dynamic range are abruptly cut off rather than fading out naturally or “decaying”. If that wasn’t bad enough one can also get a slight buzzing as the least significant bit because of the audio trying to switch between inaccurate one’s and zero’s. This buzzing is called quantization noise due to quantization error; a distortion. The error is the result of trying to represent the “step” that reflects the original waveform. So if digital is limited in these “steps” to begin with imagine the harshness in its attempt with further loss of resolution in representing the audio signal. Truncation hates and kills our dynamic range! One must remember, at least for now, we live in a 16-bit 44.1 KHz “Red Book” type of world. In other words, for now, our standard audio format is represented by CD quality at 16 bits and 44.1 KHz sampling rate. This means obviously, if we started with 24-bit in our recording and mixing process then we certainly must truncate our signal to be able to deliver and communicate it to the world, again for now.  So when a 24-bit signal ends up on a 16-bit CD, eight bits are truncated and done away with pretty much. But now here is the difference between flat-out truncating a signal and truncating with dither.                                                                                                                                                  

            Adding this noise or dither to the lower eight bits increases their amplitude (combining signals) and pushes some of the information contained in those bits into the 16th bit range. This means then the signal we hear with dither is a combination of those 8 bits, their info, and the dither noise which all reduces the quantization noise and rather a smoother type of constant hiss modulated by the lower-level information. This cures the unnatural fade out problem and overall there is ameliorated sonic detail for now one is hearing the quietest part of the signal as opposed to its digital conjecture which is most likely in error in its representation. Here is an analogy to my understanding of dither. We can imagine a man trying to cross a pond. This pond is murky, filthy, and not pleasant to walk through. Granted it is only ankle deep however, the man still does not want the last part of his body, his feet even touching the disgusting water. Lest he be ankle deep, the man can use stilts to cross the water. The stilts will raise his feet and ankles, what we want to keep dry and out of the water in sight, and the whole of his body is preserved and kept out of the undesirable portion under him. In this case, the water would be the area that would contain the portion of that which we want not cut off or gone. His ankles would represent our quiet parts of the signal which we are trying to preserve. The stilts of course are the dither combining with the height of the man or as in the audio signal combining amplitude to rise above the undesirable.

            What options do we have for dithering anyway? We do have some control over the type of dithering that goes along with our signal. This involves shaping the noise. By shaping the noise one can perhaps more accurately match the characteristic of their music in order to make the dither seamless and integrated. We have Rectangular dither which uses one random number generator to provide equal probabilities of all numbers. This then tells us it is perhaps the least accurate for the lower probability in using one random number. There is Triangular dither which uses two random number generators to provide a triangular probability density function. This would tell us more accuracy for it utilizes two numbers resulting in more of a probability in achieving a number more so than using one to achieve it. And there is also Gaussian dither.  In theory, this uses an infinite number of random number generators to produce a Gaussian distribution or equal distribution throughout.

Share

Tagged with , , , , .

Popup By Puydi