pink-0, an Ableton Link to clock/reset hardware converter

The working prototype

When Ableton published the Link source code, I started experimenting with it and decided to explore the feasibility of a hardware Link-to-clock converter.
I made the first attempt with a Teensy 3.2 board and a a WIZ820io ethernet module, but due to some of the dependencies of Ableton Link, this approach proved too complex, as it would have required a complete rewrite of the low-level networking functionality.
Having abandoned the "bare metal" approach, the next natural candidate became a Raspberry Pi board: I had a Zero lying around and decided to use it to build the first prototype, mainly because of the power requirements and the form factor.

A couple of weekends later I had a working prototype and decided to design and order a PCB, which I only received almost two months later (thanks, Custom Office...). When the PCB finally arrived, I put everything together and spent some more time fine-tuning and optimizing here and there.
The final result is a hardware shield for the Raspberry Pi Zero board and the necessary software and scripts running on the Zero itself and providing real-time conversion from Ableton Link to eurorack-friendly clock and reset signals.

When experimenting with the first breadboard based prototype, the hardware connected to the Zero board consisted of a simple RC filter, an NPN transistor and a couple of resistors for each of the two outputs (clock and reset), as shown in the block scheme above.
Even if the PCB was quite small, I still had some space left, and most of the Zero I/O pins where still unused, so I decided to add a small display, a switch, an encoder (with push button) and a bunch of LEDs.

The basic idea is to enable the audio output on the Zero, as explained in this nice article, and then to use Ableton Link for what it's best at: synchronizing an audio buffer :)
The clock and reset signals are in fact rendered respectively as the left and right channel, therefore the RC filters are required to filter off the 50Mhz PWM component and "isolate" the audio signal.
The NPN transistors then provide level shifting to 0-5 volts and clean up the edges of the clock and reset pulses.

The software part mainly consists of a daemon, which uses portaudio and Ableton Link to generate the clock and reset signals. All the signals to/from the shield are handled using wiringPI.

In terms of connectivity, there are several options:

  • If a WiFi network adapter is available upon startup, the device will act as an access point and will create a network named "pink-ap" (thanks, RaspAP!). Once you connect one or more devices running an Ableton Link enabled application to it, they'll immediately join the Link session. If you use a web browser, you can browse to the setup page and configure the device to act as a client and select any of the available WiFi network. The device then will always try to connect to the known WiFi networks upon startup and will eventually become an access point again only if none of the known WiFi networks is available.
  • If an USB-to-ethernet adapter is available upon startup, the device will join an available Ableton Link session on the local network (if available) or create a new one.
  • If no network adapters are available, the device can still be used as an independent and configurable clock/reset source for your eurorack modules ;)
The user interface offers the possibility to change the tempo (affecting all of the participants), the loop length and the clock multiplier. 

The source code, scripts, schematics and documentation are available on GitHub.

comments powered by Disqus