SlideShare a Scribd company logo
Adam Sporka
Charles University
Tuesdays 10.40, Room SW1, Malostranské náměstí
NCGD009 ’19/’20
Audio Signal Representation
Technical remark: I drew a number of sketches on the whiteboard. These
were not archived in this deck of slides. Sorry about that, I’ll keep it in mind
next time!
Acoustics 101
Sound is oscillation of atmospheric pressure, detectable by ears.
20 Hz – 20,000 Hz
• Amplitude of anything over time
• A/D
• Sampling frequency
• Bit depth resolution
• D/A
• Time domain
• Frequency domain
Signal Processing 101
• Periodic measurement of the input signal
• Storing the values in a sequence
A/D Converter
0.000
0.383
0.707
0.924
1.000
0.924
0.707
0.383
0.000
– 0.383
– 0.707
– 0.924
– 1.000
– 0.924
– 0.707
– 0.383
0.000
t
D/A Converter (DAC)
• Processing a sequence of values
• Conversion of each value to amplitude
0.000
0.383
0.707
0.924
1.000
0.924
0.707
0.383
0.000
– 0.383
– 0.707
– 0.924
– 1.000
– 0.924
– 0.707
– 0.383
0.000
t
Audio Data Formats
Time domain-based formats
• Pulse Code Modulation
• WAV
• FLAC
• ...
Frequency domain-based formats
• MP3
• Ogg Vorbis
• ...
(Musical Instrument Digital Interface, MIDI)
Mentioned for sake of completeness
Events and their placement in time
Multi-channel Audio
mono FC
stereo FL+FR
2.1 FL+FR+LFE
3.0 FL+FR+FC
3.0(back) FL+FR+BC
4.0 FL+FR+FC+BC
quad FL+FR+BL+BR
quad(side) FL+FR+SL+SR
3.1 FL+FR+FC+LFE
5.0 FL+FR+FC+BL+BR
5.0(side) FL+FR+FC+SL+SR
4.1 FL+FR+FC+LFE+BC
5.1 FL+FR+FC+LFE+BL+BR
5.1(side) FL+FR+FC+LFE+SL+SR
6.0 FL+FR+FC+BC+SL+SR
6.0(front) FL+FR+FLC+FRC+SL+SR
hexagonal FL+FR+FC+BL+BR+BC
6.1 FL+FR+FC+LFE+BC+SL+SR
6.1(back) FL+FR+FC+LFE+BL+BR+BC
6.1(front) FL+FR+LFE+FLC+FRC+SL+SR
7.0 FL+FR+FC+BL+BR+SL+SR
7.0(front) FL+FR+FC+FLC+FRC+SL+SR
7.1 FL+FR+FC+LFE+BL+BR+SL+SR
7.1(wide) FL+FR+FC+LFE+BL+BR+FLC+FRC
7.1(wide-side) FL+FR+FC+LFE+FLC+FRC+SL+SR
octagonal FL+FR+FC+BL+BR+BC+SL+SR
hexadecagonal FL+FR+FC+BL+BR+BC+SL+SR+TFL+TFC+TFR+TBL+TBC+TBR+WL+WR
Audio Playback
“Sample pump”
D/A < audio controller < operating system < process < playback routine
Aliasing
http://www.cs.berkeley.edu/~sequin/CS184/LECT_09/L28.html
Aliasing
http://www.cs.berkeley.edu/~sequin/CS184/LECT_09/L28.html
• Sampling of a signal containing higher frequencies
than Nyquist Frequency
Aliasing
Which Sampling Frequency?
• Depends on the highest pitch we wish to represent
50 ms
44100 Hz
22050 Hz
14700 Hz
11025 Hz
8820 Hz
Which Sampling Frequency?
0 s 1 s 2 s
21
KHz
10
Hz
Which Sampling Frequency?
0 s 1 s 2 s
21
KHz
10
Hz
Bit Depth
• Measured values stored as separated numbers
• Resolution in bits
– Typical values:
8, 12, 16, 24, 32 bits
• Quantization error
– measurement error on each sample
– signal contains added noise
Bit Depth
• Example:
8-bit
4-bit
3-bit
2-bit
1-bit
7 sec
A low level audio output API
// Main thread
audioAPI_set_callback(&prepare_buffer);
audioAPI_play();
// … some time after (or never):
audioAPI_stop();
// Callback function
static cursor = 0;
void prepare_buffer(
signed_8bit_number *dest_buff,
int length)
{
for (int a=0; a<length; a++) {
cursor ++;
double time = cursor / 48000;
dest_buff[a] = 127*sin(time);
}
}
Buffering
PLAY BUFFER 1PREPARE BUFFER 2
PLAY BUFFER 2
PLAY BUFFER 3
PLAY BUFFER 4
PLAY BUFFER 5
PREPARE BUFFER 3
PREPARE BUFFER 4
PREPARE BUFFER 5
PREPARE BUFFER 1
PREPARE BUFFER 6
PLAY BUFFER 6PREPARE BUFFER 7
PLAY BUFFER 7
time
– dropout
CALLBACKS SOUND HW ACTIVITY
Buffering
• Shorter, fewer buffers:
– E.g.: 1 buffer, 256 samples @48,000 Hz
• 5.33 ms
• Almost good for the real-time music performances
• Zero margin for errors and delays
Buffering
• Longer, more buffers
– E.g.: 10 buffers, 1024 samples each @48000 Hz
• 213 ms
• Safer
• Probably OK for phone calls
– Internet radios – 1~60 seconds of buffer
• Unsuitable for interactive tasks
Playback Errors
• Data transmission errors
– Omission
– Pause
– Repetition
• Wrong sample rate
– Different playback speed
– Gradual drop of synchronicity
“Going above Zero”
• Distortion:

