glicol / glicol-cli

glicol cli: cross-platform music live coding in terminal
https://github.com/chaosprint/glicol
MIT License
139 stars 12 forks source link

Ableton Link time synchronization #5

Open EnigmaCurry opened 1 year ago

EnigmaCurry commented 1 year ago

Ableton Link is an open protocol for time synchronization, so that multiple disparate programs, devices, or instruments can sync up over the network to a common session that synchronizes musical time, so each connection knows the bpm and the exact moment to start the next measure, so everyone starts or stops at the correct time.

I have been interested in the glicol VST for syncing time in my DAW, but I think it would be more powerful for glicol-cli to have ableton link support, then you could sync with pretty much anything, not just a DAW.

Heres how I imagine it would work:

glicol-cli --link --sync-start 4 --file test.glicol

That would start the glicol engine loading the file, it would connect to ableton link, and then it would wait until the current beat is a modulus of 4, before starting. glicol wouldn't necessarily need to track time internally, and you would still use whatever speed parameters in your code, etc. But glicol would only respect the link time for the transport, to start and stop the DSP graph engine.

You could even trap the SIGINT (Ctrl-C) signal of glicl-cli, to tell it to stop playback at the next --sync-start bar and then quit, so that way you could start and stop glicol-cli in time with your other music.

I think this would be great for live music, but I am mostly interested in this for recording stems of several tracks in my DAW (my DAW controls the transport through Ableton Link), and by manually muting things in glicol code. So I can record the process N times for N tracks (unmuting each track), and have each recording start and stop in the same time frame (unless glicol can already map to multiple sound devices?)

References: