Final Composition Algorithms
Pentatonic Scales ( c major )
By using this algorithm, the notes generated are compared against the c major scale, and changed according to which is closest. It returns a much less hectic group of notes, since they are now within the same scale, and can harmonize well without adding too much dissonance.
Context-Free Grammars
There are rules for generating notes depending on what the current note is when the ruleset is called. The ruleset only cares about one note, and does not take into account other notes in the composition, thereby making this grammar set context-free. Each ruleset for a note randomly picks a rule within that set to return. A propagating function takes in a note phrase, and returns a new note phrase generated from the notes within the passed phrase by implementing the rulesets for each particular note.
Slide 1 -- Structure and Method