duality in the problem. Depending on the sets chosen for the notes,

, and for the intervals,

, it may be impossible to solve. We can then either favor the notes or the intervals in the CSP modelization. Here the composer wanted to work on gestures, represented as intervals or sets of intervals. Following the musical wish, we have to choose these gestures as variables,

.
The domain is given in MIDI values and closed under minus, for instance
. The starting note
is fixed, such as the set of allowed values for the notes
. Then the harmonic constraint is
for all
(analogous to a capacity constraint).
A second constraint forbids local repetitions,
.
A third constraint restricts the number of apparition for each value of the domain. Fixing an integer
for some, resp. all, values
of the domain (with
, resp.
), the constraint can be written
. Note that we can switch to a Permut-CSP if all the domain values have a cardinality constraint.
The last constraint restricts the melodic motion of the whole sequence, and is better integrated in the first one as a reduction of
.
2.1.5 Tempo approximation
This problem has also been stated by Gilbert Nouno. The goal is to find an approximate tempo, given the rhythms really played by a musician. These real rhythms may differ from the symbolic rhythms of the score (if there is one). The