Information Technology Reference
In-Depth Information
selectHarmonicDatabase (chord)
if chord is major, major 7, major 6 then return MajorDB;
if chord is minor, minor 7, minor 6 then return MinorDB;
if chord is half diminished then return HalfDimDB;
if chord is 7 altered then return SeventhAlteredDB;
if chord is augmented 5 then return WholeToneDB;
Fig. 5.8
The selection of a harmonic database according to the current chord
GenerateBeat(context, i) // context
=
the last generated output
RP := chooseRhythmPattern;
H := selectHarmonicDatabase (i chord);
segment := new empty segment;
Repeat N times (N = number of notes in RP)
next(H) = Random_Draw (H, context);
segment := Concatenate (segment, next) ;
context := Concatenate (context, next) ;
return segment with rhythm
Fig. 5.9
The basic GenerateBeat function integrates all musical decisions. N is the number of
notes per beat, H is the harmonic context, which determines the Markov model to be used. H is
constant during the beat
Fig. 5.10
A minor scale played up and down, used as the sole training phrase
Changing Markov databases at each beat also creates a potential problem with
regards to continuity: how to ensure that phrases evolve continuously during chord
changes? It turns out that there is again a simple solution to chord change negotia-
tion, which does not necessitate modifying the generation algorithm, but consists of
carefully choosing the training corpus
. In cognitive terms, means that all possible
chord changes have at least one solution.
Let us consider several cases in turn, to illustrate the Markov process. We start
by a training sequence in the key of
A harmonic minor
consisting of a scale played
up and down (Fig.
5.10
). Using our generator, we can produce phrases in all minor
keys like the one illustrated in Fig.
5.11
(still in
A minor
). Other keys are handled
simply by transposing the input sequence.
By definition, the generated phrases will all be Brownian, in the sense of Voss and
Clarke (
1978
). This is caused by the fact that each pitch (except for the extremes)
has only two possible continuations—one above and one below—in the diatonic
scale used for training.