Information Technology Reference
In-Depth Information
GenerateBeatMoreThan (context, H, I, BiasCriteria, startValue):
// context represents the last generated output
State the generation problem as a CSP
Compute one solution according to
the time left that optimises the criteria
Fig. 5.23 The method for generating a beat according to a bias. We use the approach described in
Pachet and Roy ( 2011 ). The criteria is optimised depending on the time available (using an anytime
approach)
In a Markovian context, control raises a fundamentally difficult problem, because
control goes in the way of the basic Markov assumption (see Sect. 5.3.2 ). Indeed,
control consists precisely in establishing properties to be satisfied not on 'the next
item' to play, but on the next sequence of items. Unfortunately, the Markovian view
of sequence generation is that the future in only determined by the current state (or
the N last current states, depending on the chosen order).
We have addressed this problem from a fundamental perspective, and proposed
in Pachet and Roy ( 2011 ) a general solution to generate Markov sequences satisfy-
ing arbitrary properties. This solution consists in reformulating Markov generation
not as a greedy algorithm, but as a constraint satisfaction problem (Freuder and
Mackworth 1994 ). Constraint satisfaction is a powerful technique that enables the
fast exploration of large search spaces. In our case, controlling a Markov sequence
amounts to exploring the space of all possible sequences of length N (in our case,
N is the number of notes per beat). This space can be huge as soon as the training
set is large, or the length of the sequence to generate is high.
In this section we illustrate how controlled Markov generation can be used to
influence the generation in real-time using meaningful musical criteria. Any criteria
can be defined to control sequences, as long as they are computable. We present
here a case in which the criteria are scalar values computed from a given sequence
with simple features , but this scheme can be extended to more complex algorithms,
classifiers in particular, as discussed below.
In a first phase, a set of melodic features are defined, such as:
Mean pitch of a sequence;
Mean interval of a sequence;
Tonalness of a sequence.
Tonalness is a scalar value
and gives an indication of how tonal is a melody
with regards to the corresponding chord in the sequence. It can be computed using,
e.g. a pitch profile algorithm (Krumhansl 1990 ).
The next step is to substitute the generation of a beat by the corresponding con-
straint satisfaction problem, as described in (Pachet and Roy 2011 ).
We illustrate the mechanism as follows. We start by a phrase played on an A
minor chord (24). We then generate three beat continuations to fill up a four beat
measure (still in A minor in our case; changing the harmony has no impact on the
control issue). We select the ones maximising criteria we consider useful as controls :
∈[
0 , 1
]
Search WWH ::




Custom Search