spencersalazar / chuck

28 stars 8 forks source link

midi clock support #6

Open spencersalazar opened 11 years ago

spencersalazar commented 11 years ago

okay this, this is untested, but im pretty sure it is in the underlying RTMidi library (and not the chuck MIDI IO classes). In rtmidi.h line 176 there is a function 176: void ignoreTypes( bool midiSysex = true, bool midiTime = true, bool midiSense = true );

that function defaults midiclock ("midiTime") to true, turning it off I believe. The main midi callback then checks that later in midiInputCallback (function starting in rtmidi.cpp at line 343)- more specifically, it checks it at line 431 I believe as 0xF8 is hex for a Midi tick (clock). At line 433, it checks data->ignoreFlags by doing &ing 0x02, so Im pretty sure all you need to do is set the bool in the function initially to false, which will subsequently allow that code to pass through in the IO callback.

Really though, there should be a MIDI panel in the miniaudicle preferences, and settable in chuck terminal that you can flip that bool true or false to enable or disable midi clock as I agree with the comments that there is no point in having it receiving when unnecessary.