hi, I am experimenting with minim and processing, really new to this, so maybe missing something obvious.
the following program continuously starts oscillators with filter, and when number of running oscillators becomes more than i want, it starts unpatching them one by one. It works for some time, then i get ArrayIndexOutOfBoundsException error, and the problem lies within unpatching, because it works fine without it, except for crackles i get when there are too many oscils. I tried to do this with SineWave at first, but couldn't figure out how to add filters with this method. so, here is my program:
import ddf.minim.*;
import ddf.minim.signals.*;
import ddf.minim.ugens.*;
import ddf.minim.effects.*;
int maxSignals=7;
Minim minim;
AudioOutput out;
Oscil sine[]=new Oscil [maxSignals];
IIRFilter filt[]=new IIRFilter [maxSignals];
void setup()
{
size(512, 200, P3D);
minim = new Minim(this);
// this gets a stereo output
out = minim.getLineOut(Minim.STEREO);
}
float a=0;
float nexttime=0;
int i=0;
boolean unp=false;
void draw()
{
if (millis () >= nexttime) {
int noteLen = int (abs (sin ((PI-a)*19))*100)+100;