Sound files 1.2. Quantization

Apart from sampling (§1.1), digitization also involves quantization, which is the conversion of a sample value into a number that fits into 8, 16, 24 or 32 bits.

## Saving

When exporting a Sound object as a 16-bit audio file on disk, Praat multiplies the samples of the Sound by 32768, and then rounds them to integer numbers, so that air pressure values between -1.0 and +1.0 Pa will end up being coded as integers between -32768 and +32767. Sample values below -1.0 will be coded as -32768, and sample values above +1.0 will be coded as +32767. To avoid such "clipping", keep the absolute amplitude in your Sound object below 1.000, perhaps by using Sound: Scale peak... before you save.

When exporting a Sound object as a 24-bit audio file on disk, Praat multiplies the samples of the Sound by 8388608 instead.

## Opening

For a 16-bit sound file, the sample values on disk are integers between -32768 and +32767. When turning the file into a Sound object, Praat converts these integers into real values between -1.0 and +1.0, by dividing the sample values by 32768.0 (i.e. 2(16 – 1)). Praat subsequently regards these real values as air pressures in pascal (see sound pressure calibration). For a 24-bit AIFF file, the sample values on disk are integers between -8388608 and +8388607, and Praat divides these by 8388608.0 to get values between -1.0 and +1.0 Pa in the Sound object.

### Links to this page

- Sound files
- Sound files 1. General structure
- Sound files 1.4. The header