Block-based Processing

Segmenting audio into chunks

This lecture is on block-based processing, where audio is segmented into windows rather than processed one sample at a time. The most common use of block-based processing involves taking the Fast Fourier Transform (FFT) of windows of signal. This forms the basis of phase vocoder audio effects, which will be further discussed in the next lecture.

This lecture also covers the use of Bela’s browser-based GUI to make responsive visualisations. The lecture shows how to send data from a Bela program to the GUI.

Table of contents

  1. What you’ll learn in this lecture
  2. What you’ll make in this lecture
  3. Code examples
  4. Recommended parts
  5. Additional references

Lecture 17: Block-based Processing

What you’ll learn in this lecture

  • Generating and processing windows of a signal
  • The Fast Fourier Transform (FFT)
  • Sending data to the Bela GUI

What you’ll make in this lecture

  • Two simple spectrum analysers with LEDs and GUI

Code examples

Find the code examples here

fft-led: Simple project using the FFT to calculate high and low frequency content and blink LEDs. Also shows sending data to the Bela GUI.

fft-circular-buffer: Plot a real-time spectrum of the signal using the FFT. Your task is to implement the circular buffer code.

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

This lecture also uses several electronic components:

Additional references

Here are some textbooks and other resources related to the Fast Fourier Transform and spectral audio processing: