Difference between revisions of "Pulse-code modulation"

From Sega Retro

 
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
'''P'''ulse-'''C'''ode '''M'''odulation (PCM) is a modulation technique invented by the British Alec Reeves in 1937. It is a digital representation of an analog signal where the magnitude of the signal is sampled regularly at uniform intervals. Every sample is quantized to a series of symbols in a digital code, which is usually a [[binary]] code. PCM is used in digital telephone systems. It is also the standard form for digital audio in computers and various compact disc formats.
+
{{RetroCDN}}
 +
 
 +
'''Pulse-code modulation''' ('''PCM''') is a method used to digitally represent sampled analog signals It is the standard form for digital audio in computers and various compact disc formats, as well as other uses such as digital telephone systems. A PCM stream is a digital representation of an analog signal, in where the magnitude of the analogue signal is sampled regularly at uniform intervals, being quantized to the nearest value within a range of digital steps.
 +
 
 +
PCM streams have two basic properties that determine their fidelity to the original analog signal: the sampling rate, which is the number of times per second that samples are taken; and the bit-depth, which determines the number of possible digital values that each sample can take.
 +
 
 +
Audio CDs, uncompressed audio files (WAV, AIFF, etc.), and certain DVD audio formats contain digital audio encoded using PCM. Furthermore, as well as using standard CD audio for most of its tracks, several versions of ''[[Sonic the Hedgehog CD]]'' stored the tracks for its Past levels in PCM format but as data files.
 +
 
 +
==Technical information==
  
 
Several PCM streams may be multiplexed into a larger aggregate data stream. This technique is called Time-Division Multiplexing, or TDM. TDM was invented by the telephone industry, but today the technique is an integral part of many digital audio workstations such as Pro Tools.
 
Several PCM streams may be multiplexed into a larger aggregate data stream. This technique is called Time-Division Multiplexing, or TDM. TDM was invented by the telephone industry, but today the technique is an integral part of many digital audio workstations such as Pro Tools.
  
----
+
===Digitization as part of the PCM process===
 
 
Digitization as part of the PCM process
 
  
 
In conventional PCM, the analog signal may be processed (e.g. by amplitude compression) before being digitized. Once the signal is digitized, the PCM signal is not subjected to further processing (e.g. digital data compression).
 
In conventional PCM, the analog signal may be processed (e.g. by amplitude compression) before being digitized. Once the signal is digitized, the PCM signal is not subjected to further processing (e.g. digital data compression).
Line 11: Line 17:
 
Some forms of PCM combine signal processing with coding. Older versions of these systems applied the processing in the analog domain as part of the A/D process, newer implementations do so in the digital domain. These simple techniques have been largely rendered obsolete by modern transform-based signal compression techniques.
 
Some forms of PCM combine signal processing with coding. Older versions of these systems applied the processing in the analog domain as part of the A/D process, newer implementations do so in the digital domain. These simple techniques have been largely rendered obsolete by modern transform-based signal compression techniques.
  
'''   * Differential (or Delta) pulse-code modulation''' encodes the PCM values as differences between the current and the previous value. For audio this type of encoding reduces the number of bits required per sample by about 25% compared to PCM.
+
*'''Differential (or Delta) pulse-code modulation''' encodes the PCM values as differences between the current and the previous value. For audio this type of encoding reduces the number of bits required per sample by about 25% compared to PCM.
 
+
*'''Adaptive DPCM''' is a variant of DPCM that varies the size of the quantization step, to allow further reduction of the required bandwidth for a given signal-to-noise ratio.
'''   * Adaptive DPCM''' is a variant of DPCM that varies the size of the quantization step, to allow further reduction of the required bandwidth for a given signal-to-noise ratio.
 
  
 
In telephony, a standard audio signal for a single phone call is encoded as 8000 analog samples per second, of 8 bits each, giving a 64 kbit/s digital signal known as DS0. The default encoding on a DS0 is either μ-law PCM (mu-law PCM) (North America) or a-law PCM (Europe and most of the rest of the world). These are logarithmic compression systems where a 12 or 13 bit linear PCM sample number is mapped into an 8 bit value. This system is described by international standard G.711.
 
In telephony, a standard audio signal for a single phone call is encoded as 8000 analog samples per second, of 8 bits each, giving a 64 kbit/s digital signal known as DS0. The default encoding on a DS0 is either μ-law PCM (mu-law PCM) (North America) or a-law PCM (Europe and most of the rest of the world). These are logarithmic compression systems where a 12 or 13 bit linear PCM sample number is mapped into an 8 bit value. This system is described by international standard G.711.
Line 21: Line 26:
 
