How to output MIDI Timecode (MTC)

Hi all

I need to build a very basic audio sequencer, which also outputs MIDI Timecode at a predefined framerate. Its the timecode bit that I’m trying to work out. I’ve had a browse through the JUCE classes and have a vague idea of how to achieve this but would be grateful for some pointers.

So far I think I need to:

  • Use the audio thread as my timing reference
  • Send “Quarter Frame” midi messages to match the framerate


So I found some relevant info at

I also found a post from 2012 with some example code: Sending midi (clock) from standalone app?

I took the liberty of uploading it to Github:

That looks like a like very good starting point at least.