Delay effects and continuously writing to memory
This lecture introduces circular buffers as a way to save the previous history of an audio signal. Circular buffers can be used to create delays and delay-based audio effects such as echo, chorus and flanger effects. Over the course of the lecture, we progressively build up a circular buffer example with adjustable delay and feedback.
Table of contents
- What you’ll learn in this lecture
- What you’ll make in this lecture
- Code examples
- Recommended parts
- Further reading
Lecture 11: Circular Buffers
What you’ll learn in this lecture
- Keeping track of previous audio samples
- Why and how to use circular buffers
- Creating an audio delay
What you’ll make in this lecture
- An adjustable delay and an echo effect
circular-buffer: Template project which is built up in several steps over the lecture. Plays a sound file in a loop. During the lecture we implement a circular buffer with read and write pointers and adjustable delay.
Running the examples in this course assumes that you have a Bela Starter Kit or Bela Mini Starter Kit. Note that the analog outputs are only available on the original Bela board, and not on Bela Mini.
More information on delay-based audio effects, including vibrato, chorus, flanger and echo, can be found in Chapter 2 of this textbook:
- Joshua D. Reiss and Andrew McPherson, Audio Effects: Theory, Implementation and Application. Publisher link.