0% found this document useful (0 votes)
2 views9 pages

Chapter 10

Chapter 10 discusses the significance of audio file formats, focusing on compression techniques like MP3 and AAC, and the MIDI format. It highlights the importance of selecting appropriate formats for audio quality, storage efficiency, and compatibility across devices. Additionally, it covers the technical structures, psychoacoustic principles, and applications of these formats in digital media.

Uploaded by

hbm6l9wpy
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views9 pages

Chapter 10

Chapter 10 discusses the significance of audio file formats, focusing on compression techniques like MP3 and AAC, and the MIDI format. It highlights the importance of selecting appropriate formats for audio quality, storage efficiency, and compatibility across devices. Additionally, it covers the technical structures, psychoacoustic principles, and applications of these formats in digital media.

Uploaded by

hbm6l9wpy
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Chapter 10: Compression (MP3, AAC)

and MIDI format


1 Introduction
1.1 Importance of audio file formats in digital media
Audio file formats are fundamental to the storage, distribution, and playback of digital media,
determining how audio data is encoded, compressed, and decoded across different platforms
and devices. The choice of file format impacts not only file size and quality but also
compatibility, streaming efficiency, and user experience. With an ever-growing variety of
audio sources and consumption channels—ranging from high-fidelity music streaming and
multimedia content to communication applications and games—understanding audio file
formats becomes essential for producers, developers, and consumers alike. Proper selection
of audio formats ensures the preservation of sound quality, optimized bandwidth usage, and
seamless interoperability, making them vital components in the digital audio ecosystem.

1.2 Overview of compression and MIDI


Compression and MIDI represent two distinct but complementary technologies in digital
audio management. Compression techniques reduce file size by removing redundancy and
perceptually irrelevant information, enabling more efficient storage and faster transmission
without severely compromising audio quality. Lossy formats like MP3 and AAC employ
psychoacoustic models to discard inaudible data, while lossless compressions maintain exact
audio fidelity. Meanwhile, MIDI (Musical Instrument Digital Interface) diverges from audio
recording by encoding musical performance data—such as note pitch, duration, and
velocity—rather than sound itself. MIDI files are highly compact and flexible, enabling
synthesis, sequencing, and real-time manipulation of music production. Together,
compression and MIDI cater to diverse needs in digital media, balancing quality, efficiency,
and creative control.

2. Fundamentals of Digital Audio Compression


2.1. Need for compression in audio transmission and storage
Digital audio uncompressed requires significant data bandwidth and storage capacity, which
poses challenges in transmission over networks and physical storage media. For example,
CD-quality audio at 44.1 kHz sampling rate and 16-bit depth produces data rates around 1.4

1
Mbps, which is expensive and inefficient to transmit or store at scale. Compression reduces
this data requirement by removing redundancies and irrelevant information, enabling
efficient streaming, downloading, and archiving while lowering costs and energy
consumption. With the increasing consumption of digital audio content through streaming
services, podcasts, and mobile applications, compression facilitates real-time delivery and
storage on bandwidth-constrained or storage-limited devices.

2.2. Principles of lossy and lossless compression


Audio compression techniques are broadly classified into lossless and lossy methods that
differ in data preservation and quality trade-offs. Lossless compression retains an exact
replica of the original audio data by removing only redundant encoding information using
methods like Huffman coding or run-length encoding. Although smaller than uncompressed
files, lossless files remain relatively large compared to lossy methods and are suited for
archival and master-quality applications. Lossy compression applies perceptual coding based
on psychoacoustic models, which eliminate audio components imperceptible to human
hearing such as masked or redundant frequencies, thereby achieving higher data reduction
levels. Widely used formats like MP3, AAC, and Opus rely on lossy compression for
streaming, trading some fidelity for bandwidth efficiency while maintaining acceptable
auditory quality. The compression process involves critical parameter settings balancing
fidelity, bit rate, and computational complexity.

3. MP3 Format
3.1. History and development of MP3
MP3, formally known as MPEG-1 Audio Layer III, was developed in the late 1980s and early
1990s by researchers at the Fraunhofer Institute in Germany, with key contributions from
Karlheinz Brandenburg, often called the "father of MP3". The Moving Picture Experts Group
(MPEG) standardized MP3 as part of the MPEG-1 and later MPEG-2 audio standards, with
the goal of providing high-quality audio compression suitable for transmission over
limited bandwidth networks such as the early Internet. The first version was finalized and
published in 1993, with subsequent patents, hardware implementations, and
widespread software support enabling the format’s rapid adoption. MP3 revolutionized
digital music by enabling drastic file size reductions—up to 75-95% smaller than
uncompressed audio—while maintaining acceptable sound quality.

