yummyDSP is an easy to use, yet powerful audio processing library.
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; // the dsp core, holding all nodes FilterNode lp; // a low pass filter WaveShaperNode sat; // some saturation ... dsp.add(&lp); dsp.add(&sat); ... sample = dsp.process(sample, channel);
This allows for a pretty high level view on signal processing but also to dig deeper. Write your own nodes or directly add dsp code to the sample loop.
Currently there a just a few nodes implemented (more to come)
- Hipass / Lopass / Bandpass filter
- Waveshaper / Saturation
First you'll need some sort of an ESP32 e.g. a ESP32 DevKitC or a derivate. Currently you also need an ADC or audio codec connected via I2S. I didn't manage yet to make the built-in ADC work with I2S DMA without breaking the DAC. If someone has an advice, please drop me a line.
- Install the Arduino ESP32 Core as described.
- Download this library into your Arduino library folder
- Run the example code and fiddle around
The ESP32 has two cores at 240 MHz and features a Bluetooth and Wifi module (hello OSC). Audio processing is running on one core, leaving the other for control and housekeeping stuff. The ESP32 is running a realtime OS, namely freeRTOS managing tasks, threading and all that.
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.).
- Processing is sample wise
- I2S buffers are handled by DMA
- I2S master clock is provided on GPIO0. This pin needs to be high on boot up!
- Latency is low, depends on the I2S buffer size (currently a few ms)
- The audio driver is only tested with the AKM AK4556 audio codec. A proper hardware abstraction layer is still missing.