Later it was found that even further compression was possible and additional standards were published. Some of these international standards describe systems and ideas which are covered by privately owned patents and thus use of these standards requires payments to the patent holders.
 
Later it was found that even further compression was possible and additional standards were published. Some of these international standards describe systems and ideas which are covered by privately owned patents and thus use of these standards requires payments to the patent holders.
  
Some ADPCM techniques are used in Voice over IP communications.
+
Some ADPCM techniques are used in Voice over IP (VoIP) communications.
  
----
+
===Encoding the bitstream as a signal===
 
 
Encoding the bitstream as a signal
 
  
 
Pulse-code modulation can be either return-to-zero (RZ) or non-return-to-zero (NRZ). For a NRZ system to be synchronized using in-band information, there must not be long sequences of identical symbols, such as ones or zeroes. For [[binary]] PCM systems, the density of 1-symbols is called 'ones-density'.
 
Pulse-code modulation can be either return-to-zero (RZ) or non-return-to-zero (NRZ). For a NRZ system to be synchronized using in-band information, there must not be long sequences of identical symbols, such as ones or zeroes. For [[binary]] PCM systems, the density of 1-symbols is called 'ones-density'.
Line 37: Line 40:
 
Many of these codes are bipolar codes, where the pulses can be positive, negative or absent. Typically, non-zero pulses alternate between being positive and negative. These rules may be violated to generate special symbols used for framing or other special purposes.
 
Many of these codes are bipolar codes, where the pulses can be positive, negative or absent. Typically, non-zero pulses alternate between being positive and negative. These rules may be violated to generate special symbols used for framing or other special purposes.
  
