brucelane / Cinder-MIDI2

Alternative approach to interfacing RtMidi lib in Cinder
21 stars 10 forks source link

Midi Thru #16

Open earjuice opened 7 years ago

earjuice commented 7 years ago

I did this to forward the raw midi unsigned char to the midiOut low level sendMessage function. It works, but I'm not sure how stable it is... Perhaps there is a better way?

brucelane commented 7 years ago

@felixfaire could you like to have a look, please? I'm currently busy on another project for 2 weeks...

felixfaire commented 7 years ago

My only concern with this is that it posts 2 async functions to the ioservice for every callback instead 1. Which seems like overkill for what seems like quite a rare edge case.

If you think this is a valuable feature to others I might suggest adding another bool switch to enable raw midi instead of the midi message objects.

Ideally this would also work similar to (and alongside) mDispatchToMainThread so the user could specify whether they want raw messages and also which thread they want it to come from.

brucelane commented 7 years ago

yes, a boolean like mMidiThru would be the way