SlideShare a Scribd company logo
1 of 33
Download to read offline
Introduction to Audio Content Analysis
module 7.6: chord detection
alexander lerch
overview chords chord detection HMMs summary
introduction
overview
corresponding textbook section
section 7.6
lecture content
• musical chords and harmony
• baseline chord detection
• Hidden Markov Models (HMMs) and the Viterbi algorithm
learning objectives
• name basic chords and describe the concept of chord inversions
• discuss commonalities and differences between chord & key detection
• discuss the usefulness of HMMs for chord detection
• explain the Viterbi algorithm with an example
module 7.6: chord detection 1 / 19
overview chords chord detection HMMs summary
introduction
overview
corresponding textbook section
section 7.6
lecture content
• musical chords and harmony
• baseline chord detection
• Hidden Markov Models (HMMs) and the Viterbi algorithm
learning objectives
• name basic chords and describe the concept of chord inversions
• discuss commonalities and differences between chord & key detection
• discuss the usefulness of HMMs for chord detection
• explain the Viterbi algorithm with an example
module 7.6: chord detection 1 / 19
overview chords chord detection HMMs summary
musical pitch
chords
simultaneous use of several pitches ⇒ chords
usually constructed of (major/minor) thirds
note:
• chord type independent of pitch doubling, pitch order
• same label for keys and chords
module 7.6: chord detection 2 / 19
overview chords chord detection HMMs summary
musical pitch
chords
simultaneous use of several pitches ⇒ chords
usually constructed of (major/minor) thirds
note:
• chord type independent of pitch doubling, pitch order
• same label for keys and chords
module 7.6: chord detection 2 / 19
overview chords chord detection HMMs summary
musical pitch
chord inversion
most common: root note is lowest note
otherwise: chord inversion
module 7.6: chord detection 3 / 19
overview chords chord detection HMMs summary
musical pitch
harmony
key and tonal context define chord’s harmonic function
examples:
• tonic:
chord on 1st scale degree (tonal center)
• dominant:
chord on 5th scale degree (often moves to tonic)
• subdominant:
chord on 4th scale degree
• . . .
module 7.6: chord detection 4 / 19
overview chords chord detection HMMs summary
chord detection
introduction: key vs. chord detection
commonalities
• chords are octave independent ⇒ pitch chroma sufficient
• process flow: pitch chroma extraction + classification
differences
• time frame for pitch chroma calculation
• templates
• number of templates/chords
• many results per song (time series)
module 7.6: chord detection 5 / 19
overview chords chord detection HMMs summary
chord detection
introduction: key vs. chord detection
commonalities
• chords are octave independent ⇒ pitch chroma sufficient
• process flow: pitch chroma extraction + classification
differences
• time frame for pitch chroma calculation
• templates
• number of templates/chords
• many results per song (time series)
module 7.6: chord detection 5 / 19
overview chords chord detection HMMs summary
chord detection
introduction: overview
Pitch Representation
Extraction
Similarity
Computation
Chord Template
Definition
Time Sequence
Modeling
Chord Sequence
Chord Probabilities
module 7.6: chord detection 6 / 19
overview chords chord detection HMMs summary
pitch chroma
introduction
pitch class distribution: 12-dimensional vector
map all pitch class bands in all octaves to one
module 7.6: chord detection 7 / 19
matlab
source:
plotPitchChromaGrouping.m
overview chords chord detection HMMs summary
pitch chroma
introduction
pitch class distribution: 12-dimensional vector
map all pitch class bands in all octaves to one
module 7.6: chord detection 7 / 19
matlab
source:
plotPitchChroma.m
overview chords chord detection HMMs summary
pitch chroma
introduction
pitch class distribution: 12-dimensional vector
map all pitch class bands in all octaves to one
pitch chroma properties
no octave information
• no differentiation between prime and octave
• no info on inversion
robust, timbre-independent representation
module 7.6: chord detection 7 / 19
overview chords chord detection HMMs summary
chord detection
chord template
compare extracted pitch
chroma with template
• simplest possible template
and distance: linear
transformation
example — C major:
Γ(0, j) = [1/3, 0, 0, 0, 1/3, 0, 0, 1/3, 0, 0, 0, 0]
⇒ instantaneous chord
likelihood:
ψ(c, n) =
11
X
j=0
Γ(c, j) · ν(j, n)
module 7.6: chord detection 8 / 19
matlab
source:
plotChordTemplates.m
overview chords chord detection HMMs summary
chord detection
chord progression 1/2
apply musical knowledge to increase the result’s robustness and accuracy:
different probabilities for different chord progressions (similar to key modulations),
e.g.
• cadences: I-IV-V-I
• sequences: circle progression
⇒ model for chord progression probabilities
1 analytical model based on music theory
• circle of fifths (?!)
• key profile correlation (?!)
2 empirical model based on data
• annotate audio
• symbolic score
module 7.6: chord detection 9 / 19
overview chords chord detection HMMs summary
chord detection
chord progression 1/2
apply musical knowledge to increase the result’s robustness and accuracy:
different probabilities for different chord progressions (similar to key modulations),
e.g.
• cadences: I-IV-V-I
• sequences: circle progression
⇒ model for chord progression probabilities
1 analytical model based on music theory
• circle of fifths (?!)
• key profile correlation (?!)
2 empirical model based on data
• annotate audio
• symbolic score
module 7.6: chord detection 9 / 19
overview chords chord detection HMMs summary
chord detection
chord progression 1/2
apply musical knowledge to increase the result’s robustness and accuracy:
different probabilities for different chord progressions (similar to key modulations),
e.g.
• cadences: I-IV-V-I
• sequences: circle progression
⇒ model for chord progression probabilities
1 analytical model based on music theory
• circle of fifths (?!)
• key profile correlation (?!)
2 empirical model based on data
• annotate audio
• symbolic score
module 7.6: chord detection 9 / 19
overview chords chord detection HMMs summary
chord detection
chord progression 2/2
what properties do chord progression probabilities depend on
module 7.6: chord detection 10 / 19
overview chords chord detection HMMs summary
chord detection
chord progression 2/2
what properties do chord progression probabilities depend on
musical key
larger musical context (model order)
style
tempo/length??
module 7.6: chord detection 10 / 19
overview chords chord detection HMMs summary
chord detection
markov chain
two possible states E, A
transition probabilities to other state(s) and to self
sum of transition probabilities equals 1
module 7.6: chord detection 11 / 19
from:
https://commons.wikimedia.org/wiki/File:Markovkate_01.svg
overview chords chord detection HMMs summary
chord detection
hidden markov model: variables
states:
unknown/hidden
transition probability:
probability of transitioning from one state to the other
observations:
measureable time series
emission probability:
probability of an observation given a state
start probability:
probability of the initial state
module 7.6: chord detection 12 / 19
overview chords chord detection HMMs summary
chord detection
hidden markov model: variables
X: states
y: possible observations
a: state transition probabilities
b: emission probabilities
module 7.6: chord detection 13 / 19
from
https://en.wikipedia.org/wiki/File:HiddenMarkovModel.svg
overview chords chord detection HMMs summary
chord detection
hidden markov model: example (WP) 1/2
scenario
• doctor diagnoses fever by how patients feel
• patient may feel normal, dizzy, or cold
• patient visits multiple days in a row
what are the states and observations in this case
module 7.6: chord detection 14 / 19
overview chords chord detection HMMs summary
chord detection
hidden markov model: example (WP) 1/2
scenario
• doctor diagnoses fever by how patients feel
• patient may feel normal, dizzy, or cold
• patient visits multiple days in a row
what are the states and observations in this case
states
• healthy
• fever
observations:
• normal
• cold
• dizzy
module 7.6: chord detection 14 / 19
overview chords chord detection HMMs summary
chord detection
hidden markov model: example (WP) 2/2
start probabilities (initial state assumption)
• healthy: 0.6
• fever: 0.4
emission probabilities (prob of obs given state)
• healthy: normal 0.5, cold 0.4, dizzy 0.1
• fever: : normal 0.1, cold 0.3, dizzy 0.6
transition probabilities
• healthy: healthy 0.7, fever 0.3
• fever: : healthy 0.4, fever 0.6
module 7.6: chord detection 15 / 19
overview chords chord detection HMMs summary
chord detection
hidden markov model: example (WP) 2/2
dizzy normal
cold
p
1
=
0
.
6
p
2
=
0
.
4
start probabilities
a12=0.3
a21=0.4
a
1
1
=0.7
a
2
2
=
0
.
6
b
1
2
=
0
.
4 b13=0.5
b
1
1
=
0
.
1
b21=0.6
b
2
2
=
0
.
3
b
2
3
=
0
.
1
transition probabilities
emission probabilities
n states
k observations
module 7.6: chord detection 15 / 19
overview chords chord detection HMMs summary
chord detection
hidden markov model: example (WP) 2/2
three observations:
day 1 normal → day 2 cold → day 3 dizzy
module 7.6: chord detection 16 / 19
overview chords chord detection HMMs summary
chord detection
hidden markov model: example (WP) 2/2
three observations:
day 1 normal → day 2 cold → day 3 dizzy
module 7.6: chord detection 16 / 19
overview chords chord detection HMMs summary
chord detection
hidden markov model: example (WP) 2/2
three observations:
day 1 normal → day 2 cold → day 3 dizzy
module 7.6: chord detection 16 / 19
overview chords chord detection HMMs summary
chord detection
hidden markov model: example (WP) 2/2
three observations:
day 1 normal → day 2 cold → day 3 dizzy
module 7.6: chord detection 16 / 19
overview chords chord detection HMMs summary
chord detection
HMMs for chord detection
states → chords
observations → pitch chroma
emission probability → trained with pitch chroma
transition probability → trained from dataset
start probability → chord statistics (style dependent?)
module 7.6: chord detection 17 / 19
overview chords chord detection HMMs summary
chord detection
chord detection example
module 7.6: chord detection 18 / 19
matlab
source:
plotChordDetection.m
overview chords chord detection HMMs summary
summary
lecture content
chords
• combination of three or more pitches
• usually stacked thirds
• can be inverted
chord detection
• processing steps
▶ pitch chroma extraction
▶ template matching
▶ chord transition model
Viterbi algorithm
• find globally optimal path through state space
• estimate state sequence with
▶ emission probabilities
▶ transition probabilities
module 7.6: chord detection 19 / 19

