Current collected state Current
Observed since 20 Oct, 16:57 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Async Python interface for Ableton Link
======
aalink
======
aalink is a Python wrapper for Ableton Link built for interactive applications
using asyncio event loops.
It provides a simple programming interface for writing concurrent Python code
synchronized to a beat. The beat can optionally be time-aligned with other
peers in an Ableton Link session.
Installation
============
aalink requires at least Python 3.9. It can be installed using pip::
pip3 install aalink
It may be required to install the latest version of MSVC Runtime libraries
on Windows to use the binary wheels currently hosted on PyPI.
Usage
=====
aalink uses asyncio. To connect to a Link session, create a ``Link`` object,
and await for ``Link.sync()`` as follows:
.. code-block:: python
import asyncio
from aalink import Link
async def main():
link = Link(120)
link.enabled = True
while True:
await link.sync(1)
print('bang!')
asyncio.run(main())
``Link.sync(n)`` returns a ``Future`` scheduled to be *done* when Link time
reaches next n-th beat on the timeline.
In the above example, awaiting for ``link.sync(1)`` will pause and resume
the ``main`` coroutine at beats 1, 2, 3, and so on.
Keep in mind that awaiting for ``sync(n)`` does not cause a coroutine to sleep
for the given number of beats. Regardless of the moment when the coroutine is
suspended, it will resume when the next closest n-th beat is reached on the
shared Link timeline, e.g. awaiting for ``sync(2)`` at beat 11.5 will resume
at beat 12.
Non-integral beat syncing is supported. For example:
.. code-block:: python
await link.sync(1/2) # resumes at beats 0.5, 1, 1.5...
await link.sync(3/2) # resumes at beats 1.5, 3, 4.5...
from fractions import Fraction
await link.sync(Fraction(1, 2)) # works too
Sync events can be scheduled with an offset (also expressed in beats) by
passing an ``offset`` argument to ``sync()``. Offset can be either positive
or negative. Use this to add groove to the coroutine rhythm.
.. code-block:: python
async def arpeggiate():
for i in range(16):
swing = 0.25 if i % 2 == 1 else 0
await link.sync(1/2, offset=swing)
print('###', i)
await link.sync(1/2, offset=0)
print('@@@', i)
Combine synced coroutines to run in series or concurrently:
.. code-block:: python
import asyncio
from aalink import Link
async def main():
link = Link(120)
link.enabled = True
async def sequence(name):
for i in range(4):
await link.sync(1)
print('bang!', name)
await sequence('a')
await sequence('b')
await asyncio.gather(sequence('c'), sequence('d'))
asyncio.run(main())
Limitations
-----------
aalink aims to be punctual, but it is not 100% accurate due to the processing
delay in the internal scheduler and the uncertainty of event loop iterations
timing.
For convenience, the numerical values of futures returned from ``sync()``
aren't equal to the exact beat time from the moment the futures are *done*.
They correspond to the previously estimated resume times instead.
.. code-block:: python
b = await link.sync(1) # b will be 1.0, returned at beat 1.00190
b = await link.sync(1) # b will be 2.0, returned at beat 2.00027
b = await link.sync(1) # b will be 3.0, returned at beat 3.00005
License
-------
Copyright (c) 2023 Artem Popov <art@artfwo.net>
aalink is licensed under the GNU General Public License (GPL) version 3.
You can find the full text of the GPL license in the ``LICENSE`` file included
in this repository.
aalink includes code from pybind11 and Ableton Link.
`pybind11 <https://pybind11.readthedocs.io/>`_
Copyright (c) 2016 Wenzel Jakob <wenzel.jakob@epfl.ch>, All rights reserved.
`pybind11 license <https://github.com/pybind/pybind11/blob/master/LICENSE>`_
`Ableton Link <https://ableton.github.io/link/>`_
Copyright 2016, Ableton AG, Berlin. All rights reserved.
`Ableton Link license <https://github.com/Ableton/link/blob/master/LICENSE.md>`_
pypistats · 90 observations shown. Missing days are unknown. Source category: overall: without mirrors.
| Date / source period | Value | Observed at |
|---|---|---|
| 2026-10-19 – 2026-10-19 | 80 | 2026-10-20T19:54:30.0362831Z |
| 2026-10-18 – 2026-10-18 | 178 | 2026-10-20T19:54:30.0362831Z |
| 2026-10-17 – 2026-10-17 | 101 | 2026-10-20T19:54:30.0362831Z |
| 2026-10-16 – 2026-10-16 | 166 | 2026-10-20T19:54:30.0362831Z |
| 2026-10-15 – 2026-10-15 | 303 | 2026-10-20T19:54:30.0362831Z |
| 2026-10-14 – 2026-10-14 | 63 | 2026-10-20T19:54:30.0362831Z |
| 2026-10-13 – 2026-10-13 | 407 | 2026-10-20T19:54:30.0362831Z |
| 2026-10-12 – 2026-10-12 | 424 | 2026-10-20T19:54:30.0362831Z |
| 2026-10-11 – 2026-10-11 | 116 | 2026-10-20T19:54:30.0362831Z |
| 2026-10-10 – 2026-10-10 | 169 | 2026-10-20T19:54:30.0362831Z |
| 2026-10-09 – 2026-10-09 | 168 | 2026-10-20T19:54:30.0362831Z |
| 2026-10-08 – 2026-10-08 | 350 | 2026-10-20T19:54:30.0362831Z |
| 2026-10-07 – 2026-10-07 | 303 | 2026-10-20T19:54:30.0362831Z |
| 2026-10-06 – 2026-10-06 | 35 | 2026-10-20T19:54:30.0362831Z |
| 2026-10-05 – 2026-10-05 | 36 | 2026-10-20T19:54:30.0362831Z |
| 2026-10-04 – 2026-10-04 | 144 | 2026-10-20T19:54:30.0362831Z |
| 2026-10-03 – 2026-10-03 | 73 | 2026-10-20T19:54:30.0362831Z |
| 2026-10-02 – 2026-10-02 | 167 | 2026-10-20T19:54:30.0362831Z |
| 2026-10-01 – 2026-10-01 | 49 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-30 – 2026-09-30 | 277 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-29 – 2026-09-29 | 279 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-28 – 2026-09-28 | 303 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-27 – 2026-09-27 | 191 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-26 – 2026-09-26 | 43 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-25 – 2026-09-25 | 31 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-24 – 2026-09-24 | 47 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-23 – 2026-09-23 | 112 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-22 – 2026-09-22 | 129 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-21 – 2026-09-21 | 117 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-20 – 2026-09-20 | 150 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-19 – 2026-09-19 | 150 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-18 – 2026-09-18 | 298 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-17 – 2026-09-17 | 109 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-16 – 2026-09-16 | 146 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-15 – 2026-09-15 | 92 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-14 – 2026-09-14 | 179 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-13 – 2026-09-13 | 72 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-12 – 2026-09-12 | 183 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-11 – 2026-09-11 | 93 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-10 – 2026-09-10 | 22 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-09 – 2026-09-09 | 196 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-08 – 2026-09-08 | 191 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-07 – 2026-09-07 | 80 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-06 – 2026-09-06 | 178 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-05 – 2026-09-05 | 225 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-04 – 2026-09-04 | 121 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-03 – 2026-09-03 | 51 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-02 – 2026-09-02 | 72 | 2026-10-20T19:54:30.0362831Z |
| 2026-09-01 – 2026-09-01 | 74 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-31 – 2026-08-31 | 34 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-30 – 2026-08-30 | 51 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-29 – 2026-08-29 | 36 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-28 – 2026-08-28 | 17 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-27 – 2026-08-27 | 18 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-26 – 2026-08-26 | 20 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-25 – 2026-08-25 | 63 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-24 – 2026-08-24 | 144 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-23 – 2026-08-23 | 105 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-22 – 2026-08-22 | 50 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-21 – 2026-08-21 | 41 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-20 – 2026-08-20 | 28 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-19 – 2026-08-19 | 22 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-18 – 2026-08-18 | 1,591 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-17 – 2026-08-17 | 268 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-16 – 2026-08-16 | 269 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-15 – 2026-08-15 | 77 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-14 – 2026-08-14 | 54 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-13 – 2026-08-13 | 26 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-12 – 2026-08-12 | 59 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-11 – 2026-08-11 | 19 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-10 – 2026-08-10 | 15 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-09 – 2026-08-09 | 30 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-08 – 2026-08-08 | 26 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-07 – 2026-08-07 | 29 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-06 – 2026-08-06 | 25 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-05 – 2026-08-05 | 21 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-04 – 2026-08-04 | 193 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-03 – 2026-08-03 | 480 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-02 – 2026-08-02 | 34 | 2026-10-20T19:54:30.0362831Z |
| 2026-08-01 – 2026-08-01 | 105 | 2026-10-20T19:54:30.0362831Z |
| 2026-07-31 – 2026-07-31 | 70 | 2026-10-20T19:54:30.0362831Z |
| 2026-07-30 – 2026-07-30 | 31 | 2026-10-20T19:54:30.0362831Z |
| 2026-07-29 – 2026-07-29 | 26 | 2026-10-20T19:54:30.0362831Z |
| 2026-07-28 – 2026-07-28 | 16 | 2026-10-20T19:54:30.0362831Z |
| 2026-07-27 – 2026-07-27 | 22 | 2026-10-20T19:54:30.0362831Z |
| 2026-07-26 – 2026-07-26 | 11 | 2026-10-20T19:54:30.0362831Z |
| 2026-07-25 – 2026-07-25 | 6 | 2026-10-20T19:54:30.0362831Z |
| 2026-07-24 – 2026-07-24 | 9 | 2026-10-20T19:54:30.0362831Z |
| 2026-07-23 – 2026-07-23 | 31 | 2026-10-20T19:54:30.0362831Z |
| 2026-07-22 – 2026-07-22 | 18 | 2026-10-20T19:54:30.0362831Z |
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.2.3 | 3 Jul 2026 | 0 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 16:57 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:227104f5007260bcd33e2c582dac8011d97eb1b5fb69bf9cf6e45de0d3e15301