This is a script designed to be sent to an Arduino board (I use the Arduino IDE for this, on a Mega R3 2560 board), and have the pins configured with whatever components you have available.
Take it, chop and change it, have fun and make some noise!
The sound is generated using the Mozzi library, found here [https://sensorium.github.io/Mozzi/]