I'm currently writing a program that's basically a grid sequencer, and I had an audio question. Currently, my program can detect "hits" by displaying fill colors, but I'd like a variable audio sample (one of 16) to play depending on the position of the tile. I have my program split up into three different classes: Timer, Column, and Tile. It works by passing timing and placement information into an array of the Columns, which is made up of an array of the Tiles. I based my audio integration off of the following doorbell tutorial:
http://www.learningprocessing.com/examples/chapter-20/example-20-3/
I was able to get it so a single sound played any time a tile was clicked, but whenever I tried to load a second sound I got an out of memory error. I should have plenty of memory for two data sounds, so I'm guessing I made a mistake somewhere along the line, and I'd appreciate someone taking a look at it. Thanks!
//*********** Visical Revision 10
Timer timer;
import ddf.minim.*;
Column [] columns;
Minim minim;
int interval = 100;
int measureH = 16;
int measureL = 60;
int timerSpeed = interval*measureL;
int dL = measureL*25;
float mxMain, myMain;
void setup() {
size(dL, 400);
minim = new Minim(this);
timer = new Timer(timerSpeed);
timer.start();
columns = new Column[measureL];
for (int i=0; i<columns.length; i++) {
columns[i] = new Column(i, measureH, interval, "dingdong.wav", "BD.wav");
Hello, I'm currently working on a project that requires a grid to be laid out across the sketch, the user click on different tiles of the grid, and then a line moving across the screen be able to interact with only the clicked objects. I was wondering what the best way to go about this would be? Here's the code I have so far, it's just a column of the tiles instead of the full grid: