SlideShare a Scribd company logo
1 of 24
Download to read offline
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

Similar to Audio Data Representation (NCGD009)

Rigol dsa700 low cost spectrum analyzer
Rigol dsa700 low cost spectrum analyzerRigol dsa700 low cost spectrum analyzer
Rigol dsa700 low cost spectrum analyzerNIHON DENKEI SINGAPORE
 
Analog RF Front End Architecture
Analog RF Front End ArchitectureAnalog RF Front End Architecture
Analog RF Front End ArchitectureSHIV DUTT
 
Hantek DSO5072P Datasheet
Hantek DSO5072P DatasheetHantek DSO5072P Datasheet
Hantek DSO5072P DatasheetRimsky Cheng
 
Quantum Computer - Low noise signal processing solution
Quantum Computer - Low noise signal processing solutionQuantum Computer - Low noise signal processing solution
Quantum Computer - Low noise signal processing solutionNIHON DENKEI SINGAPORE
 
Eve Audio Catalog 2014
Eve Audio Catalog 2014Eve Audio Catalog 2014
Eve Audio Catalog 2014Radikal Ltd.
 
Synchronous Time / Frequency Domain Measurements Using a Digital Oscilloscope...
Synchronous Time / Frequency Domain Measurements Using a Digital Oscilloscope...Synchronous Time / Frequency Domain Measurements Using a Digital Oscilloscope...
Synchronous Time / Frequency Domain Measurements Using a Digital Oscilloscope...Rohde & Schwarz North America
 
vantage-audio-solutions.pdf
vantage-audio-solutions.pdfvantage-audio-solutions.pdf
vantage-audio-solutions.pdfAminMK2
 
Katalog siglent-handheld-digital-oscilloscope-shs800-series-tridinamika
Katalog siglent-handheld-digital-oscilloscope-shs800-series-tridinamikaKatalog siglent-handheld-digital-oscilloscope-shs800-series-tridinamika
Katalog siglent-handheld-digital-oscilloscope-shs800-series-tridinamikaPT. Tridinamika Jaya Instrument
 
Digital Audio & Signal Processing (Elad Gariany)
Digital Audio & Signal Processing (Elad Gariany)Digital Audio & Signal Processing (Elad Gariany)
Digital Audio & Signal Processing (Elad Gariany)Ron Reiter
 
Oscilloscope Fundamentals, Hands-On Course at EELive 2014
Oscilloscope Fundamentals, Hands-On Course at EELive 2014Oscilloscope Fundamentals, Hands-On Course at EELive 2014
Oscilloscope Fundamentals, Hands-On Course at EELive 2014Rohde & Schwarz North America
 
Design of Radio Frequency Integrated Circuits for UWB Communications
Design of Radio Frequency Integrated Circuits for UWB CommunicationsDesign of Radio Frequency Integrated Circuits for UWB Communications
Design of Radio Frequency Integrated Circuits for UWB CommunicationsRFIC-IUMA
 
Development of a low cost pc-based single-channel eeg monitoring system
Development of a low cost pc-based single-channel eeg monitoring systemDevelopment of a low cost pc-based single-channel eeg monitoring system
Development of a low cost pc-based single-channel eeg monitoring systemMd Kafiul Islam
 
Noise reduction techniques
Noise reduction techniquesNoise reduction techniques
Noise reduction techniquesChico3001
 
Analog to Digital Converters and Data Acquisition Systems
Analog to Digital Converters and Data Acquisition SystemsAnalog to Digital Converters and Data Acquisition Systems
Analog to Digital Converters and Data Acquisition SystemsMathivanan Natarajan
 
Using Python3 to Build a Cloud Computing Service for my Superboard II
Using Python3 to Build a Cloud Computing Service for my Superboard IIUsing Python3 to Build a Cloud Computing Service for my Superboard II
Using Python3 to Build a Cloud Computing Service for my Superboard IIDavid Beazley (Dabeaz LLC)
 
ADC and its Circuit design
ADC and its Circuit designADC and its Circuit design
ADC and its Circuit designVihari Andukuri
 

