2.1.7 Harmonization of a rhythmical canon
This problem has been proposed by the french composer Georges Bloch (in Une empreinte sonore de la Fondation Bayeler). We start from a given rhythmical canon structure, of length
, with
voices. This canon has the property that exactly one onset is played for each time unit. It is played repetitively. There are only a few possible values of
and
(see Andreatta, 1999) for details, or the chapter by Emmanuel Amiot in this book. We’ll have to deal with
and
voices, and periods in a range from
to
.
The goal is to harmonize the canon, i.e. to give a pitch value to each note. The note are sustained, and the chords formed at any time unit vary of exactly one note from one to the next due to the canon structure. We’ll write
for the chord played at time
. Here, the variables are the notes, and the domain is a fixed ambitus.
The first constraint is to minimize a distance-like function
, called Estrada distance, on the chords. To define
, we need to calculate the texture of the chord (or step-interval-serie), which is the set of all inner intervals of the chord transposed in one octave, plus their completion to
. For instance the chord
,
,
is transposed in
,
,
, with intervals
and texture
. The distance
is then defined as the number of different values in the textures, precisely the number of notes in the chords minus the number of common intervals in the textures minus
. An option is the minimize the Estrada distance between the chords and a fixed chord.
The second constraint is to minimize the difference between the virtual fundamentals
between two successive chords. Georges Bloch uses as definition of
the lowest note of a fifth interval in the chord if there is one, if not, the lowest note of a third interval in the chord if there is one, and if not, the lowest note of the chord (some alternative definitions were also used). He then defines another distance
for values of
, which matches the circle of fifths, see table 1.
| Table 1: | Values for the virtual fundamental distance. |
|
|
|
|
|
|
|
|
|
|
|
|
|  | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
|
|
|
|
|
|
|
|
|
|
|
|
| | 0 | 9 | 7 | 6 | 5 | 2 | 8 | 1 | 4 | 3 | 11 | 10 |
|
|
|
|
|
|
|
|
|
|
|
|
| | | |
A third constraint restricts the melodic motion of each voice. It imposes for each voice a common fixed profile, of course with the same time gap as the voices entries, in order to enforce the canon perception.
This CSP is overconstrained and a solver will give as solution the same note everywhere. To avoid this, we have to add some alldifferent constraints, and there are two possibilities, a vertical one and a horizontal one. Either all the notes of a chord should be different, or two successive notes of a voice should be different. The first option is bad in two ways : it hasn’t a real musical meaning (think of the case with
voices), and it constrains the CSP more than reasonnable. The second option is good in two ways : it only adds a little constraint (furthermore