Top Banner
Harmony Analysis Music Information Retrieval Christof Weiß, Frank Zalkow, Meinard Müller Workshop HfM Karlsruhe International Audio Laboratories Erlangen [email protected] [email protected] [email protected]
126

Harmony Analysis - International Audio Laboratories Erlangen

May 06, 2023

Download

Documents

Khang Minh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Harmony Analysis - International Audio Laboratories Erlangen

Harmony Analysis

Music Information Retrieval

Christof Weiß, Frank Zalkow, Meinard Müller

Workshop HfM Karlsruhe

International Audio Laboratories Erlangen

[email protected]@audiolabs-erlangen.de

[email protected]

Page 2: Harmony Analysis - International Audio Laboratories Erlangen

Book: Fundamentals of Music Processing

Meinard MüllerFundamentals of Music ProcessingAudio, Analysis, Algorithms, Applications483 p., 249 illus., hardcoverISBN: 978-3-319-21944-8Springer, 2015

Accompanying website: www.music-processing.de

Page 3: Harmony Analysis - International Audio Laboratories Erlangen

Book: Fundamentals of Music Processing

Meinard MüllerFundamentals of Music ProcessingAudio, Analysis, Algorithms, Applications483 p., 249 illus., hardcoverISBN: 978-3-319-21944-8Springer, 2015

Accompanying website: www.music-processing.de

Page 4: Harmony Analysis - International Audio Laboratories Erlangen

5.1 Basic Theory of Harmony5.2 Template-Based Chord Recognition5.3 HMM-Based Chord Recognition5.4 Further Notes

In Chapter 5, we consider the problem of analyzing harmonic properties of apiece of music by determining a descriptive progression of chords from a givenaudio recording. We take this opportunity to first discuss some basic theory ofharmony including concepts such as intervals, chords, and scales. Then,motivated by the automated chord recognition scenario, we introducetemplate-based matching procedures and hidden Markov models—a conceptof central importance for the analysis of temporal patterns in time-dependentdata streams including speech, gestures, and music.

Chapter 5: Chord Recognition

Page 5: Harmony Analysis - International Audio Laboratories Erlangen

Dissertation: Tonality-Based Style Analysis

Christof WeißComputational Methods for Tonality-Based Style Analysis of Classical Music Audio RecordingsDissertation, Ilmenau University of Technology, 2017

Chapter 5: Analysis Methods for Key and Scale StructuresChapter 6: Design of Tonal Features

Page 6: Harmony Analysis - International Audio Laboratories Erlangen

Chromatic circle Shepard’s helix of pitch

Recall: Chroma Features Human perception of pitch is periodic Two components: tone height (octave) and chroma (pitch class)

Page 7: Harmony Analysis - International Audio Laboratories Erlangen

Time (seconds)

Chr

oma

Recall: Chroma Features

Salie

nce

/ Li

kelih

ood

Page 8: Harmony Analysis - International Audio Laboratories Erlangen

Recall: Chroma Representations

Salie

nce

/ Lik

elih

ood

L. van Beethoven,Fidelio, Overture,Slovak Philharmonic

Page 9: Harmony Analysis - International Audio Laboratories Erlangen

Recall: Chroma Representations Orchestra

Piano

L. van Beethoven,Fidelio, Overture,Slovak Philharmonic

Fidelio, Overture,arr. Alexander ZemlinskyM. Namekawa, D.R. Davies, piano four hands

Page 10: Harmony Analysis - International Audio Laboratories Erlangen

Tonal Structures

ChordsCM GM7 Am

Global key

Local keyC major G major C major

Global key detection

Chord recognition

Music transcriptionNote level

Segment level

Chord level

Movement level C major

MelodyMiddle voices

Bass line

Local key detection

Western music (and most other music): Different aspects of harmony Referring to different time scales

Page 11: Harmony Analysis - International Audio Laboratories Erlangen

Tonal Structures

ChordsCM GM7 Am

Global key

Local keyC major G major C major

Global key detection

Chord recognition

Music transcriptionNote level

Segment level

Chord level

Movement level C major

MelodyMiddle voices

Bass line

Local key detection

Western music (and most other music): Different aspects of harmony Referring to different time scales

Page 12: Harmony Analysis - International Audio Laboratories Erlangen

Chord Recognition

Source: www.ultimate-guitar.com

Page 13: Harmony Analysis - International Audio Laboratories Erlangen

Time (seconds)

Chord Recognition

Page 14: Harmony Analysis - International Audio Laboratories Erlangen

Chord Recognition

Page 15: Harmony Analysis - International Audio Laboratories Erlangen

Chord Recognition

C G

Audiorepresentation

Prefiltering▪ Compression▪ Overtones▪ Smoothing

▪ Smoothing▪ Transition▪ HMM

Chromarepresentation

Patternmatching

Recognitionresult

Postfiltering

Majortriads

Minortriads

Page 16: Harmony Analysis - International Audio Laboratories Erlangen

Chord Recognition: Basics Musical chord: Group of three or more notes Combination of three or more tones which sound simultaneously Types: triads (major, minor, diminished, augmented), seventh chords… Here: focus on major and minor triads

C

→ C Major (C)

Page 17: Harmony Analysis - International Audio Laboratories Erlangen

Chord Recognition: Basics Musical chord: Group of three or more notes Combination of three or more tones which sound simultaneously Types: triads (major, minor, diminished, augmented), seventh chords… Here: focus on major and minor triads

Enharmonic equivalence: 12 different root notes possible → 24 chords

C Major (C)

C Minor (Cm)

Page 18: Harmony Analysis - International Audio Laboratories Erlangen

Chord Recognition: BasicsChords appear in different forms: Inversions

Different voicings

Harmonic figuration: Broken chords (arpeggio)

Melodic figuration: Different melody note (suspension, passing tone, …) Further: Additional notes, incomplete chords

Page 19: Harmony Analysis - International Audio Laboratories Erlangen

Chord Recognition: Basics

B

A

G

FE

D

C

G♯/A♭

D♯/E♭

C♯/D♭

A♯/B♭

F♯/G♭

C D ♭ D E ♭ E F G ♭ G A ♭ A B ♭ B

Templates: Major Triads

Page 20: Harmony Analysis - International Audio Laboratories Erlangen

Chord Recognition: Basics

B

A

G

FE

D

C

G♯/A♭

D♯/E♭

C♯/D♭

A♯/B♭

F♯/G♭

C D ♭ D E ♭ E F G ♭ G A ♭ A B ♭ B

Templates: Major Triads

Page 21: Harmony Analysis - International Audio Laboratories Erlangen

Chord Recognition: Basics

B

A

G

FE

D

C

G♯/A♭

D♯/E♭

C♯/D♭

A♯/B♭

F♯/G♭

Cm C♯m Dm E ♭m Em Fm F♯m Gm G♯m Am B ♭m Bm

Templates: Minor Triads

Page 22: Harmony Analysis - International Audio Laboratories Erlangen

Chroma vectorfor each audio frame

24 chord templates(12 major, 12 minor)

Compute for each frame thesimilarity of the chroma vector

to the 24 templates

B

A

G

F

E

D

C

G♯

D♯

C♯

A♯

F♯

C C♯ D … Cm C♯m Dm

0 0 0 … 0 0 0 …

0 0 0 … 0 0 0 …

0 0 1 … 0 0 1 …

0 1 0 … 0 1 0 …

1 0 0 … 1 0 0 …

0 0 1 … 0 0 0 …

0 1 0 … 0 0 1 …

1 0 0 … 0 1 0 …

0 0 0 … 1 0 0 …

0 0 1 … 0 0 1 …

0 1 0 … 0 1 0 …

1 0 0 … 1 0 0 …

Chord Recognition: Template Matching

Page 23: Harmony Analysis - International Audio Laboratories Erlangen

Chord Recognition: Template Matching Similarity measure: Cosine similarity (inner product of normalized

vectors)

Chord template:

Chroma vector:

Similarity measure:

Page 24: Harmony Analysis - International Audio Laboratories Erlangen

Cho

rdC

hrom

a

Chord Recognition: Template Matching

Time (seconds)

Page 25: Harmony Analysis - International Audio Laboratories Erlangen

Chord Recognition: Label Assignment

Assign to each frame the chord labelof the template that maximizes the

similarity to the chroma vector

B

A

G

F

E

D

C

G♯

D♯

C♯

A♯

F♯

C C♯ D … Cm C♯m Dm

0 0 0 … 0 0 0 …

0 0 0 … 0 0 0 …

0 0 1 … 0 0 1 …

0 1 0 … 0 1 0 …

1 0 0 … 1 0 0 …

0 0 1 … 0 0 0 …

0 1 0 … 0 0 1 …

1 0 0 … 0 1 0 …

0 0 0 … 1 0 0 …

0 0 1 … 0 0 1 …

0 1 0 … 0 1 0 …

1 0 0 … 1 0 0 …

…Chroma vector

for each audio frame24 chord templates(12 major, 12 minor)

Compute for each frame thesimilarity of the chroma vector

to the 24 templates

Page 26: Harmony Analysis - International Audio Laboratories Erlangen

Chord Recognition: Label Assignment

Cho

rdC

hord

Time (seconds)

Page 27: Harmony Analysis - International Audio Laboratories Erlangen

Chord Recognition: Evaluation

Time (seconds)

C G Am F C G F C

Page 28: Harmony Analysis - International Audio Laboratories Erlangen

Chord Recognition: Evaluation “No-Chord” annotations: not every frame labeled

Different evaluation measures: Precision:

Recall:

F-Measure (balances precision and recall):

Without “No-Chord” label:

𝑃#TP

#TP #FP

𝑅#TP

#TP #FN

𝐹2 ⋅ 𝑃 ⋅ 𝑅𝑃 𝑅

𝑃 𝑅 𝐹

Page 29: Harmony Analysis - International Audio Laboratories Erlangen

Chord Recognition: Smoothing Apply average filter of length 𝐿 ∈ ℕ:

Time (seconds)

Page 30: Harmony Analysis - International Audio Laboratories Erlangen

Chord Recognition: Smoothing Apply average filter of length 𝐿 ∈ ℕ:

Time (seconds)

Page 31: Harmony Analysis - International Audio Laboratories Erlangen

Chord Recognition: Smoothing Evaluation on all Beatles songs

0.8

0.75

0.7

0.65

0.6

0.55

0.5

0.45

0.4

0.35

Smoothing length

F-m

easu

re

Binary templates

1 5 9 13 17 21 25

Page 32: Harmony Analysis - International Audio Laboratories Erlangen

Markov Chains Probabilistic model for sequential data Markov property: Next state only depends on current state

(no “memory”) Consist of: Set of states (hidden)

State transition probabilities

Initial state probabilitiesC

FG

0.8

0.60.7

0.2

0.1

0.3

0.10.1

0.1

Page 33: Harmony Analysis - International Audio Laboratories Erlangen

Markov ChainsNotation:

C

FG

0.8

0.60.7

0.2

0.1

0.3

0.10.1

0.1

A α1 α2 α3

α1 𝑎 𝑎 𝑎α2 𝑎 𝑎 𝑎α3 𝑎 𝑎 𝑎

State transition probabilities

Initial state probabilities

C α1 α2 α3

𝑐 𝑐 𝑐

𝑎

𝑐

States 𝛼 for 𝑖 ∈ 1: 𝐼

𝛽 for 𝑘 ∈ 1: 𝐾

Page 34: Harmony Analysis - International Audio Laboratories Erlangen

Markov Chains Application examples: Compute probability of a sequence using given a model (evaluation) Compare two sequences using a given model Evaluate a sequence with two different models (classification)

C

FG

0.8

0.60.7

0.2

0.1

0.3

0.10.1

0.1

Page 35: Harmony Analysis - International Audio Laboratories Erlangen

Hidden Markov Models

C

FG

0.8

0.60.7

0.2

0.1

0.3

0.10.1

0.1

States as hidden variables

Consist of: Set of states (hidden)

State transition probabilities

Initial state probabilities

Page 36: Harmony Analysis - International Audio Laboratories Erlangen

Hidden Markov Models

C

FG

0.8

0.60.7

0.2

0.1

0.3

0.10.1

0.1

States as hidden variables

Consist of: Set of states (hidden)

State transition probabilities

Initial state probabilities

Observations (visible)

Page 37: Harmony Analysis - International Audio Laboratories Erlangen

Hidden Markov Models States as hidden variables

Consist of: Set of states (hidden)

State transition probabilities

Initial state probabilities

Observations (visible)

Emission probabilities

0.7

0.1

0.9 0.2

0.3

0.8

C

FG

0.8

0.60.7

0.2

0.1

0.3

0.10.1

0.1

0

00

Page 38: Harmony Analysis - International Audio Laboratories Erlangen

Hidden Markov ModelsNotation:

0.7

0.1

0.9 0.2

0.3

0.8

C

FG

0.8

0.60.7

0.2

0.1

0.3

0.10.1

0.1

0

00

A α1 α2 α3

α1 𝑎 𝑎 𝑎α2 𝑎 𝑎 𝑎α3 𝑎 𝑎 𝑎

B β1 β2 β3

α1 𝑏 𝑏 𝑏α2 𝑏 𝑏 𝑏α3 𝑏 𝑏 𝑏

State transition probabilities

Emission probabilities

Initial state probabilities

C α1 α2 α3

𝑐 𝑐 𝑐

𝑎

𝑏

𝑐

States 𝛼 for 𝑖 ∈ 1: 𝐼

Observation symbols 𝛽 for 𝑘 ∈ 1: 𝐾

Page 39: Harmony Analysis - International Audio Laboratories Erlangen

Markov Chains Analogon: the student‘s life Consists of: Set of states (hidden)

State transition probabilities

Initial state probabilities0.5

0.30.4

0.2

0.2

codingsleep

eatingsocialactivity

0.7

0.1

0.2

0.1 0.10.3 0

0.1

0.2

0.4

0.2

Page 40: Harmony Analysis - International Audio Laboratories Erlangen

Hidden Markov Models Analogon: the student‘s life Consists of: Set of states (hidden)

State transition probabilities

Initial state probabilities

Observations (visible)

Emission probabilities

0.5

0.30.4

0.2

0.2

codingsleep

eatingsocialactivity

0.7

0.1

0.2

0.1 0.10.3 0

0.1

0.2

0.4

0.2

0.9

Smell

NoiseLight

0.5

0.3 0.4

0.3

0.7

Page 41: Harmony Analysis - International Audio Laboratories Erlangen

Hidden Markov Models Only observation sequence is visible!Different algorithmic problems: Evaluation problem Given: observation sequence and model Calculate how well the model matches the sequence

Uncovering problem: Given: observation sequence and model Find: optimal hidden state sequence

Estimation problem („training“ the HMM): Given: observation sequence Find: model parameters Baum-Welch algorithm (Expectation-Maximization)

Page 42: Harmony Analysis - International Audio Laboratories Erlangen

Uncovering problem Given: observation sequence 𝑂 𝑜 , … , 𝑜 of length 𝑁 ∈ ℕ and

HMM 𝛩 (model parameters) Find: optimal hidden state sequence 𝑆∗ 𝑠∗, … , 𝑠∗

Corresponds to chord estimation task!

Observation sequence

β1 β3 β1 β3 β3 β2

𝑂 𝑜 , 𝑜 , 𝑜 , 𝑜 , 𝑜 , 𝑜

Page 43: Harmony Analysis - International Audio Laboratories Erlangen

Observation sequence

β1 β3 β1 β3 β3 β2

𝑂 𝑜 , 𝑜 , 𝑜 , 𝑜 , 𝑜 , 𝑜

α1 α1 α1 α3 α3 α1

Hidden state sequence 𝑆∗ 𝑠∗ , 𝑠∗ , 𝑠∗ , 𝑠∗ , 𝑠∗ , 𝑠∗

Uncovering problem Given: observation sequence 𝑂 𝑜 , … , 𝑜 of length 𝑁 ∈ ℕ and

HMM 𝛩 (model parameters) Find: optimal hidden state sequence Corresponds to chord estimation task!

Page 44: Harmony Analysis - International Audio Laboratories Erlangen

Observation sequence

β1 β3 β1 β3 β3 β2

𝑂 𝑜 , 𝑜 , 𝑜 , 𝑜 , 𝑜 , 𝑜

C C C G G C

Hidden state sequence 𝑆∗ 𝑠∗ , 𝑠∗ , 𝑠∗ , 𝑠∗ , 𝑠∗ , 𝑠∗

Uncovering problem Given: observation sequence 𝑂 𝑜 , … , 𝑜 of length 𝑁 ∈ ℕ and

HMM 𝛩 (model parameters) Find: optimal hidden state sequence Corresponds to chord estimation task!

Page 45: Harmony Analysis - International Audio Laboratories Erlangen

Uncovering problem Optimal hidden state sequence? “Best explains” given observation sequence 𝑂 Maximizes probability 𝑃 𝑂, 𝑆 Θ

Straight-forward computation (naive approach): Compute probability for each possible sequence 𝑆

Number of possible sequences of length 𝑁 (𝐼 number of states):

Prob∗ max 𝑃 𝑂, 𝑆 Θ

𝑆∗ argmax 𝑃 𝑂, 𝑆 Θ

𝐼 · 𝐼 ·… · 𝐼 𝐼

𝑁 factorscomputationally infeasible!

Page 46: Harmony Analysis - International Audio Laboratories Erlangen

Viterbi Algorithm Based on dynamic programming (similar to DTW) Idea: Recursive computation from subproblems Use truncated versions of observation sequence

Define 𝐃 𝑖, 𝑛 as the highest probability along a single state sequence𝑠 , … , 𝑠 that ends in state 𝑠 𝛼

Then, our solution is the state sequence yielding

Prob∗ max∈ :

𝐃 𝑖, 𝑁

𝑂 1: 𝑛 ≔ 𝑜 , … , 𝑜 , length 𝑛 ∈ 1: 𝑁

𝐃 𝑖, 𝑛 max,… ,

𝑃 𝑂 1: 𝑛 , 𝑠 , … , 𝑠 , 𝑠 𝛼 Θ

Page 47: Harmony Analysis - International Audio Laboratories Erlangen

Viterbi Algorithm 𝐃: matrix of size 𝐼 𝑁

Recursive computation of 𝐃 𝑖, 𝑛 along the column index 𝑛

Initialization: 𝑛 1

Truncated observation sequence: 𝑂 1 𝑜 Current observation: 𝑜 𝛽

𝐃 𝑖, 1 𝑐 ⋅ 𝑏 for some 𝑖 ∈ 1: 𝐼

Page 48: Harmony Analysis - International Audio Laboratories Erlangen

Viterbi Algorithm 𝐃: matrix of size 𝐼 𝑁

Recursive computation of 𝐃 𝑖, 𝑛 along the column index 𝑛

Recursion: 𝑛 ∈ 2: 𝑁

Truncated observation sequence: 𝑂 1: 𝑛 𝑜 , … , 𝑜 Last observation: 𝑜 𝛽

𝐃 𝑖, 𝑛 𝑏 ⋅ 𝑎 ∗ ⋅ 𝑃 𝑂 1: 𝑛 1 , 𝑠 , … , 𝑠 𝛼 ∗ Θ for 𝑖 ∈ 1: 𝐼

𝐃 𝑖, 𝑛 𝑏 ⋅ 𝑎 ∗ ⋅ 𝐃 𝑗∗, 𝑛 1

must be maximal!

Page 49: Harmony Analysis - International Audio Laboratories Erlangen

Viterbi Algorithm 𝐃: matrix of size 𝐼 𝑁

Recursive computation of 𝐃 𝑖, 𝑛 along the column index 𝑛

