Ground, undergrounds and fillers

Given several ground melodies, and several other melodies (fillers), the program adds the fillers, suitably transposed, to the ground. The ground may consist of independent musical lines, each containing chords, e.g. :

One musical line, which must be present, is defined as ground; the others, if any, as underground.

The instruction:

perl  drug.pl   file_filein     rand_345     five_7     pass_1/8     fix    
will produce a score named  scorename  and the corresponding midi file  scorename.mid. The score name is generated from filein , which is an input file containing the ground and the fillers.

All the parameters except the first are optional. Their interpretation is as follows:

file_filein
Must appear; filein is the name of the file to be processed by tondur.

rand_seed
The number seed is used to initialize the random numbers generator.

five_manynotes
manynotes is too many notes for one chord. manynotes is between 5 and 8, inclussive; 5 is reasonable, as the standard harmony is in four voices. However, specifying higher values 6,7 or 8, makes the program add more fillers, resulting in richer counterpoint.

fix
fix dissonances, if possible, using trills.

pass_fraction
If the duration of the dissonant chord is less than  fraction,  it will be considered as consisting of passing notes, and will not change, even if  fix dissonances  is required.

The driver executes, via system from perl:

perl chordug.pl @ARGV > a$ID
perl shazar.pl @ARGV > b$ID
midi $ID
The identifier $ID is based on filein  and the random seed . The outputs name  scorename  is $ID.



Programs