Catalog PyPI
PACKAGE EXPLORERView in registry

aalink

PyPI

Async Python interface for Ableton Link

Versions collected1
Direct dependencies0From release 0.2.3
Last observed20 Oct, 16:57 UTC

README

Version 0.2.3 documentation
======
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>`_

Downloads & popularity

80downloads
1-day window · source-reported counts19 Oct 2026
1.6K795.50
2026-07-22: 18 · observed 2026-10-20T19:54:30.0362831Z · period 2026-07-22–2026-07-222026-07-23: 31 · observed 2026-10-20T19:54:30.0362831Z · period 2026-07-23–2026-07-232026-07-24: 9 · observed 2026-10-20T19:54:30.0362831Z · period 2026-07-24–2026-07-242026-07-25: 6 · observed 2026-10-20T19:54:30.0362831Z · period 2026-07-25–2026-07-252026-07-26: 11 · observed 2026-10-20T19:54:30.0362831Z · period 2026-07-26–2026-07-262026-07-27: 22 · observed 2026-10-20T19:54:30.0362831Z · period 2026-07-27–2026-07-272026-07-28: 16 · observed 2026-10-20T19:54:30.0362831Z · period 2026-07-28–2026-07-282026-07-29: 26 · observed 2026-10-20T19:54:30.0362831Z · period 2026-07-29–2026-07-292026-07-30: 31 · observed 2026-10-20T19:54:30.0362831Z · period 2026-07-30–2026-07-302026-07-31: 70 · observed 2026-10-20T19:54:30.0362831Z · period 2026-07-31–2026-07-312026-08-01: 105 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-01–2026-08-012026-08-02: 34 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-02–2026-08-022026-08-03: 480 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-03–2026-08-032026-08-04: 193 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-04–2026-08-042026-08-05: 21 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-05–2026-08-052026-08-06: 25 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-06–2026-08-062026-08-07: 29 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-07–2026-08-072026-08-08: 26 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-08–2026-08-082026-08-09: 30 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-09–2026-08-092026-08-10: 15 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-10–2026-08-102026-08-11: 19 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-11–2026-08-112026-08-12: 59 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-12–2026-08-122026-08-13: 26 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-13–2026-08-132026-08-14: 54 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-14–2026-08-142026-08-15: 77 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-15–2026-08-152026-08-16: 269 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-16–2026-08-162026-08-17: 268 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-17–2026-08-172026-08-18: 1,591 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-18–2026-08-182026-08-19: 22 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-19–2026-08-192026-08-20: 28 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-20–2026-08-202026-08-21: 41 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-21–2026-08-212026-08-22: 50 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-22–2026-08-222026-08-23: 105 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-23–2026-08-232026-08-24: 144 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-24–2026-08-242026-08-25: 63 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-25–2026-08-252026-08-26: 20 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-26–2026-08-262026-08-27: 18 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-27–2026-08-272026-08-28: 17 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-28–2026-08-282026-08-29: 36 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-29–2026-08-292026-08-30: 51 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-30–2026-08-302026-08-31: 34 · observed 2026-10-20T19:54:30.0362831Z · period 2026-08-31–2026-08-312026-09-01: 74 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-01–2026-09-012026-09-02: 72 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-02–2026-09-022026-09-03: 51 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-03–2026-09-032026-09-04: 121 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-04–2026-09-042026-09-05: 225 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-05–2026-09-052026-09-06: 178 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-06–2026-09-062026-09-07: 80 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-07–2026-09-072026-09-08: 191 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-08–2026-09-082026-09-09: 196 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-09–2026-09-092026-09-10: 22 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-10–2026-09-102026-09-11: 93 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-11–2026-09-112026-09-12: 183 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-12–2026-09-122026-09-13: 72 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-13–2026-09-132026-09-14: 179 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-14–2026-09-142026-09-15: 92 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-15–2026-09-152026-09-16: 146 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-16–2026-09-162026-09-17: 109 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-17–2026-09-172026-09-18: 298 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-18–2026-09-182026-09-19: 150 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-19–2026-09-192026-09-20: 150 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-20–2026-09-202026-09-21: 117 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-21–2026-09-212026-09-22: 129 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-22–2026-09-222026-09-23: 112 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-23–2026-09-232026-09-24: 47 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-24–2026-09-242026-09-25: 31 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-25–2026-09-252026-09-26: 43 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-26–2026-09-262026-09-27: 191 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-27–2026-09-272026-09-28: 303 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-28–2026-09-282026-09-29: 279 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-29–2026-09-292026-09-30: 277 · observed 2026-10-20T19:54:30.0362831Z · period 2026-09-30–2026-09-302026-10-01: 49 · observed 2026-10-20T19:54:30.0362831Z · period 2026-10-01–2026-10-012026-10-02: 167 · observed 2026-10-20T19:54:30.0362831Z · period 2026-10-02–2026-10-022026-10-03: 73 · observed 2026-10-20T19:54:30.0362831Z · period 2026-10-03–2026-10-032026-10-04: 144 · observed 2026-10-20T19:54:30.0362831Z · period 2026-10-04–2026-10-042026-10-05: 36 · observed 2026-10-20T19:54:30.0362831Z · period 2026-10-05–2026-10-052026-10-06: 35 · observed 2026-10-20T19:54:30.0362831Z · period 2026-10-06–2026-10-062026-10-07: 303 · observed 2026-10-20T19:54:30.0362831Z · period 2026-10-07–2026-10-072026-10-08: 350 · observed 2026-10-20T19:54:30.0362831Z · period 2026-10-08–2026-10-082026-10-09: 168 · observed 2026-10-20T19:54:30.0362831Z · period 2026-10-09–2026-10-092026-10-10: 169 · observed 2026-10-20T19:54:30.0362831Z · period 2026-10-10–2026-10-102026-10-11: 116 · observed 2026-10-20T19:54:30.0362831Z · period 2026-10-11–2026-10-112026-10-12: 424 · observed 2026-10-20T19:54:30.0362831Z · period 2026-10-12–2026-10-122026-10-13: 407 · observed 2026-10-20T19:54:30.0362831Z · period 2026-10-13–2026-10-132026-10-14: 63 · observed 2026-10-20T19:54:30.0362831Z · period 2026-10-14–2026-10-142026-10-15: 303 · observed 2026-10-20T19:54:30.0362831Z · period 2026-10-15–2026-10-152026-10-16: 166 · observed 2026-10-20T19:54:30.0362831Z · period 2026-10-16–2026-10-162026-10-17: 101 · observed 2026-10-20T19:54:30.0362831Z · period 2026-10-17–2026-10-172026-10-18: 178 · observed 2026-10-20T19:54:30.0362831Z · period 2026-10-18–2026-10-182026-10-19: 80 · observed 2026-10-20T19:54:30.0362831Z · period 2026-10-19–2026-10-19
22 Jul19 Oct

pypistats · 90 observations shown. Missing days are unknown. Source category: overall: without mirrors.

View observed values
Date / source periodValueObserved at
2026-10-19 – 2026-10-19802026-10-20T19:54:30.0362831Z
2026-10-18 – 2026-10-181782026-10-20T19:54:30.0362831Z
2026-10-17 – 2026-10-171012026-10-20T19:54:30.0362831Z
2026-10-16 – 2026-10-161662026-10-20T19:54:30.0362831Z
2026-10-15 – 2026-10-153032026-10-20T19:54:30.0362831Z
2026-10-14 – 2026-10-14632026-10-20T19:54:30.0362831Z
2026-10-13 – 2026-10-134072026-10-20T19:54:30.0362831Z
2026-10-12 – 2026-10-124242026-10-20T19:54:30.0362831Z
2026-10-11 – 2026-10-111162026-10-20T19:54:30.0362831Z
2026-10-10 – 2026-10-101692026-10-20T19:54:30.0362831Z
2026-10-09 – 2026-10-091682026-10-20T19:54:30.0362831Z
2026-10-08 – 2026-10-083502026-10-20T19:54:30.0362831Z
2026-10-07 – 2026-10-073032026-10-20T19:54:30.0362831Z
2026-10-06 – 2026-10-06352026-10-20T19:54:30.0362831Z
2026-10-05 – 2026-10-05362026-10-20T19:54:30.0362831Z
2026-10-04 – 2026-10-041442026-10-20T19:54:30.0362831Z
2026-10-03 – 2026-10-03732026-10-20T19:54:30.0362831Z
2026-10-02 – 2026-10-021672026-10-20T19:54:30.0362831Z
2026-10-01 – 2026-10-01492026-10-20T19:54:30.0362831Z
2026-09-30 – 2026-09-302772026-10-20T19:54:30.0362831Z
2026-09-29 – 2026-09-292792026-10-20T19:54:30.0362831Z
2026-09-28 – 2026-09-283032026-10-20T19:54:30.0362831Z
2026-09-27 – 2026-09-271912026-10-20T19:54:30.0362831Z
2026-09-26 – 2026-09-26432026-10-20T19:54:30.0362831Z
2026-09-25 – 2026-09-25312026-10-20T19:54:30.0362831Z
2026-09-24 – 2026-09-24472026-10-20T19:54:30.0362831Z
2026-09-23 – 2026-09-231122026-10-20T19:54:30.0362831Z
2026-09-22 – 2026-09-221292026-10-20T19:54:30.0362831Z
2026-09-21 – 2026-09-211172026-10-20T19:54:30.0362831Z
2026-09-20 – 2026-09-201502026-10-20T19:54:30.0362831Z
2026-09-19 – 2026-09-191502026-10-20T19:54:30.0362831Z
2026-09-18 – 2026-09-182982026-10-20T19:54:30.0362831Z
2026-09-17 – 2026-09-171092026-10-20T19:54:30.0362831Z
2026-09-16 – 2026-09-161462026-10-20T19:54:30.0362831Z
2026-09-15 – 2026-09-15922026-10-20T19:54:30.0362831Z
2026-09-14 – 2026-09-141792026-10-20T19:54:30.0362831Z
2026-09-13 – 2026-09-13722026-10-20T19:54:30.0362831Z
2026-09-12 – 2026-09-121832026-10-20T19:54:30.0362831Z
2026-09-11 – 2026-09-11932026-10-20T19:54:30.0362831Z
2026-09-10 – 2026-09-10222026-10-20T19:54:30.0362831Z
2026-09-09 – 2026-09-091962026-10-20T19:54:30.0362831Z
2026-09-08 – 2026-09-081912026-10-20T19:54:30.0362831Z
2026-09-07 – 2026-09-07802026-10-20T19:54:30.0362831Z
2026-09-06 – 2026-09-061782026-10-20T19:54:30.0362831Z
2026-09-05 – 2026-09-052252026-10-20T19:54:30.0362831Z
2026-09-04 – 2026-09-041212026-10-20T19:54:30.0362831Z
2026-09-03 – 2026-09-03512026-10-20T19:54:30.0362831Z
2026-09-02 – 2026-09-02722026-10-20T19:54:30.0362831Z
2026-09-01 – 2026-09-01742026-10-20T19:54:30.0362831Z
2026-08-31 – 2026-08-31342026-10-20T19:54:30.0362831Z
2026-08-30 – 2026-08-30512026-10-20T19:54:30.0362831Z
2026-08-29 – 2026-08-29362026-10-20T19:54:30.0362831Z
2026-08-28 – 2026-08-28172026-10-20T19:54:30.0362831Z
2026-08-27 – 2026-08-27182026-10-20T19:54:30.0362831Z
2026-08-26 – 2026-08-26202026-10-20T19:54:30.0362831Z
2026-08-25 – 2026-08-25632026-10-20T19:54:30.0362831Z
2026-08-24 – 2026-08-241442026-10-20T19:54:30.0362831Z
2026-08-23 – 2026-08-231052026-10-20T19:54:30.0362831Z
2026-08-22 – 2026-08-22502026-10-20T19:54:30.0362831Z
2026-08-21 – 2026-08-21412026-10-20T19:54:30.0362831Z
2026-08-20 – 2026-08-20282026-10-20T19:54:30.0362831Z
2026-08-19 – 2026-08-19222026-10-20T19:54:30.0362831Z
2026-08-18 – 2026-08-181,5912026-10-20T19:54:30.0362831Z
2026-08-17 – 2026-08-172682026-10-20T19:54:30.0362831Z
2026-08-16 – 2026-08-162692026-10-20T19:54:30.0362831Z
2026-08-15 – 2026-08-15772026-10-20T19:54:30.0362831Z
2026-08-14 – 2026-08-14542026-10-20T19:54:30.0362831Z
2026-08-13 – 2026-08-13262026-10-20T19:54:30.0362831Z
2026-08-12 – 2026-08-12592026-10-20T19:54:30.0362831Z
2026-08-11 – 2026-08-11192026-10-20T19:54:30.0362831Z
2026-08-10 – 2026-08-10152026-10-20T19:54:30.0362831Z
2026-08-09 – 2026-08-09302026-10-20T19:54:30.0362831Z
2026-08-08 – 2026-08-08262026-10-20T19:54:30.0362831Z
2026-08-07 – 2026-08-07292026-10-20T19:54:30.0362831Z
2026-08-06 – 2026-08-06252026-10-20T19:54:30.0362831Z
2026-08-05 – 2026-08-05212026-10-20T19:54:30.0362831Z
2026-08-04 – 2026-08-041932026-10-20T19:54:30.0362831Z
2026-08-03 – 2026-08-034802026-10-20T19:54:30.0362831Z
2026-08-02 – 2026-08-02342026-10-20T19:54:30.0362831Z
2026-08-01 – 2026-08-011052026-10-20T19:54:30.0362831Z
2026-07-31 – 2026-07-31702026-10-20T19:54:30.0362831Z
2026-07-30 – 2026-07-30312026-10-20T19:54:30.0362831Z
2026-07-29 – 2026-07-29262026-10-20T19:54:30.0362831Z
2026-07-28 – 2026-07-28162026-10-20T19:54:30.0362831Z
2026-07-27 – 2026-07-27222026-10-20T19:54:30.0362831Z
2026-07-26 – 2026-07-26112026-10-20T19:54:30.0362831Z
2026-07-25 – 2026-07-2562026-10-20T19:54:30.0362831Z
2026-07-24 – 2026-07-2492026-10-20T19:54:30.0362831Z
2026-07-23 – 2026-07-23312026-10-20T19:54:30.0362831Z
2026-07-22 – 2026-07-22182026-10-20T19:54:30.0362831Z

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.2.33 Jul 20260

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
artfwo/aalink

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 16:57 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:227104f5007260bcd33e2c582dac8011d97eb1b5fb69bf9cf6e45de0d3e15301