Learn audio programming with Bela
This course is a deep dive into how Bela processes data, and how to implement real-time audio and interaction. If you want to learn or improve your skills with C++ and audio programming, this is a great way to start! This course is co-developed by Bela and Queen Mary University of London. The materials are based on a Master’s module “Music and Audio Programming”, taught by Dr Andrew McPherson in the School of Electronic Engineering and Computer Science.
Table of contents
- What will I learn in this course?
- Recommended parts
- Should I know anything before starting?
- But I don’t know any C++!
- Who is this course for?
- Where did this course come from?
- Who’s teaching it?
C++ for Real-Time Audio Programming with Bela
What will I learn in this course?
This course is a deep dive into how Bela processes data, how to think in real time, and how to implement interaction with sensors and sound. As well as the basics of coding interaction, this course also introduces concepts of real-time processing and dives into topics like Assembly programming and audio processing. See the below table for an overview of the topics covered:
|Programming topics||Music/audio topics|
|Working in Real-Time, Buffers and arrays, Parameter control||Oscillators, Samples, Wavetables|
|Classes and objects, Analog and digital I/O, Filtering||Filters, Control voltages, Gates and triggers|
|Circular buffers, Timing in real time, State machines||Delays and delay-based effects, Metronomes and clocks, Envelopes|
|MIDI, Block-based processing, Threads||ADSR, MIDI, Additive synthesis|
|Fixed point arithmetic, ARM assembly language||Phase vocoders, Impulse reverb|
Running the examples in this course assumes that you have a Bela Starter Kit or Bela Mini Starter Kit.
Some of the lectures also work with sensors and other electronic hardware. We suggest the following components, which can be acquired from any electronics supplier:
- Solderless breadboard (any size)
- Potentiometers: at least 2, ideally 8. Choose ones that fit a breadboard.
- Pushbuttons (tactile switches): at least 2, ideally 8.
- LEDs: at least 2, ideally 8, various colours.
- Resistors: 8+ 10k resistors for switches; 8+ 220 ohm resistors for LEDs.
- Force-sensing resistor (FSR), any shape.
- Piezo element (contact microphone), any size, with wire leads attached.
- Jumper wires, including pin-to-socket wires.
- A 3.5mm stereo audio cable for connecting Bela to other audio devices.
Should I know anything before starting?
This course was designed for students who already have some digital signal processing knowledge. If you have some that’s great, but if not you’ll learn about these concepts in this course.
But I don’t know any C++!
This is the ideal way to learn! This course is full of concise explanations and hands-on lessons. If you have a Bela system you can follow along at home, and the examples are here and freely available for you to download and examine.
Who is this course for?
Bela’s mission has always been to make high-performance computing accessible to all. This isn’t just a course for engineers - this is a course geared at people who have a bit of technical knowledge, and want to improve their C++ skills by learning how to implement interaction with audio and sensors using the Bela platform.
Where did this course come from?
Bela was born in the Augmented Instruments Laboratory at Queen Mary University of London, and one of its earliest applications was as a learning platform for a masters-level course now called Music and Audio Programming. This course is an online adaptation of that course. That course is offered on degree programmes including:
- MSc in Sound and Music Computing, a one-year Master’s programme
- PhD in Artificial Intelligence and Music, a 4-year PhD programme with fully-funded studentships for UK and international students
Who’s teaching it?
This course is presented by Bela’s creator, Dr Andrew McPherson.