Arduino Audio Tools is using less memory

I was always unhappy that just importing my Arduino Audio Tools library was using quite some PROGMEM and RAM even with an empty sketch: Sketch uses 888547 bytes (67%) of program storage space. Maximum is 1310720 bytes. Global variables use 43352 bytes (13%) of dynamic memory, leaving 284328 bytes for local variables. Maximum is 327680 bytes. The root cause for this was that I considered networking to be part of the core functionality that should Read more

Arduino Audio Tools: Building a Simple DTMF Detector using Goertzel

The Goertzel Algorithm is an optimized Discrete Fourier Transform (DFT) that can detect defined frequencies. It can be used e.g. to identify DTMF keys. DTMF keys conist of 2 tones that can be described by the following diagram: In the Arduino Audio Tools library we can use the GoertzelStream to build a simple DTMF detector. Arduino Sketch The example can be found in the examples and I was using an AI Thinker AudioKit for testing. Read more

Arduino Audio Tools: Pimping Up Resampling

The ResampleStream class of the Arduino Audio Tools project provides some flexible resampling functionality both on the input and the output side. To calculate the values it just uses a simple but efficient linear interpolation. I finally managed to provide an extended ResampleStreamT resampling class that uses some alternative interpolation method implementations: Here is an overview with the advantages and disadvantages: Method Quality CPU Cost Artifacts Interpolates Sample Points Linear Low Very Low High Yes Read more

HIMEM – ESP32 PSRAM on Steroids

Quite some time ago, I published some blogs about the ESP32 PSRAM. I think it is about time to dig a litte deeper into the topic and look at how we can use the unadressable 4 MBytes. PSRAM and C++ STL One thing that took me by surprise when I was testing with the actual ESP32 3.2.0 core, is that you just need to switch on the PSRAM in Arduino, and the C++ STL classes Read more

Pimping up your ContainerM4A

In my last blog, I described you I added M4A support to my Arduino Audio Tools project and how to use it. As highlited we need to access and store the stsz size tabe to play back the audio: a typical size table contains aournd 40 – 80 kbytes, but for long audio this can get much bigger: This is not an amount of data, that you would like to have to store on a Read more

Vibe Coding: Adding M4A Audio Playback Support to the AudioTools

Last week I was asked, if my Arduino Audio Tools project was supporting the playback of M4A files, which it didn’t: but I thought that would be quite a good opportunity to try out Vibe Coding,  since this problem space is well documented and quite established it seemed to be quite a good fit. Needless to say that at that point of time I did not know anything about M4A. So I just asked Claude Read more

Arduino Audio Tools: Supporting ALAC

Overview I am currently supporting quite an extensive list of audio codecs as part of my Arduino Audio Tools Library. I thought that I covered all available open source implementations. However last week, I discovered that there is an open source implementation for the Apple Lossless Audio Codec (ALAC): I was struggeling quite a bit with the API, but I finaly got it integrated! I was testing with an ESP32: With some decreased frame size, Read more

Arduino Audio Tools: Using FTP as Data Source

I published a new release of my TinyFTP library, that I have converted to a header only C++ library and I changed the FTPClient to a templated class so that we can support an automatic session management with different Client implementations. I already provided an simple ftp example in the AudioTools library that just uses an individual FTP File as data source. However, I thought it would be cool to have a FTP audio source Read more

Remote Control for the Arduino AudioTools AudioPlayer

I thought it might be cool to provide a remote control for the AudioPlayer which is part of the Arduino Audio Tools. I did not want to invent a new protocol, so I implemented the HTML interface that has been documented by the KA-Radio project. I am providing a Stream and a Http implementation via the following classes: KARadioProtocol KARadioProtocolServer The following commands are supported: play, instant, volume, volume+, volume-, pause, resume, stop, start, next, Read more

A Http Live Streaming (HLS) Player with the Arduino Audio Tools

In traditional http streaming we can just read a single audio stream and feed it to a decoder. Unfortunatly Http Live Streaming (HLS) adds a lot of additional complexity and overhead. It works by splitting an audiostream into very short segments, which are just a few seconds in length, and then serving these segments over HTTP or HTTPS. This list of available segments is published in a playlist file (.m3u8), which contains a URL for Read more