Does TheMidibus Library work in Processing 4?

Has anyone gotten the midibus library to work with the new Processing 4.0 release? Any of my old code with that library recognizes available midi devices but then throws a NullPointer Exception every time. Works fine in the older version. Would really appreciate it if someone can confirm the error or give me tips on rectifying it. Thanks.

Hi @justin_lincoln – what is the specific error you are getting, on what kind of line? Can you give a very simple example sketch? That would really help narrow things down if someone wanted to start investigating your problem.

Hey y’all! Can confirm that I’m replicating the error @justin_lincoln reports. Doesn’t require anything fancy to run into the issue, just a simple attempt to initialize a new MidiBus throws the NullPointerException:

import themidibus.*;
MidiBus NK2;

void setup() {
  NK2 = new MidiBus(this, "SLIDER/KNOB", 2);

Attempting to run this will flag line 7 (NK2 = …) and throw 5 "NullPointerException"s in the dialog box.

I have several projects that would run just fine with this syntax in Processing 3 that are displaying this behavior now in Processing 4.

1 Like