danomatika / ofxMidi

(maintained) Midi addon for openFrameworks
Other
262 stars 72 forks source link

newMidiMessage not called. #40

Closed flyingrub closed 8 years ago

flyingrub commented 8 years ago

https://gist.github.com/flyingrub/012441d8a4693aff15f6 > Log and files.

It does now compile (i recompiled and resinstalled all depencies). It doesn't complain that the device isn't set. But it won't trigger newMidiMessage. So i'm wondering if the class should herit from ofBaseApp obligatory ?

danomatika commented 8 years ago

Those "RtApiAudio" errors refer to the RT Audio library, not the Rt Midi library used by ofxMidi on desktop OSs.

danomatika commented 8 years ago

No, the midi listener doesn't need to inherit from an ofBaseApp. Your problem is probably related to setting things up in the constructor. Don't do that. Make a setup function and explicitly call from your ofApp setup. This is because you can't guarantee when the constructor gets called unless you're creating things using pointers and things might be getting inited too early on.

danomatika commented 8 years ago

This issue is probably relates to creating static ofxMidi objects: https://github.com/danomatika/ofxMidi#using-static-ofxmidi-objects-on-linux-causes-seg-faults

flyingrub commented 8 years ago

that did the tricks, thanks :)