From: Wikipedia Article([http://en.wikipedia.org/wiki/Pulse_code_modulation])
+
From: [[wikipedia:Pulse-code modulation|Wikipedia article]]
 +
 
 +
==History==
 +
PCM was invented by Alec Reeves in 1937, originally used in telecommunications applications, decades before its first use in commercial broadcast and recording. Commercial digital recording was pioneered in Japan by [[NHK]] and [[Nippon Columbia]], and their [[wikipedia:Denon|Denon]] brand, in the 1960s. In 1967, the first PCM recorder was developed by NHK's research facilities in Japan, before releasing the first commercial digital PCM recordings in 1971. In 1972, Denon unveiled the first 8-channel digital recorder, the DN-023R. In 1973, [[wikipedia:Adaptive differential pulse-code modulation|adaptive differential pulse-code modulation]] (ADPCM) was developed by [[wikipedia:Nikil Jayant|Nikil S. Jayant]], P. Cummiskey and [[wikipedia:James L. Flanagan|James L. Flanagan]].
 +
 
 +
The earliest PCM [https://gamicus.gamepedia.com/Sound_chip sound chip] used in video games was the [[wikipedia:Oki|Oki]] MSM5205, released in 1979. It was used in several [[arcade]] systems including the [[Irem]] M52, [[Data East]] Z80, [[Taito]] Unique and [[Capcom]] 68000 hardware, as well as the [[NEC]] [https://necretro.org/CD-ROM%C2%B2_systems PC Engine CD-ROM²] ([https://necretro.org/TurboGrafx-CD TurboGrafx-CD]) home console.
 +
 
 
{{cleanup}}
 
{{cleanup}}
[[Category:Music]]
+
[[Category:Technical information]]

Latest revision as of 11:25, 26 September 2020

Retrocdn-round.svg
This file or page has been flagged for relocation to Retro CDN, the Wikimedia Commons-esque service for all Retro wikis. This message is for the benefit of Sega Retro wiki staff.

Pulse-code modulation (PCM) is a method used to digitally represent sampled analog signals It is the standard form for digital audio in computers and various compact disc formats, as well as other uses such as digital telephone systems. A PCM stream is a digital representation of an analog signal, in where the magnitude of the analogue signal is sampled regularly at uniform intervals, being quantized to the nearest value within a range of digital steps.

PCM streams have two basic properties that determine their fidelity to the original analog signal: the sampling rate, which is the number of times per second that samples are taken; and the bit-depth, which determines the number of possible digital values that each sample can take.

Audio CDs, uncompressed audio files (WAV, AIFF, etc.), and certain DVD audio formats contain digital audio encoded using PCM. Furthermore, as well as using standard CD audio for most of its tracks, several versions of Sonic the Hedgehog CD stored the tracks for its Past levels in PCM format but as data files.

Technical information

Several PCM streams may be multiplexed into a larger aggregate data stream. This technique is called Time-Division Multiplexing, or TDM. TDM was invented by the telephone industry, but today the technique is an integral part of many digital audio workstations such as Pro Tools.

Digitization as part of the PCM process

In conventional PCM, the analog signal may be processed (e.g. by amplitude compression) before being digitized. Once the signal is digitized, the PCM signal is not subjected to further processing (e.g. digital data compression).

Some forms of PCM combine signal processing with coding. Older versions of these systems applied the processing in the analog domain as part of the A/D process, newer implementations do so in the digital domain. These simple techniques have been largely rendered obsolete by modern transform-based signal compression techniques.

  • Differential (or Delta) pulse-code modulation encodes the PCM values as differences between the current and the previous value. For audio this type of encoding reduces the number of bits required per sample by about 25% compared to PCM.
  • Adaptive DPCM is a variant of DPCM that varies the size of the quantization step, to allow further reduction of the required bandwidth for a given signal-to-noise ratio.

In telephony, a standard audio signal for a single phone call is encoded as 8000 analog samples per second, of 8 bits each, giving a 64 kbit/s digital signal known as DS0. The default encoding on a DS0 is either μ-law PCM (mu-law PCM) (North America) or a-law PCM (Europe and most of the rest of the world). These are logarithmic compression systems where a 12 or 13 bit linear PCM sample number is mapped into an 8 bit value. This system is described by international standard G.711.

Where circuit costs are high and loss of voice quality is acceptable, it sometimes makes sense to compress the voice signal even further. An ADPCM algorithm is used to map a series of 8 bit PCM samples into a series of 4 bit ADPCM samples. In this way, the capacity of the line is doubled. The technique is detailed in the G.726 standard.

Later it was found that even further compression was possible and additional standards were published. Some of these international standards describe systems and ideas which are covered by privately owned patents and thus use of these standards requires payments to the patent holders.

Some ADPCM techniques are used in Voice over IP (VoIP) communications.

Encoding the bitstream as a signal

Pulse-code modulation can be either return-to-zero (RZ) or non-return-to-zero (NRZ). For a NRZ system to be synchronized using in-band information, there must not be long sequences of identical symbols, such as ones or zeroes. For binary PCM systems, the density of 1-symbols is called 'ones-density'.

Ones-density is often controlled using precoding techniques such as Run Length Limited encoding, where the PCM code is expanded into a slightly longer code with a guaranteed bound on ones-density before modulation into the channel. In other cases, extra 'framing' bits are added into the stream which guarantee at least occasional symbol transitions.

Another technique used to control ones-density is the use of a 'scrambler' polynomial on the raw data which will tend to turn the raw data stream into a stream that looks pseudo-random, but where the raw stream can be recovered exactly by reversing the effect of the polynomial. In this case, long runs of zeroes or ones are still possible on the output, but are considered unlikely enough to be within normal engineering tolerance.

In other cases, the long term DC value of the modulated signal is important, as building up a DC offset will tend to bias detector circuits out of their operating range. In this case special measures are taken to keep a count of the cumulative DC offset, and to modify the codes if necessary to make the DC offset always tend back to zero.

Many of these codes are bipolar codes, where the pulses can be positive, negative or absent. Typically, non-zero pulses alternate between being positive and negative. These rules may be violated to generate special symbols used for framing or other special purposes.

From: Wikipedia article

History

PCM was invented by Alec Reeves in 1937, originally used in telecommunications applications, decades before its first use in commercial broadcast and recording. Commercial digital recording was pioneered in Japan by NHK and Nippon Columbia, and their Denon brand, in the 1960s. In 1967, the first PCM recorder was developed by NHK's research facilities in Japan, before releasing the first commercial digital PCM recordings in 1971. In 1972, Denon unveiled the first 8-channel digital recorder, the DN-023R. In 1973, adaptive differential pulse-code modulation (ADPCM) was developed by Nikil S. Jayant, P. Cummiskey and James L. Flanagan.

The earliest PCM sound chip used in video games was the Oki MSM5205, released in 1979. It was used in several arcade systems including the Irem M52, Data East Z80, Taito Unique and Capcom 68000 hardware, as well as the NEC PC Engine CD-ROM² (TurboGrafx-CD) home console.


Cleanup.svg
This article needs cleanup.
This article needs to be edited to conform to a higher standard of article quality. After the article has been cleaned up, you may remove this message. For help, see the How to Edit a Page article.