Automatic Melody Harmonisation

back

The Constraint Satisfaction Problem
Discussion

The Constraint Satisfaction Problem

This example creates a harmonisation for a given melody. More specifically, it performs an automatic harmony analysis for a folk tune. Voicing is irrelevant in this CSP: only the chord symbols are searched for. For simplicity, this CSP defines relatively rigid basic conditions.

The CSP borrows a few harmonic rules from Schoenberg (1911) in order to ensure musically reasonable solutions.

Shown are all solutions for the first phrase of the German folksong `Horch was kommt von draussen rein': only four harmonisations fulfil the rules of the CSP. For example, the second bar can not be harmonised with Am, because Am has no common pitch class with G7. An x on top of a note denotes a non-harmonic pitch.

Solution 1

Solution 2

Solution 3

Solution 4

source

Discussion

The example is kept simple for brevity. For example, only an early model of Schoenberg1 and only a few non-harmonic note cases are implemented. Therefore, this CSP works well for some melodies and less good for others. These are the primary limitations cause by the simplification.

back


1. During the course of his theory of harmony, Schoenberg gradually refines his directions for the student by introducing more and more exceptions. This CSP, however, implements only rules from an early part of Schoenberg's book.