Counting samples and measuring time
This lecture explains how to measure time when working with real-time audio signals, based on counting samples. The lecture includes some basic circuits to make an adjustable metronome with LED and a step sequencer with a clock.
Table of contents
Lecture 9: Timing
What you’ll learn in this lecture
- Counting time with sampled audio
- Creating delays in real time
- Events and intervals
What you’ll make in this lecture
- A metronome and a step sequencer
metronome: Code template for creating a metronome that plays an audio sample at regular intervals.
step-sequencer-metronome: An update to the example from Lecture 7, with hooks for you to incorporate a metronome to advance the step.
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.
This lecture also uses several electronic components:
- Solderless breadboard (Rapid, Adafruit)
- 1x 10k potentiometer (Rapid, Adafruit)
- 1x LED (any colour) (Rapid, Adafruit)
- 1x 220 ohm resistor (Rapid, Adafruit)
- Jumper wires (Rapid, Adafruit)