We describe how we used a data set of chorale harmonisations composed by Johann Sebastian Bach to train Hidden Markov Models. Using a probabilistic framework allows us to create a harmonisation system which learns from examples, and which can compose new harmonisations. We make a quantitative comparison of our system's harmonisation performance against simpler models, and provide example harmonisations.
This dissertation describes a chorale harmonisation system which uses Hidden Markov Models. We use a standard data set of chorale harmonisations composed by Johann Sebastian Bach. This data set provides a large number of stylistically similar harmonisations, and is freely available in a machine-readable format. We divide the data into training and test sets, and compare the predictive power of various models, as measured by cross-entropy, the negative log likelihood per symbol. Using Hidden Markov Models we create a harmonisation system which learns its harmonic rules by example, without a pre-programmed knowledge base. We assume that we only need to take into account short-term dependencies in the local context. However, we generate globally probable harmonisations, rather than choosing the locally most likely outcome at each decision. The results produced by the system show that pre-programmed harmonic rules are not necessary for automatic harmonisation. Statistical observation of training examples provides the harmonic knowledge needed to generate reasonable chorale harmonisations.
Some example harmonisations are available as audio files in MIDI format. Except the first, which was composed by Bach, these files were generated by the Hidden Markov Model harmonisation system.
| p. 17 | Chorale K11 (Bach's harmonisation), BWV 26.6, 'Ach wie nichtig, ach wie flüchtig': MIDI, PDF |
| p. 50 | Example chord skeleton: harmonisation of 'Dank sei Gott in der Höhe', melody of chorale K54, BWV 287: MIDI, PDF |
| p. 51 | Example chord skeleton: harmonisation of 'Wie schön leuchtet der Morgenstern', melody of chorale K377, BWV 36.(2).4: MIDI, PDF |
| p. 53 | Example illustrating ornamentation: harmonisation of 'Dank sei Gott in der Höhe', melody of chorale K54, BWV 287: MIDI, PDF |
| p. 54 | Example illustrating ornamentation: harmonisation of 'In allen meinen Taten', melody of chorale K211, BWV 367: MIDI, PDF |
| p. 55 | Example harmonisation: 'Erstanden ist der heilige Christ', melody of chorale K85, BWV 306: MIDI, PDF |
| p. 56 | Example harmonisation: 'Für deinen Thron tret' ich hiermit', melody of chorale K132, BWV 327: MIDI, PDF |
| p. 57 | Example harmonisation: 'Wir Christenleut', melody of chorale K380, BWV 110.7: MIDI, PDF |
| Example harmonisation: 'O stilles Gotteslamm', melody of chorale K181, BWV 133.6: MIDI, PDF | |
| Example harmonisation: 'Jesu, der du meine Seele', melody of chorale K187, BWV 354: MIDI, PDF | |
| Example harmonisation: 'Ist Gott mein Schild und Helfersmann', melody of chorale K216, BWV 85.6: MIDI, PDF | |
| Example harmonisation: 'Was Gott tut, das ist wohlgetan', melody of chorale K341, BWV 99.6: MIDI | |
| Example harmonisation: 'Gott der Vater wohn uns bei', melody of chorale K113, BWV 317: MIDI, PDF |
Moray Allan, 12 September 2002