More Related Content

More from AlexanderLerch4

12-01-ACA-Similarity.pdf
12-01-ACA-Similarity.pdf12-01-ACA-Similarity.pdf
12-01-ACA-Similarity.pdfAlexanderLerch4
 
09-04-ACA-Temporal-BeatHisto.pdf
09-04-ACA-Temporal-BeatHisto.pdf09-04-ACA-Temporal-BeatHisto.pdf
09-04-ACA-Temporal-BeatHisto.pdfAlexanderLerch4
 
09-05-ACA-Temporal-Tempo.pdf
09-05-ACA-Temporal-Tempo.pdf09-05-ACA-Temporal-Tempo.pdf
09-05-ACA-Temporal-Tempo.pdfAlexanderLerch4
 
11-00-ACA-Fingerprinting.pdf
11-00-ACA-Fingerprinting.pdf11-00-ACA-Fingerprinting.pdf
11-00-ACA-Fingerprinting.pdfAlexanderLerch4
 
03-05-ACA-Input-Features.pdf
03-05-ACA-Input-Features.pdf03-05-ACA-Input-Features.pdf
03-05-ACA-Input-Features.pdfAlexanderLerch4
 
07-03-03-ACA-Tonal-Monof0.pdf
07-03-03-ACA-Tonal-Monof0.pdf07-03-03-ACA-Tonal-Monof0.pdf
07-03-03-ACA-Tonal-Monof0.pdfAlexanderLerch4
 
