Information Technology Reference
In-Depth Information
Algorithm 2 discover_best_motifs
1: Input: notes , model , num_motifs , l _ min , l _ max
2: C extract_candidate_motifs ( notes , l_min , l_max )
3: best_motifs ₐ{}
4: while | best_motifs | < num_motifs do
5:
m
C [ norm ( | m | ) Pr ( m | model ) ]
6: best_motifs best_motifs m
7: end while
8: return best_motifs
argmax
m
4.2.2.5 Lead Sheet Composition
Using the motif discovery system as an entry point, a simple, hybrid composition
system for creating lead sheets can be built. This system composes from the bottom
up because it uses motifs as a starting point. It also utilises a top down approach
because it imposes formal global constraints on the final piece of music.
After motifs are collected from an inspirational file, they are randomly concate-
nated together to form an initial population for a genetic algorithm. The genetic
algorithm outputs a section of monophonic music which is harmonized using a hid-
den Markov model trained on a lead sheet database. The monophonic melody and
the chords from the hidden Markov model comprise a lead sheet.
From a set of motifs, we create an initial population of 100 themes by repeatedly
choosing four random motifs and concatenating them. We run a genetic algorithm
with the initial population for 100 iterations without a stopping criterion, assum-
ing a 4/4 meter. The fitness function, crossover, and mutation operations are taken
from the NormalDistributionFE, OnePointCrossover, and ComplexMutater classes
in jMusic, 4 respectively.
The genetic algorithm above is executed twice in order to create an A theme and
a B theme. The A and B themes are then concatenated to create a melody line in
ABAB form, a typical form in pop music and jazz.
After the melody line for the entire piece of music is created, chords are added to
the melody by following the process described in [ 36 ]. Chord transition probabilities
are accumulated in a square matrix by counting chord transitions in a chords-only
lead sheet database called The Imaginary Book , which can be downloaded at the
Impro-Visor Yahoo Group. 5 Melodies are generated for The Imaginary Book with
Impro-Visor's improvisation tool using the Bill Evans grammar, and melody emission
probabilities are accumulated in a matrix by counting the melody note durations for
each accompaniment chord.
Next, the composed theme (A or B) is segmented into measures, where each
measure becomes an observation in a hidden Markov model, and the chord transition
matrix represents the state transitions. The measure observations are calculated by
4
http://explodingart.com/jmusic .
5
https://groups.yahoo.com/neo/groups/impro-visor/info .
 
Search WWH ::




Custom Search