Crate API

rusty_link

rusty_link is a Rust wrapper of abllink, which is a C 11 extension for Ableton Link, provided by Ableton. This library attempts to be mostly unopinionated and plain in copying the functionality of abllink, while providing some of Rust's safety guarantees.

Ableton Link is a technology that synchronizes musical beat, tempo, phase, and start/stop commands across multiple applications running on one or more devices. Applications on devices connected to a local network discover each other automatically and form a musical session in which each participant can perform independently: anyone can start or stop while still staying in time. Anyone can change the tempo, the others will follow. Anyone can join or leave without disrupting the session.

Examples

To run the examples, clone this repository and change into its directory. Then fetch the Ableton Link source by initializing the git submodules with:

git submodule update --init --recursive

linkhutsilent: A Rust port from C of the simple 'LinkHut' example without sound by Ableton. To run it:

cargo run --release --example link_hut_silent

link_hut: A Rust port from C++ of the more complex 'LinkHut' example with sound by Ableton. Run it like this:

cargo run --release --example link_hut

See the cpal documentation for ASIO and Jack support, if required.

Requirements

Requires a recent version of CMake (3.14 or newer) to be installed and available in your terminal. Test with cmake --version.

Linux may require a few more system libraries to be installed for C compilation, depending on your distro, like build-essential, libclang-dev or libasound2-dev and pkg-config for examples, etc...

Thread and Realtime Safety

'abl_link.h' has doc comments about thread and realtime safety on some of its functions. Those comments have been copied to the functions of this library. A short explainer on what they mean:

Implementation

Testing

Ableton designed a Test Plan to test if your implementation of Ableton Link in your project meets all the expected requirements.

Tested Platforms

rusty_link itself works on all major platforms. I only had trouble with the example with sound on Linux. Could be my fault for not using cpal properly?! Any help with that is highly appreciated. 😘 Anyway, this shouldn't stop anyone from using this library in their project. Have fun!

| | MacOS M1 | Win 11 WASAPI | Ubuntu 22 on Pi4 | | -------------------------- | -------- | ------------- | ------------------ | | Building rusty_link | ✓ | ✓ | ✓ | | Example: link_hut_silent | ✓ | ✓ | ✓ | | Example: link_hut | ✓ | ✓ | cpal/ALSA issues?! |

Feedback

I am not a professional Developer, just doing this as a hobby, so any help with updates and corrections of my work are welcome.

License

Ableton Link is dual licensed under GPLv2+ and a proprietary license.

This means that rusty_link has to be under the GPLv2+ as well.

If you would like to incorporate Link into a proprietary software application, please contact Ableton at link-devs@ableton.com.

Credits

Thanks to Magnus Herold for his implementation. I made this library to learn about FFI in Rust and I started it as a fork of his.

Some code for splitting closures has been borrowed from ffihelpers with altered functionality. Thanks to Michael F Bryan for his work. Pull request to ffihelpers pending...

Links

For anyone interested, I also started making a multi-platform Ableton Link wrapper for Flutter, called f_link.