Arduino Audio Tools – Creating A Multiuser Audio Webserver

Quite some time ago I was playing with the idea that it should be quite easy to implement a web server in Arduino that provides the same audio signal to multiple users. All that needs to be done is register new connections and close them when the user closes the browser window. Then we just need to copy the same data to all open connections. That’s how my TinyHttp (Audio) Server got started. This week Read more…

Arduino Audio Tools – Downloading Files from the Internet to a SD Card

Quite some time ago, I tried to use the functionality of the Arduino Audio Tools to download a file from an URL and store it on a SD card, but I was running into some problems. I finally found the time to investigate the issue and I have the functionality finally working now: #include “SD.h” #include “AudioTools.h” const char *ssid = “SSID”; const char *password = “password”; URLStream url(ssid, password); // Music Stream StreamCopy copier; Read more…

Arduino Audio Tools – Recording Sound to SPI RAM

The AudioKit and some ESP32 Processors have 4MB of SPI RAM that we can use e.g. to store recorded audio. I was playing with the idea to build some looping logic. Therefore I have added an additional DynamicMemoryStream class that can stores the audio data on the heap. With the help of the memory manager we can indicate that data chunks that are above a specified limit are stored in SPI RAM! Arduino Sketch To Read more…

Arduino Audio Tools – Input from the VS1053 Module

I added support for the VS1053 breakout boards to my Arduino Audio Tools project. Finally the recording of sound from the microphone or the aux input is working as well both for the VS1003 and VS1053 devices! Arduino Sketch It is working the same like any other input: #include “AudioTools.h” #include “AudioLibs/VS1053Stream.h” int channels = 1; VS1053Stream in; // Access VS1053/VS1003 as stream CsvStream<int16_t> csvStream(Serial, channels); StreamCopy copier(csvStream, in); // copy in to csvStream // Read more…

Arduino Audio Tools – VS1053 And Real Time MIDI

The VS1053 and VS1003 audio codecs support real time MIDI. While the VS1003 only provides a few instruments, the VS1053 has 128 melodic instruments and quite a few additional percussion instruments! When GPIO0 is low and GPIO1 is high during boot, real-time MIDI mode is activated. Unfortunately these pins are not available on most breakout boards. In this case a patch can be used to activate it. When real time MIDI is active, you can Read more…

Arduino Audio Tools – Output to the VS1053 Module

I added support for the VS1053 breakout boards to my Arduino Audio Tools project. This module is interesting if you have a microcontroller that does not support I2S because all communication is going via SPI. Some boards also include an SD drive. The major disadvantage is the number of pins that need to be connected and the fact that they might be named differently. Dependencies As a precondition you need to install the arduino-vs1053 driver Read more…

Symlinks and Git

I converted some Audio C++ libraries into Arduino Libraries and used symlinks which point to the original file locations to make sure that Arduino can find all relevant files. This approach was working fine in OSX and Linux. Unfortunately this seems to create problems in Windows, so I decided to change the approach a little bit and replace the symlinks just with regular files that contain a regular #include. To convert all files manually would Read more…

ESP32 and PSRAM

The ESP32 microcontroller has only a few hundred kilobytes of internal RAM. Fortunately the ESP32 AudioKit or ESP32 Wrover provide 8MB PSRAM where 4MB can be directly addressed. More information how to use PSRAM in Arduino can be found here. The only thing to highlight is that PSRAM can not be allocated in global variables! This is quite unfortunate because I preferably like to do this, so that the compiler can inform about the total Read more…

Streaming and Decoding OGG…

Per definition ogg files should use the Vorbis file format using Ogg framing. Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, general-purpose compressed audio format for mid to high quality: So it is basically the open source alternative to mp3! xiph.org provides an integer only decoder implementation which is based on pure “C”. I am providing this version as Arduino Library. Like Flac from my last post, the API is using a callback pull mechanism Read more…

A FLAC codec for my Arduino Audio Tools

I started to work on a FLAC CODEC for my Arduino Audio Tools. FLAC stands for Free Lossless Audio Codec, an audio format similar to MP3, but lossless, meaning that audio is compressed in FLAC without any loss in quality. This is similar to how Zip works, except with FLAC you will get much better compression because it is designed specifically for audio, and you can play back compressed FLAC files in your favorite player Read more…