05-00-ACA-Data-Intro.pdf
05-00-ACA-Data-Intro.pdf05-00-ACA-Data-Intro.pdf
05-00-ACA-Data-Intro.pdfAlexanderLerch4
 
07-03-05-ACA-Tonal-F0Eval.pdf
07-03-05-ACA-Tonal-F0Eval.pdf07-03-05-ACA-Tonal-F0Eval.pdf
07-03-05-ACA-Tonal-F0Eval.pdfAlexanderLerch4
 
03-03-01-ACA-Input-TF-Fourier.pdf
03-03-01-ACA-Input-TF-Fourier.pdf03-03-01-ACA-Input-TF-Fourier.pdf
03-03-01-ACA-Input-TF-Fourier.pdfAlexanderLerch4
 
03-06-ACA-Input-FeatureLearning.pdf
03-06-ACA-Input-FeatureLearning.pdf03-06-ACA-Input-FeatureLearning.pdf
03-06-ACA-Input-FeatureLearning.pdfAlexanderLerch4
 
07-03-04-ACA-Tonal-Polyf0.pdf
07-03-04-ACA-Tonal-Polyf0.pdf07-03-04-ACA-Tonal-Polyf0.pdf
07-03-04-ACA-Tonal-Polyf0.pdfAlexanderLerch4
 
