Program structure for

initialize program
setparms :
Reads the file PARM.txt

defineconso :
Reads the file noizez.txt

readphr :
Reads all the phrases, saves cadential info, and creates the three versions ASIS, BYTON, BYID for each phrase.

codaindex :
Finds the "most final" cadence, to serve as the piece conclusion (CODA)

makescore :
Examines all the phrases constructed by readphr, one at a time, and converts them into score. It may skip phrases that have no cadences, and it will stop after the final close (in the phrase identified by codaindex)

rhy :
Defines the rhythm for each phrase. The rhythm is simply a sequence of fractions, e.g.
4/16 2/16 1/16 1/16 4/16 4/16
This represents a 4/4 measure, and fits 6 distinct chords from the phrase (there are 6 durations). The rhythm may change only on a new phrase; in this example, if the number of chords in the phrase is not a multiple of 6, the new phrase will continue with the same rhythm.

In each voice, the notes receive the durations from the rhythm; however, identical notes are "slurred" together. So, in this example, one voice might play:

4/16 3/16 5/16 4/16
while another plays:
4/16 2/16 2/16 8/16
analyse each phrase
advox :
Adds voices, if the texture is too thin

analid :
Checks if the phrase may be compressed to fewer voices, playing chords

compress :
Does the compression, if analid says so

mixcol :
Mixes the columns, i.e. voices, after all the changes and regularizations

genscor :
genericinst :
Picks instrumentation. The instrumentation changes only at a new phrase – that could be improved.

genemit :
Emits notes, rests and hockets

rarefied :
rarefinst :
Picks instrumentation

raremit :
Emits chords, not just notes; also rests and hockets

cad :
calls cadscor

cadscor :
cadrhy :
Makes a special rhythm for cadences, basically slowing down and emphasizing the melodic cadence.

genericinst :
genemit :

coda :
calls codascor

codascor :
codarhy :
Makes a special rhythm for the final cadence.

genericinst :
genemit :