Musical Bouncing Balls

For my Intro to Computer Media midterm I wanted to do something with collision detection and audio. With this as my general goal I started playing around with bouncing balls and turned that into a drum machine like application. Whenever a ball crosses the center point of the screen 1 of 10 audio tracks will play depending on where the ball crosses along the x-axis of the center point. You can click to add more balls to the mix and create beats. I also tried to program the arrow keys to control the speed or tempo of the balls, although I did not succeed with that I accidentally figured out how to turn gravity on with the right arrow, pause everything with the down arrow, flip gravity with the left arrow and turn off gravity with the up arrow. Gotta love happy accidents. Below is a link to a javascript version of the application along with two version of the application for download, the first is more rhythmic and the second is more abstract and random. Enjoy!

Array of Balls

This is a project testing the array and loop features in processing. Every time the user clicks the screen a new bouncing ball is created. See it in action here.