A simple Midi File Parser (not only) for Arduino

I was looking for a simple midi file parser library, but I did not find anything that made me happy, so I decided to provide one myself. Here are my design goals: minimal RAM requirements for midi with 1 track incremental writing and parsing of data No external dependencies: compile and run outside of Arduino with cmake Using the Arduino Print API for writing data For processors with a lot of RAM: provide some multitrack Read more…

AudioTools and 24 bit values

I always planned to support audio with 24bit values in my Arduino Audio Tools library, but I never actually tested the functionality and so far I did not have a clear understanding of how these values would need to be represented. To be prepared I already provided a draft implementation of the int24_t data type, but there were some misunderstandings, that have been corrected now. First we use the int24_t data type as you would Read more…

Getting Started with the STM32F411 Discovery Kit and Arduino

I started to explore the STM32F411 Discovery Kit which comes with the following features: STM32F411VE Arm®(a)-based microcontroller featuring 512 Kbytes of Flash memoryand 128 Kbytes of RAM A (blue) user push-button ST MEMS 3-axis digital gyroscope (L3GD20 or I3G4250D) ST MEMS 3D digital linear accelerometer and magnetic sensor (LSM303DLHC or LSM303AGR) Four user LEDs: orange, green, red and blue ST MEMS digital microphone (MP45DT02 or IMP34DT05) Audio DAC with integrated class-D speaker driver (CS43L22) USB Read more…

Analyzing ESP32 Exceptions

When your Arudino sketch is crashing it produces something as follows 13:45:41.992 -> 13:45:41.992 -> Backtrace: 0x40083585:0x3ffb2690 0x400892ad:0x3ffb26b0 0x4008e2f1:0x3ffb26d0 0x400d1442:0x3ffb2800 0x400d2be1:0x3ffb2820 13:45:41.992 -> 13:45:41.992 -> 13:45:41.992 -> 13:45:41.992 -> 13:45:41.992 -> ELF file SHA256: 9868280367130d7a It is vital to be able to analyse this backtrace and translate it to methods and file names. In Arduino we could use the EspExceptionDecoder to do this. Unfortunately this is not supported by Arduino 2.0! No problem – I Read more…

Arduino AudioTools – Audio Effects

I was never quite happy with my old implementation of the AudioEffects class because it was not very intuitive with the required type parameters and I thought it is about time to improve. So I finally managed to provide a proper Stream implementation that works like many other converting Streams, so that we can now apply the effects both on the input and the output side: Effects on the Input Side We just provide an Read more…

Ranting about McBooks

I think the old McBooks from about 10 years ago are just marvelous. It’s not like the today’s “crap” where you have no possibility to replace the RAM or the hardisk because they are soldered: It is really a pitty that Apple moved away from providing any repairable Hardware! The problem was however that I did not get any OS/X software updates any more and more and more of my needed functionality stopped to work. Read more…

Arduino Audio Tools – Resampling Revisited

So far I have provided some resampling functionality that was working with some integer factors to up- and downsample. After the work on the Pitch Shifting I realized that we can easily resample using a float based step size to achieve any resampling factor and determine the new values with the help of linear interpolation. This is cool because we can now speed up or slow down the audio by any rate! And the beauty Read more…

Arduino Audio Tools – Multicore Processing

So far I never needed to use any of the ESP32 multicore functionality because all the examples are very simple and everything is fitting on a single core. However if you write some more complex scenarios which are e.g. updating a screen, process user input w/o impacting the audio, you should consider to use multiple tasks. Then you need to use a save way to communicate data between the tasks. In this case I strongly Read more…