Im new to Processing, and am currently working on a project in which I have collected a large amount of motion data from the traffic outside my window. I currently have a sketch that reads in this data, and plays it back. All the motion is represented by various sized rectangles. Once a rectangle passes through the centre point of the screen, it changes to a shade of yellow to show it has passed through this point;
What I would like to do is add sound to my sketch, so that once a rectangle passes through the centre point, a simple tone is triggered and played. I would like this to happen every time a new rectangle passes through this point, in order to create a sort of abstract piece of music. Any help would be greatly appreciated;