Open starfishmod opened 7 years ago
@radarsat1 Any further thoughts on this? I'm willing to put down some cash if this could be done? Thanks Andrew
I think if there is operating system support it makes sense to expose it, I suppose the API should also support some callback method or other for doing local clock-synchronized stuff too. But I don't have time to investigate how it work would right now, especially on other operating systems. It should at least make an effort to be similar on all supported platforms.
@radarsat1 if it helps this is based on my research about various midiclock subsystems - NOTE I'm not a c/c++ developer and none of this maybe useful
Windows now has clock built in - https://blogs.windows.com/buildingapps/2016/09/21/midi-enhancements-in-windows-10/#XYBC0JmAzXheiVED.97 has an example on how to write code
ALSA - see the attached file, as an example, it uses internal ALSA handling for clock AFAICT ametro.txt
Jack doesn't seem to have a built in clock generator the closest I can find is http://www.teuton.org/~gabriel/jack_midi_clock/ and https://github.com/x42/jack_midi_clock
CoreMidi - I didn't have much luck with the closest I got was https://github.com/michaeltyson/TheSpectacularSyncEngine/blob/master/TheSpectacularSyncEngine/SEMIDIClockSender.m
both Jack and CoreMidi look like they create their own timers?? If I can help in any other way please let me know
Is it possible to add a new option to RtMidiOut for midiClock out? e.g.
AFAICT alsa has the ability to set this up with snd_seq_ev_schedule_tick, I have no idea if others have this kind of option.
While I know this can be done using code around the RtMidi API it would good to have some kind of reliable low level solution that is non-blocking with fairly accurate timing.
Thanks for the great work so far!