The instruction:
The irregular time signatures 10/8 11/8 13/16 14/16 15/16 17/16 are played
aksak
– chords rhythm is some combination of quarters and dotted quarters (eighths and dotted eighths respectively)
For time signature of 16/16 there will be four chords in the bass , each lasting a quarter and accompanying four sixteenths in the melody.
For an irregular time signature , e.g. 13/16, the bass will use an
aksak rhythm, say 3+2+3+3+2 ( = 13 ), so:
The introduction and coda are also created here,
as they are built on I and V chords of the selected tonality.
This step may fail, and then the driver neotod.pl
increases the random seed and restarts from neotoca.pl .
Notice that
both motifs above belong to C major (the notes are A C and G B D F)
but the product is not in C major, because 20 = G#.
If the melody is to remain in C major, it will be played
Once the tonality has been established, analy copies the initial measures in c, suitably transposed,
and prepends them to the data already in memory. If necessary, it will also transpose and
append a few measures at the end of the data, so the final tonality will be heard long
enough to become established.
analy then calls the routines af and bef to write the introduction and coda,
which further emphasize the piece tonality.
A pair of scales or arpeggios is followed by one final tonic chord.
Tonal etude for piano solo. Has a short introduction and coda, which are an elaboration of I,I or I,V or V,I in
the piece tonality. The rest consists of melody plus chords, starting and ending in the same
tonality, but freely modulating (unprepared changes of key, which I cannot hear anyway).
The melody evolves from measure to measure, using my own technique of motif multiplication,
and the chords are fitted to it. Most of the time, the melody is in the right hand and the chords in the left (surprise!),
but sometimes viceversa. Most of the time the chords are blocked, but often expanded as arpeggios and simple rhythmic figures.
will produce a score named, e.g. gminWDC and a playable midi file gminWDC.mid. In more detail, neotod.pl executes:
perl neotod.pl parameters
perl neotoca.pl @ARGV
perl neotocb.pl
copy colophon.txt+sco.txt+befaf.txt $nam
midi $nam
neotoca.pl
as supplied to neotod.pl. All the parameters are optional; their interpretation is as follows:
rand_1234
ton_min
size_12
regular
fit
The parameters are written on the file colophon.txt.
A min = A B C D E F# G#
and min9 uses freely nine notes, e.g. :
A G F E D C B A in descending scales
A min9 = A B C D E F F# G G#
If the parameter regular is set, then repeat from the first note,
otherwise from some arbitrary point in the product.
This is done based on rhythm and current key. For time signature of, say, 9/8
there will be three chords in the bass, each lasting a dotted quarter and accompanying three eights in the melody.
The chords are picked from the current key chords.
the first chord will last a dotted eighth accompanying the first three sixteenths in the melody;
Sometimes, a special aksak rhythm is generated for the measure (even in regular rhythms) and used in the bass.
the second chord will last one eighth accompanying the next two sixteenths;
the third chord will last one dotted eighth accompanying the next three sixteenths;
etc...
neotocb.pl
This sets a high and a low range, one each for the melody and accompaniment.
There is little sophistication in this step, as the melody consists in notes of given pitch, all of the same duration.
A more complex routine, as the chords may be emitted:
The files colophon.txt, sco.txt, and befaf.txt will be
later combined to the score called name, and then
converted to the midi file name.mid. Using the example above, the end result is dmajRFV.mid.
Motif multiplication
Each note of the first motif is replaced by the second motif, transposed by that note.
For the purpose of this piece,
all durations, in the motives and their product, are equal, so they do not get mentioned. For example:
9 12 x 7 11 14 17 = 16 20 23 26 19 23 26 29
9 becomes 9+7 9+11 9+14 9+17 and 12 becomes 12+7 12+11 12+14 12+17.
In this scheme, obviously, 0,12,24... = C, 1,13,25... = C# = D♭, ... etc, and 12 is one octave higher than 0.
16 19 23 26 19 23 26 29 = E G B D G B D F
Alternatively, the new key will be set to A minor – one of several possibilities. In this case the melody will appear as:
16 20 23 26 20 23 26 30 = E G# B D G# B D F#
accompanied by chords of A minor.
The routine analy
This routine examines the data read from inte.txt. The measures start in either C major or C minor,
then modulate freely. analy records only the mode (major or minor) and tries to find, at the end of
the piece, a measure in the same mode. If found, the tonality of that measure
becomes the tonality of the piece, and the etude will end with the last measure in the same tonality.
If not, the program exits with an error code, to be recognized and automatically
fixed by the driver.
Introduction (routine bef )
This is a straightforward presentation of the piece tonality: either the scale, or
two chords: I,I or I,V or I,V7. Each of I, V or V7 may appear
as a simple blocked chord, or a pair of arpeggios, one in each hand. The scale
is also played simultaneously in the two hands, in the same direction or in opposite directions.
For variety, rests replace some notes in the scales.
Coda (routine af )
An elaboration on the final cadence in the piece tonality: either the scale, or
two chords: I,I or V,I or V7,I. Each of I, V or V7 may appear
as a simple blocked chord, or a pair of arpeggios, one in each hand. The scale
is also played simultaneously in the two hands, in the same direction or in opposite directions.
For variety, rests replace some notes in the scales.Intermediate file inte.txt
0: START 0 0 0 0 x 0 0 0 0 = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
cmin9 4013 8/8 2 4 tonality c minor, two beats subdivided into 4
60 1/8 60 1/8 60 1/8 60 1/8 60 1/8 60 1/8 60 1/8 60 1/8 eight eights unison on C=60
53,57,48 4/8 53,57,48 4/8 two chords lasting one quarter each: F,A,C F,A,C
1: new1st 7 12 x 0 0 0 0 = 7 7 7 7 12 12 12 12 no more unison
cmin9 4013 8/8 2 4
67 1/8 67 1/8 67 1/8 67 1/8 72 1/8 72 1/8 72 1/8 72 1/8
55,58,50 4/8 53,56,48 4/8
2: miror 7 12 x 0 0 0 0 = 5 5 5 5 0 0 0 0
cmin9 4013 8/8 2 4
65 1/8 65 1/8 65 1/8 65 1/8 60 1/8 60 1/8 60 1/8 60 1/8 melody: F F F F C C C C
50,53,57 3/8 48,53,57 2/8 53,56,48 3/8 bass: D,F,A C,F,A F,Ab,C aksak rhythm
3: swap12 7 12 x 0 0 0 0 = 7 12 7 12 7 12 7 12
cmin9 4013 8/8 2 4
67 1/8 72 1/8 67 1/8 72 1/8 67 1/8 72 1/8 67 1/8 72 1/8
48,51,55 4/8 48,51,55 4/8
43,47,50,53 4/8 43,47,50,53 4/8
{ ____________ new tonality ebmaj ______________ }
4: new2nd 7 12 x 0 7 3 = 7 14 10 12 19 15
ebmaj 1453 8/8 2 4
74 1/8 70 1/8 72 1/8 79 1/8 75 1/8 67 1/8 74 1/8 70 1/8 melody: D Bb C G Eb G D Bb
46,50,56 4/8 51,55,58,50 4/8 chords: Bb,D,Ab Eb,G,Bb,D
{ ____________ new tonality cmaj ______________ }
5: transpo 7 12 x 0 7 3 = 4 11 7 9 4 0 transpose prev. measure 3 semitones down (causes modulation from Eb major to C major)
cmaj 2741 8/8 2 4
69 1/8 64 1/8 60 1/8 64 1/8 71 1/8 67 1/8 69 1/8 64 1/8
57,48,52 4/8 43,47,50,53 4/8
.
.
The final score
An example, with lots of commentaries, may be found here.