03-07-01-ACA-Input-Post-Processing.pdf
03-07-01-ACA-Input-Post-Processing.pdf03-07-01-ACA-Input-Post-Processing.pdf
03-07-01-ACA-Input-Post-Processing.pdfAlexanderLerch4
 
07-02-ACA-Tonal-Music.pdf
07-02-ACA-Tonal-Music.pdf07-02-ACA-Tonal-Music.pdf
07-02-ACA-Tonal-Music.pdfAlexanderLerch4
 
06-00-ACA-Evaluation.pdf
06-00-ACA-Evaluation.pdf06-00-ACA-Evaluation.pdf
06-00-ACA-Evaluation.pdfAlexanderLerch4
 
07-01-ACA-Tonal-Perception.pdf
07-01-ACA-Tonal-Perception.pdf07-01-ACA-Tonal-Perception.pdf
07-01-ACA-Tonal-Perception.pdfAlexanderLerch4
 
03-03-04-ACA-Input-TF-Filterbanks.pdf
03-03-04-ACA-Input-TF-Filterbanks.pdf03-03-04-ACA-Input-TF-Filterbanks.pdf
03-03-04-ACA-Input-TF-Filterbanks.pdfAlexanderLerch4
 
0A-01-ACA-Fundamentals-Digitization.pdf
0A-01-ACA-Fundamentals-Digitization.pdf0A-01-ACA-Fundamentals-Digitization.pdf
0A-01-ACA-Fundamentals-Digitization.pdfAlexanderLerch4
 
03-01-ACA-Input-Signals.pdf
03-01-ACA-Input-Signals.pdf03-01-ACA-Input-Signals.pdf
03-01-ACA-Input-Signals.pdfAlexanderLerch4
 
02-00-ACA-System-Intro.pdf
02-00-ACA-System-Intro.pdf02-00-ACA-System-Intro.pdf
02-00-ACA-System-Intro.pdfAlexanderLerch4
 

More from AlexanderLerch4 (20)

12-01-ACA-Similarity.pdf
12-01-ACA-Similarity.pdf12-01-ACA-Similarity.pdf
12-01-ACA-Similarity.pdf
 
09-04-ACA-Temporal-BeatHisto.pdf
09-04-ACA-Temporal-BeatHisto.pdf09-04-ACA-Temporal-BeatHisto.pdf
09-04-ACA-Temporal-BeatHisto.pdf
 
09-05-ACA-Temporal-Tempo.pdf
09-05-ACA-Temporal-Tempo.pdf09-05-ACA-Temporal-Tempo.pdf
09-05-ACA-Temporal-Tempo.pdf
 
11-00-ACA-Fingerprinting.pdf
11-00-ACA-Fingerprinting.pdf11-00-ACA-Fingerprinting.pdf
11-00-ACA-Fingerprinting.pdf
 
08-00-ACA-Intensity.pdf
08-00-ACA-Intensity.pdf08-00-ACA-Intensity.pdf
08-00-ACA-Intensity.pdf
 
03-05-ACA-Input-Features.pdf
03-05-ACA-Input-Features.pdf03-05-ACA-Input-Features.pdf
03-05-ACA-Input-Features.pdf
 
07-03-03-ACA-Tonal-Monof0.pdf
07-03-03-ACA-Tonal-Monof0.pdf07-03-03-ACA-Tonal-Monof0.pdf
07-03-03-ACA-Tonal-Monof0.pdf
 
05-00-ACA-Data-Intro.pdf
05-00-ACA-Data-Intro.pdf05-00-ACA-Data-Intro.pdf
05-00-ACA-Data-Intro.pdf
 
07-03-05-ACA-Tonal-F0Eval.pdf
07-03-05-ACA-Tonal-F0Eval.pdf07-03-05-ACA-Tonal-F0Eval.pdf
07-03-05-ACA-Tonal-F0Eval.pdf
 
03-03-01-ACA-Input-TF-Fourier.pdf
03-03-01-ACA-Input-TF-Fourier.pdf03-03-01-ACA-Input-TF-Fourier.pdf
03-03-01-ACA-Input-TF-Fourier.pdf
 
