Sending MIDI clock and transport

In this example, we'll synchronize Magenta with a DAW using a MIDI clock and transport (start, stop, and reset) information. The MIDI clock is one of the oldest and more popular ways of synchronizing devices, which is available for pretty much every instrument and music software.

We'll be giving the example in Ableton Live, but you can also try this in any DAW that has MIDI clock functionality.

You can follow this example in the chapter_09_example_04.py file in the source code of this chapter. There are more comments and content in the source code, so you should go check it out.

To sync our Magenta program to Ableton Live, we'll launch a metronome thread that wakes up on every beat and sends a clock message: ...

Get Hands-On Music Generation with Magenta now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.