Midi Clock to Ableton Link

[Edit 03.12.2019] I added a link to the corresponding GitHub Repo at the end of this article. Feel free to clone, fork and mess around. #fcksbt [Update]

Long story short: This is an application which receives Midi clock data and converts them to Ableton Link. Target scenario is using it to enable Track Decks in Native Instrument’s Traktor being the Tempo Master in an Ableton Link Timeline. You can download it here (Mac).

I am one proud owner of Native Instruments Traktor and Maschine. And I dream of being musically creative and running both products synchronized with each other … and add other apps to this scenario like Resolume, VDMX, … anything that creates music or visuals. Just because I think it might lead to beautiful (or at least interesting) results.

While there is a multitude of tutorials explaining how to successfully sync Maschine and Traktor most of them have in common that they rely on MIDI as well as Maschine and Traktor running on the same computer. Something that might not always be the preferred solution. Just think of basic load-balancing (Maschine as well as Traktor can cause quite some CPU load. Add Resolume or VDMX and your Computer will probably … experience some kind of lag every now and then). Or maybe you want to run both programs on fullscreen. Or you want multiple people to work together. I think I made my point.

You could, of course, use MIDI to connect different hosts to each other but you would have to deal with all the struggle that comes along with MIDI: You need an appropriate interface on each host, you need MIDI cables and you need a way to make your application react to MIDI clock. Then there’s clock drift, latency, etc… If you ever tried to syc more than two computers via MIDI you probably ran into at least one of these issues. If not: Have fun trying to not lose your temper while setting up a working scenario on-stage.

Fortunately, there’s Ableton Link which allows you to simply run software in sync. It just works. Locally and over a network connection. It incorporates latency compensation, runs on all major operating systems (including mobile) and …. it just works (really: try it). Furthermore there’s a growing number of ‘creative’ software products which natively support Ableton Link. And even more: it’s open source.

Good thing: Maschine supports Ableton Link. Traktor supports Ableton Link.

Maschine’s titlebar prominently features the ‘Link’ button near the center – you can rarely miss it.

Traktor also has a ‘Link’ button. Life’s good.

Bad thing: You can not provide tempo information for an Ableton Link timeline from a running Track Deck in Traktor.

Though by the protocol’s specs every host can set/ suggest a session’s tempo (there is no dedicated clock master like in a MIDI scenario) Traktor’s implementation of Ableton Link more or less makes it a ‘semi-passive’ member: You can sync Traktor’s master clock to Ableton Link like a charm. You can also sync Traktor’s Track Decks to its master clock. Making them adapt the master clock’s tempo. But you can not take a deck’s tempo information and feed it into the Ableton Link Timeline. It’s a one-way scenario. Decks can only be set to a tempo but cannot set a tempo themselves.

Track Decks can be set to Master when Link is DE-activated. ‘Master’ relates to MIDI Clock.
Traktor’s Track Decks can NOT be set as Master when Link is active. Notice how Traktor’s Master clock synced to Live 10 running in the background. Also notice the deck’s tempofader (it’s active).
Traktor’s Master Clock is synced with Live via Ableton Link. The left Track Deck is set to SYNC. Notice the tempofader being semi-transparent; it’s inactive and can not be controlled via mouse or MIDI. The deck can only receive tempo information.

This might be okay for when you play some flavour of electronic music where (maybe) you stick to one tempo throughout your (preplanned? *cough*) set. But if you want to incorporate different tempos (because you play different sorts of music) and want to provide your song’s tempo information to Ableton Link you are technically running into some dead end.

That is unless you use the software I provided here. As described in the beginning it receives MIDI clock data and converts them into Ableton Link data. This way you can set a Link Timeline’s tempo from your actively playing Track-Deck within Traktor (or basically any other piece of software or hardware that sends out Midi Clock). I drew a little sketch to show the basic principle behind this.

Pay attention to the arrows. It’s another one-way-scenario. But this time it’s going in the correct direction. From a Track Deck into Link’s Timeline. (Man I love these kinds of diagrams.)