3.2. Technical structure of MP3 files


MP3 files consist of frames containing compressed audio data encoded using a hybrid filter
bank that combines polyphase filter and Modified Discrete Cosine Transform (MDCT)
2
techniques. Each frame includes header information specifying bitrate, sampling rate, stereo
mode, and other control data. MP3 uses lossy compression to reduce data by quantizing and
encoding only perceptually relevant components. The file structure allows streaming and
random access playback, and common file extensions are ".mp3". The audio is typically
encoded at sample rates of 32, 44.1, or 48 kHz with bitrates ranging from 32 kbps to 320
kbps, supporting mono and stereo audio, as well as joint stereo coding to optimize channel
redundancy.

3.3. Psychoacoustic modeling in MP3 compression


A core innovation of MP3 compression is its use of psychoacoustic models that exploit
human auditory perception to discard inaudible or masked sounds. The model analyzes
audio signals to identify frequency components that the ear cannot perceive due to
simultaneous masking or threshold effects. This selective removal of information reduces
data size without noticeably degrading audio quality for most listeners. Psychoacoustic
coding enables MP3's efficient lossy compression by carefully tuning bit allocation to
maximize perceptual audio fidelity while minimizing redundant data.

3.4. Bitrate and quality settings


MP3 supports variable bitrates (VBR) and constant bitrates (CBR) typically ranging from 32
kbps to 320 kbps. Higher bitrates yield better audio fidelity but larger file sizes, whereas lower
bitrates reduce file size at the expense of quality. VBR dynamically adjusts bitrate during
encoding to allocate more bits to complex passages and fewer to simple segments, improving
perceived quality for a given average bitrate. The choice of sampling rate and bitrate affects
compatibility, quality, and file size, with 128 kbps CBR often considered the baseline for
acceptable music quality.

3.5. Applications and compatibility


MP3 became the dominant format for digital music distribution, storage, and streaming, due
to its balance of compression efficiency and broad device support. It is extensively used in
portable media players, smartphones, personal computers, and web streaming services.
MP3's compatibility spans virtually all audio software and hardware players, making it the
most universally accepted digital audio format. Despite the rise of newer codecs like AAC
and Opus, MP3 remains widely used due to its entrenched ecosystem and well-understood
characteristics.

3
4. AAC Format
4.1. Evolution from MP3 to AAC
Advanced Audio Coding (AAC) was developed as the successor to MP3 by a consortium
including Dolby, AT&T, Fraunhofer, and Sony. While MP3 (MPEG-1 Audio Layer III) was
revolutionary for its time, AAC was designed under the MPEG-2 and later MPEG-4 standards
to provide better sound quality at the same bitrates. AAC uses a pure Modified Discrete
Cosine Transform (MDCT) algorithm instead of MP3's hybrid transform coding, enabling
more efficient and accurate compression. It supports a wider range of sampling rates (8 Hz
to 96 kHz), more audio channels (up to 48), and higher coding efficiency for transient and
stationary signals. This transition corrected several design limitations of MP3, offering more
flexibility and improved performance especially at low bitrates.

4.2. Advanced compression algorithms and tools in AAC


AAC integrates several advanced tools to enhance compression efficiency, including
Temporal Noise Shaping (TNS), Perceptual Noise Substitution (PNS), and improved joint
stereo coding methods. The pure MDCT algorithm with longer transform windows improves
frequency resolution and reduces artifacts like pre-echo. AAC’s advanced psychoacoustic
modeling better exploits human auditory perception to discard inaudible components,
thereby achieving smaller file sizes with higher perceived quality. These algorithms
collectively underpin AAC's ability to outperform MP3 by maintaining clearer transient
details and smoother tonal balance across diverse audio content.

4.3. Profiles and use cases: AAC-LC, HE-AAC, AAC-LD


AAC exists in multiple profiles tailored to different applications. AAC-LC (Low Complexity)
is the core profile widely used for general audio compression with moderate complexity. HE-
AAC (High Efficiency AAC or AAC+) extends AAC-LC by adding Spectral Band Replication
(SBR) and Parametric Stereo (PS) tools to improve compression at very low bitrates, making
it popular for streaming and broadcasting. AAC-LD (Low Delay) targets real-time
communication applications such as video conferencing, minimizing latency while preserving
audio quality. These profiles allow flexible adoption in music streaming, digital radio,
telephony, and media broadcasting depending on device capability and network conditions.