03-06-ACA-Input-FeatureLearning.pdf
03-06-ACA-Input-FeatureLearning.pdf03-06-ACA-Input-FeatureLearning.pdf
03-06-ACA-Input-FeatureLearning.pdf
 
07-03-04-ACA-Tonal-Polyf0.pdf
07-03-04-ACA-Tonal-Polyf0.pdf07-03-04-ACA-Tonal-Polyf0.pdf
07-03-04-ACA-Tonal-Polyf0.pdf
 
03-07-01-ACA-Input-Post-Processing.pdf
03-07-01-ACA-Input-Post-Processing.pdf03-07-01-ACA-Input-Post-Processing.pdf
03-07-01-ACA-Input-Post-Processing.pdf
 
07-02-ACA-Tonal-Music.pdf
07-02-ACA-Tonal-Music.pdf07-02-ACA-Tonal-Music.pdf
07-02-ACA-Tonal-Music.pdf
 
06-00-ACA-Evaluation.pdf
06-00-ACA-Evaluation.pdf06-00-ACA-Evaluation.pdf
06-00-ACA-Evaluation.pdf
 
07-01-ACA-Tonal-Perception.pdf
07-01-ACA-Tonal-Perception.pdf07-01-ACA-Tonal-Perception.pdf
07-01-ACA-Tonal-Perception.pdf
 
03-03-04-ACA-Input-TF-Filterbanks.pdf
03-03-04-ACA-Input-TF-Filterbanks.pdf03-03-04-ACA-Input-TF-Filterbanks.pdf
03-03-04-ACA-Input-TF-Filterbanks.pdf
 
0A-01-ACA-Fundamentals-Digitization.pdf
0A-01-ACA-Fundamentals-Digitization.pdf0A-01-ACA-Fundamentals-Digitization.pdf
0A-01-ACA-Fundamentals-Digitization.pdf
 
03-01-ACA-Input-Signals.pdf
03-01-ACA-Input-Signals.pdf03-01-ACA-Input-Signals.pdf
03-01-ACA-Input-Signals.pdf
 
02-00-ACA-System-Intro.pdf
02-00-ACA-System-Intro.pdf02-00-ACA-System-Intro.pdf
02-00-ACA-System-Intro.pdf
 

Recently uploaded

Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxFIDO Alliance
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGDSC PJATK
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...marcuskenyatta275
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxFIDO Alliance
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingScyllaDB
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfdanishmna97
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 
الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهMohamed Sweelam
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Skynet Technologies
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityVictorSzoltysek
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuidePixlogix Infotech
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfalexjohnson7307
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform EngineeringMarcus Vechiato
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctBrainSell Technologies
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)Samir Dash
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfSrushith Repakula
 

Recently uploaded (20)

Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهله
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 

