Ableton Link is a technology that synchronizes musical beat,tempo, phase, and start/stop commands across multiple applications running on one or moredevices. Applications on devices connected to a local network discover each otherautomatically and form a musical session in which each participant can performindependently: anyone can start or stop while still staying in time. Anyone can changethe tempo, the others will follow. Anyone can join or leave without disrupting the session.
Ableton provides two options for developers interested in integrating Link into theirmusical applications:
Browse by topic: Orders Installing Live Authorizing Live Using Live Push Max for Live Link. This feature requires at least Live 9.2.3. And KOMPLETE KONTROL 1.9.0. There are four steps involved to set up Live with your KOMPLETE KONTROL S-Series MK1 as explained below.
LinkKit SDK for iOS
Link cross-platform source code library
- Ableton Live 9.2.3 or higher Cubase Artist / Pro 8.5 or higher Nuendo 7.1.35 or higher Studio One 4.5 or higher Please read the KOMPLETE KONTROL documentation for.
- Ableton Live Download Utility. Downloads the desired 64-bit installer from any version of Ableton Live 11, 10 or 9.
This page contains a discussion of fundamental Link concepts that apply to both of theseprojects. For more detailed documentation and licensing information, please visit theappropriate project page linked above.
Link Concepts
Link is different from other approaches to synchronizing electronic instruments that youmay be familiar with. It is not designed to orchestrate multiple instruments so that theyplay together in lock-step along a shared timeline. In fact, Link-enabled apps each havetheir own independent timelines. The Link library maintains a temporal relationshipbetween these independent timelines that provides the experience of playing in timewithout the timelines being identical.
Playing “in time” is an intentionally vague term that might have different meanings fordifferent musical contexts and different applications. As a developer, you must decidethe most natural way to map your application’s musical concepts onto Link’ssynchronization model. For this reason, it’s important to gain an intuitive understandingof how Link synchronizes tempo, beat, and phase.Version 3 of Link makes it possible to share start and stop commands.
Tempo Synchronization
Tempo is a well understood parameter that represents the velocity of a beat timeline withrespect to real time, giving it a unit of beats/time. Tempo synchronization is achievedwhen the beat timelines of all participants in a session are advancing at the same rate.
With Link, any participant can propose a change to the session tempo at any time. Nosingle participant is responsible for maintaining the shared session tempo. Rather, eachparticipant chooses to adopt the last tempo value that they’ve seen proposed on thenetwork. This means that it is possible for participants’ tempi to diverge during periodsof tempo modification (especially during simultaneous modification by multipleparticipants), but this state is only temporary. The session will converge quickly to acommon tempo after any modification. The Link approach to tempo relies on groupadaptation to changes made by independent, autonomous actors - much like a group oftraditional instrumentalists playing together.
Beat Alignment
It’s conceivable that for certain musical situations, participants would wish to onlysynchronize tempo and not other musical parameters. But for the vast majority of cases,playing with synchronized tempo in the absence of beat alignment would not be perceivedas playing “in time.” In this scenario, participants’ beat timelines would advance at thesame rate, but the relationship between values on those beat timelines would be undefined.
In most cases, we want to provide a stronger timing property for a session than justtempo synchronization - we also want beat alignment. When a session is in a state of beatalignment, an integral value on any participant’s beat timeline corresponds to anintegral value on all other participants’ beat timelines. This property says nothingabout the magnitude of beat values on each timeline, which can be different, just thatany two timelines must only differ by an integral offset. For example, beat 1 on oneparticipant’s timeline might correspond to beat 3 or beat 4 on another’s, but it cannotcorrespond to beat 3.5.
Note that in order for a session to maintain a state of beat alignment, it must havesynchronized tempo.
Phase Synchronization
Beat alignment is a necessary condition for playing “in time” in most circumstances, butit’s often not enough. When working with bars or loops, a user may expect that the beatposition within such a construct (the phase) be synchronized, resulting in alignment ofbar or loop boundaries across participants.
In order to enable the desired bar and loop alignment, an application provides a quantumvalue to Link that specifies, in beats, the desired unit of phase synchronization. Linkguarantees that session participants with the same quantum value will be phase aligned,meaning that if two participants have a 4 beat quantum, beat 3 on one participant’stimeline could correspond to beat 11 on another’s, but not beat 12. It also guaranteesthe expected relationship between sessions in which one participant has a multiple ofanother’s quantum. So if one app has an 8-beat loop with a quantum of 8 and another has a4-beat loop with a quantum of 4, then the beginning of an 8-beat loop will alwayscorrespond to the beginning of a 4-beat loop, whereas a 4-beat loop may align with thebeginning or the middle of an 8-beat loop.
Ableton Live 9.1
Specifying the quantum value and the handling of phase synchronization is the aspect ofLink integration that leads to the greatest diversity of approaches among developers.There’s no one-size-fits-all recommendation about how to do this, it is veryapplication-specific. Some applications have a constant quantum that never changes.Others allow it to change to match a changing value in their app, such as loop length ortime signature. In Ableton Live, it is directly tied to the “Global Quantization”control, so it may be useful to explore how different values affect the behavior of Livein order to gain intuition about the quantum.
In order to maintain phase synchronization, the vast majority of Link-enabledapplications (including Live) perform a quantized launch when the user starts transport.This means that the user sees some sort of count-in animation or flashing play buttonuntil starting at the next quantum boundary. This is a very satisfying interactionbecause it allows multiple users on different devices to start exactly together just bypressing play at roughly the same time. We strongly recommend that developers implementquantized launching in Link-enabled applications.
Start/Stop Synchronization
As of Version 3, Link allows peers to share information on the user’s intent to start orstop transport with other peers that have the feature enabled.Start/stop state changes only follow user actions. This means applications will not adaptto, or automatically change the start/stop state of a Link session when they are joining.After a peer joins a session it exposes and listens to all upcoming start/stop statechanges. This is different to tempo, beat, and phase that are automatically aligned assoon as an application joins a session.As every application handles start and stop commands according to its capabilities andquantization, it is not expected that applications start or stop at the same time. Ratherevery application should start according to its quantum and phase.
Link API
The Link repo contains C++ source code implementingthe Link protocol and a C++ API for integrating applications. Developers making iOS appsshould instead use the LinkKit SDK for iOS, whichprovides a pre-built library and a C/Objective-C API. The API provided by LinkKit is analmost direct mapping of Link’s C++ API into C. So while the APIs are distinct, theyshare common concepts that we will explore in this section.
Session State
In Link, a session state contains timeline information and a start/stop state.
A timeline is represented as a triple of (beat, time, tempo)
, which defines a bijectionbetween the sets of all beat and time values. Converting between beats and time is themost basic service that Link provides to integrating applications - an application willgenerally want to know what beat value corresponds to a given moment in time. The timelineimplements this and all other timing-related queries and modifications availableto Link clients.
A start/stop state represents the user’s intent to start or stop transport at agiven time.
Timeline and start/stop state may change over time. A session state value onlyrepresents a snapshot of the state of the system at a particular moment. Link providesclients the ability to ‘capture’ such a snapshot. This is the only mechanism forobtaining a session state value.
Once a session state value is captured, clients may query its properties or modify it bychanging its tempo, its beat/time mapping or its start/stop state. Modifications to thecaptured session state are not propagated to the Link session automatically - clientsmust ‘commit’ the modified session state back to Link for it to take effect.
A major benefit of the capture-commit model for session states is that a capturedsession state can be known to have a consistent value for the duration of a computationin which it is used. If clients queried timing information from the Link object directlywithout capturing a session state, the results could be inconsistent during the courseof a computation because of asynchronous changes coming from other participants inthe Link session.
Session States and Threads
The audio thread, the thread that computes and fills audio buffers,has special timing constraints that must be managed carefully. It’s usually necessary toquery Link state data while computing audio, so the Link API provides a realtime-safesession state capture/commit function pair. This allows clients to query and modify theLink session state directly from the audio callback. It’s important that this audio-threadspecific interface only be used from the audio thread.
It is also often convenient to be able to access the current Link session state from themain thread or other application threads, for example when rendering the current beat timein a GUI. For this reason, Link also provides a session state capture/commit function pairto be used on application threads. These versions must not be used from the audio threadas they may block.
While it is possible to commit session state modifications from an application thread,this should generally be avoided by clients that implement a custom audio callback and useLink from the audio thread. Because of the real-time constraints in the audio thread,changes made to the Link session state from an application thread are processedasynchronously and are not immediately visible to the audio thread. The same is true forchanges made from the audio thread - the new session state will eventually be visible tothe application thread, but clients cannot rely on exactly when. It’s especially importantto take this into account when combining Link session state modifications with othercross-thread communication mechanisms employed by the application. For example, if asession state is committed from an application thread and in the next line an atomic flagis set, the audio thread will almost certainly observe the flag being set before observingthe new session state value.
In order to avoid these complexities, it is recommended that applications that implementa custom audio callback only modify the Link session state from the audio thread.Application threads may query the session state but should not modify it. This approachalso leads to better timing accuracy because session state changes can be specified tooccur at buffer boundaries or even at specific samples, which is not possible from anapplication thread.
Resources
The following open source repositories integrate Link.Those are not Ableton repositories. In case of issues please contact the respective maintainer. If you are missing a repository in this list please open a pull request or mail to link-devs@ableton.com.
The following links may provide useful information if you are trying to integrate Linkwith your own applications:
Ableton Live 9.2.3 Mac
Listing your product on ableton.com
If your product supports Link we will happily list it on our website. To be added to the listing please send the following to link-devs@ableton.com
Fl Studio
- Icon in JPEG format: min. 400 x 400 pixels and 144 ppi
- Short product description: max. 200 characters including spaces
- Product website or app store link, pointing to your product