Koga Kobayashi
December 12, 2019
45

# Fundamentals of Music Processing (Chapter 5)

## Koga Kobayashi

December 12, 2019

## Transcript

1. Fundamentals of Music Processing
Chapter 5: Chord Recognition

খྛ ᕣՏ
εϥΠυʹؚ·ΕΔਤ͸Fundamentals of Music ProcessingΑΓҾ༻

2. Chapter 5: Chord Recognition
Chord(࿨Ի)
• 3ͭҎ্ͷҟͳΔԻූ͔Βߏ੒͞ΕΔԻͷ͜ͱ
Harmony(࿨੠)
• ෳ਺ͷ࿨Ի͔ΒͳΔܥྻɺ࿨Իਐߦ
FM7 G7 Em7 Am
Harmony

3. Chapter 5: Chord Recognition
Chord Recognition(࿨Իೝࣝ)
• Ի੠͔Β࿨ԻਐߦΛೝࣝ͢Δٕज़
ԻָϑΝΠϧ͔ΒίʔυේΛࣗಈͰ࡞੒ग़དྷΔ
࿨Իೝ͕ࣝ͏·͍͘͘ͱ…

4. Chapter 5.3: HMM-Based Chord Recognition
Chapter 5.1~5.2
• ಛ௃ྔ͔Β࿨ԻΛ͋Δఔ౓ਪఆग़དྷΔ
͔͠͠ɺ͜Ε͸࿨ԻҰͭҰ͔ͭ͠ݟ͍ͯͳ͍
Α͘ग़Δ࿨Ի΍ܨ͕Γͷڧ͍࿨Իʹண໨͍ͨ͠
ྫ: I–IV–V–Iਐߦ
• F΍G͸සग़͠ɺ͍͖ͳΓFmʹߦ͘͜ͱ͸΄΅ແ͍
HMM(ӅΕϚϧίϑϞσϧ)Λར༻ͯ͠࿨ԻਪఆΛߦ͏

