Loading...
Logo
Processing Forum
Hello!

I wrote a programme for live visuals, using the promidi library and a Korg nano controller to play with it. When I press the „SCENE“ button on my controller (and only when I do that) the console writes the following message:

java.lang.ClassCastException: com.sun.media.sound.FastSysexMessage
cannot be cast to javax.sound.midi.ShortMessage
    at promidi.MidiInDevice.send( MidiInDevice.java:98)
    at com.sun.media.sound. AbstractMidiDevice$ TransmitterList.sendMessage( AbstractMidiDevice.java:701)
    at com.sun.media.sound. MidiInDevice. callbackLongMessage( MidiInDevice.java:162)
    at com.sun.media.sound. MidiInDevice.nGetMessages( Native Method)
    at com.sun.media.sound. MidiInDevice.run(MidiInDevice. java:123)
    at java.lang.Thread.run(Thread. java:680)
 
I think it always did that but I never paid much attention to it. However since I updated to Processing 2.0.1 the programme crashes.

Can somebody maybe explain this message to me? I have no idea how to fix that.

Thank you so much!

Replies(4)


However since I updated to Processing 2.0.1
 
updated from what? 
  • from 2.0b7 ? 
  • 1.5.1 ? 
  • 2.0b8???


This error smells like incompatibility of Java versions. Seems like in newer version of Java there's something changed or broken and promidi.MidiInDevice.send() is failing.

But this is just a guess, as I have never worked with this sound api.
Sorry, I forgot to mention that. It worked both with 1.5.1 and 2.0b9. The error message was always there but the programme never crashed. Thus I didn’t care much about it.

Actually with 2.0b9 it still works, and it would be the same version of Java as with 2.0.2, right?
I just checked seems both of them use 1.6 37 version of Java. :S
Well, thank you anyway!

Since nobody seems to know the solution to this problem I guess I will trya different MIDI library and if nothing helps stick to the beta version for a while.