Algorithmic Composition: My first stochastic canon
This is a short little exercise that uses a linear distribution of random numbers to select notes and note durations that appeal to me. These are then arranged into an AABA pattern that gets played over itself in double and quadruple time. Here's a schematic representation:
AABAAABAAABAAABA A A B A A A B A A A B A
Here is the csound file, and here is the python script that generates the score. The output from a run of the program (with a 16 second pattern length) is included below (download here).