An attraction
model of melody generation
Assumptions
This model is based on the same assumptions as the other models:
- A tonal melody consists of Parts
- A tonal melody is based on an underlying harmonic progression
The model also supports the distinction between structural and
ornamental tones, but differs in the way a melody is generated. Instead
of first generating the structural tones (the skeleton) which may next
be ornamented, the attraction model builds the melody from left to
right, generating chord tones and non-chord tones in the process. The
non-chord tones, are resolved by a subsequent chord tone as described
below.
Background
The aim is to implement a model of melody generation that takes into
account the expectations created by the tones and chords within the
tonal system. These expectations can be described as the mutual
attractions of tones.
Roughly, the generation of a melody within this model is guided,
in part, by the expectations of the tones in the incrementally produced
melody. Thus after each added tone the expectations for future tones
are updated and these new expectations co-determine the selection of
the next tone. Expectations can be implemented as weights for the
entire array of available tones (limited by the range). Simultaneously,
the model contains a representation of the metrical weights of each of
the
future slots.
In this way we could envisage an incremental process of melody
generation in which the choice for a next tone is determined by a
multi-dimensional attraction model in which the slots function as
attractors such that strong slots attract highly activated tones, and
weak slots less activated tones. But envisage is not the same as
implement. So, next we consider the implementation of this model.
Implementation
A Part is constructed by first setting rhythm, gap, and harmony (as in the
other models) and finally the pitches.
The
pitches
are set as follows:
The first note is set as follows: if the harmony = I, a tonic
near the
middle of the range is chosen, otherwise a chordtone near the
middle of the range is selected. Subsequent notes are defined by the
interval between the current and the
next note, specified by the parameters: type, direction,
and stepsize that are
defined as follows:
Type:
Type specifies the scale used to specify an interval between two
consecutive notes: triadic, diatonic, or chromatic.
- Depending on the parameters set by the user, Type may be 100%
triadic (chord tones), 100% diatonic (which will obviously partly
produce chord tones), or a specified proportion of chord tones and
non-chordtones
- If the chromatic box is checked, on average half of the non-chord
tones will be chromatic
- The first and last note of each bar is a chordtone (to avoid
illegal successive notes)
- The first tone after a harmony change is a chordtone
- The last tone of a Part will be a tonic if Harmony = I
Direction:
Direction is chosen randomly except
- that a leap (StepSize > 1) is
followed by a step in the opposite direction (gap-fill principle)
- for a
preference to move away from
the range boundaries, which becomes stronger the closer the
current tone is to a range boundary.
Stepsize:
- Default stepsize is 1 (within either the triadic, diatonic, or
chromatic scale)
- If the user has ticked the "allow
tone
repetition"
box, stepsize will be 0 for a proportion of
the chordtones
- If the user has ticked the "allow
leap"
box, part of the stepsizes will be 2 or 3 (a 'leap'), but
only
for chordtones
The resolution
of unresolved
notes
Apart from the above rules, unresolved tones,
both diatonic and chromatic, are resolved immediately (at present) as
follows.
Unresolved diatonic notes are resolved by enforcing
stepsize 1 on the diatonic scale. In most cases this will result in a
chordtone except in the case of a note on the 6th degree which may
result in a non-chordtone on degree 7. Thus, using this algorithm a
run G A B
C (in the key of C-major) is feasible. In a similar fashion unresolved
chromatic tones are resolved by a step
on the chromatic scale.
Later we will implement a more sophisticated procedure based on the
'Tonal Pitch Space' of Lerdahl. More
Between-Bar
correspondence
We have included the possibility to assign the melodic structure
of the first bar to all or some of the next bars in a Part. Selection
for this is made by means of the pop-up menu under Structure constraints in the
Model-specific parameters pane.
Between-Part
correspondence
In this model we have included the possibility to use the structure of
the previous Part in the construction of the current Part. Thus, if the
box labeled this Part same structure
as last Part is checked the rhythm of the former Part will be
used and in the setting of the pitches the structure (defined as a step
on a scale) of the former Part will be used.
AttractionModel.html (last update 31.12.2010)
Created in SeaMonkey
© D.J. Povel, 2010
