Difference between revisions of "Pulse Code Modulation"

From Hydrogenaudio Knowledgebase
Jump to: navigation, search
(See also: archiveurl for history link)
(General rewrite.)
Line 1: Line 1:
 
{{stub}}
 
{{stub}}
  
'''Pulse Code Modulation''' ('''PCM''') is a method of recording sound as digital data. The amplitude of the audio signal is sampled at a regular [[sampling rate]], and [[Quantization|quantized]] with a fixed [[bit depth]].
+
'''Pulse Code Modulation''' ('''PCM''') is a method of recording sound as digital data. For more information on the method, its history and uses, see the Wikipedia entry.<ref>https://en.wikipedia.org/wiki/PCM</ref>
  
This technology was created by Alec Reeves in 1937.
+
(Linear) PCM is used in the [[CD]] and [[DAT]] formats, can also be found on [[DVD]] and [[Blu-Ray]] discs, is the data form transmitted in AES3 / S/PDIF digital audio interfaces, <ref>https://en.wikipedia.org/wiki/AES3#Protocol</ref> and is the most common content of [[RIFF WAVE|WAVE]] and [[Audio Interchange File Format|AIFF]] files. Most [[lossless]] audio [[codecs]] for end-users compress linear PCM. Being by far the most common form for audio end-users, one will often see linear PCM referred to as merely "PCM".  The phrases "linear PCM" or the abbreviation "LPCM" occur more common in the context of [[DVD]] or Blu-Ray<ref>See for example https://en.wikipedia.org/wiki/Blu-ray#Audio for this usage</ref>, sometimes leading to the erroneous notion that "linear PCM" necessarily must be of the form supported by the DVD formats.
 +
 
 +
[[ADPCM]] is common in telecommunication.
 +
 
 +
 
 +
=== Linear PCM ===
 +
In ''Linear'' PCM, the quantization levels are linear in amplitude.  To visualize, each 16-bit sample of CD audio represents the amplitude as a number between −32768 and 32767 in ''equidistant'' steps: a difference from 2 to 11 makes for the same as the difference from 13000 to 13009.  Linear PCM can be converted with ordinary multi-bit converters: the 12th bit contributes the same to the analog signal no matter what the other bits are.
 +
 
 +
As a counterexample formed by modifying a PCM signal with a nonlinearity: [[High_Definition_Compatible_Digital|HDCD]]'s low level adjustment can flag the lower bits to signify something else if the signal is close to zero (i.e., depending on the more significant bits), and its peak extension is also a nonlinearity.  A non-HDCD-aware DAC will omit these steps, and decode linearly.
 +
 
 +
=== Differential PCM ===
 +
''Differential'' PCM will, in simplified terms, decode the difference between consecutive samples.  The ''adaptive differential PCM'' ([[ADPCM]]) variant is common in e.g. telecommunication, where the signal is typically companded using given nonlinear functions specified as A-law<ref>https://en.wikipedia.org/wiki/A-law_algorithm</ref> and µ-law<ref>https://en.wikipedia.org/wiki/%CE%9C-law_algorithm</ref> (wikipedia links).  
 +
 
 +
 
 +
== References ==
 +
<references/>
  
 
== See also ==
 
== See also ==
 +
 
* [[Pulse-Density Modulation]] (PDM)
 
* [[Pulse-Density Modulation]] (PDM)
 
* [[Pulse-Amplitude Modulation]] (PAM)
 
* [[Pulse-Amplitude Modulation]] (PAM)

Revision as of 23:54, 7 January 2022

Pulse Code Modulation (PCM) is a method of recording sound as digital data. For more information on the method, its history and uses, see the Wikipedia entry.[1]

(Linear) PCM is used in the CD and DAT formats, can also be found on DVD and Blu-Ray discs, is the data form transmitted in AES3 / S/PDIF digital audio interfaces, [2] and is the most common content of WAVE and AIFF files. Most lossless audio codecs for end-users compress linear PCM. Being by far the most common form for audio end-users, one will often see linear PCM referred to as merely "PCM". The phrases "linear PCM" or the abbreviation "LPCM" occur more common in the context of DVD or Blu-Ray[3], sometimes leading to the erroneous notion that "linear PCM" necessarily must be of the form supported by the DVD formats.

ADPCM is common in telecommunication.


Linear PCM

In Linear PCM, the quantization levels are linear in amplitude. To visualize, each 16-bit sample of CD audio represents the amplitude as a number between −32768 and 32767 in equidistant steps: a difference from 2 to 11 makes for the same as the difference from 13000 to 13009. Linear PCM can be converted with ordinary multi-bit converters: the 12th bit contributes the same to the analog signal no matter what the other bits are.

As a counterexample formed by modifying a PCM signal with a nonlinearity: HDCD's low level adjustment can flag the lower bits to signify something else if the signal is close to zero (i.e., depending on the more significant bits), and its peak extension is also a nonlinearity. A non-HDCD-aware DAC will omit these steps, and decode linearly.

Differential PCM

Differential PCM will, in simplified terms, decode the difference between consecutive samples. The adaptive differential PCM (ADPCM) variant is common in e.g. telecommunication, where the signal is typically companded using given nonlinear functions specified as A-law[4] and µ-law[5] (wikipedia links).


References

  1. https://en.wikipedia.org/wiki/PCM
  2. https://en.wikipedia.org/wiki/AES3#Protocol
  3. See for example https://en.wikipedia.org/wiki/Blu-ray#Audio for this usage
  4. https://en.wikipedia.org/wiki/A-law_algorithm
  5. https://en.wikipedia.org/wiki/%CE%9C-law_algorithm

See also