Input: Button; Output: Tone
After reading and researching alternative forms of writing music, I came across Terry Riley’s In C. It consists of 53 short musical phrases to be played in order, but each phrase is to be played as many times as each musician chooses.
Using this as a framework, I wanted to use a number of push buttons and associated speakers to act as each musician. When a button is pressed, the “musician” advances to the next bar. Until this event occurs, the phrase plays on loop. In this way, it allows an individual to perform the piece without requiring an ensemble.
So far I’ve programmed two buttons/speaker sets, as well as the melodies for 2 bars — but the speakers are playing the music in series rather than both outputting simultaneously. I suspect this has to do with my “play tone” code being part of the for loop and sequentially for each speaker. I think I might need to have the looping of sound occur automatically rather than reading the melody each time loop() is called over and over.