We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi there!
I'm working on a project in which i visualize music trough musical instruments. Now I have everything set-up and working with audio to midi converters. But with the only full-on midi instrument I get an error...
Can you guys n gals help me out with this?
So when I connect my electronic drumkit to my laptop and open processing I get the following error: (I don't get this error when I connect a guitar with a midi-converter)
The MidiBus Warning: Disabling midiMessage(MidiMessage message, String bus_name) with bus_name because an unkown exception was thrown and caught java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at themidibus.MidiBus.notifyParent(Unknown Source) at themidibus.MidiBus$MReceiver.send(Unknown Source) at com.sun.media.sound.AbstractMidiDevice$TransmitterList.sendMessage(AbstractMidiDevice.java:679) at com.sun.media.sound.MidiInDevice.callbackShortMessage(MidiInDevice.java:172) at com.sun.media.sound.MidiInDevice.nGetMessages(Native Method) at com.sun.media.sound.MidiInDevice.run(MidiInDevice.java:140) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ArrayIndexOutOfBoundsException: 1 at HiddeDrums.midiMessage(HiddeDrums.java:57) ... 11 more
Answers
What is HiddeDrums? Your sketch?
That bottom line suggests you're trying to access the second of an array that's only got one element (or fewer). Without the code I can't say any more.
Hi Koogs,
This is my sketch, thanks for your time!
The error is probably in these lines:
Try either:
message.getMessage()
is null and/or ifmessage.getMessage().length > 2