Here is a video of Maschine and Traktor running on separate computers which are synced via Ableton Link within a WLAN. The audible metronome click is coming from Maschine on the left. Notice how Maschine automatically syncs to the tempo changes on the Track Deck.

Up next is a more visual approach. This example shows Traktor being the Tempo Master for some visuals run by VDMX. And it clearly shows that timing and syncing are things that you have to prepare. VDMX is always a little early on the beat. The Clock is near perfect but it’s somewhat extra tight while Traktor’s implementation might not be that precise (which is just an assumption). However, this is simply a matter a fine-tuning. If you look closely you might identify an LFO running in VDMX on the left screen. That’s where you could easily compensate minor (or even major) misalignments between audio and video. Please don’t quote me on aesthetics. This is just an impromptu demo with the first reactive shader I found. I am using either VDMX or Maschine simply because I don’t have enough CPU power at hand; technically they could all be run simultaneously and in sync. Theoretically THIS could then be your setup for your next art-exhibition performance.

Setting up the software is as easy as … setting up something very easy. First you need a MIDI port that accepts incoming Midi Timecode. I Added a virtual Midi Port since I am running Traktor (the Midi Clock’s source) on the same computer. The port is called it ‘MidiAbletonLink’.

This port receives MIDI Clock from Traktor

The software features a drop down menu at the top (and it might be easy to overlook) where you select the MIDI port where the Timecode is being derived from. And that’s basically it. The ‘Retrigger wait’ slider makes the software wait x milliseconds after incoming Midi Clock data are detected and after Midi Clock is being retriggered. Theoretically this doesn’t need to be – practically a delay of ~50ms simply led to better results.

Feel free to contact me if anything is left unclear or if you have suggestions to further improve it. The software is built with openFrameworks and can be downloaded here. I’ll happily provide the sources as well: simply contact me via mail. (Sorry for that extra effort but this tweak is necessary because there are people who repeatedly tried to take my work and blatantly sell it as their own. I just want to make sure they are not getting the sources too easily. #fcksbt)

[Update 03.12.2019] A few people contacted me because the software crashes on their system. I tidied up the sourcecode a little bit and uploaded everything to my GitHub so you can give it a go yourself. [/Update]

Tagged , , , , , , . Bookmark the permalink.

9 Responses to Midi Clock to Ableton Link

  1. verstaerker says:

    unfortunately this app immediately crashes after starting

  2. Will says:

    I take it this requires OSX Mojave?

    • Andy Fischer says:

      Hi Will, I built in on Mojave. don’t think openFrameworks is very picky considering the OS but that’s just a rough guess.

  3. Will says:

    Hi Andy,
    Downloaded your Link tool to try and use. I take it this was built for OSX 10.14?
    I am running 10.13 and I can get the application to run by executing from a terminal, but not from the app package – any ideas?

    • Andy Fischer says:

      Hey Will, thanks a lot for the feedback. At this moment I cannot say very much about it since it’s my first openFrameworks app. I will have a look at it and will post updates as soon as possible.

  4. Stefan says:

    Hey Andy,
    Nice idea and kudo for making this app.
    I’m searching since a long time the opposite, creating a Midi-Clock from Ableton Link. Is it a great effort for you, to implement this function (opposite direction) for your program? Would be really nice to have a solid solution for that..!
    Thanks, Stefan

    • Andy Fischer says:

      Hey Stefan, thx for the feedback! At first I thought about Link to Midi but it seems to be mobile-only. The idea, however, doesn’t sound too bad =). I will put this on my to-do-stack (which doesn’t guarantee anything happening soon…sry for that).

  5. W says:

    Thanks so much for this. Solves a great problem for non-link-enabled DAWs.

    FYI: Works perfectly with Logic generating clock. With Studio One generating clock, tempo alignment works, beat/phase alignment does not. As if MIDI clock start has no effect.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.