garygru / yummyDSP

An Arduino audio DSP library for the Espressif ESP32 and probably other 32 bit machines
GNU General Public License v3.0
108 stars 21 forks source link
arduino audio dsp esp32 i2s music sound

yummyDSP

yummyDSP is an Arduino audio DSP library for the Espressif ESP32. Main focus is realtime processing of audio signals for e.g. a guitar stomp box.
Although there is some basic synth stuff inside, there are probably better audio synthesis libraries out there. For web radios, player, recorder or similar have a look at the Espressif Systems Audio Development Framework.

The Library is in an early state, still lot's of known issues! Anyone is invited to help, extend and bring in his expertise.

The idea is to have modular blocks which are simply arranged in a processing tree to form the signal chain. These processing blocks are called Nodes inspired by Apple's Audio Unit framework. They are processed one after another in the sequence in which they are added to the tree:

YummyDSP dsp;
FilterNode lp; // a low pass filter
WaveShaperNode sat; // some saturation
...
dsp.add(&lp);
dsp.add(&sat);
...
sample = dsp.process(sample);

This allows for a pretty high level view on signal processing but also to dig deeper and write your own nodes or directly add dsp code in the sample loop.

Currently there a just a few nodes implemented (more to come)

Getting Started

First you'll need some sort of an ESP32 e.g. ESP32 DevKitC or a derivate.
You also need an ADC or audio codec connected via I2S. The AI-Thinker ESP32 Audio Kit is cheap and has everything on board to start.

Installation

ESP32

The ESP32 has two cores at 240 MHz and features a Bluetooth and Wifi module (hello OSC). The WROOM32 module has just 520 kB of RAM, the WROVER32 module at least additional 4MB (you'll want that for many lookup tables, delay line, etc.).
The ESP32 is running a realtime OS, namely freeRTOS managing tasks, threading and all that. Audio processing is running on one core, leaving the other for control and housekeeping stuff.

Fun Facts

License

This project is licensed under the GPLv3 License - see the LICENSE file for details