musikinformatik / SuperDirt

Tidal Audio Engine
GNU General Public License v2.0
520 stars 74 forks source link

Support Ableton Link via SuperDirt instead of Carabiner? #185

Closed jarmitage closed 4 years ago

jarmitage commented 4 years ago

SuperCollider 3.11.0 supports Ableton Link: https://github.com/supercollider/supercollider/releases/tag/Version-3.11.0

Currently Tidal supports Ableton Link via a separate tool called Carabiner: https://forum.toplap.org/t/link-support-preview/418/16

Would it now be more streamlined/maintainable for Tidal users to access Ableton Link via SuperDirt?

yaxu commented 4 years ago

Yes I think so. It would be a generally useful thing for tidal to be able to follow supercollider's tempo clock. Then I guess link support would follow from that 'for free'. I've had mixed results with carabiner, and would be more in favour of putting time (ha) into getting sync with supercollider right

jarmitage commented 4 years ago

I am not sure how SuperDirt currently does scheduling, but it appears to not use TempoClock, which LinkClock is based on

telephon commented 4 years ago

All the timing is done by tidal, superdirt just uses the timestamps that tidal produces. It is a bit difficult to tell how these timestamps could be processed to fit on the link clock.

jamshark70 commented 4 years ago

The devil is in the details of course. How will Tidal sync to SC's LinkClock? You can't assume LinkClock will be strictly monotonic because it's constantly making micro-adjustments to match other peers on the network -- so you couldn't use the network to identify a starting time and then let Tidal run under its own power. You'd have to slave Tidal to SC's clock, using some kind of constantly-running network messaging that also absorbs and compensates for network jitter...

... which is all the stuff that Link is already doing for you, better than you could rearchitect it for yourself. (I say that having tried and partially failed to write my own network sync for SC. It is harder than you think.)

My opinion is that you won't actually save any effort this way.

It would be easier to import the Link library directly into Tidal, and get rid of carabiner that way.

yaxu commented 4 years ago

Good points @jamshark70. I'll close this for now. Unfortunately Haskell <> C++ is quite hard. I always find c++ building a dark art in itself, and the functional model doesn't map well to C++. I see there is a code generator that's maintained though https://github.com/wavewave/fficxx