• No results found

Rameau: A System for Automatic Harmonic Analysis

N/A
N/A
Protected

Academic year: 2021

Share "Rameau: A System for Automatic Harmonic Analysis"

Copied!
41
0
0

Loading.... (view fulltext now)

Full text

(1)

Rameau: A System for Automatic Harmonic

Analysis

Pedro Kröger and Alexandre Passos

Genos—Computer Music Research Group

Federal University of Bahia, Brazil

(2)

1 How the system works

(3)

The input: LilyPond format

\score {

<<

\new Staff {

<< \new Voice { \voiceOne \relative c’’ { c4 b c2 }}

\new Voice { \voiceTwo \relative c’ { e4 d e2 }}

>> }

\new Staff {

<< \clef "bass"

\new Voice { \voiceOne \relative c’ { c4 b c2 }}

\new Voice { \voiceTwo \relative c { c4 g c2 }}

>> }

>>

}

(4)

The input: LilyPond format

4

3

(5)

The answer sheet format

For the previous example:

C G C

For the 1st phrase of Bach Chorale #1

{g

g c/e [b] d/f#

g bm/d bm7/d em

c [b d] [b] f#

/a g

d g

d/f# em7/g f#

/a

g/b am7/c d d7 g}

(6)

The output as a table

#

|answer |ES-tree|EC-Knn |ES-Knn |ES-PB

|S-PB

|

---1

|C

|C

|C

|C

|C

|C

|

2

|G

|G

|G

|G

|G

|G

|

3

|C

|C

|C

|C

|C

|C

|

---CORRECT(%) |100.00 |100.00 |100.00 |100.00 |100.00 |

(7)
(8)

Comparison of results

(9)

Timing the program

chorale #1 (80 segments) on my aging laptop:

14s for all 9 algorithms

0.2s for the fastest algorithm (neural network)

(10)

2 Problems

(11)

Pitch spelling

equal

not equal

(12)

Pitch class notation

C=0, C]=1, D=2, D]=3, . . . , B=11

(or MIDI: 60, 62, 64 . . . )

problem:

C]

=

D[

(13)

A codification for tonal music (Dr. Jamary Oliveira)

c

d

e

f

g

a

b

7[

7

21

62

76

6[

90

8

22

35

49

63

77

5[

91

9

23

36

50

64

78

4[

92

10

24

37

51

65

79

3[

93

11

25

38

52

66

80

2[

94

12

26

39

53

67

81

[

95

13

27

40

54

68

82

\

0

14

28

41

55

69

83

]

1

15

29

42

56

70

84

2]

2

16

30

43

57

71

85

3]

3

17

31

44

58

72

86

4]

4

18

32

45

59

73

87

5]

5

19

33

46

60

74

88

6]

6

20

34

47

61

75

89

7]

48

C=0, D=14, F]=42, A[[=67

(14)

Segmentation (easy case)

splitting the piece into chord spans

(15)

Segmentation (not easy)

(16)

Chord labeling

Labeling each chord with a name

Eb

Eb

B°7

D°7

(17)

Functional Analysis

Assigning tonal functions to the chords

F F C/E F/Eb Bb/D

I I V V /IV IV

4

2 6 6

(18)

3 The analysis per se

(19)

The process is:

(20)

Each algorithm

converts the list of pitches into chords

(21)
(22)

Pardo and Birmingham’s algorithm

straight template-matching

0

4

=

Major

7

0

3

=

Minor

7

And so on. . . (but we did extend it to have enough labels and be

enharmonically savvy)

(23)

Temperley and Sleator’s algorithm

maximizing something over the piece

Too slow.

(24)

Naïve Bayesian algorithm

the chord that gives the highest probability to each sonority

(25)

Hidden Markov Model (Raphael)

Bayesian, but also maximizes the probability of the entire piece in a Markov Model

As you can see, it’s the only one that can tell that a transition from Bm to D and then to Em is too unlikely.

(26)

K-Nearest Neighbors algorithm

the most common chord label closest to the pitches being analyzed

(27)

Decision tree

implicit rule-following

If first pitch is 0 (a C) and second pitch is 28 (an E) and third

pitch is 55 (a G), then the chord is a C major.

If first pitch is 0 and second pitch is 27 (an E

[

) and third pitch

is 55, then the chord is a C minor.

(28)

Neural networks (Tsui)

pattern-matching over each sonority’s pitches

Currently the best algorithm is a neural network that only looks at one

sonority at a time. Go figure.

(29)
(30)

Average accuracies (10 chorales)

Context-free neural net

95%

±

6

Context-free Knnn

94%

±

7

Context-considering knn

92%

±

8

Context-considering net

91%

±

10

Decision tree

89%

±

14

Naïve Bayesian

88%

±

19

Hidden Markov Model

83%

±

16

Pardo & Birmingham’s

82%

±

21

(31)

Confusion matrix for the neural network

M

nc

M7+

M7

m7

m

ø7

!

!7

7

M

x

nc

2

.

8

x

1

.

8

1

.

8

M7+

100

x

x

4

.

2

M7

x

m7

x

m

x

ø7

7

.

1

x

!

x

!7

50

50

x

7

x

(32)

Precision (%)

Decision tree

Contextual neural network

M

93.7

94.2

nc

77.1

78.2

M7+

50.0

100.0

95.7

100.0

M7

92.3

91.5

m7

72.2

93.9

m

97.2

95.5

ø7

91.7

76.9

7

100.0

66.7

(33)

Recall (%)

Decision tree

Contextual neural network

M

96.1

97.0

nc

77.1

89.0

M7+

33.3

16.7

91.7

83.3

M7

92.3

82.7

m7

78.8

93.9

m

96.3

98.2

ø7

78.6

71.4

7

100.0

66.7

(34)

F-measure (%)

Decision tree

Contextual neural network

M

94.9

95.6

nc

77.1

83.4

M7+

40.8

40.8

93.6

91.3

M7

92.3

87.0

m7

75.4

93.9

m

96.8

96.8

ø7

84.9

74.1

7

100.0

66.7

(35)

6 Computational

musicology

(36)

Range

 

Soprano

Alto

Tenor

Bass

Bach

Kostk a

(37)

Range

highest pitch

lowest pitch

soprano

116 254 282 298 331 334

186 034 050 068 075 223

049 070 100 165 185 197

214 325 348 158 175 205

239 352 087 110 244

alto

024 028 033 036 057 058

069 078 084 123 217 225

248 252 329 331 334 354

359

345 186

tenor

024 043 074 083 151 156

224 248 263 264 273 276

281 329 354 371

229 070 205

bass

285 312 331

034 051 214 223 340 131

328 143 155 197 205 219

241 187 235 319 337 240

070 075 165 175 239

(38)

Voice crossing (57% of Bach Chorales)















3





  















10









7

(39)

Consecutive octaves (4%)









5













 





 

7

 

 

 



10





(40)

Cadence detection:

these are all the final cadences in the Bach chorales

(41)

Conclusion

Pros

free software:

http://genos.mus.br/rameau

algorithms from literature and new algorithms

good accuracy

easy performance evaluation

quite fast :-)

Cons

no functional analysis

no explicit segmentation

no non-chord tone analysis

only Bach Chorales

natural ambiguity in harmonic analysis

input data must be 100% correct

References

Related documents