More Related Content

PDF
Building the Minima - Pacificon 2014
PDF
Rt60 | Dewesoft
PDF
Build cool stuff with arduino for sci camp 16 dec13
DOCX
All about ir arduino - cool
PPT
Tomas_IWAENC_keynote10.ppt
PDF
PPT
Orthogonal Frequency Division Multiplexing.ppt
PPTX
Telecommunications: Speech and Audio
Building the Minima - Pacificon 2014
Rt60 | Dewesoft
Build cool stuff with arduino for sci camp 16 dec13
All about ir arduino - cool
Tomas_IWAENC_keynote10.ppt
Orthogonal Frequency Division Multiplexing.ppt
Telecommunications: Speech and Audio

Similar to Audio Data Representation (NCGD009) (20)

PDF
Rigol dsa700 low cost spectrum analyzer
PPTX
Analog RF Front End Architecture
PPT
Speech coding techniques
PDF
Hantek DSO5072P Datasheet
PPTX
Digital Audio
PDF
SHA850A_DataSheet_EN02B_spectrum_analyzer.pdf
PDF
Quantum Computer - Low noise signal processing solution
PDF
Eve Audio Catalog 2014
PPTX
Sound digitalisation
PDF
Synchronous Time / Frequency Domain Measurements Using a Digital Oscilloscope...
PDF
vantage-audio-solutions.pdf
PDF
Katalog siglent-handheld-digital-oscilloscope-shs800-series-tridinamika
PPTX
Digital Audio & Signal Processing (Elad Gariany)
PDF
Oscilloscope Fundamentals, Hands-On Course at EELive 2014
PPTX
Design of Radio Frequency Integrated Circuits for UWB Communications
PPTX
Development of a low cost pc-based single-channel eeg monitoring system
PDF
9420 datasheet
PPT
Noise reduction techniques
PDF
Analog to Digital Converters and Data Acquisition Systems
PPT
est your knowledge of digital communication systems with our interactive quiz...
Rigol dsa700 low cost spectrum analyzer
Analog RF Front End Architecture
Speech coding techniques
Hantek DSO5072P Datasheet
Digital Audio
SHA850A_DataSheet_EN02B_spectrum_analyzer.pdf
Quantum Computer - Low noise signal processing solution
Eve Audio Catalog 2014
Sound digitalisation
Synchronous Time / Frequency Domain Measurements Using a Digital Oscilloscope...
vantage-audio-solutions.pdf
Katalog siglent-handheld-digital-oscilloscope-shs800-series-tridinamika
Digital Audio & Signal Processing (Elad Gariany)
Oscilloscope Fundamentals, Hands-On Course at EELive 2014
Design of Radio Frequency Integrated Circuits for UWB Communications
Development of a low cost pc-based single-channel eeg monitoring system
9420 datasheet
Noise reduction techniques
Analog to Digital Converters and Data Acquisition Systems
est your knowledge of digital communication systems with our interactive quiz...
Ad

