I came to STM32 arduino after making a midi controller that combines multiple LFO’s to confuse the heck out of various software synths and works well, but I found when running 96 individual LFO’s it makes the arduino mega chug a little to say the least. I plan to move my project to the STM32 and it feels fairly straight forward, albeit with some minor changes to account for the 3.3v limits to the system as well as some changes to the physical interface, using touch control instead of buttons. Anyway, I wondered how much fun it would be to intergrate some hardware voices, and have ended up flying down another rabbit hole, playing with the Mozzi library on an Uno as well as buying a few blue pills (and then realising they were coming from china, so have about 6 more weeks till they arrive) with plans to try mozzi on those..and then I discovered the teensy and it’s excellent audio library.
Anyway, I’m rambling – I just wanted to give you a bit of background – what I need to ask is, while I wait for those blue pills I’ve got time to waste and wondered, is there any way to add support for either Mozzi or the Teensy audio library, or is there some other capable audio library out there that will run on the nucleo board with the stm core that also utilises the DAC?
Of course if there’s another core that will give me what need, happy to use that instead.
- ChrisMicro played a lot with audio and the “genericCore” on F4, use the search function.
- I did a I2S DMA circular buffer (adaption code) on the F4 which *should* running on the official core, please see here viewtopic.php?f=18&t=4095 and read this: viewtopic.php?f=48&t=4109
- For serial MIDI take this: https://github.com/FortySevenEffects/ar … di_library (this awesome library runs on nearly every *duino platform I tried out). But for “MIDI only” I wont use a F4 but a blue pill (even this device will fads itself with MIDI and counting IDLE circles)
- USB-Midi: Not implemented in any way (both: generic or official) – maybe arpuss will convert his USB-HID library from the F1 Roger core to *HAL.
- Mozzi: There was an attempt by tfred some months ago (but also F1 Roger core): viewtopic.php?f=15&t=2936 – As I remember, the Mozzi library is a masterpiece, but needs timer (and low level code?) and so on, so I’m pretty sure it won’t compile out of the box.
Please keep in mind, that for the generic core there no real support or updates anymore (At least not in the last six months).

Hi Mathias,
thanx for mentioning that.
I also played with Rogers Core:
https://github.com/ChrisMicro/BluePillSound
In my opinion it is better to directly move to a stronger MCU than the STM32F103 because with a more complex sound generation this MCU reaches its limits soon.
I would also not recommend to use the L476 because this MCU is made for low power applications and can only run up to 80MHz. A better choice is the F407 and the the F407 discovery board has a build in audio DAC.
Here I tried the Nucleo F401 because it was laying around. But the F407 is better.
Now I ordered a F411 discovery because it is cheaper than the F407 discovery. We’ll see how it works.
The best thing would be to port the Audio-Lib from Early Hill Power ( ESP ) to the STM32. Probably it would not be too difficult and it has a build in MP3 decoder.
I’ve got blink up and running, just about to start fiddling around with mozzi.
The weird thing is I tried to work out what to do with bootloaders and things, went round in circles for a while but wasnt able to upload a bootloader using my ST link clone. Decided to get roger’s core installed and try the command line option using the instructions here: https://github.com/rogerclarkmelbourne/ … ill-Boards
But for the sheer devilment I selected ST link as the upload method and just tried to upload a sketch… worked first time and is now blinking away..
..time to try mozzi.
Shame to hear USB midi is for “freaks”. Seems I’m a freak too!
About freaks: Yes, we *are* freaks doing synth stuff with STM32F***

[madias – Tue Oct 02, 2018 9:20 pm] –
BTW: A real cool “candidate” for synth stuff is this: https://www.aliexpress.com/item/1PCS-ST … 03267.html
Looks nice – I like the form factor and the extra hardware built in. Have you tried Teensy out? The library seems to have all kinds of fun things. It is a relatively expensive board at £28ish in the UK, but the support looks great.
And the Teensy 3.6 is MCU hardware as it should be: https://www.pjrc.com/store/teensy36.html
I was thinking about to port some of his things but then I decided: NO
Why? Because he put so much effort in his things and he is earning a little bit of money by selling his Teensies so I think it is better to not destroy his market by porting the software to cheap STM-Nucleos.
Probably not as advanced as Pauls synthesizers there are some other things.
Pauls made the graphical synth tool here.
Here I adapted another synthesizer with GUI some STM32 boards.
It is not as advanced as Pauls version but nevertheless quite good I think.
Not all sound algorithms of the original equation composer are implemented but if you don’t need to used the graphical part they probably could easily be copied.
Then the equation composer library should be as advanced as the MOZZI library.
BTW: I saw that the L476 has a SAI interface instead of an I2S interface. I assume that the I2S drivers for the other boards can not be easily ported to the SAI. right?
[madias – Tue Oct 02, 2018 9:20 pm] –
BTW: A real cool “candidate” for synth stuff is this: https://www.aliexpress.com/item/1PCS-ST … 03267.html
Yes a good board. Somehow I forgot that I made a simple equation composer example for it.
[ChrisMicro – Wed Oct 03, 2018 3:43 am] –
BTW: I saw that the L476 has a SAI interface instead of an I2S interface. I assume that the I2S drivers for the other boards can not be easily ported to the SAI. right?
I think SAI is compatible to I2S, but you are right, there might be some other register entries needed getting the “I2S compatibility mode”. Beside that, SAI is very interesting, there are cheap Audio DAC’s supporting SAI. Advantage: You can handle multiple I/O streams with SAI.
[madias – Wed Oct 03, 2018 5:49 am] –[ChrisMicro – Wed Oct 03, 2018 3:43 am] –
BTW: I saw that the L476 has a SAI interface instead of an I2S interface. I assume that the I2S drivers for the other boards can not be easily ported to the SAI. right?I think SAI is compatible to I2S, but you are right, there might be some other register entries needed getting the “I2S compatibility mode”. Beside that, SAI is very interesting, there are cheap Audio DAC’s supporting SAI. Advantage: You can handle multiple I/O streams with SAI.
https://github.com/GrumpyOldPizza/ardui … raries/I2S
Works like a charm with a I2S microphone …
The SAI peripheral is more complex than the I2S off SPI. It allows more than 2 channels, and different slot encodings …
[GrumpyOldPizza – Wed Oct 03, 2018 2:15 pm] –
https://github.com/GrumpyOldPizza/ardui … raries/I2SWorks like a charm with a I2S microphone …
Because I got a L432Nucleo I thougth I can give it a try on my Ubuntu. But it seems openocd has a problem:
.arduino15/packages/grumpyoldpizza/hardware/stm32l4/0.0.28/tools/linux/openocd/bin/openocd.bin: error while loading shared libraries: libudev.so.1: cannot open shared object file: No such file or directory
[ChrisMicro – Sat Oct 06, 2018 6:11 am] –[GrumpyOldPizza – Wed Oct 03, 2018 2:15 pm] –
https://github.com/GrumpyOldPizza/ardui … raries/I2SWorks like a charm with a I2S microphone …
Because I got a L432Nucleo I thougth I can give it a try on my Ubuntu. But it seems openocd has a problem:
.arduino15/packages/grumpyoldpizza/hardware/stm32l4/0.0.28/tools/linux/openocd/bin/openocd.bin: error while loading shared libraries: libudev.so.1: cannot open shared object file: No such file or directory
You got to install the 32bit compatibilty libraries. Thought it said so in the instructions.