[PD] Dynamic range question

Mathieu Bouchard matju at artengine.ca
Fri Apr 29 21:10:30 CEST 2005

On Fri, 29 Apr 2005, Jamie Bullock wrote:

> With PD, numbers are represented internally as 32-bit floats, but audio 
> processing is done using values normalised to the range -1 < x < 1. So 
> doesn't this effectively restrict PD's audio dynamic range to 24-bit?

No, because floats are a multiscale number system, so quiet sounds, 
represented by small numbers, have almost the same dynamic range as loud 
sounds. There's a distinction to be made: there is 24 bits of significant 
digits, but it's a sliding window that adapts to the magnitude of the 
numbers, and because 32-bit floats have about 126 different exponents (?) 
you have much more effective resolution. However, of course, adding 
together large values and small values will lose some resolution on the 
small values, because only the top 24 bits of the result are kept.

In the end, it doesn't matter much whether the range being used in audio 
is -1;+1 or -32768;+32768 or whatever. It's just a matter of convention, 
and the number of possible exponents with -1;+1 is already more than 
enough for most uses. Standardising on -1;+1 is nice because it makes 
decibel computation slightly simpler, as log(1)=0.

  ,-o---------o---------o---------o-. ,---.                            |
  | The Diagram is the Program (TM) | | ,-o-------------o--------------o-.
  `-o--------------o--------------o-' | | Mathieu Bouchard (Montréal QC) |
    | téléphone: +1.514.383.3801  `---' `-o-- http://artengine.ca/matju -'

More information about the Pd-list mailing list