Possible bug? ArrayIndexOutOfBoundsException when using SoundCipher sendMidi() with minim import.

edited April 2018 in Library Questions

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:

  1. On mac (OSX 10.9.5), Processing 2.2.1: importing minim causes exception.
  2. On mac (OSX 10.9.5), Processing 2.2.1: NOT importing minim works.
  3. On mac (OSX 10.9.5), Processing 1.5.1: importing minim works.
  4. On mac (OSX 10.9.5), Processing 1.5.1: NOT importing minim works.
  5. 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();
}

Answers

  • Hi, I get no error at all and I hear a short 'blob' like (The default os x tone) sound. I am using Processing 3.0a5 using the latest minim library downloaded from the internet and the latest soundCipher library. Maybe it is only you?

  • edited April 2018

    Hi, I also got the same error message when I'm using the two libraries together (Processing 3.3.7, macOS 10.13.3.) don't know how to fix it yet...

  • Can you post your full error message?

    Kf

Sign In or Register to comment.