SD Read and Write Speeds on an ESP32

I did not find any comprehensive overview of the expected read on write speeds of the different Arduino SD APIs that are provided to access the SD drive. I also expected to see a difference depending on the read/write size. I tested the SD and SDMMC libraries, that are provided by the ESP32 Arduino core. I also wanted to include the SDFAT library, but unfortunately it was crashing with different read or write sizes, so Read more…

AudioTools: ESP32 IDF and Files – The Final Frontier

After we can access the Internet purely using IDF functionality w/o Arduino, the final challange is to provide access to files as Streams! IDF provides the concept of the Virtual File System (VFS): you can mount a file system under a name and access the files of that file system using the name as prefix. For this the POSIX file API is supported and therefore we have all standard C and C++ file methods available. Read more…

AudioTools: An Internet MP3 Player with the Espressif IDF

In my last post, I described that I have implemented the URLStream class using pure IDF functionality. So you will not be wrong if you expect a working MP3 Internat Player next that just relies on the IDF w/o Arduino. The main.cpp Program Here is the complete IDF program that mimicks the Arduino setup() and loop() methods. The only other difference to the usual Arduino sketches is, that we can’t use Serial and the related Read more…

AudioTools: An ESP32 IDF implementation of URLStream

The following classes can be used as HTTP client and implement the AbstractURLStream API. All these classes are dependent on the Arduino Networking API: URLStream: Supports HTTP GET, POST, PUT and DELETE ICYStream: Supports the ICY protocol URLStreamBuffered: Using buffer that is filled by a task ICYStreamBuffered: Using buffer that is filled by a task I thought that it would be cool to have this functionality also working for the ESP32 outside of Arduino. The Read more…

AudioTools: Using Multiple Decoders

In all my demo sketches so far, I have used just one decoder only, but what if we want to play multiple audio file types ? To support this scenario, I decided to provide the MultiDecoder class, that lets you register your codecs with the corresponding mime type. This class works together with my MimeDetector which detects the file type based on the first couple of bytes. Here is an example sketch that can play Read more…

Using Inverse FFT to generate Audio

So far I was using the Fast Fourier Transform (FFT) functionality of my “Arduino Audio Tools Library” for analyzing the audio. This week I spent some time to make sure that we also support the inverse FFT properly. The inverse FFT is generating audio samples in the time domain from the spektrum information. This functionality is executed automatically when we read the data from the fft source: The spektrum information can be set in the Read more…

AudioTools: Filter Performance of the RP2350

When I was comparing the RP2040 with an ESP32 for audio filters quite some time ago , the ESP32 was winning by a big margin. The Rasperry Pico has been improved with the new RP2350 and I thought it would be interesting to have a comparision: I was using the default settings (for cpu speed and optimization) Type ESP32 RP2040 RP2350 ARM RP2350 RISC int32_t 318 ms 717 ms 380 ms 420 ms int64_t 788 Read more…

arduino-audio-tools: Mixing Effects with the Input Signal

Yesterday, a user was proposing an Arduino Sketch for a Guitar Effects Pedal which is mixing the original input with an effect. Setting up a simple effect is easy, but I have never thought about how to mix the effect with the original input. He was proposing the following process chain (which I think is just ingenious): |-> AudioEffectStream –| I2SStream -copy-> MultiOutput -| |-> OutputMixer -> I2SStream |———————–| It took me quite some time Read more…

arduino-snapclient with Rasperry Pico 2 W

I was wondering if the Raperry Pico 2W can be used with my Arduino Snapclient Library. A related discussion was hinting that it is just not powerful enough. In the beginning was stuggeling quite a bit and the audio with Opus was just not working and I could bareliy make it work with PCM/WAV with a sample rate of only 8000. The solution was to split up the Wifi and the audio decoding to the Read more…

TinyUSB: the RP2040 I2S Output Challange

The starting point for writing audio data from USB to I2S using a Rasperry Pico (RP2040) Microcontroller is the speaker example sketch from my extended TinyUSB library. We would just do an i2s.write(data, len) in the callback: Unfortunately this did not work and this was locking up the output quite quickly. In the next trial, I was writing the data to a queue and do the i2s output in the loop(): still no success. The Read more…