Multimedia System ApplicationUnit 47 min read
Audio Fundamentals: Waves, Sampling, Formats & Applications
Unit 4 of Multimedia System Application explores the physics of sound waves, digital audio principles (sampling, quantization, bit depth), file formats (WAV, MP3, AAC), and real-world audio processing in apps like WhatsApp voice notes and Ncell music streaming.
Core Concepts: Sound as a Physical Wave
How Sound Travels
Sound is a longitudinal mechanical wave that propagates through a medium (air, water, or solids) by compressing and rarefying particles. Key properties:
- Frequency (f): Measured in Hertz (Hz), determines pitch (e.g., 261.63 Hz = middle C).
- Amplitude (A): Measured in Pascals (Pa), determines loudness (decibels, dB).
- Wavelength (λ): Distance between two identical points in a wave cycle (λ = v/f, where v = speed of sound ≈ 343 m/s in air at 20°C).
graph LR
A["Sound Source\n(e.g., vocal cords)"] -->|"Vibration"| B["Medium\n(air/water/solid)"]
B -->|"Compression/Rarefaction"| C["Wave Propagation"]
C -->|"Detected by"| D["Human Ear\nor Microphone"]
Shows compression/rarefaction cycles, wavelength, amplitude, and frequency markers. (Image: Kulayada, CC BY-SA 4.0, via Wikimedia Commons)
Worked Example: Ncell’s Ringtone Pitch
Ncell’s default ringtone uses a 440 Hz sine wave (A4 note). If the speed of sound is 343 m/s:
- Wavelength (λ) = v/f = 343/440 ≈ 0.78 m (78 cm).
- A shorter wavelength (e.g., 176 Hz) would produce a deeper bass note (C3).
Digital Audio: From Analog to Binary
Sampling and Quantization
- Sampling: Converting continuous analog signals into discrete values at fixed intervals (sample rate, e.g., 44.1 kHz = 44,100 samples/sec).
- Quantization: Assigning each sample a discrete value (bit depth, e.g., 16-bit = 65,536 possible levels).
Nyquist Theorem: To avoid aliasing, the sample rate must be at least twice the highest frequency in the signal.
- Example: For human hearing (20 Hz–20 kHz), minimum sample rate = 40 kHz.
graph TD
A["Analog Signal\n(smooth wave)"] -->|"Sampling"| B["Discrete Samples\n(44.1kHz)"]
B -->|"Quantization"| C["Digital Values\n(16-bit)"]
C -->|"Binary Encoding"| D["MP3/WAV File"]Bit Depth and Dynamic Range
| Bit Depth | Dynamic Range (dB) | Example Use Case |
|---|---|---|
| 8-bit | 48 dB | Old telephony, MIDI |
| 16-bit | 96 dB | CD-quality audio |
| 24-bit | 144 dB | Professional recording |
| 32-bit | 192 dB | High-end mastering |
Worked Example: WhatsApp Voice Notes
- WhatsApp compresses voice notes to 16 kHz sample rate, 16-bit depth (mono).
- File size saved: Lower sample rate reduces data by 50% vs. CD-quality (44.1 kHz).
Audio File Formats: Trade-offs in Compression
Uncompressed Formats (Lossless)
| Format | Extension | Sample Rate/Bit Depth | Use Case |
|---|---|---|---|
| WAV | .wav | Up to 192 kHz/32-bit | Studio recording, editing |
| AIFF | .aiff | Same as WAV | Apple ecosystem |
| FLAC | .flac | Lossless compression | Archival, high-fidelity audio |
Compressed Formats (Lossy)
| Format | Compression Type | Bitrate (kbps) | Example Platform |
|---|---|---|---|
| MP3 | Psychoacoustic | 96–320 | YouTube, Spotify |
| AAC | Advanced Audio | 64–320 | Apple Music, Ncell Music |
| OGG | Vorbis | 64–320 | Open-source projects |
How MP3 Works:
- Frequency Division: Splits audio into 32 bands.
- Perceptual Noise: Removes frequencies masked by louder sounds (e.g., bass drowning out highs).
- Bit Allocation: Allocates bits to perceptually important bands.
Worked Example: NEPSE Stock Alerts
- NEPSE’s audio alerts use MP3 at 64 kbps to balance clarity and file size.
- Original: 16-bit WAV (1.4 MB/min).
- Compressed: MP3 (96 KB/min) → 93% smaller.
Audio Hardware: Microphones and Speakers
Microphone Types
| Type | Polar Pattern | Example Use Case |
|---|---|---|
| Cardioid | Heart-shaped | Podcasting, interviews |
| Omnidirectional | 360° pickup | Conference calls (Zoom) |
| Lavalier | Unidirectional | News reporting (NTV) |
Speaker Systems
| Configuration | Channels | Use Case |
|---|---|---|
| 2.0 | Left/R | Laptops, earbuds |
| 5.1 | 5 + sub | Home theaters, cinemas |
| 7.1 | 7 + sub | Gaming (PS5), high-end audio |
Worked Example: Daraz’s Call Center
- Uses full-duplex audio (separate mics/speakers) for simultaneous customer-agent communication.
- Latency < 50 ms ensures natural conversation flow.
Audio in Multimedia Applications
Real-World Applications
eSewa Voice Authentication:
- Uses formant analysis (vocal tract shapes) to verify identity via voiceprints.
- Sample rate: 8 kHz (sufficient for speech recognition).
Pathao Driver Navigation:
- Directional audio cues (e.g., "Turn left in 100m") via bone conduction headphones.
- Compression: AAC at 128 kbps for real-time clarity.
NTC’s Emergency Alerts:
- Dual-tone multi-frequency (DTMF) for automated calls (e.g., "Your bill is due").
- Example:
*123#generates tones for 1 (1209 Hz) and 2 (1336 Hz).
Audio Editing Tools
| Tool | Key Feature | Example Use Case |
|---|---|---|
| Audacity | Multi-track editing, effects | Podcast mixing (e.g., The Daily) |
| Adobe Audition | Noise reduction, spectral analysis | Professional music production |
| GarageBand | Loop library, MIDI integration | Mobile music creation |
Exam Tip
Define Key Terms:
- Aliasing: Artifacts from insufficient sampling (e.g., a 1 kHz sine wave sampled at 1.5 kHz appears as 500 Hz).
- Psychoacoustics: How humans perceive sound (used in MP3 compression).
Calculate File Sizes:
- Formula:
File Size (bytes) = (Sample Rate × Bit Depth × Channels × Duration) / 8 - Example: 30 sec stereo WAV at 44.1 kHz, 16-bit:
= (44100 × 16 × 2 × 30) / 8 = 1,058,400 bytes ≈ 1 MB.
- Formula:
Compare Formats:
- MP3 vs. WAV: MP3 is lossy (smaller file) but loses quality; WAV is lossless (larger file, pristine).
- AAC vs. OGG: AAC is more efficient for streaming (used by Apple), OGG is open-source.
Real-World Scenarios:
- Always relate to Nepali apps (e.g., "Why does Khalti use AAC for voice prompts?" → Lower bandwidth).
- Diagrams: Draw wave forms, polar patterns, or speaker setups in exams.
Visual Summary:
mindmap
root((Audio Fundamentals))
Physics
Wave Properties
Nyquist Theorem
Digital Conversion
Sampling
Quantization
Formats
WAV
MP3
AAC
Hardware
Microphones
Speakers
Applications
eSewa Voice
Pathao Audio
NTC AlertsBased on the TU BIM syllabus for Multimedia System Application (IT273), unit 4.
Discussion
Loading…