Demo Page

This is the accompanying web page for the following paper:

Abstract

This paper presents an automatic harmonization method that, for a given melody (sequence of musical notes), generates a sequence of chord symbols in the style of existing data. A typical way is to use hidden Markov models (HMMs) that represent chord transitions on a regular grid (e.g., bar or beat grid). This approach, however, cannot explicitly describe the rhythms, harmonic functions (e.g., tonic, dominant, and subdominant), and the hierarchical structure of chords, which are supposedly important in traditional harmony theories. To solve this, we formulate a hierarchical generative model consisting of (1) a probabilistic context-free grammar (PCFG) for chords incorporating their syntactic functions, (2) a metrical Markov model describing chord rhythms, and (3) a Markov model generating melodies conditionally on a chord sequence. To estimate a variable-length chord sequence for a given melody, we iteratively refine the latent tree structure and the chord symbols and rhythms using a Metropolis-Hastings sampler with split-merge operations. Experimental results show that the proposed method outperformed the HMM-based method in terms of predictive abilities.

Experimental Results

(Fig.1: Sampling-based estimation of the most likely chord sequence for a given melody.)

The figure above shows how the proposed MH sampling method with split-merge operations worked for automatic harmonization. The number of kinds of non-terminal symbols, K, was set to 12.

A musical score at the top of the figure shows an initial sample in which the chord labels were optimized by using the Viterbi algorithm, but the chord onsets were located at the bar lines at the beginning of sampling.


The second score shows a sample proposed by moving the onset positions of 5th and 6th chords (G major and C major).


The third score shows a sample proposed by merging the 7th and 8th chords (F major and C major) into one chord (C major).


The bottom score shows the best sample that maximizes the likelihood for the given melody.


In each of the processes, the likelihood increased after refining variables. The result indicates that proposed method can successfully generate a musically-meaningful variable-length sequence of chords by considering the latent tree structure behind the chord sequence.


Audio data for other experimental results

Case:1

Case:2

Case:3