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

Thanks!

So I found some relevant info at http://www.electronics.dit.ie/staff/tscarff/Music_technology/midi/MTC.htm

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: https://gist.github.com/adamski/b42eb8f91910fe28a017458e2edad5d3

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