Realtime audio platform

Imagine that you want to create a virtual drum kit. Your first attempts are likely to fail due to latency problems. The Bela platform can help with such projects.

Bela is a programmable audio platform with incredible performance, an integrated development environment, a large active community, and virtually no limits. But it’s also a slightly unusual project because you need some extra hardware to make it properly work. That hardware is a BeagleBone Black with an optional shield that adds multiple digital, analog, and audio inputs and outputs. This setup, when combined with the Linux-based software stack, promises a 0.5ms (half) delay between when a sound is triggered by the software to when the audio exits the hardware. For comparison, a Mac can manage a few milliseconds with the very best expensive hardware, desktop Linux with a realtime kernel adds a few more milliseconds to this, an Arduino is in the 10ms range, and a Raspberry Pi the 20ms range. All these delay times are much quicker than what you’d get from a default PulseAudio configuration without specialist hardware, which may typically operate with a delay of 100ms.

An ultra-low audio delay makes a big difference because it enables Bela to do all kinds of things transparently, before delays and their associated latency would start to break the immersion. A good example might be if you were to use Bela to create a software-generated drum kit with a DIY hardware trigger. The ultra-low response time would allow you to hit the trigger and hear the sound almost instantaneously, just as you would with real drums. It’s this lack of delay that most differentiates digital instruments from their analog counterparts, and the low delay values seen on the Bela platform with the BeagleBone Black and the audio shield really are game changing.

None of this would be worth mentioning if there weren’t an accessible and easy-to-use software stack that’s both ready to take advantage of this power and easy to use when you want to build your own hardware or software experiments. High performance comes from Xenomai real-time Linux extensions, and the flexibility comes from an integrated web-hosted development environment that becomes accessible as soon as you connect the device to your Linux computer. You can use this Integrated Development Environment (IDE) to code in SuperCollider, Csound, or C++, and even to upload Pure Data patches with graphical previews of C++. All of this software can of course be run on your Linux desktop, where patches can be developed and tested before being transferred to the onboard IDE. But developing with the IDE (Figure 1) is also perfectly feasible, and you’ll get an immediate response from the hardware when you do press play. It may sound complicated, but there’s enough here for even beginners to get started.

F1_bela_01_map.tif
Figure 1: 1. Project management: Load and switch between a variety of onboard projects. 2. IDE: Code your projects directly, or view the projects you upload. 3. Project explorer: Upload and download projects to the BeagleBone. 4. Tutorials and examples: Browse lots of examples plus the excellent documentation on each function and capability. 5. Pin explorer: An annotated diagram of the device pins can be shown for easy programming. 6. Oscilloscope: This feature is integrated into the IDE but connects to the hardware. 7. Log and debug: The output from your projects is listed in a separate pane.

A fresh install includes many working examples, plus a community library from which you can simply copy and paste. Much like the Norns platform, the Bela platform lets you do a lot of things without ever writing a line of your own code. Copying and pasting patches, modifying variables to better suit your use cases, and building your own solutions are all possible without any programming know-how. Examples include complex digital signal processing, such as reverb, delay, and convolution effects, plus lots of synthesizer and sequencer patches, alongside many more esoteric examples that often sit alongside a hardware input project. It’s creative and educational, practical and ephemeral, and one of the best (and cheapest) ways to get into high-performance experimental audio design.