4.4. Error resilience and streaming


AAC incorporates error resilience tools to maintain audio quality over unstable network
conditions common in streaming and broadcasting. These include in-band signalling, Robust

4
Header Compression, and error concealment strategies that reduce the impact of packet loss
or corruption. Combined with efficient packetization, AAC supports seamless adaptive
streaming, allowing playback to dynamically adjust to bandwidth fluctuations while
minimizing audio glitches, making it suitable for robust delivery in live and on-demand
streaming platforms.

4.5. Industry adoption and device support


AAC has seen widespread adoption across consumer electronics, streaming services, and
broadcasting networks. Prominent usage includes Apple’s iTunes Store, YouTube, Spotify,
and various mobile devices from Apple, Sony, and Android manufacturers. Its compatibility
with software media players (VLC, Windows Media Player, etc.) and hardware devices
(smartphones, tablets, car audio systems) is broad and growing. Tungsten initiatives like
Apple’s exclusive use of AAC for iTunes accelerated adoption, making AAC a de facto
standard for high-quality lossy audio compression in modern digital ecosystems.

4.6. Comparison of AAC and MP3


Compared to MP3, AAC provides superior audio quality at the same bitrates or similar quality
at lower bitrates due to its higher compression efficiency and advanced coding tools. It
supports broader sampling rates and channel configurations, enabling richer soundscapes
including surround and immersive audio. AAC also better handles transient signals and high-
frequency content, preserving detail and clarity. Although MP3 retains the advantage in
universal legacy compatibility, AAC's advantages in quality, efficiency, and future-proofing
make it the preferred format for contemporary streaming and digital media applications.

5. Psychoacoustics in Audio Compression


5.1. Human auditory perception principles
Psychoacoustics explores how humans perceive sound, focusing on the psychological and
physiological processes that govern auditory sensation. The auditory system has inherent
limitations such as frequency range sensitivity (typically 20 Hz to 20 kHz), temporal
resolution, and masking effects that influence which sounds are noticed or ignored.
Critical bands describe how the ear groups frequencies for perception, with varying
resolving capacity across the spectrum. This understanding allows audio engineers
and compression algorithms to optimize encoding by emphasizing perceptually
significant sounds while disregarding others less discernible to listeners.

5
5.2. Auditory masking and its role
Auditory masking is a key psychoacoustic phenomenon where loud sounds make it difficult
or impossible to hear quieter ones occurring simultaneously (simultaneous masking) or
closely in time (temporal masking). Masking thresholds vary by frequency and sound
intensity, enabling compression systems to omit audio components under the threshold
without perceptual loss. This mechanism is exploited in codecs to reduce redundant data by
encoding only the audible parts of the audio spectrum, efficiently preserving quality while
minimizing file size. Masking is modeled mathematically in psychoacoustic models to guide
bit allocation across frequency bands.

5.3. Implementation in MP3 and AAC codecs


MP3 and AAC codecs integrate psychoacoustic models to enhance compression efficiency.
These models analyze audio frames and divide the spectrum into critical bands, calculating
masking thresholds that permit lossy removal of inaudible signal components. MP3 uses
hybrid filter banks and basic psychoacoustic models, while AAC applies advanced frequency
resolution and temporal noise shaping techniques to further refine bit allocation. Both codecs
use intensity stereo and mid/side stereo coding to exploit redundant information in stereo
channels, maximizing compression without noticeably sacrificing audio fidelity.

5.4. Effects of compression on perceived sound


While psychoacoustic compression maintains high perceived audio quality, aggressive
compression can introduce artifacts such as pre-echo, warbling, or metallic sounds due to
quantization and bit reduction. Listeners may perceive reduced spatial clarity or loss of subtle
detail in complex or high-frequency signals. However, properly tuned compression balances
bitrate reduction with minimal perceptual impact, enabling efficient streaming, storage, and
transmission. Advances in psychoacoustic modeling continue to improve this balance,
delivering near-transparent audio at significantly reduced data sizes compared to
uncompressed sources.

6. MIDI Format
6.1. History and purpose of MIDI
MIDI, or Musical Instrument Digital Interface, was introduced in 1983 as a standardized
protocol to enable electronic musical instruments from different manufacturers to
communicate and synchronize with each other. Before MIDI, instruments used proprietary
systems, which limited their interoperability. The development of MIDI was led by key figures
like Dave Smith of Sequential Circuits and Ikutaro Kakehashi of Roland, who collaborated to