Recursion: 𝑛 ∈ 2: 𝑁

Truncated observation sequence: 𝑂 1: 𝑛 𝑜 , … , 𝑜 Last observation: 𝑜 𝛽

𝐃 𝑖, 𝑛 𝑏 ⋅ 𝑎 ∗ ⋅ 𝑃 𝑂 1: 𝑛 1 , 𝑠 , … , 𝑠 𝛼 ∗ Θ for 𝑖 ∈ 1: 𝐼

𝐃 𝑖, 𝑛 𝑏 ⋅ 𝑎 ∗ ⋅ 𝐃 𝑗∗, 𝑛 1

must be maximal!

must be maximal (best index 𝑗∗)

𝐃 𝑖, 𝑛 𝑏 ⋅ max∈ :

𝑎 ⋅ 𝐃 𝑗, 𝑛 1

Page 50: Harmony Analysis - International Audio Laboratories Erlangen

Viterbi Algorithm 𝐃 given – find optimal state sequence 𝑆∗ 𝑠∗, … , 𝑠∗ ≔ 𝛼 , … , 𝛼

Backtracking procedure (reverse order) Last element: 𝑛 𝑁 Optimal state: 𝛼

𝑖 argmax∈ :

𝐃 𝑗, 𝑁

Page 51: Harmony Analysis - International Audio Laboratories Erlangen

Viterbi Algorithm 𝐃 given – find optimal state sequence 𝑆∗ 𝑠∗, … , 𝑠∗ ≔ 𝛼 , … , 𝛼

Backtracking procedure (reverse order) Further elements: 𝑛 𝑁 1, 𝑁 2, … , 1 Optimal state: 𝛼

𝑖 argmax∈ :

𝑎 ⋅ 𝐃 𝑖, 𝑛

Page 52: Harmony Analysis - International Audio Laboratories Erlangen

Viterbi Algorithm 𝐃 given – find optimal state sequence 𝑆∗ 𝑠∗, … , 𝑠∗ ≔ 𝛼 , … , 𝛼

Backtracking procedure (reverse order) Further elements: 𝑛 𝑁 1, 𝑁 2, … , 1 Optimal state: 𝛼

Simplification of backtracking: Keep track of maximizing index 𝑗 in

Define 𝐼 𝑁 1 matrix 𝐄:

𝑖 argmax∈ :

𝑎 ⋅ 𝐃 𝑖, 𝑛

𝐃 𝑖, 𝑛 𝑏 ⋅ max∈ :

𝑎 ⋅ 𝐃 𝑗, 𝑛 1

𝐄 𝑖, 𝑛 1 argmax∈ :

𝑎 ⋅ 𝐃 𝑗, 𝑛 1

Page 53: Harmony Analysis - International Audio Laboratories Erlangen

Viterbi AlgorithmSummary

1

1

2

3

4

5

6

7

8

…𝑐𝑖 𝑏𝑖

𝐷 𝑖, 1𝑘1

States𝑖 ∈ 1: 𝐼

Sequence index 𝑛 ∈ 1: 𝑁

Initialization

Page 54: Harmony Analysis - International Audio Laboratories Erlangen

Viterbi AlgorithmSummary

1

1

2

3

4

5

6

7

8

…… …

……… …

n – 1 n

… …𝑐𝑖 𝑏𝑖

𝐷 𝑖, 1𝑘1

States𝑖 ∈ 1: 𝐼

Sequence index 𝑛 ∈ 1: 𝑁

Initialization Recursion

Page 55: Harmony Analysis - International Audio Laboratories Erlangen

Viterbi AlgorithmSummary

1

1

2

3

4

5

6

7

8

…… …

……… …

n – 1 n

𝑏𝑖𝑘𝑛

𝐷 𝑖, 𝑛

… …𝑐𝑖 𝑏𝑖

𝐷 𝑖, 1𝑘1

States𝑖 ∈ 1: 𝐼

Sequence index 𝑛 ∈ 1: 𝑁

Initialization Recursion

Page 56: Harmony Analysis - International Audio Laboratories Erlangen

Viterbi AlgorithmSummary

1

1

2

3

4

5

6

7

8

…… …

……… …

n – 1 n

𝑎𝑗𝑖𝑏𝑖𝑘𝑛

𝐷 𝑗, 𝑛 1

𝐷 𝑖, 𝑛

… …𝑐𝑖 𝑏𝑖

𝐷 𝑖, 1𝑘1

States𝑖 ∈ 1: 𝐼

Sequence index 𝑛 ∈ 1: 𝑁

Initialization Recursion

Page 57: Harmony Analysis - International Audio Laboratories Erlangen

…… …

… …

……

…… …

Viterbi AlgorithmSummary

1

1

2

3

4

5

6

7

8

n – 1 n N

𝑎𝑗𝑖𝑏𝑖𝑘𝑛

𝐷 𝑗, 𝑛 1

𝐷 𝑖, 𝑛

𝐷 𝑖, 𝑁

… …𝑐𝑖 𝑏𝑖

𝐷 𝑖, 1𝑘1

States𝑖 ∈ 1: 𝐼

Sequence index 𝑛 ∈ 1: 𝑁

Initialization Recursion Termination

Page 58: Harmony Analysis - International Audio Laboratories Erlangen

…… …

… …

……

…… …

Viterbi AlgorithmSummary

1

1

2

3

4

5

6

7

8

n – 1 n N

𝑎𝑗𝑖𝑏𝑖𝑘𝑛

𝐷 𝑗, 𝑛 1

𝐷 𝑖, 𝑛

𝐷 𝑖, 𝑁

… …𝑐𝑖 𝑏𝑖

𝐷 𝑖, 1𝑘1

States𝑖 ∈ 1: 𝐼

Sequence index 𝑛 ∈ 1: 𝑁

Initialization Recursion Termination

Backtrackingmatrix 𝐄

Page 59: Harmony Analysis - International Audio Laboratories Erlangen

…… …

……

Viterbi AlgorithmComputational Complexity

n – 1 n

𝑎𝑗𝑖𝑏𝑖𝑘𝑛

𝐷 𝑗, 𝑛 1

𝐷 𝑖, 𝑛

States𝑖 ∈ 1: 𝐼

Sequence index 𝑛 ∈ 1: 𝑁

Recursion𝐼 states 𝐼 states

Per recursion step:𝐼 · 𝐼

Total recursion:𝐼 · 𝑁

Page 60: Harmony Analysis - International Audio Laboratories Erlangen

Viterbi AlgorithmSummary

Page 61: Harmony Analysis - International Audio Laboratories Erlangen

Viterbi Algorithm: Example

A α1 α2 α3

