The motifs,
each repeated several times times form the basic strand.
The program also writes an intermediate file minipas.txt, to be used by the other programs yabmini and cmini
to create a coda to conclude the piece. This file is just a list of shorties in 8 voices. The shorty is the smallest duration in the piece, typically 1/16 or 1/8,
and all other durations are multiples of it. E.g., if the shorty is 1/16, a quarter note will be emitted in 4 records in minipas.txt .
Up to now there was no consideration of harmony, the two voices advance in canon, although each voice may have folds. This is why up to 8
voices will sound.
If a cadence is found, then the durations of the notes around it are modified, to emphasize it. A few preceding chords are
also reset to belong to the scale of the final cadence. The coda is attached to the previous canon, with a suitable rallentando,
and the score is written, and processed to a midi file.
If there is a cadence, the canon is incomplete – voice 1 does not play the basic strand twice,
and voice 2 does not play all the basic strand, only 'most of' that.
Alas! the whole setup is mostly overkill, the codas don't sound natural or especially effective. The version without coda is much simpler and
cleaner, but it does sound incomplete. A non-harmonic, somehow organic, coda?
That makes the midi file somename.mid, that you can listen to. There is random dependence on time, so if you
say
later, you get a new sound file: the same strands used in counterpoint, but voice 2 enters at a different time, and the dynamics are different all over.
TO DO : it should end on some kind of coda.
( Done: see canon.pl above )
A minimalist canon at augmentation, for piano.
canon.pl
This runs from Perl, via system:
creating two complete scores with the corresponding midi files.
perl amini.pl @ARGV
perl yabmini.pl
perl cmini.pl
rand_2345 size_20
This means: initialize random generator with 2345, and make 20 motifs.
The parameters are optional; they are also used in naming the score files:
sc2345-20
in this case. There will also be midi files: sc2345-20.mid and
nocoda2345-20.mid .
nocoda2345-20,
DETAILS
amini
This creates the motifs, and produces the files nocodaRAND-SIZE and nocodaRAND-SIZE.mid. As their names implies, there is no coda,
and the voices proceed independently to completion. However, the result may be interesting because there is built in randomness:
every time you run
midi nocodarand-size
you get a different nocodarand-size.mid with different dynamics and another entry time for voice 2.
yabmini
Here we consider the harmony between the (up to) eight voices, to discover a cadence near the end,
on which to end the piece. This is done by gathering chords and
checking versus a big list of acceptable cadences.
If none is found, yabmini exits and the driver program canon.pl will call cmini, to supply a
coda otherwise.
mini.pl
Builds the complete score, on a file par.txt. If you want, munge it, or just:
copy par.txt somename
midi somename
midi somename
This means: initialize random generator with 2345, and make 20 motifs. The motifs,
each repeated 4 times – very square, form the basic strand.rand_2345 sz_20
varep.pl
The same as above, but the motifs are repeated 2,3,4 or 5 times at random, and the dynamics are a little different,
over a larger range.