Professional Documents
Culture Documents
HowMusicalPathFinderWorks-unfinished
HowMusicalPathFinderWorks-unfinished
Ivan Dragolov
1
end time (for example 32 bars). The BUILDER saves every successfully created
melody. Building the melody may fail if the user-specied start is a dead end.
2
This example2 is represented as:
[(12, 5, 0), (24, 9, 0), (36, 5, 0), (48, 12, 0), (60, 5, 0),
(72, 17, 0), (84, 16, 0), (90, 14, 0), (96, 12, 0), (102, 14, 0),
(108, 12, 0), (114, 10, 0), (120, 9, 0), (126, 10, 0), (132, 9, 0),
(138, 7, 0), (144, 5, 0)]
If we work only with tones from one layer, the tone can include only time and
pitch. For simplicity, the examples in which no layer is used, the tones will be
presented only as a pair (time, pitch ). Then the above example will be presented
as follows:
[(12, 5), (24, 9), (36, 5), (48, 12), (60, 5),
(72, 17), (84, 16), (90, 14), (96, 12), (102, 14),
(108, 12), (114, 10), (120, 9), (126, 10), (132, 9),
(138, 7), (144, 5)]
Each tone is unique. Therefore, the melody can be represented as set. Inter-
nally, the melody is most often presented as a sorted list of tones in ascending
order. This is how the melodies will be written in this description of MPF.
The description of MPF chords is similar to that of pop and jazz pieces. Each
chord starts at a certain moment and lasts until the beginning of the next chord.
The chord is described by (1) the scale and (2) the degree on which the chord is
based. The chord Dm can be described as scale: C major, degree: II (second).
The same chord can be described dierently depending on the musical context
- the neighboring chords and / or the melody sounding with the chord. The
chord Dm can be described also as scale: D minor, degree: I (rst). The chords
are grouped according to their harmonic function: T (tonic), S (subdominant),
D (dominant).
harmonic function degree
T I, III, VI
S II, IV
D V (VII)
The chord description for MPF includes (1) the scale and (2) the harmonic
function (T, S or D). So, for MPF chords F and Dm may be represented as
(C major, S) or (D minor, T) depending on the musical context. The internal
2 The begin of J. S. Bach - Invention No. 8 in F major, BWV 779
3
representation of the chord is a pair with the rst item - the tonal basis (0 for C,
1 for C#, 2 for D, ...) and the second item - the type of chord (0 for major T, 1
for major S, 2 for major D, 3 for minor T, 4 for minor S, 5 for minor (harmonic)
D).
scale harmonic function type of chord
major T 0
major S 1
major D 2
minor T 3
minor S 4
minor (harmonic) D 5
For example: (2, 3) means D minor T (tonic), (7, 1) means G major S
(subdominant).
The chords of a piece are represented as a dictionary. The key is the time
when the chord begins, and the value is the chord itself.
The chords
may be represented as
chords = {
0: (0, 1),
48: (0, 2),
96: (0, 0)
}
To Be Continued...