Ableton / link

Ableton Link
Other
1.06k stars 145 forks source link

Library for dotnet standart #70

Open joa77 opened 4 years ago

joa77 commented 4 years ago

I would like to seen an implementation of Ableton Link for dotnet standart. Is there a chance to get this? Or a detailed protocol description, so that I can implement one?

brunchboy commented 4 years ago

I wanted the same thing for Java years ago, but neither is likely. So I wrote Carabiner to bridge between the Java and Link worlds. You can use it to do the same for .Net: https://github.com/Deep-Symmetry/carabiner#carabiner

joa77 commented 4 years ago

That might be an option, but i rather prefer a pure dotnet implementation, so i dont't have to worry to ship the correct carabiner version for every platform

brunchboy commented 4 years ago

I understand completely. I wish I didn’t have to write and maintain this and educate people how to install and use it, as well! 😄 You can see my original request from 2016, and the reasons why we don’t yet have Java/.Net implementations, or detailed protocol specifications for people to create competing implementations here: https://github.com/Ableton/link/issues/10

fgo-ableton commented 4 years ago

I also understand the wish. But unfortunately the situation hasn't changed since #10. Sorry I can't be of more help.

brunchboy commented 4 years ago

And the good news is that Carabiner works very well when running on the same host as the software that wants to bridge to the Link network (so they can share meaningful system monotonic clock values). I just updated it to embed Link version 3.0.2 this week, and figured out how to have GitHub Actions automatically build and deploy the MacOS and Windows binaries for me, which will save me time going forwards. I still have to manually build the Raspberry Pi binary, but hopefully GitHub will add ARM-64 runners someday. 😄

If there are any missing features for your particular use case, I’d appreciate it if you could open an issue to see if I can address them.

brunchboy commented 4 years ago

@joa77 this discussion inspired me to do something I should have a while ago, and perhaps you can take this approach as well. I have created a new library, lib-carabiner, a Java libarry which embeds copies of Carabiner for all supported operating system and processor architecture combinations. It has a very simple API, and allows any Java project to install, start, and stop Carabiner as a background process with no user intervention. I have updated my Beat Link Trigger project to use this, and my end-user instructions for Link integration are now vastly simpler.

This library is small, and I expect you could implement the same concept in .Net in much the same way.

Xartrick commented 4 years ago

I guess the best approach is to create a dynamic library in C++ that exposes ableton::link class that you can use with PInvoke. That's what I'm currently using and it's working great. The only downside is that you cannot use OOP paradigm directly and have to create a native .NET class that handle it (and port non-native types).