6
create a simple, inexpensive, and universal interface. The protocol allowed instructions like
note on/off, pitch, velocity, and control changes to be transmitted digitally, revolutionizing
music production by enabling complex multi-instrument setups and easier editing. MIDI's
open nature and widespread adoption made it an enduring standard that has evolved but
remained compatible for decades.

6.2. Structure of MIDI data


MIDI data is structured as a series of event messages, each consisting of a status byte
followed by one or more data bytes. Messages encode musical commands such as note
events (note on, note off), control changes (modulation, volume), program changes
(instrument selection), pitch bend, and system messages (timing, synchronization). The data
is transmitted serially over a 5-pin DIN cable or over modern USB and network protocols.
Each MIDI event includes parameters like note number (pitch), velocity (loudness), and
channel number, facilitating multitimbral control of different instruments. MIDI files store
these events in sequences with timing information for playback.

6.3. Event-based encoding of musical information


MIDI uses an event-based encoding system to represent music not as audio waveforms but
as instructions or performance data. Instead of storing sound, it records when notes are
played, their dynamics, articulation, and other expressive parameters. This enables extremely
compact file sizes and the ability to edit individual musical elements without degrading audio
quality. The event-based nature also means MIDI enables real-time control during live
performance and supports automation of effects, tempo changes, and device
synchronization.

6.4. Advantages and limitations of MIDI


MIDI's advantages include its small data size, interoperability across hardware and software,
and high editability. Musicians can change notes, instruments, and effects dynamically
without re-recording audio. However, MIDI does not encode audio signals and depends on
the quality of the receiving synthesizers or sound modules for sound generation. It also lacks
native support for complex audio effects or high-fidelity sound, limiting its use as a
standalone format for final music delivery. Additionally, the 16-channel limitation can restrict
large-scale orchestration without channel management.

6.5. Real-world applications in music and multimedia


MIDI is widely used in music production, enabling sequencing, composition, and live
performance control. It allows producers to orchestrate multiple virtual instruments and
hardware synthesizers from a single controller. Beyond music, MIDI is used in multimedia

7
applications such as video game soundtracks, interactive installations, and lighting control
systems. Its extensibility supports integration with digital audio workstations (DAWs),
enabling advanced editing and automation workflows. Despite newer audio formats, MIDI
remains foundational in electronic music and real-time performance setups due to its
flexibility and universality.

7. Comparison of Audio File Formats


7.1. Compression efficiency and audio quality
Audio file formats vary significantly in their compression techniques and resulting audio
quality. Lossy formats like MP3, AAC, and OGG utilize perceptual coding algorithms to
reduce file sizes by removing inaudible or less important audio data, achieving compression
ratios that make files much smaller but with some quality loss noticeable at low bitrates. AAC
generally offers better audio quality than MP3 at the same bitrate due to advanced
psychoacoustic modeling and more efficient encoding practices. Lossless formats such as
FLAC, ALAC, and WAV preserve the original audio data entirely, maintaining pristine sound
quality but with larger file sizes. These formats are preferred when quality cannot be
compromised, such as professional mastering or archival.

7.2. File sizes and use cases


File size directly relates to the chosen format and compression level. Uncompressed formats
like WAV and AIFF have very large file sizes, often exceeding 10 MB per minute of audio,
making them suitable for editing and production workflows where audio fidelity is critical.
Lossless compressed formats like FLAC reduce size by about 30-50% while preserving full
audio quality, favored for archiving and audiophile listening. Lossy formats like MP3 and AAC
achieve dramatic size reductions—often 75-90% smaller than uncompressed—enabling
efficient storage and transmission, making them ideal for streaming, portable devices, and
online distribution where bandwidth and storage are limited.

7.3. Suitability for different workflows and platforms


Different workflows and platforms dictate the choice of audio format. Professional studios
and mastering use uncompressed or lossless formats for highest fidelity during production
and archival. Streaming services and mobile apps commonly use AAC or MP3 due to wide
compatibility and efficient compression offering acceptable quality at lower bitrates. Formats
like OGG Vorbis are popular in open-source projects, gaming, and some web applications
due to their open licensing. Some platforms prioritize low latency or multi-channel audio,
influencing format choice accordingly. Compatibility with hardware (e.g., car stereos, mobile
phones) and software ecosystems also affects format preference.
8
9

You might also like