I'm having an unusual problem with the SoundCipher library on Mac. This question is some combination of asking for help and a bug report. I wasn't sure where to file a bug-report, so I thought I would post here before bothering the creator.
The gist of the problem is in Processing 2.2.1, whenever I use SoundCipher's sendMidi() function while I have imported the minim library, I get an "ArrayIndexOutOfBoundsException". But, by simply commenting out the minim import, sendMidi() works fine. In Processing 1.5.1, SoundCipher's sendMidi() function works regardless of whether minim is imported. I believe there might be some conflict with SoundCipher on macs, in Processing 2.2.1, with the minim library.
I pursued the problem a little further and tested a few different combinations of OS/Processing. In all of these tests I used the "latest" version of SoundCipher I could download from explodingart.com (beta release 10). The list of testing combinations is below:
- On mac (OSX 10.9.5), Processing 2.2.1: importing minim causes exception.
- On mac (OSX 10.9.5), Processing 2.2.1: NOT importing minim works.
- On mac (OSX 10.9.5), Processing 1.5.1: importing minim works.
- On mac (OSX 10.9.5), Processing 1.5.1: NOT importing minim works.
- On Win 7, Processing 2.2.1 and 1.5.1, SoundCipher sendMidi() works regardless of whether minim is imported.
The code I am using for testing is below. With the running applet window selected, press a key to hear a ridiculously short midi note.:
import arb.soundcipher.*;
import ddf.minim.*; // commenting out this line affects whether sendMidi works.
SoundCipher sc = new SoundCipher(this);
void setup(){}
void draw() {}
void keyPressed() {
sc.sendMidi(sc.NOTE_ON,0,63,66);
sc.sendMidi(sc.NOTE_OFF,0,63,0);
}
void stop() {
// cleanup
sc.stop();
super.stop();
}