[PD] audio bit resolution in Pd

IOhannes m zmölnig zmoelnig at iem.at
Wed Apr 22 20:30:27 CEST 2015


On 04/22/2015 07:26 PM, Alexandre Torres Porres wrote:
> Now, output audio values
> is actually just from -1 to 1,

where did you get that from?
there is no -1/+1 in "audio".

instead "audio" will have many different values (and units), including:
- sound-pressure in the air (hmm, hard to make any actual numbers)
- voltage at your sound-card output (+- 1V, depending on the line level
in use)
- digital values fed to your soundcard (depending on the the bit
resolution of your soundcard, this might be +-32768 (16bit) or +-8388608
(24bit))
- digital values output by Pd (many audio backends (e.g. jack) will use
floating point as their intermediate format)


now your question really only makes sense when you consider fixed-point
values such as used by your typical soundcard (where you divide a range
(e.g. +-1) into N equally small fractions (e.g. 1/32678 steps)

but Pd uses floating point arithmetic, which does not have equal
fractions but fractions depending on the current range of the value.
so the quantization steps are rather largish when it comes to bigger
numbers, but can be *very* small when it comes to small numbers.

IEEE-754 (which defines the exact format of single/double precision
floating point values as used by most systems) uses 24bits for the
significand, which will correspond to 24bit fixed point around the
values +-1., but will already correspond to 25bit fixed point around the
values +-0.5 and so on.


gfmsrd
IOhannes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150422/46620f4e/attachment.sig>


More information about the Pd-list mailing list