α1 𝑎 𝑎 𝑎α2 𝑎 𝑎 𝑎α3 𝑎 𝑎 𝑎

B β1 β2 β3

α1 𝑏 𝑏 𝑏α2 𝑏 𝑏 𝑏α3 𝑏 𝑏 𝑏

State transition probabilities Emission probabilities Initial state probabilities

C α1 α2 α3

𝑐 𝑐 𝑐

𝑎 𝑏 𝑐

States𝛼 for 𝑖 ∈ 1: 𝐼

Observation symbols𝛽 for 𝑘 ∈ 1: 𝐾

HMM:

Page 62: Harmony Analysis - International Audio Laboratories Erlangen

Viterbi Algorithm: Example

A α1 α2 α3

α1 0.8 0.1 0.1α2 0.2 0.7 0.1α3 0.1 0.3 0.6

B β1 β2 β3

α1 0.7 0 0.3α2 0.1 0.9 0α3 0 0.2 0.8

C α1 α2 α3

0.6 0.2 0.2

State transition probabilities Emission probabilities Initial state probabilities𝑎 𝑏 𝑐

States𝛼 for 𝑖 ∈ 1: 𝐼

Observation symbols𝛽 for 𝑘 ∈ 1: 𝐾

HMM:

Page 63: Harmony Analysis - International Audio Laboratories Erlangen

Viterbi Algorithm: Example

A α1 α2 α3

α1 0.8 0.1 0.1α2 0.2 0.7 0.1α3 0.1 0.3 0.6

B β1 β2 β3

α1 0.7 0 0.3α2 0.1 0.9 0α3 0 0.2 0.8

C α1 α2 α3

0.6 0.2 0.2

State transition probabilities Emission probabilities Initial state probabilities𝑎 𝑏 𝑐

States𝛼 for 𝑖 ∈ 1: 𝐼

Observation symbols𝛽 for 𝑘 ∈ 1: 𝐾

HMM:

Observation sequence

β1 β3 β1 β3 β3 β2

O = (o1,o2,o3,o4,o5,o6)

Input

Page 64: Harmony Analysis - International Audio Laboratories Erlangen

Viterbi Algorithm: Example

A α1 α2 α3

α1 0.8 0.1 0.1α2 0.2 0.7 0.1α3 0.1 0.3 0.6

B β1 β2 β3

α1 0.7 0 0.3α2 0.1 0.9 0α3 0 0.2 0.8

C α1 α2 α3

0.6 0.2 0.2

State transition probabilities Emission probabilities Initial state probabilities𝑎 𝑏 𝑐

States𝛼 for 𝑖 ∈ 1: 𝐼

Observation symbols𝛽 for 𝑘 ∈ 1: 𝐾

HMM:

D o1= β1 o2= β3 o3= β1 o4= β3 o5= β3 o6= β2

α1

α2

α3

E o1= β1 o2= β3 o3= β1 o4= β3 o5= β3

α1

α2

α3

Observation sequence

β1 β3 β1 β3 β3 β2

O = (o1,o2,o3,o4,o5,o6)

Input Viterbi algorithm

Page 65: Harmony Analysis - International Audio Laboratories Erlangen

Viterbi Algorithm: Example

A α1 α2 α3

α1 0.8 0.1 0.1α2 0.2 0.7 0.1α3 0.1 0.3 0.6

B β1 β2 β3

α1 0.7 0 0.3α2 0.1 0.9 0α3 0 0.2 0.8

C α1 α2 α3

0.6 0.2 0.2

State transition probabilities Emission probabilities Initial state probabilities𝑎 𝑏 𝑐

States𝛼 for 𝑖 ∈ 1: 𝐼

Observation symbols𝛽 for 𝑘 ∈ 1: 𝐾

HMM:

D o1= β1 o2= β3 o3= β1 o4= β3 o5= β3 o6= β2

α1

α2

α3

E o1= β1 o2= β3 o3= β1 o4= β3 o5= β3

α1

α2

α3

Viterbi algorithm

𝐃 𝑖, 1 𝑐 ⋅ 𝑏

Initialization

β1 β3 β1 β3 β3 β2

Inputo1 o2 o3 o4 o5 o6

Page 66: Harmony Analysis - International Audio Laboratories Erlangen

Viterbi Algorithm: Example

A α1 α2 α3

α1 0.8 0.1 0.1α2 0.2 0.7 0.1α3 0.1 0.3 0.6

B β1 β2 β3

α1 0.7 0 0.3α2 0.1 0.9 0α3 0 0.2 0.8

C α1 α2 α3

0.6 0.2 0.2

State transition probabilities Emission probabilities Initial state probabilities𝑎 𝑏 𝑐

States𝛼 for 𝑖 ∈ 1: 𝐼

Observation symbols𝛽 for 𝑘 ∈ 1: 𝐾

HMM:

D o1= β1 o2= β3 o3= β1 o4= β3 o5= β3 o6= β2

α1 0.4200α2 0.0200α3 0

E o1= β1 o2= β3 o3= β1 o4= β3 o5= β3

α1

α2

α3

Viterbi algorithm

𝐃 𝑖, 𝑛 𝑏 ⋅ max∈ :

𝑎 ⋅ 𝐃 𝑗, 𝑛 1

𝐄 𝑖, 𝑛 1 argmax∈ :

𝑎 ⋅ 𝐃 𝑗, 𝑛 1

𝐃 𝑖, 1 𝑐 ⋅ 𝑏

Initialization

Recursion

β1 β3 β1 β3 β3 β2

Inputo1 o2 o3 o4 o5 o6

Page 67: Harmony Analysis - International Audio Laboratories Erlangen

D o1= β1 o2= β3 o3= β1 o4= β3 o5= β3 o6= β2

α1 0.4200 0.1008 α2 0.0200 0α3 0 0.0336

E o1= β1 o2= β3 o3= β1 o4= β3 o5= β3

α1 1α2 1α3 1

Viterbi algorithm

Viterbi Algorithm: Example

A α1 α2 α3

α1 0.8 0.1 0.1α2 0.2 0.7 0.1α3 0.1 0.3 0.6

B β1 β2 β3

α1 0.7 0 0.3α2 0.1 0.9 0α3 0 0.2 0.8

C α1 α2 α3

0.6 0.2 0.2

State transition probabilities Emission probabilities Initial state probabilities𝑎 𝑏 𝑐

States𝛼 for 𝑖 ∈ 1: 𝐼

Observation symbols𝛽 for 𝑘 ∈ 1: 𝐾

HMM:

Viterbi algorithm

β1 β3 β1 β3 β3 β2

Inputo1 o2 o3 o4 o5 o6

𝐃 𝑖, 𝑛 𝑏 ⋅ max∈ :