5. Chapter 5.3: HMM-Based Chord Recognition
࿨Ի: , ঢ়ଶ: (for )
ͱͨ͠ͱ͖ɺϚϧίϑੑΛԾఆ͢Δͱ Ͱ͋Δ֬཰͸
A := {α1
, α2
, ⋯, αI
} s i ∈ [1 : I]
sn+1
= αj
P[sn+1
= αj
|sn
= αi
, sn−1
= αk
, ⋯] = P[sn+1
= αj
|P[sn+1
= αj
|sn
]
͜͜Ͱ ΛҎԼͷΑ͏ʹఆٛ͢Δɻ(for )
aij
i, j ∈ [1 : I]
͜Ε͸ঢ়ଶ͕ ͔Β ʹભҠ͢Δ֬཰ͱߟ͑Δ͜ͱ͕ग़དྷΔ
αi
αj
aij
:= P[sn+1
= αj
|sn
= αi
] ∈ [0,1]
·ͣɺϚϧίϑ࿈࠯Λར༻ͨ͠࿨Ի༧ଌʹ͍ͭͯઆ໌͢Δ

6. Chapter 5.3: HMM-Based Chord Recognition
۩ମྫ; , ͷͱ͖
I = 3 A := {α1
= C, α2
= G, α3
= F}
·ͨ࠷ॳͷঢ়ଶ͕ Ͱ͋Δ֬཰ΛҎԼͷΑ͏ʹఆٛ͢Δ
αi
ci
:= P[s1
= αi
] ∈ [0,1]

7. Chapter 5.3: HMM-Based Chord Recognition
, ,
ͷͱ͖
ঢ়ଶܥྻ: ʹ͍ͭͯߟ͑Δ
I = 3 A := {α1
= C, α2
= G, α3
= F}
C = (c1
, c2
, c3
)T = (0.6,0.2,0.3)T
S = (C, C, C, G, G, F, F, C, C)
࠷ॳͷঢ়ଶ͕ Ͱ͋Δ֬཰ΛҎԼͷΑ͏ʹఆٛ͠ɺ
αi
ci
:= P[s1
= αi
] ∈ [0,1]
۩ମྫ

8. Chapter 5.3: HMM-Based Chord Recognition
ભҠ֬཰͕ҎԼͷͱ͖
ͷΑ͏ͳ࿨Իਐߦ͕ى͖Δ֬཰͸
S
S = (C, C, C, G, G, F, F, C, C)
= c1
⋅ a11
⋅ a11
⋅ a12
⋅ a22
⋅ a23
⋅ a33
⋅ a31
⋅ a11
≈ 1.29 ⋅ 10−4

9. Chapter 5.3: HMM-Based Chord Recognition
ઌఔঢ়ଶܥྻ Λ༻͍ͯɺ࿨Իਐߦͷ֬཰Λܭࢉ͕ͨ͠
࣮ੈքͰ͸औΓ͏Δ͢΂ͯͷ ʹ͍ͭͯܭࢉ͸ෆՄೳ
S
S
ྫ: 10छྨͷ࿨Իɺ20͔ͭΒߏ੒͞ΕΔۂͷ৔߹
ύλʔϯͷ֬཰Λܭࢉ͢Δඞཁ͕͋Δ
1020
ͦ͜Ͱ಺෦ͷঢ়ଶͰ͸ͳ͘ɺಛ௃ϕΫτϧΛ༻͍ͯ
࿨ԻਐߦΛٻΊΔํ๏ͱͯ͠HMMΛར༻͢Δɻ

10. Chapter 5.3: HMM-Based Chord Recognition

11. Chapter 5.3: HMM-Based Chord Recognition

12. Chapter 5.3: HMM-Based Chord Recognition
Input:
Ի੠σʔλ͔Β؍ଌͨ͠ܥྻ ͔Β
ϞσϧΛར༻͠ɺ؍ଌܥྻ Λ࡞੒ɻ
O = (o1
, ⋯, oN
)
B = (β1
, ⋯, βN
)
؍ଌܥྻ ͸
؍ଌγϯϘϧ

͔Βߏ੒͞ΕΔ
B = (β1
, ⋯, βN
)
ℬ = {β1
, ⋯, βk
} (for k ∈ [1 : K])

13. Chapter 5.3: HMM-Based Chord Recognition

14. Chapter 5.3: HMM-Based Chord Recognition
Viterbi:
؍ଌܥྻ ͱ
ॳظঢ়ଶͷ֬཰
ੜ੒֬཰ͱભҠ֬཰͔Β༗޲άϥϑΛ࡞੒
B = (β1
, ⋯, βN
)
C = (c1
, c2
, c3
)T = (0.6,0.2,0.3)T
ੜ੒֬཰
ભҠ֬཰

15. Chapter 5.3: HMM-Based Chord Recognition
ੜ੒֬཰
ભҠ֬཰ ॳظঢ়ଶͷ֬཰
ੜ੒͞Εͨ༗޲άϥϑ

16. Chapter 5.3: HMM-Based Chord Recognition
ViterbiΞϧΰϦζϜʹΑͬͯ
࠷΋໬΋Β͍͠ܦ࿏ʹ͍ͭͯܭࢉΛߦ͏

17. Chapter 5.3: HMM-Based Chord Recognition
ੜ੒͞Εͨ༗޲άϥϑ
ViterbiΞϧΰϦζϜͰ͸֤ҐஔͰɺ
֤࿨ԻʹͨͲΓண͘·Ͱͷ࠷దίετͱ
ͦͷ௚લʹࢸΔ·ͰͷϙΠϯλΛ֮͑ͳ͕ΒܭࢉΛߦ͏

18. Chapter 5.3: HMM-Based Chord Recognition
ੜ੒͞Εͨ༗޲άϥϑ
ViterbiΞϧΰϦζϜͰ͸֤ҐஔͰɺ
֤࿨ԻʹͨͲΓண͘·Ͱͷ࠷దίετͱ
ͦͷ௚લʹࢸΔ·ͰͷϙΠϯλΛ֮͑ͳ͕ΒܭࢉΛߦ͏

19. Chapter 5.3: HMM-Based Chord Recognition
ੜ੒͞Εͨ༗޲άϥϑ
ViterbiΞϧΰϦζϜͰ͸֤ҐஔͰɺ
֤࿨ԻʹͨͲΓண͘·Ͱͷ࠷దίετͱ
ͦͷ௚લʹࢸΔ·ͰͷϙΠϯλΛ֮͑ͳ͕ΒܭࢉΛߦ͏

20. Chapter 5.3: HMM-Based Chord Recognition
ੜ੒͞Εͨ༗޲άϥϑ
ViterbiΞϧΰϦζϜͰ͸֤ҐஔͰɺ
֤࿨ԻʹͨͲΓண͘·Ͱͷ࠷దίετͱ
ͦͷ௚લʹࢸΔ·ͰͷϙΠϯλΛ֮͑ͳ͕ΒܭࢉΛߦ͏

21. Chapter 5.3: HMM-Based Chord Recognition
ੜ੒͞Εͨ༗޲άϥϑ
ViterbiΞϧΰϦζϜͰ͸֤ҐஔͰɺ
֤࿨ԻʹͨͲΓண͘·Ͱͷ࠷దίετͱ
ͦͷ௚લʹࢸΔ·ͰͷϙΠϯλΛ֮͑ͳ͕ΒܭࢉΛߦ͏

22. Chapter 5.3: HMM-Based Chord Recognition
ੜ੒͞Εͨ༗޲άϥϑ
ViterbiΞϧΰϦζϜͰ͸֤ҐஔͰɺ
֤࿨ԻʹͨͲΓண͘·Ͱͷ࠷దίετͱ
ͦͷ௚લʹࢸΔ·ͰͷϙΠϯλΛ֮͑ͳ͕ΒܭࢉΛߦ͏

23. Chapter 5.3: HMM-Based Chord Recognition
࠷ޙʹɺͦͷϙΠϯλΛḷΓ࠷΋໬΋Β͍͠࿨ԻਐߦΛ
ٻΊΔ
A := {α1
= C, α2
= G, α3
= F} ͷͱ͖
̂
S = (C, C, C, G, G, F)