import arb.soundcipher.*; SoundCipher sc = new SoundCipher(this); int tempo = 1; int inst[] = {0,0,14,44}; int selInst = 0; void setup() { //frameRate(5); } void draw() { background(125); //line(random(width), random(height), mouseX, mouseY); sc.instrument(selInst); //sc.pan(mouseX); sc.playNote( mouseY, 50,1); delay(tempo); } void mousePressed() { tempo = mouseY * 10; System.out.println(mouseX); //frameRate(fr); } void keyPressed() { int k = key - 48; if(key == '+') { selInst = selInst + 1; } else if(key == '-') { selInst = selInst - 1; } else { selInst = inst[k]; } System.out.println(k); }