𝑎 ⋅ 𝐃 𝑗, 𝑛 1

𝐄 𝑖, 𝑛 1 argmax∈ :

𝑎 ⋅ 𝐃 𝑗, 𝑛 1

𝐃 𝑖, 1 𝑐 ⋅ 𝑏

Initialization

Recursion

Page 68: Harmony Analysis - International Audio Laboratories Erlangen

D o1= β1 o2= β3 o3= β1 o4= β3 o5= β3 o6= β2

α1 0.4200 0.1008 0.0564 0.0135 0.0033 0α2 0.0200 0 0.0010 0 0 0.0006α3 0 0.0336 0 0.0045 0.0022 0.0003

E o1= β1 o2= β3 o3= β1 o4= β3 o5= β3

α1 1 1 1 1 1α2 1 1 1 1 3α3 1 3 1 3 3

Viterbi algorithm

Viterbi Algorithm: Example

A α1 α2 α3

α1 0.8 0.1 0.1α2 0.2 0.7 0.1α3 0.1 0.3 0.6

B β1 β2 β3

α1 0.7 0 0.3α2 0.1 0.9 0α3 0 0.2 0.8

C α1 α2 α3

0.6 0.2 0.2

State transition probabilities Emission probabilities Initial state probabilities𝑎 𝑏 𝑐

States𝛼 for 𝑖 ∈ 1: 𝐼

Observation symbols𝛽 for 𝑘 ∈ 1: 𝐾

HMM:

D o1= β1 o2= β3 o3= β1 o4= β3 o5= β3 o6= β2

α1

α2

α3

E o1= β1 o2= β3 o3= β1 o4= β3 o5= β3

α1

α2

α3

Viterbi algorithm

𝑖 𝐄 𝑖 , 𝑛

𝑖 argmax∈ :

𝐃 𝑖, 𝑛

Backtracking

β1 β3 β1 β3 β3 β2

Inputo1 o2 o3 o4 o5 o6

Page 69: Harmony Analysis - International Audio Laboratories Erlangen

D o1= β1 o2= β3 o3= β1 o4= β3 o5= β3 o6= β2

α1 0.4200 0.1008 0.0564 0.0135 0.0033 0α2 0.0200 0 0.0010 0 0 0.0006α3 0 0.0336 0 0.0045 0.0022 0.0003

E o1= β1 o2= β3 o3= β1 o4= β3 o5= β3

α1 1 1 1 1 1α2 1 1 1 1 3α3 1 3 1 3 3

i6 = 2

Viterbi algorithm

D o1= β1 o2= β3 o3= β1 o4= β3 o5= β3 o6= β2

α1 0.4200 0.1008 0.0564 0.0135 0.0033 0α2 0.0200 0 0.0010 0 0 0.0006α3 0 0.0336 0 0.0045 0.0022 0.0003

E o1= β1 o2= β3 o3= β1 o4= β3 o5= β3

α1 1 1 1 1 1α2 1 1 1 1 3α3 1 3 1 3 3

Viterbi algorithm

Viterbi Algorithm: Example

A α1 α2 α3

α1 0.8 0.1 0.1α2 0.2 0.7 0.1α3 0.1 0.3 0.6

B β1 β2 β3

α1 0.7 0 0.3α2 0.1 0.9 0α3 0 0.2 0.8

C α1 α2 α3

0.6 0.2 0.2

State transition probabilities Emission probabilities Initial state probabilities𝑎 𝑏 𝑐

States𝛼 for 𝑖 ∈ 1: 𝐼

Observation symbols𝛽 for 𝑘 ∈ 1: 𝐾

HMM:

D o1= β1 o2= β3 o3= β1 o4= β3 o5= β3 o6= β2

α1

α2

α3

E o1= β1 o2= β3 o3= β1 o4= β3 o5= β3

α1

α2

α3

Viterbi algorithm

𝑖 𝐄 𝑖 , 𝑛

𝑖 argmax∈ :

𝐃 𝑖, 𝑛

Backtracking

β1 β3 β1 β3 β3 β2

Inputo1 o2 o3 o4 o5 o6

Page 70: Harmony Analysis - International Audio Laboratories Erlangen

Viterbi Algorithm: Example

A α1 α2 α3

α1 0.8 0.1 0.1α2 0.2 0.7 0.1α3 0.1 0.3 0.6

B β1 β2 β3

α1 0.7 0 0.3α2 0.1 0.9 0α3 0 0.2 0.8

C α1 α2 α3

0.6 0.2 0.2

State transition probabilities Emission probabilities Initial state probabilities𝑎 𝑏 𝑐

States𝛼 for 𝑖 ∈ 1: 𝐼

Observation symbols𝛽 for 𝑘 ∈ 1: 𝐾

HMM:

Optimal state sequenceD o1= β1 o2= β3 o3= β1 o4= β3 o5= β3 o6= β2

α1 0.4200 0.1008 0.0564 0.0135 0.0033 0α2 0.0200 0 0.0010 0 0 0.0006α3 0 0.0336 0 0.0045 0.0022 0.0003

E o1= β1 o2= β3 o3= β1 o4= β3 o5= β3

α1 1 1 1 1 1α2 1 1 1 1 3α3 1 3 1 3 3

i6 = 2

Observation sequence

β1 β3 β1 β3 β3 β2

S* = (α1,α1,α1,α3,α3,α2)O = (o1,o2,o3,o4,o5,o6)

Input OutputViterbi algorithm

Page 71: Harmony Analysis - International Audio Laboratories Erlangen

(a) Template Matching (frame-wise)

HMM: Application to Chord Recognition Effect of HMM-based chord estimation and smoothing:

C Dm G C

Time (seconds)Time (seconds)

(b) HMM

Page 72: Harmony Analysis - International Audio Laboratories Erlangen

HMM: Application to Chord Recognition Parameters: Transition probabilities Estimated from data

State αj

Stat

e α i

Log

prob

abilit

y

Page 73: Harmony Analysis - International Audio Laboratories Erlangen

Parameters: Transition probabilities Estimated from data

Log

prob

abilit

y

Major chords Minor chords

Maj

or c

hord

sM

inor

cho

rds

HMM: Application to Chord Recognition

Page 74: Harmony Analysis - International Audio Laboratories Erlangen

Major chords Minor chords

Maj

or c

hord

sM

inor

cho

rds

HMM: Application to Chord Recognition Parameters: Transition probabilities Transposition-invariant

Log

prob

abilit

y

Page 75: Harmony Analysis - International Audio Laboratories Erlangen

HMM: Application to Chord Recognition Parameters: Transition probabilities Uniform transition matrix (only smoothing)

State αj

Stat

e α i

Log

prob

abilit

y

Page 76: Harmony Analysis - International Audio Laboratories Erlangen

HMM: Application to Chord Recognition Evaluation on all Beatles songs

0.8

0.75

0.7

0.65

0.6

0.55

0.5

0.45

0.4

0.35

Smoothing length

F-m

easu

re

binary

HMM

1 5 9 13 17 21 25

Page 77: Harmony Analysis - International Audio Laboratories Erlangen

A

Cm

Em

Am

C

C

E G

E♭

B

E G

Em

C

B

CCmaj7

Chord Recognition: Further Challenges Chord ambiguities

Acoustic ambiguities (overtones) Use advanced templates (model overtones, learned templates) Enhanced chroma (logarithmic compression, overtone reduction)

Tuning inconsistency

Page 78: Harmony Analysis - International Audio Laboratories Erlangen

Chord Recognition: Public System

Chord recognition Typically: Feature extraction, pattern matching, filtering (HMM) „Out-of-the-box“ solutions (Sonic Visualizer, Chordino plugin)

Sonic Visualizer, Chordino Vamp Plugin(Queen Mary University of London)

Page 79: Harmony Analysis - International Audio Laboratories Erlangen

Tonal Structures

ChordsCM GM7 Am

Global key

Local keyC major G major C major

Global key detection

Chord recognition

Music transcriptionNote level

Segment level

Chord level

Movement level C major

MelodyMiddle voices

Bass line

Local key detection

Page 80: Harmony Analysis - International Audio Laboratories Erlangen

Tonal Structures

ChordsCM GM7 Am

Global key

Local keyC major G major C major

Global key detection

Chord recognition

Music transcriptionNote level

Segment level

Chord level

Movement level C major

MelodyMiddle voices

Bass line

Local key detection

Page 81: Harmony Analysis - International Audio Laboratories Erlangen

Local Key Detection

G

D

E

BD♭

E♭

F

A

G♭F♯

A♭

B♭

E ♭mD♯m

B♭mFm

Cm

Gm

Dm

G♯mC♯m

F♯m

Bm

EmAm

C

♭ ♯

Key as an important musical concept (“Symphony in C major”) Modulations → Local approach Key relations: Circle of fifth (keys)

Page 82: Harmony Analysis - International Audio Laboratories Erlangen

Local Key Detection

Key as an important musical concept (“Symphony in C major”) Modulations → Local approach Diatonic Scales Simplification of keys Perfect-fifth relation

0 diatonic1# diatonic2b diatonic

Circle of fifths (pitches) →

Page 83: Harmony Analysis - International Audio Laboratories Erlangen

Local Key Detection Example: J.S. Bach, Choral "Durch Dein Gefängnis" (Johannespassion) Score – Piano reduction

Page 84: Harmony Analysis - International Audio Laboratories Erlangen

Local Key Detection Example: J.S. Bach, Choral "Durch Dein Gefängnis" (Johannespassion) Audio – Waveform (Scholars Baroque Ensemble, Naxos 1994)

Time (seconds)

Page 85: Harmony Analysis - International Audio Laboratories Erlangen

Tonal Structures: Local Diatonic Scales Example: J.S. Bach, Choral "Durch Dein Gefängnis" (Johannespassion) Audio – Spectrogram (Scholars Baroque Ensemble, Naxos 1994)

Page 86: Harmony Analysis - International Audio Laboratories Erlangen

Local Key Detection: Chroma Features Example: J.S. Bach, Choral "Durch Dein Gefängnis" (Johannespassion) Audio – Chroma features (Scholars Baroque Ensemble, Naxos 1994)

Page 87: Harmony Analysis - International Audio Laboratories Erlangen

Local Key Detection: Chroma Smoothing Summarize pitch classes over a certain time

Chroma smoothing Parameters: blocksize b and hopsize h

bb

bh

h

Page 88: Harmony Analysis - International Audio Laboratories Erlangen

Local Key Detection: Chroma Smoothing Choral (Bach)

Page 89: Harmony Analysis - International Audio Laboratories Erlangen

Local Key Detection: Chroma Smoothing Choral (Bach) — smoothed with b = 42 seconds and h = 15 seconds

Page 90: Harmony Analysis - International Audio Laboratories Erlangen

Local Key Detection: Diatonic Scales Choral (Bach) — Re-ordering to perfect fifth series

Page 91: Harmony Analysis - International Audio Laboratories Erlangen

Local Key Detection: Diatonic Scales Choral (Bach) — Re-ordering to perfect fifth series

Page 92: Harmony Analysis - International Audio Laboratories Erlangen

Local Key Detection: Diatonic Scales Choral (Bach) — Diatonic Scale Estimation (7 fifths)

4#

Page 93: Harmony Analysis - International Audio Laboratories Erlangen

Local Key Detection: Diatonic Scales Choral (Bach) — Diatonic Scale Estimation (7 fifths)

5#

Page 94: Harmony Analysis - International Audio Laboratories Erlangen

Local Key Detection: Diatonic Scales Choral (Bach) — Diatonic Scale Estimation: Multiply chroma values*

Page 95: Harmony Analysis - International Audio Laboratories Erlangen

Local Key Detection: Diatonic Scales Choral (Bach) — Diatonic Scale Estimation: Multiply chroma values

Page 96: Harmony Analysis - International Audio Laboratories Erlangen

Local Key Detection: Diatonic Scales Choral (Bach) — Diatonic Scale Estimation

Page 97: Harmony Analysis - International Audio Laboratories Erlangen

Local Key Detection: Diatonic Scales Choral (Bach) — Diatonic Scale Estimation

4 #(E major)

Page 98: Harmony Analysis - International Audio Laboratories Erlangen

Local Key Detection: Diatonic Scales Choral (Bach) — Diatonic Scale Estimation: Shift to global key

4 #(E major)

Page 99: Harmony Analysis - International Audio Laboratories Erlangen

Local Key Detection: Diatonic Scales Choral (Bach) — 0 ≙ 4#

Weiss / Habryka, Chroma-Based Scale Matchingfor Audio Tonality Analysis, CIM 2014

Page 100: Harmony Analysis - International Audio Laboratories Erlangen

Local Key Detection: Examples L. v. Beethoven – Sonata No. 10 op. 14 Nr. 2, 1. Allegro — 0 ≙ 1

(Barenboim, EMI 1998)

Page 101: Harmony Analysis - International Audio Laboratories Erlangen

Local Key Detection: Examples R. Wagner, Die Meistersinger von Nürnberg, Vorspiel — 0 ≙ 0

(Polish National Radio Symphony Orchestra, J. Wildner, Naxos 1993)

Page 102: Harmony Analysis - International Audio Laboratories Erlangen

