Sample Formats

Samples can be stored in different formats and precisions. The most common ones are integer (fixed-point) formats, that store values with fixed quantisations. Depending on where the zero line is defined, it has to be destinguished between unsigned (only positive values, "zero line" is at half of the numeric range) and signed (positive and negative values) integer formats.

Signed Format

Signed Format

Unsigned Format

Unsigned Format

As the quantisation loses some accuracy, it produces noise, the so-called quantisation noise. That kind of noise has more effect on low amplitudes, so this method of storing samples is not optimal, but quite easy and very fast to handle (computers are fast in calculating with fixed point numbers).

The second way of encoding samples is with floating point numbers. With floating point numbers, noise is spread nearly equal over all ranges of amplitudes and has advantages especially on low ampliudes. However, this format is much slower when used for processing (computers are much slower on calculating with floating point values in comparison to fixed point numbers).

Note

Kwave internally uses signed integer format with 24 bit precision, stored in 32 bit integers. This has the disadvantage of higher memory consumption when processing files with lower precision (e.g. 8 bits), but processing 32 bit numbers is very fast and also leaves some reserves for internal calculations, as only 24 bits are normally used.