How To Sync to a DAW? Midi or OSC

Ok so there's the ableton with the max/msp patch, but is there a ardour or reaper with pd patch? Or some other method?

It would be great if tidalcycles could sync or provide clock to jack transport as well.

The Midi Tutorial is this MIDI | Tidal Cycles

But in the initialization step there's this:

MIDI Sources:
MIDIEndPoint("LoopBe Internal MIDI", "LoopBe Internal MIDI")
MIDIEndPoint("Focusrite USB MIDI", "Focusrite USB MIDI")
MIDI Destinations:
MIDIEndPoint("Microsoft GS Wavetable Synth", "Microsoft GS Wavetable Synth")
MIDIEndPoint("LoopBe Internal MIDI", "LoopBe Internal MIDI")
MIDIEndPoint("Focusrite USB MIDI", "Focusrite USB MIDI")

And the endpoint is chosen to be the midi destination "focusrite". In jack, choosing the midi through port-0 gives a loopback which the midi through port can be attached to the DAW, in this case ardour6.

cps doesn't seem to work on controlling the clock on the DAW. But midicmd "midiClock*" seems to work. Throughout, I had to toggle between Int & M-Clk in the transport of ardour6, and going through the tutorial, ardour6 was sometimes unresponsive and doing random function evaluations on the tutorial didn't seem to produce reasonable actions in ardour6.

Has anyone gotten this to work in ardour6 or reaper?

You can try using:

  • a MIDI Clock (MIDI | Tidal Cycles), detailed in one of the sections on the page.
  • Ableton Link (Multi-User Tidal | Tidal Cycles) if your DAW is able to synchronize using this method.
    • Jack Link might be what you are looking for. It allows you to synchronize with Ardour 6.

The TidalCycles architecture is much more open than other softwares. It's cool because it means that with the proper configuration, you can include it in various setups. The bad side is that you have to configure it and it can take some time.

Yes i've tried the midi clock example. It appears Reaper cannot use any external input clocks ( i might be wrong ), and tidalcycles hooked into the midi clock in of ardour6 doesn't generate any workable responses in ardour6.

There's this in the cockos forum, but what is OSCTarget? The osc wiki for tidalcycles doesn't have an api function like this.

I'm trying out the technique from that cockos forum post to try out OSC for clock.

Recap of the method:

  1. configure reaper to listen for OSC
  2. reaper reads osc for TEMPO /tempo/raw as a tempo bpm
  3. create a Target in tidalcycles
  4. create an osc packet
  5. create an oscmap
  6. start a stream by stream <- startStream defaultConfig oscmap
  7. create a reaper variable
  8. streamReplace stream 1 $ reaper 230

And, it works to change reaper's bpm. A few questions though. What is defaultConfig? I reconfigured it use cCtrlPort = because it's conflicting with an already bound port of Tidalcycles. Does this mean there's another tidalcycles listening on that port? All i see are a bunch of ghc processess. Are all these steps supposed to be evaluated in Bootup.hs instead?

In the original post, it seems like the poster is able to open an OSC multi stream from tidalcycles to reaper and superdirt at the same time using

tidal <- startMulti [reaperTarget, (superdirtTarget {oLatency = 0.6, oAddress = "127.0.0.1", oPort = 57120})] (defaultConfig {cFrameTimespan = 1/5})

But the tidalcycles OSC tutorial's use of stream seems to setup a few listeners specified by defaultConfig. Looking through reaper's Default.ReaperOSC, it seems like reaper has some predefined OSC endpoints like Time.

Trying out that Time endpoint, I notice that the streamReplace doesn't seem to stop sending the OSC messages. Are there other OSC message APIs that can be used?

Trying this with reaper 6.51. Reaper is using a helper script Reablink to link to Carabiner using ableton's link protocol. tidal is doing

sock <- carabiner tidal 4 (-0.14)

It seems to work for a while, then reaper segfaults with

In pixman_region_append_non_o: The expression y1< y2 was false

Well, if anyone has any suggestions ...

This will be simpler in the future. I have prepared a PR where Ableton Link is fully integrated: Use ableton link for scheduling by Zalastax · Pull Request #898 · tidalcycles/Tidal · GitHub. I will merge once a bug in GHC on Windows is fixed.

I did a quick readup on this. It seems like midi sync with jack isn't that easy because the messages include where in the timeline the master is supposed to be as opposed to ableton link, which the slave can infer the beat tempo.

It would be great if tidalcycles is able to do all this through midi as opposed to osc though, seeing as how it's pretty ubiquitous.

When Link support is integrated, Supercollider can be set up as MIDI source: Tidal link by Zalastax · Pull Request #891 · tidalcycles/Tidal · GitHub. Other way around might be possible too but will likely be a bit buggy.

1 Like