You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
665 B

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);
}