Source: Wikipedia

With Prof. Rainer Kleinertz, Musicology, Uni Saarland

Richard Wagner, Der Ring des Nibelungen– Four operas, up to 15 hours of music– How is harmony organized at the large scale?– Analyses by A. Lorenz 1924– Hypothesis of „Poetico-musical periods“

DFG-funded Project: Computational Analysis of Harmonic Structures

Page 103: Harmony Analysis - International Audio Laboratories Erlangen

Up to 18 versions 3 versions manually annotated

No. Conductor Recording hh:mm:ss

1 Barenboim 1991–92 14:54:55

2 Boulez 1980–81 13:44:38

3 Böhm 1967–71 13:39:28

4 Furtwängler 1953 15:04:22

5 Haitink 1988–91 14:27:10

6 Janowski 1980–83 14:08:34

7 Karajan 1967–70 14:58:08

8 Keilberth/Furtwängler 1952–54 14:19:56

9 Krauss 1953 14:12:27

10 Levine 1987–89 15:21:52

11 Neuhold 1993–95 14:04:35

12 Sawallisch 1989 14:06:50

13 Solti 1958–65 14:36:58

14 Swarowsky 1968 14:56:34

15 Thielemann 2011 14:31:13

16 Weigle 2010–12 14:48:46

1 2 3 4

Cross-Version Analysis

Page 104: Harmony Analysis - International Audio Laboratories Erlangen

Idea: Use analysis results based on different interpretations (versions) Tonal characteristics should not depend on interpretation→ Test reliability of the method

Visualize consistency with gray scheme

Cross-Version Analysis

Page 105: Harmony Analysis - International Audio Laboratories Erlangen

Act 1

Act 2

Act 3

Die Walküre WWV 86 B

Page 106: Harmony Analysis - International Audio Laboratories Erlangen

Act 1

Die Walküre WWV 86 B

Page 107: Harmony Analysis - International Audio Laboratories Erlangen

Die Walküre WWV 86 B

Act 1, measures 955–1012 Sieglinde´s narration

Page 108: Harmony Analysis - International Audio Laboratories Erlangen

Die Walküre WWV 86 B

Act 1, measures 955–1012 Sieglinde´s narration

Page 109: Harmony Analysis - International Audio Laboratories Erlangen

Act 1

Act 2

Act 3

Die Walküre WWV 86 B

Page 110: Harmony Analysis - International Audio Laboratories Erlangen

Die Walküre WWV 86 B

Act 3, measures 724–789 Wotan´s punishment

Page 111: Harmony Analysis - International Audio Laboratories Erlangen

Die Walküre WWV 86 B

Act 3, measures 724–789 Wotan´s punishment

Page 112: Harmony Analysis - International Audio Laboratories Erlangen

Die Walküre WWV 86 B

Page 113: Harmony Analysis - International Audio Laboratories Erlangen

Exploring Tonal-Dramatic Relationships

Histograms of Analysis over timeD

iato

nic

Scal

es

Das RheingoldWWV 86 A

3897 measures

Die WalküreWWV 86 B

5322 measures

SiegfriedWWV 86 C

6682 measures

GötterdämmerungWWV 86 D

6040 measures

Time (measures)

Page 114: Harmony Analysis - International Audio Laboratories Erlangen

Exploring Tonal-Dramatic Relationships

Sword motif – Die Walküre

Diatonic Scales

Page 115: Harmony Analysis - International Audio Laboratories Erlangen

Exploring Tonal-Dramatic Relationships

Sword motif – Siegfried

Diatonic Scales

Page 116: Harmony Analysis - International Audio Laboratories Erlangen

Exploring Tonal-Dramatic Relationships

Valhalla motif – Das Rheingold

Chords

Page 117: Harmony Analysis - International Audio Laboratories Erlangen

Exploring Tonal-Dramatic Relationships

Valhalla motif – Die Walküre

Chords

Page 118: Harmony Analysis - International Audio Laboratories Erlangen

Tonal Structures: Complexity Global chroma statistics (audio) 1567 – G. da Palestrina, Missa de Beata Virgine, Credo

G#Eb Bb F C G D A E B F# C#

1

0.8

0.6

0.4

0.2

0

Salie

nce

Pitch class

Circle of fifths →

Page 119: Harmony Analysis - International Audio Laboratories Erlangen

Tonal Structures: Complexity Global chroma statistics (audio) 1725 – J. S. Bach, Orchestral Suite No. 4 BWV 1069, 1. Ouverture (D major)

G# D# A#F C G D A E B F# C#

1

0.8

0.6

0.4

0.2

0

Salie

nce

Pitch class

Circle of fifths →

Page 120: Harmony Analysis - International Audio Laboratories Erlangen

Tonal Structures: Complexity Global chroma statistics (audio) 1783 – W. A. Mozart, „Linz“ symphony KV 425, 1. Adagio / Allegro (C major)

G#Eb Bb F C G D A E B F# C#

1

0.8

0.6

0.4

0.2

0

Salie

nce

Pitch class

Circle of fifths →

Page 121: Harmony Analysis - International Audio Laboratories Erlangen

Tonal Structures: Complexity Global chroma statistics (audio) 1883 – J. Brahms, Symphony No. 3, 1. Allegro con brio (F major)

Ab Eb Bb F C G D A E B F# C#

1

0.8

0.6

0.4

0.2

0

Salie

nce

Pitch class

Circle of fifths →

Page 122: Harmony Analysis - International Audio Laboratories Erlangen

Tonal Structures: Complexity Global chroma statistics (audio) 1940 – A. Webern, Variations for Orchestra op. 30

Ab Eb Bb F C G D A E B F# C#

1

0.8

0.6

0.4

0.2

0

Salie

nce

Pitch class

Circle of fifths →

Page 123: Harmony Analysis - International Audio Laboratories Erlangen

Tonal Structures: Complexity Realization of complexity measure Γ Entropy / Flatness measures Distribution over Circle of Fifths

Relating to different time scales!

Γ 0

length 𝑟

Γ 1 𝑟

Γ 1 0 Γ 1

Page 124: Harmony Analysis - International Audio Laboratories Erlangen

Tonal Structures: Complexity

Weiss / Müller, Quantifying and Visualizing Tonal Complexity, CIM 2014

Com

plex

ityΓ

Page 125: Harmony Analysis - International Audio Laboratories Erlangen

Tonal Structures: Complexity

L. van BeethovenSonata Op. 2, No. 3

1st movement

Page 126: Harmony Analysis - International Audio Laboratories Erlangen

Tonal Structures: Complexity

Op. 2, No. 3 Op. 57, No. 1„Appassionata“

Op. 106, No. 1„Hammerklavier“