Playing recorded samples
Reading samples from memory
This lecture explains how to load recorded audio samples and play them in real time.
Table of contents
Lecture 2: Playing recorded samples
What you’ll learn in this lecture
- The Bela C++ API
- Working with buffers (arrays) in C++
What you’ll make in this lecture
- Sample (audio file) player
Code examples
sample-player: a partially complete project that plays a sound loaded from the flash storage. The sample loading is handled for you, but you have to fill in the real-time playback code in render().
sample-player-stereo: a variation on sample-player that plays multi-channel audio files. Like the previous example, it is incomplete and you need to fill in the critical sections in render().
Recommended parts
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.
