This runs in Processing (version 3 at the time this
is being written) and requires the
Minim audio library. To install
Minim, in Processing's menu open Sketch -> Import Library... -> Add Library...
,
search for Minim and hit the Install button.
Of course, running this as intended will also require the instrument files referenced in the code, but they're not provided here. However, you can remove references to them and play around without them (an exercise left to the reader).
Most of the code here is extremely ad-hoc & unclear, and I probably won't build on it directly, but I'm leaving it here for those who may be curious. It looks like this when running (a lot is lost when not in motion, of course).