07-06-ACA-Tonal-Chord.pdf

  • 1. Introduction to Audio Content Analysis module 7.6: chord detection alexander lerch
  • 2. overview chords chord detection HMMs summary introduction overview corresponding textbook section section 7.6 lecture content • musical chords and harmony • baseline chord detection • Hidden Markov Models (HMMs) and the Viterbi algorithm learning objectives • name basic chords and describe the concept of chord inversions • discuss commonalities and differences between chord & key detection • discuss the usefulness of HMMs for chord detection • explain the Viterbi algorithm with an example module 7.6: chord detection 1 / 19
  • 3. overview chords chord detection HMMs summary introduction overview corresponding textbook section section 7.6 lecture content • musical chords and harmony • baseline chord detection • Hidden Markov Models (HMMs) and the Viterbi algorithm learning objectives • name basic chords and describe the concept of chord inversions • discuss commonalities and differences between chord & key detection • discuss the usefulness of HMMs for chord detection • explain the Viterbi algorithm with an example module 7.6: chord detection 1 / 19
  • 4. overview chords chord detection HMMs summary musical pitch chords simultaneous use of several pitches ⇒ chords usually constructed of (major/minor) thirds note: • chord type independent of pitch doubling, pitch order • same label for keys and chords module 7.6: chord detection 2 / 19
  • 5. overview chords chord detection HMMs summary musical pitch chords simultaneous use of several pitches ⇒ chords usually constructed of (major/minor) thirds note: • chord type independent of pitch doubling, pitch order • same label for keys and chords module 7.6: chord detection 2 / 19
  • 6. overview chords chord detection HMMs summary musical pitch chord inversion most common: root note is lowest note otherwise: chord inversion module 7.6: chord detection 3 / 19
  • 7. overview chords chord detection HMMs summary musical pitch harmony key and tonal context define chord’s harmonic function examples: • tonic: chord on 1st scale degree (tonal center) • dominant: chord on 5th scale degree (often moves to tonic) • subdominant: chord on 4th scale degree • . . . module 7.6: chord detection 4 / 19
  • 8. overview chords chord detection HMMs summary chord detection introduction: key vs. chord detection commonalities • chords are octave independent ⇒ pitch chroma sufficient • process flow: pitch chroma extraction + classification differences • time frame for pitch chroma calculation • templates • number of templates/chords • many results per song (time series) module 7.6: chord detection 5 / 19
  • 9. overview chords chord detection HMMs summary chord detection introduction: key vs. chord detection commonalities • chords are octave independent ⇒ pitch chroma sufficient • process flow: pitch chroma extraction + classification differences • time frame for pitch chroma calculation • templates • number of templates/chords • many results per song (time series) module 7.6: chord detection 5 / 19
  • 10. overview chords chord detection HMMs summary chord detection introduction: overview Pitch Representation Extraction Similarity Computation Chord Template Definition Time Sequence Modeling Chord Sequence Chord Probabilities module 7.6: chord detection 6 / 19
  • 11. overview chords chord detection HMMs summary pitch chroma introduction pitch class distribution: 12-dimensional vector map all pitch class bands in all octaves to one module 7.6: chord detection 7 / 19 matlab source: plotPitchChromaGrouping.m
  • 12. overview chords chord detection HMMs summary pitch chroma introduction pitch class distribution: 12-dimensional vector map all pitch class bands in all octaves to one module 7.6: chord detection 7 / 19 matlab source: plotPitchChroma.m
  • 13. overview chords chord detection HMMs summary pitch chroma introduction pitch class distribution: 12-dimensional vector map all pitch class bands in all octaves to one pitch chroma properties no octave information • no differentiation between prime and octave • no info on inversion robust, timbre-independent representation module 7.6: chord detection 7 / 19
  • 14. overview chords chord detection HMMs summary chord detection chord template compare extracted pitch chroma with template • simplest possible template and distance: linear transformation example — C major: Γ(0, j) = [1/3, 0, 0, 0, 1/3, 0, 0, 1/3, 0, 0, 0, 0] ⇒ instantaneous chord likelihood: ψ(c, n) = 11 X j=0 Γ(c, j) · ν(j, n) module 7.6: chord detection 8 / 19 matlab source: plotChordTemplates.m
  • 15. overview chords chord detection HMMs summary chord detection chord progression 1/2 apply musical knowledge to increase the result’s robustness and accuracy: different probabilities for different chord progressions (similar to key modulations), e.g. • cadences: I-IV-V-I • sequences: circle progression ⇒ model for chord progression probabilities 1 analytical model based on music theory • circle of fifths (?!) • key profile correlation (?!) 2 empirical model based on data • annotate audio • symbolic score module 7.6: chord detection 9 / 19
  • 16. overview chords chord detection HMMs summary chord detection chord progression 1/2 apply musical knowledge to increase the result’s robustness and accuracy: different probabilities for different chord progressions (similar to key modulations), e.g. • cadences: I-IV-V-I • sequences: circle progression ⇒ model for chord progression probabilities 1 analytical model based on music theory • circle of fifths (?!) • key profile correlation (?!) 2 empirical model based on data • annotate audio • symbolic score module 7.6: chord detection 9 / 19
  • 17. overview chords chord detection HMMs summary chord detection chord progression 1/2 apply musical knowledge to increase the result’s robustness and accuracy: different probabilities for different chord progressions (similar to key modulations), e.g. • cadences: I-IV-V-I • sequences: circle progression ⇒ model for chord progression probabilities 1 analytical model based on music theory • circle of fifths (?!) • key profile correlation (?!) 2 empirical model based on data • annotate audio • symbolic score module 7.6: chord detection 9 / 19
  • 18. overview chords chord detection HMMs summary chord detection chord progression 2/2 what properties do chord progression probabilities depend on module 7.6: chord detection 10 / 19
  • 19. overview chords chord detection HMMs summary chord detection chord progression 2/2 what properties do chord progression probabilities depend on musical key larger musical context (model order) style tempo/length?? module 7.6: chord detection 10 / 19
  • 20. overview chords chord detection HMMs summary chord detection markov chain two possible states E, A transition probabilities to other state(s) and to self sum of transition probabilities equals 1 module 7.6: chord detection 11 / 19 from: https://commons.wikimedia.org/wiki/File:Markovkate_01.svg
  • 21. overview chords chord detection HMMs summary chord detection hidden markov model: variables states: unknown/hidden transition probability: probability of transitioning from one state to the other observations: measureable time series emission probability: probability of an observation given a state start probability: probability of the initial state module 7.6: chord detection 12 / 19
  • 22. overview chords chord detection HMMs summary chord detection hidden markov model: variables X: states y: possible observations a: state transition probabilities b: emission probabilities module 7.6: chord detection 13 / 19 from https://en.wikipedia.org/wiki/File:HiddenMarkovModel.svg
  • 23. overview chords chord detection HMMs summary chord detection hidden markov model: example (WP) 1/2 scenario • doctor diagnoses fever by how patients feel • patient may feel normal, dizzy, or cold • patient visits multiple days in a row what are the states and observations in this case module 7.6: chord detection 14 / 19
  • 24. overview chords chord detection HMMs summary chord detection hidden markov model: example (WP) 1/2 scenario • doctor diagnoses fever by how patients feel • patient may feel normal, dizzy, or cold • patient visits multiple days in a row what are the states and observations in this case states • healthy • fever observations: • normal • cold • dizzy module 7.6: chord detection 14 / 19
  • 25. overview chords chord detection HMMs summary chord detection hidden markov model: example (WP) 2/2 start probabilities (initial state assumption) • healthy: 0.6 • fever: 0.4 emission probabilities (prob of obs given state) • healthy: normal 0.5, cold 0.4, dizzy 0.1 • fever: : normal 0.1, cold 0.3, dizzy 0.6 transition probabilities • healthy: healthy 0.7, fever 0.3 • fever: : healthy 0.4, fever 0.6 module 7.6: chord detection 15 / 19
  • 26. overview chords chord detection HMMs summary chord detection hidden markov model: example (WP) 2/2 dizzy normal cold p 1 = 0 . 6 p 2 = 0 . 4 start probabilities a12=0.3 a21=0.4 a 1 1 =0.7 a 2 2 = 0 . 6 b 1 2 = 0 . 4 b13=0.5 b 1 1 = 0 . 1 b21=0.6 b 2 2 = 0 . 3 b 2 3 = 0 . 1 transition probabilities emission probabilities n states k observations module 7.6: chord detection 15 / 19
  • 27. overview chords chord detection HMMs summary chord detection hidden markov model: example (WP) 2/2 three observations: day 1 normal → day 2 cold → day 3 dizzy module 7.6: chord detection 16 / 19
  • 28. overview chords chord detection HMMs summary chord detection hidden markov model: example (WP) 2/2 three observations: day 1 normal → day 2 cold → day 3 dizzy module 7.6: chord detection 16 / 19
  • 29. overview chords chord detection HMMs summary chord detection hidden markov model: example (WP) 2/2 three observations: day 1 normal → day 2 cold → day 3 dizzy module 7.6: chord detection 16 / 19
  • 30. overview chords chord detection HMMs summary chord detection hidden markov model: example (WP) 2/2 three observations: day 1 normal → day 2 cold → day 3 dizzy module 7.6: chord detection 16 / 19
  • 31. overview chords chord detection HMMs summary chord detection HMMs for chord detection states → chords observations → pitch chroma emission probability → trained with pitch chroma transition probability → trained from dataset start probability → chord statistics (style dependent?) module 7.6: chord detection 17 / 19
  • 32. overview chords chord detection HMMs summary chord detection chord detection example module 7.6: chord detection 18 / 19 matlab source: plotChordDetection.m
  • 33. overview chords chord detection HMMs summary summary lecture content chords • combination of three or more pitches • usually stacked thirds • can be inverted chord detection • processing steps ▶ pitch chroma extraction ▶ template matching ▶ chord transition model Viterbi algorithm • find globally optimal path through state space • estimate state sequence with ▶ emission probabilities ▶ transition probabilities module 7.6: chord detection 19 / 19