I had a little play with Pendulum Waves the other day and since then I've been wondering what sort of sound they would make if I played a tone as each pendulum reached its apex.
Well, the wondering has stopped and the mild headache has begun!
I spent a few hours adding sound support to my orignal code. I used the rather excellent Standing Wave libraries from Noteflight that make sound synthesis a doddle. Each pendulum assigns itself a MIDI Note Number based on its length and each time it reaches an apex, dispatches an event that's picked up by the main application.
I use a timer to marshall multiple events and bundle up multiple simultaneous notes using Standing Wave's AudioPerformer class. The pendulums also pass along pan information so the notes are played in glorious stereo!
There are some quite nice sounds - especially the little scales that appear and the big thumps when all the pendulums align.
Enough to drive even the most musically liberal a little crazy, but a fun experiment.
The application lives here and the source code lives here. Usual disclaimer on the source code: there are lots of magic numbers dotted around and some of the code ain't too pretty.