I apologise if this has come up before.
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?
This is more than enough headroom, but I just want to check whether my understanding is correct or not.
Jamie
With PD, numbers are represented internally as 32-bit floats, but audio processing is done using values normalised to the range -1 < x <
- So doesn't this effectively restrict PD's audio dynamic range to
24-bit?
yes, it does ... but it also makes it possible to use signals as audio rate control data
cheers ... tim
yes, it does ... but it also makes it possible to use signals as audio rate control data
why would be unable to use signals as audio rate control data if samples were only 7bit integer ?
sorry i wasn't really clear ... of course it doesn't matter, what precision the audio data have, it's only more comfortable to work with floats ...
cheers ... t
Jamie Bullock wrote:
I apologise if this has come up before.
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
who told you that ? i am often working internally with audio signals that range between -12.5 and 1000.0.
it is just the oustide world that doesn't know what to do with floating-point samples (at least my ADC/DACs are restricted to some fixedpoint format)
mfg..asdr IOhannes
doesn't this effectively restrict PD's audio dynamic range to 24-bit?
So if I write a 32-bit floating point sound file to an array in PD the visualisation is -1 to +1, but the data is still stored internally as 32-bit?
Jamie
On Fri, 2005-04-29 at 19:12 +0200, IOhannes m zmoelnig wrote:
Jamie Bullock wrote:
I apologise if this has come up before.
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
who told you that ? i am often working internally with audio signals that range between -12.5 and 1000.0.
it is just the oustide world that doesn't know what to do with floating-point samples (at least my ADC/DACs are restricted to some fixedpoint format)
mfg..asdr IOhannes
doesn't this effectively restrict PD's audio dynamic range to 24-bit?
Jamie Bullock wrote:
So if I write a 32-bit floating point sound file to an array in PD the visualisation is -1 to +1, but the data is still stored internally as 32-bit?
this depends on how you store the data: fixed-point formats will clip your data to -1..+1 for floating point soundfiles, i guess it depends on the actual format you are using (but i am no expert here)
i just tried to store a table with a maximum sample value of 2.9199 with the soundfile-object as 4byte floating-point (-nextstep -bytes 4), and lo and behold! the file restores to the exact values (maximum 2.9199)
at least the arrays look the same, i haven't done any scientific comparision...
mfg..wta.cwe IOhannes
I think FP binary saving/restoring will make an exact reproduction of the table, as long as table elements remain single precision.
I think you can also store 32 bit numbers in .wav files. This is an unofficial extension of the "wav" format that seems to have been introduced by Microsoft and is supported by some other software (audacity?)
cheers Miller
AIFF format, but
On Fri, Apr 29, 2005 at 07:42:36PM +0200, IOhannes m zmoelnig wrote:
Jamie Bullock wrote:
So if I write a 32-bit floating point sound file to an array in PD the visualisation is -1 to +1, but the data is still stored internally as 32-bit?
this depends on how you store the data: fixed-point formats will clip your data to -1..+1 for floating point soundfiles, i guess it depends on the actual format you are using (but i am no expert here)
i just tried to store a table with a maximum sample value of 2.9199 with the soundfile-object as 4byte floating-point (-nextstep -bytes 4), and lo and behold! the file restores to the exact values (maximum 2.9199)
at least the arrays look the same, i haven't done any scientific comparision...
mfg..wta.cwe IOhannes
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Thanks Miller, Iohannes,
That is exactly the info I wanted. I am about to batch process a _lot_ of sound files using PD and a few other apps, and I wanted to be sure that the bit resolution (32-bit sinlge) was being preserved throughout the process.
Jamie
On Fri, 2005-04-29 at 10:52 -0700, Miller Puckette wrote:
I think FP binary saving/restoring will make an exact reproduction of the table, as long as table elements remain single precision.
I think you can also store 32 bit numbers in .wav files. This is an unofficial extension of the "wav" format that seems to have been introduced by Microsoft and is supported by some other software (audacity?)
cheers Miller
AIFF format, but
On Fri, Apr 29, 2005 at 07:42:36PM +0200, IOhannes m zmoelnig wrote:
Jamie Bullock wrote:
So if I write a 32-bit floating point sound file to an array in PD the visualisation is -1 to +1, but the data is still stored internally as 32-bit?
this depends on how you store the data: fixed-point formats will clip your data to -1..+1 for floating point soundfiles, i guess it depends on the actual format you are using (but i am no expert here)
i just tried to store a table with a maximum sample value of 2.9199 with the soundfile-object as 4byte floating-point (-nextstep -bytes 4), and lo and behold! the file restores to the exact values (maximum 2.9199)
at least the arrays look the same, i haven't done any scientific comparision...
mfg..wta.cwe IOhannes
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
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 -'