I’m quite a beginner in embedded development in general, and in audio/midi programming in particular. However, currently this is my active hobby, so I’ll be glad to share experience, knowledge and links.
First, let me correct the terminology a little, if you don’t mind.
The most common meaning of “Bare metal” development is when your software works with hardware registers directly without any libraries like STM32 HAL or Arduino or operational systems like Linux or FreeRTOS. Technically, you can program Raspberry PI in bare metal manner.
This is important because when you’ll search for any books, articles and courses you will mostly meet this particular meaning of “bare metal”.
Back to topic.
There are tons of things to discuss.
For the beginning, I’d like to share what I recently found about various DSP chips.
Source: https://www.thegearpage.net/board/index.php?threads/sharc-vs.2405852/page-3#post-35733418
I worked at Analog Devices during the development of all the various DSP technologies and when it became practical to use DSP for pro audio applications (1986 to 2005).
Most early DSP chips were 16 bit fixed point math. It was fine for voice band and communication stuff, but not for audio. TI and ADI were early into the market. Teddy Ruxpin was the first consumer product to use DSP (TMS320-C10).
Motorola came out with the 5600 series processors, and they were 24 bit fixed point. They were the first DSP chips to be broadly adopted for audio applications.
A new generation of 32 bit floating point processors came out with TI (TMS320-C30) and ADI (ADSP-21000). When the ADSP-21000 was integrated with memory, it was branded SHARC. My boss at the time named it as a complete joke, but the name turned out to be great branding.
Harvard Architecture means that one can take 2 numbers, perform a multiply/accumulate, and then put them back in memory in one cycle. This is the sort of thing that separates a general purpose computational processor (like intel) from a DSP chip. It is an operation that makes the processing of real world signals (like audio) fast enough to keep up with the rate at which new samples are coming in.
All DSP chips trade off instruction rates (speed), on board memory, instruction set types, hardware acceleration blocks, bit depth, and chip size (aka cost).
Some random notes on various chips I am familiar with:
SHARC - Kind of expensive. Good for audio, and was broadly adopted in home theater and car HiFi. Can be programmed in a “C-like” code. Widely used in applications beyond audio.
Blackfin - 16 bit DSP that was intended for communications applications. It must be run in double precision (32 bit) for audio applications. ADI had an internal battle over this chip between the SHARC team and the Blackfin team. The only reason it is used in audio applications is the Blackfin team bombed the price to get audio design wins. Double precision cuts your instruction rate in half. ADI should never have let this happen.
SigmaDSP - The audio group that I was responsible for came out with a line of 28 bit fixed point chips that were specifically designed for audio. The creator (super famous guy in the audio world) wrote an AES paper at the time on why 28 bits was the idea number for audio (more bits is not better when looking at the big picture). Because this chip was so small and efficient, we could put audio converters on it. Eventually I got excited about using this chip for guitar effects. I got ADI to do a custom chip with delay memory, and Source Audio was born. We are the only effects company I know of with a proprietary DSP chip.
TigerSHARC - Designed for 5G basestations. Fractal used it, but I think they moved on.
FV-1 - I believe this chip was intended for karaoke machines originally. The advantage of this device is that it has integrated converters and memory. It is also easy to program. Other than that, there is nothing it does that cannot be done far better with almost any other solution. The integrated converters are less than 90dB. That is similar to computer audio of the AC-97 CODEC era. Anything from TI, Cirrus or AKM is miles ahead. The instruction rate is something like 128 per audio sample. The compares with thousands per sample for any ADI DSP (we are at 3500 on most of our products). Despite what I have said here, some of the products made with this device are very popular. No. Surrounding this device with additional analog circuitry does not improve the SNR/DNR of the signal path nor the number of instructions. I have heard this stated on TGP, but it’s not true. Yes, you can certainly hide some of the noise with filtering or gain-ranging, but at a cost to dynamic range and/or frequency response. There is NO digital I/O on this device. You are stuck with the audio performance as is.
ARM - embedded RISC processors are getting faster and there is lots of money being poured into this space for lots of applications all over. The audio market will be riding on the coattails of high-volume applications. They are getting fast enough to compare with general purpose DSP chips. The SigmaDSP chip we use for the Atlas Compressor and the EQ2 can now almost be executed on a 64 bit ARM chip. However, 64 bit ARM chips are still rare. Once they are more common, we will certainly take advantage. For now, we have assembly code running on very small and efficient high speed audio DSPs. For those who have been using SHARC and a higher level language, the switch-over might need to be sooner. I dont know how others do it exactly, so I am speculating a bit. In ten years most high end digital pedals will use ARM-based processors, I suspect.
Probably more than any of you want to know. I am showing my age given the number of years I have been involved with DSP chips!
Agree with the comment that algorithms are the most important aspect
Personally, I believe STM32 is a safe bet for beginners. There are tons of them in all possible configurations. Almost all Mutable Instruments are built using STM32. I’ve seen nice digital guitar pedals based on STM32F7/H7 chips.
Also, there is nice reading about STMs in MI documentation: Stm32 miscellania - Mutable Instruments Documentation
The most important outcome for me is that your DSP code is much more important than your MCU.
And for DSP I would recommend Will Pirkle books:
Even if you’re not going to develop VST plugins, there are tons of useful information about implementing DSP in C++;
And Cycling’74 Max is a great tool for learning DSP as well. Digitone algorithms were initially designed in Max.
This series of book is great learning material for high level understanding of Max
Electronic Music and Sound Design - Theory and Practice with Max 8
And this book covers “gen~” operator which allows to build DSP algorithms from the very scratch operation at sample level.
Generating Sound and Organizing Time
I own most of these books (apart from the 3rd part of Max series, which is not possible to buy in a country where I’m currently live). I briefly read them and they’re well written and full of useful information.
And on top of that you’ll must learn
- C++ (I wouldn’t recommend to write in plain C)
- embedded C++ (almost no dynamic allocations, no exceptions, more specific architectures, and many other embedded specific things),
- electrical engineering (you will hit the boundaries of development boards like Nucleo very fast, and you’ll want to design and manufacture your own PCB)