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

The minimp3 Decoder on an ESP32 ?

When I was looking for an alternative open source MP3 decoder, I found the minimp3 project from lieff. Arduino Support Yesterday I took another effort to make it work on an Arduino ESP32. To make the project Arduino compatible was easy: I just had to add library.properties and change the Readme.md to add the instructions. Running the code on the ESP32 however turned out to be not so easy: the sketches were crashing w/o any Read more

Audio Streaming – The Opus Codec

Codecs play an important role in audio streaming, as we have seen in one of my last blogs. I have spent some time to make the Opus Codec available as Arduino Library and I am providing some simple integration from my Arduino Audio Tools library. Opus is a codec for interactive speech and audio transmission over the Internet. Opus can handle a wide range of interactive audio applications, including Voice over IP, videoconferencing, in-game chat, Read more

Arduino ESP32 Audio Streaming with RTSP!

Recently I discovered the Micro-RTSP-Audio Project from Thomas Pfitzinger which is based on Micro-RTSP from Kevin Hester. The Real Time Streaming Protocol (RTSP) is an application-level network communication system that transfers real-time data from multimedia to an endpoint device by communicating directly with the server streaming the data. I tried to adapt the library to make sure that it is also compiling in Arduino and converted the example to comply with the Arduino conventions. However Read more

Arduino Low Latency Streaming of Audio Data – Codecs

As we have seen in my last blog, we will need to use a codec to send and receive the audio data with some proper sampling rate: CD quality e.g. is using 44100. I started to collect some promising low-complexity codecs and converted them to Arduino libraries: sbc lc3 aptx g7.22 gsm codec2 As a the next step I will need to provide some nice integration into my Arduino Audio Tools. Arduino Sketches Detailed Information Read more