number_pieces.py is a program written in the Python programming language that composes and generates sheet music for pieces in the style of John Cage’s “Five”. John Cage’s Number Pieces vary in form, so I chose to emulate the way he created “Five.” “Five” is a piece that lasts five minutes, written in parts for five players. Each part has five measures. The measures are played according to time-brackets which allow the player to choose when to begin and end a measure between the brackets. Four of the measures are given different brackets chosen through some random process, while the third measure of the piece, the middle measure, begins and ends at the same time for all five players. Each measure has between 1 and 3 randomly selected notes, straying from the pattern of fives. Given this information, I interpreted the constraints of a “number piece” given a piece called “N”:
I decided to add a couple more constraints to make number_pieces.py compositions differ in a larger way from the example by John Cage. These constraints are as follow:
These constraints make the number in the number piece more significant, and also slowly change the mood of the piece. Using all these constraints, it is now time to generate and play a piece!