Recently uploaded (20)

PDF
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
PDF
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
PDF
iTop VPN Free 5.6.0.5262 Crack latest version 2025
PPTX
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
PDF
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
PPTX
history of c programming in notes for students .pptx
PPTX
assetexplorer- product-overview - presentation
PDF
AutoCAD Professional Crack 2025 With License Key
PDF
Salesforce Agentforce AI Implementation.pdf
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Download FL Studio Crack Latest version 2025 ?
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Autodesk AutoCAD Crack Free Download 2025
PDF
Digital Systems & Binary Numbers (comprehensive )
PPTX
Computer Software and OS of computer science of grade 11.pptx
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PDF
Website Design Services for Small Businesses.pdf
PDF
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
AI-Powered Threat Modeling: The Future of Cybersecurity by Arun Kumar Elengov...
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
iTop VPN Free 5.6.0.5262 Crack latest version 2025
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
history of c programming in notes for students .pptx
assetexplorer- product-overview - presentation
AutoCAD Professional Crack 2025 With License Key
Salesforce Agentforce AI Implementation.pdf
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Download FL Studio Crack Latest version 2025 ?
wealthsignaloriginal-com-DS-text-... (1).pdf
Autodesk AutoCAD Crack Free Download 2025
Digital Systems & Binary Numbers (comprehensive )
Computer Software and OS of computer science of grade 11.pptx
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
Website Design Services for Small Businesses.pdf
Tally Prime Crack Download New Version 5.1 [2025] (License Key Free
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Ad

Audio Data Representation (NCGD009)

  • 1. Adam Sporka Charles University Tuesdays 10.40, Room SW1, Malostranské náměstí NCGD009 ’19/’20 Audio Signal Representation
  • 2. Technical remark: I drew a number of sketches on the whiteboard. These were not archived in this deck of slides. Sorry about that, I’ll keep it in mind next time!
  • 3. Acoustics 101 Sound is oscillation of atmospheric pressure, detectable by ears. 20 Hz – 20,000 Hz
  • 4. • Amplitude of anything over time • A/D • Sampling frequency • Bit depth resolution • D/A • Time domain • Frequency domain Signal Processing 101
  • 5. • Periodic measurement of the input signal • Storing the values in a sequence A/D Converter 0.000 0.383 0.707 0.924 1.000 0.924 0.707 0.383 0.000 – 0.383 – 0.707 – 0.924 – 1.000 – 0.924 – 0.707 – 0.383 0.000 t
  • 6. D/A Converter (DAC) • Processing a sequence of values • Conversion of each value to amplitude 0.000 0.383 0.707 0.924 1.000 0.924 0.707 0.383 0.000 – 0.383 – 0.707 – 0.924 – 1.000 – 0.924 – 0.707 – 0.383 0.000 t
  • 7. Audio Data Formats Time domain-based formats • Pulse Code Modulation • WAV • FLAC • ... Frequency domain-based formats • MP3 • Ogg Vorbis • ...
  • 8. (Musical Instrument Digital Interface, MIDI) Mentioned for sake of completeness Events and their placement in time
  • 9. Multi-channel Audio mono FC stereo FL+FR 2.1 FL+FR+LFE 3.0 FL+FR+FC 3.0(back) FL+FR+BC 4.0 FL+FR+FC+BC quad FL+FR+BL+BR quad(side) FL+FR+SL+SR 3.1 FL+FR+FC+LFE 5.0 FL+FR+FC+BL+BR 5.0(side) FL+FR+FC+SL+SR 4.1 FL+FR+FC+LFE+BC 5.1 FL+FR+FC+LFE+BL+BR 5.1(side) FL+FR+FC+LFE+SL+SR 6.0 FL+FR+FC+BC+SL+SR 6.0(front) FL+FR+FLC+FRC+SL+SR hexagonal FL+FR+FC+BL+BR+BC 6.1 FL+FR+FC+LFE+BC+SL+SR 6.1(back) FL+FR+FC+LFE+BL+BR+BC 6.1(front) FL+FR+LFE+FLC+FRC+SL+SR 7.0 FL+FR+FC+BL+BR+SL+SR 7.0(front) FL+FR+FC+FLC+FRC+SL+SR 7.1 FL+FR+FC+LFE+BL+BR+SL+SR 7.1(wide) FL+FR+FC+LFE+BL+BR+FLC+FRC 7.1(wide-side) FL+FR+FC+LFE+FLC+FRC+SL+SR octagonal FL+FR+FC+BL+BR+BC+SL+SR hexadecagonal FL+FR+FC+BL+BR+BC+SL+SR+TFL+TFC+TFR+TBL+TBC+TBR+WL+WR
  • 10. Audio Playback “Sample pump” D/A < audio controller < operating system < process < playback routine
  • 13. • Sampling of a signal containing higher frequencies than Nyquist Frequency Aliasing
  • 14. Which Sampling Frequency? • Depends on the highest pitch we wish to represent 50 ms 44100 Hz 22050 Hz 14700 Hz 11025 Hz 8820 Hz
  • 15. Which Sampling Frequency? 0 s 1 s 2 s 21 KHz 10 Hz
  • 16. Which Sampling Frequency? 0 s 1 s 2 s 21 KHz 10 Hz
  • 17. Bit Depth • Measured values stored as separated numbers • Resolution in bits – Typical values: 8, 12, 16, 24, 32 bits • Quantization error – measurement error on each sample – signal contains added noise
  • 19. A low level audio output API // Main thread audioAPI_set_callback(&prepare_buffer); audioAPI_play(); // … some time after (or never): audioAPI_stop(); // Callback function static cursor = 0; void prepare_buffer( signed_8bit_number *dest_buff, int length) { for (int a=0; a<length; a++) { cursor ++; double time = cursor / 48000; dest_buff[a] = 127*sin(time); } }
  • 20. Buffering PLAY BUFFER 1PREPARE BUFFER 2 PLAY BUFFER 2 PLAY BUFFER 3 PLAY BUFFER 4 PLAY BUFFER 5 PREPARE BUFFER 3 PREPARE BUFFER 4 PREPARE BUFFER 5 PREPARE BUFFER 1 PREPARE BUFFER 6 PLAY BUFFER 6PREPARE BUFFER 7 PLAY BUFFER 7 time – dropout CALLBACKS SOUND HW ACTIVITY
  • 21. Buffering • Shorter, fewer buffers: – E.g.: 1 buffer, 256 samples @48,000 Hz • 5.33 ms • Almost good for the real-time music performances • Zero margin for errors and delays
  • 22. Buffering • Longer, more buffers – E.g.: 10 buffers, 1024 samples each @48000 Hz • 213 ms • Safer • Probably OK for phone calls – Internet radios – 1~60 seconds of buffer • Unsuitable for interactive tasks
  • 23. Playback Errors • Data transmission errors – Omission – Pause – Repetition • Wrong sample rate – Different playback speed – Gradual drop of synchronicity