Alterna · учебный материал

Digital sound

Basics of digital audio: PCM, discreteization, quantum, Nyquist frequency, multi-channel sound, formats and codecs.

Что в этом материале

Содержание и основные понятия

By table of contents
Alterna · Chapter 21.1
Digital sound
Acoustics, PCM, discreteization, quantum, multi-channel sound, formats and codecs.
01
Sound physics
How does the sound: frequency, amplitude, hearing range
GEF
OGE No. 3.4
Sound wave
Sound
It is a mechanical wave that spreads in a resilient environment (air, water, solid body). The source of the sound fluctuates, creating a sequence of compressions and dilutions. The human ear perceives these fluctuations as sound.
Frequency
is the number of fluctuations per second, measured in hertzes (Hz), determining sound height: high frequency = high tone.
Amplitude
The maximum deviation from the equilibrium is the volume of the sound, measured in decibels (dB): 0 dB is the threshold for hearing, 60 dB the talking, 120 dB was the painful threshold.
20 Hz
Lower limit of hearing (bass guitar, organ)
20 kHz
Upper border (whistle, bats)
Important
Man hears frequencies from
20 Hz to 20 kHz
Examples: male voice ~ 100 - 250 Hz, female ~250 - 400 Hz, violin ~ 200 Hz - 4 kHz, veep ~ 4 khz.
🎵
Interactive visualization of the sound wave
Frequency:
440
Hz
Amplitude:
70
%
Grid
Amplitude (dB)
Frequency (Hz)
02
PCM: Discretion and Quantification
How analog signal turns into digital
GEF
PIF
OGE No. 3.4
EEG No. 7
The audio file formula
It's an extension of the formula from
Chapter 9.4
For sound, the formula takes into account the frequency of discreteization, the depth of the coding and the number of channels:
V = R × t × i × K / 8
R
— Discretion frequency (Hz),
t
- time (s),
i
- Detonation (bit)
K
The result is in bytes.
📊
PCM Visualization: Discretion and Quantification
Discretion frequency:
20
the accounts
Quantity levels:
8
Analog
Counting
Quantified
Objective: Volume of audio files
Stereo-recording for 3 minutes, discrete frequency of 44,100 Hz, 16 bits. total = 44100 x 180 x 16 x 2 / 8 = 31 824,000 byte
30.4 MB
.
03
The frequency of discreteization and the Nyquist Theorem
Why CD uses 44.1 kHz and how to choose the frequency
GEF
PIF
Nikvista - Kotelnikov Theorem
To accurately restore an analog signal from the digital, the frequency of discreteization must be
at least twice as high
Maximum frequency of signal:
R
min
= 2 × F
max
A person can hear up to 20 kHz = minimum discrete frequency = 40 kHtz. 44.1 kHts (CD) or 48 kHc (video) are used for the reserve.
Frequency
Application
Max signal frequency
Quality
8,000 Hz
Phone, VoIP
4 kHz
Speaking Indistinct
22,050 Hz
Radio, compressed audio
11 kHz
FM quality
44 100 Hz
Audio CD, MP3
22.05 kHz
Full range
48 000 Hz
Video, professional
24 kHz
Studio
96 000 Hz
Hi-Res, studio
48 kHz
High resolution
192 000 Hz
SACD, DSD
96 kHz
Ultra-Hi-Res
CD quality
Audio CD:
44,100 Hz / 16 bits / stereo
Bitrate = 44100 x 16 x 2 = 1,411,200 bits/s E 1411 kbit/s (bitrate).
04
Multi-channel sound
From mono to Dolby Atmos: acoustic system configurations
GEF
PIF
♪ Mono (1.0)
One channel, used in radio, podcasts, telephones. K = 1. Half as much as stereo.
Stereo (2.0)
Two channels: L (left) and R (right). Standard for music, films, games.
Quadro (4.0)
FL, FR, RL, RR. Used in concert sound and old home theater systems.
🎬 5.1
FL + FR + FC (centre) + LFE (subvofer) + RL + RR. House cinema standard, DVD, Blu-ray.
🎧 7.1
Lateral channels (SL, SR) are added to 5.1 used in modern cinemas and games.
🏠 7.1.4 (Dolby Atmos)
4 ceiling/top canals added: objective sound: sound as an object in 3D space.
🔊
Interactive acoustic system diagram
Select configuration
05
Audioformates and codecs
Compressive, bitreit, matching formats
GEF
OGE No. 3.4
WAV is a non-compressed PCM
Without compression · 1411 kbps (CD)
Microsoft/IBM format: audio data are stored as raw PCM flow. Accuracy 100% but large size. Minute stereo 44.1 kHz/16 bits = ~10.6 MB.
📂 FLAC — Free Lossless Audio Codec
No loss ~600 - 900 kbps
===Reversible===A typical 30–50% compression compared to WAV is ideal for archives and studio records.
📂 MP3 — MPEG-1 Audio Layer 3
Losses · 128 - 320 kbps
The first mass compression format with loss: removes "non-existent" frequencies (psychoacoustic model). At 128 kbps, the loss of quality is visible in comparison; at 320 kbits/s, most do not hear the difference.
📂 AAC — Advanced Audio Coding
Losses · 128 - 320 kbps
The successor MP3 is better compressed with the same quality (about 30%) and is used in iTunes, YouTube, Spotify, Bluetooth-audio.
📂 OGG Vorbis
Losses · 128 - 320 kbps
Open free codec. Quality is comparable to AAC but less common. Used in games and strimming.
📂 DSD — Direct Stream Digital
1bit · 2.8 - 11.2 MHz
It is used in the SACD (Super Audio CD). A very high frequency of discreteization (2.8224 MHz - 64 times higher than the CD) and 1-bit quantization.
📈
Comparison of bitrates and file size
MP3 128
~1.1 MB/min
MP3 192
~1.6 MB/min
MP3 320
~2.7 MB/min
AAC 256
~2.1 MB/min
FLAC
~5 MB/min (lossless)
WAV
~10.6 MB/min
One minute stereo, 44.1 kHz/16 bits. Compare loss at 128 kbps with the quality oflossless.
🌊
Spectrogram: Comparison of formats
Selection of format
Archive / Studio:
FLAC (lossless, compression 30-50 per cent).
Playing music:
AAC 256 or MP3 320.
Web / Striming:
AAC 128 or OGG.
Tel. / VoIP:
Opus or AMR (8 - 64 kbps).
06
Audiointerfaces and breakups
How sound gets into and out of the computer: analog, digital and network interfaces
GEF
PIF
OGE No. 7
~ 3.5 mm (Mini-Jack)
Analog stereo: TRS (Tip-ring-sleeve) is a left, right, ground standard for headphones, columns, microphones. It is not protected from interference, and the cable length is up to ~3 m.
🎤 XLR (3-pin)
Balanced analog: 3 contacts (hot, cold, ground) Symmetrical transmission is subtracted, up to 100 m long. Standard for studio microphones and professional equipment.
♪ Jack 6.35 mm (TRS/TS)
Increased Mini-Jack: TS (mono) or TRS (stereo/balanced) used in guitar amplifiers, mixers, and professional headphones.
光纤 TOSLINK
Whole-line digital: transmits S/PDIF (stereo PCM up to 96 kHz/24 bits) or multichannel Dolby/DTS. Not subject to EM interference, up to 10 m long.
S/PDF (coaxial)
Digital via the coaxial RCA cable: 75 ohm, up to 96 kHz/24 bits. Alternative TOSLINK, but electrical, is susceptible to interference.
🔗 USB Audio
Digitally via USB: USB 1.1 (16 bit/48 kHz), USB 2.0 (24 bit/192 kHtz), USA 3.0, USB Audio 1.0/2.0.
📊
Comparison of interfaces
Interface
Type
Max frequency
Channels
Cable length
Application
3.5 mm
Analog
—
2 (stereo)
~3 m
Headphones, columns
XLR
Balance
—
1 (mono)
100 m
Microphones, studios
Jack 6.35
Analog
—
1–2
~10 m
Guitars, mixers.
TOSLINK
Digital (optic)
96 kHz/24 bits
2–8
10 m
Home theatre, DAC
S/PDIF
Number (coax)
96 kHz/24 bits
2–8
10 m
AV-resivers
USB Audio
Number (USB)
192 kHz/24 bits
Up to 128
5 m (USB 2.0)
External
HDMI ARC
Number
192 kHz/24 bits
up to 8
15 m
TV, audio panels
Analog vs Digital
Analog interfaces (3.5 mm, XLR, Jack) transmit a continuous electrical signal - quality depends on cable and interference. Digital (TOSLINK, S/PDF, USB) transmit bits - the signal is not distorted, but DAC is needed to convert to sound.
07
Psy

Structural map of textbooks