Real Time

Real-Time audio and programming oscillators

This lecture explains the concepts behind real-time audio and shows you how to program an oscillator that runs in real time.

Table of contents

  1. What you’ll learn in this lecture
  2. What you’ll make in this lecture
  3. Code example
  4. Recommended parts
  5. Further reading

Lecture 1: Real Time

What you’ll learn in this lecture

  • Principles of real-time audio
  • How to write real-time C++ code

What you’ll make in this lecture

  • Sine-wave oscillator

Code example

sine-generator: a sine wave oscillator that does not run in real time: it generates 5 seconds of audio at the beginning then plays it back. Used as a starting point for code exercises.

sine-generator-rt: an incomplete example which over the course of the lecture will be turned into a real-time sine wave oscillator.

Running the examples in this course assumes that you have a Bela Starter Kit or Bela Mini Starter Kit.

This lecture does not require any other electronic hardware. However, other lectures will make use of sensors and other components. See Lecture 0 for a list of recommended parts.

Further reading

This lecture references a few basic terms related to discrete-time signal processing. An excellent reference on discrete-time signal processing is the following textbook: