I'm trying to develop an audio-reactive application using Ableton Live and the midibus library. I'm sending midi signals from two different instruments in ableton to processing. Each instrument should have a different visual response in processing. I'm doing this by setting a different midi channel for each instrument in ableton and by programming different responses for the respective channels in processing. But I'm having problems with the velocity. The velocity of the notes from one instrument affects the behavior of the visuals from the other instrument when both are played together.
I'm trying to write a program similar to a celular automata, but simpler. I'm new to programming, so I'm having trouble with simple problems. My initial program is a grid with 99x99 cells. The cells are gradually filled with squares from the center(49x49) to the corners at random positions, like a central pixel that grows and forms random shapes.
I would like to know a way to test if a cell or its neighbours are already filled with a square, can someone help me?