Similar to Audio Data Representation (NCGD009) (20)

Rigol dsa700 low cost spectrum analyzer
Rigol dsa700 low cost spectrum analyzerRigol dsa700 low cost spectrum analyzer
Rigol dsa700 low cost spectrum analyzer
 
Analog RF Front End Architecture
Analog RF Front End ArchitectureAnalog RF Front End Architecture
Analog RF Front End Architecture
 
Speech coding techniques
Speech coding techniquesSpeech coding techniques
Speech coding techniques
 
Hantek DSO5072P Datasheet
Hantek DSO5072P DatasheetHantek DSO5072P Datasheet
Hantek DSO5072P Datasheet
 
Digital Audio
Digital AudioDigital Audio
Digital Audio
 
Quantum Computer - Low noise signal processing solution
Quantum Computer - Low noise signal processing solutionQuantum Computer - Low noise signal processing solution
Quantum Computer - Low noise signal processing solution
 
Eve Audio Catalog 2014
Eve Audio Catalog 2014Eve Audio Catalog 2014
Eve Audio Catalog 2014
 
Sound digitalisation
Sound digitalisationSound digitalisation
Sound digitalisation
 
Synchronous Time / Frequency Domain Measurements Using a Digital Oscilloscope...
Synchronous Time / Frequency Domain Measurements Using a Digital Oscilloscope...Synchronous Time / Frequency Domain Measurements Using a Digital Oscilloscope...
Synchronous Time / Frequency Domain Measurements Using a Digital Oscilloscope...
 
vantage-audio-solutions.pdf
vantage-audio-solutions.pdfvantage-audio-solutions.pdf
vantage-audio-solutions.pdf
 
Katalog siglent-handheld-digital-oscilloscope-shs800-series-tridinamika
Katalog siglent-handheld-digital-oscilloscope-shs800-series-tridinamikaKatalog siglent-handheld-digital-oscilloscope-shs800-series-tridinamika
Katalog siglent-handheld-digital-oscilloscope-shs800-series-tridinamika
 
Digital Audio & Signal Processing (Elad Gariany)
Digital Audio & Signal Processing (Elad Gariany)Digital Audio & Signal Processing (Elad Gariany)
Digital Audio & Signal Processing (Elad Gariany)
 
Oscilloscope Fundamentals, Hands-On Course at EELive 2014
Oscilloscope Fundamentals, Hands-On Course at EELive 2014Oscilloscope Fundamentals, Hands-On Course at EELive 2014
Oscilloscope Fundamentals, Hands-On Course at EELive 2014
 
Design of Radio Frequency Integrated Circuits for UWB Communications
Design of Radio Frequency Integrated Circuits for UWB CommunicationsDesign of Radio Frequency Integrated Circuits for UWB Communications
Design of Radio Frequency Integrated Circuits for UWB Communications
 
Development of a low cost pc-based single-channel eeg monitoring system
Development of a low cost pc-based single-channel eeg monitoring systemDevelopment of a low cost pc-based single-channel eeg monitoring system
Development of a low cost pc-based single-channel eeg monitoring system
 
9420 datasheet
9420 datasheet9420 datasheet
9420 datasheet
 
Noise reduction techniques
Noise reduction techniquesNoise reduction techniques
Noise reduction techniques
 
Analog to Digital Converters and Data Acquisition Systems
Analog to Digital Converters and Data Acquisition SystemsAnalog to Digital Converters and Data Acquisition Systems
Analog to Digital Converters and Data Acquisition Systems
 
Using Python3 to Build a Cloud Computing Service for my Superboard II
Using Python3 to Build a Cloud Computing Service for my Superboard IIUsing Python3 to Build a Cloud Computing Service for my Superboard II
Using Python3 to Build a Cloud Computing Service for my Superboard II
 
ADC and its Circuit design
ADC and its Circuit designADC and its Circuit design
ADC and its Circuit design
 

Recently uploaded

SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 

Recently uploaded (20)

SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 

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