How LPCM Works: A Simple Guide to Uncompressed Audio
Linear Pulse-Code Modulation (LPCM) is a straightforward method for digitally representing analog audio without compression. It samples the analog waveform at regular intervals and stores each sample as a numeric value representing amplitude.
Key concepts
- Sampling rate: Number of samples per second (Hz). Common rates: 44.1 kHz (CD), 48 kHz (video), 96 kHz (high-res). Higher rates capture higher frequencies and reduce aliasing.
- Bit depth: Number of bits per sample, e.g., 16-bit (CD), 24-bit (studio). Higher bit depth increases dynamic range and lowers quantization noise.
- Channels: Mono = 1, Stereo = 2, Multichannel (5.1, 7.1) for surround sound. Each channel is recorded as its own LPCM stream.
- Frame and block alignment: For multichannel audio, samples from each channel are grouped per sample time into frames; frames form blocks used by containers and transmission formats.
How it’s produced and played
- Analog audio is passed through an anti-aliasing filter.
- An analog-to-digital converter (ADC) samples the filtered signal at the chosen sampling rate and quantizes each sample to the selected bit depth, producing PCM samples.
- Samples are organized by channel into frames and stored in a container (WAV, AIFF, PCM raw).
- On playback, samples are read, optionally passed through a digital-to-analog converter (DAC), filtered, amplified, and sent to speakers or headphones.
Advantages
- No compression artifacts: Exact waveform representation within quantization limits.
- Simplicity and compatibility: Widely supported in hardware and software.
- Low latency: Useful for real-time audio and professional workflows.
Drawbacks
- Large file size: Uncompressed data consumes more storage and bandwidth.
- Inefficient for distribution: Streaming and downloads often prefer compressed formats (e.g., AAC, MP3).
Typical use cases
- Music production and mastering
- Professional recording and mixing
- Archival and preservation
- Broadcast and video production where quality is critical
Quick example (conceptual)
- CD audio: 44,100 samples/sec × 16 bits × 2 channels ≈ 1,411 kbps raw bitrate.
Compatibility and containers
- Common containers: WAV, AIFF, BWF, and raw .pcm. These store LPCM with metadata for sample rate, bit depth, and channel layout.
If you want, I can:
- Explain sample-rate conversion and dithering;
- Show how to calculate file sizes for LPCM; or
- Provide command-line examples to convert audio to LPCM.
Leave a Reply