Virtual Analog Synth
This project concerns the development of an hardware Virtual Analog Synthesizer on STM32.
Basically, the MCU receives MIDI messages and perform all the required operations (software) to produce sounds. Sound generator is based on subtractive synthesis. The sound source are two oscillators and one noise generator, shaped by a fourth-order resonant low-pass filter and then modulated by two low-frequency oscillators (LFO) and two envelope generators (ADSR).
Any synth parameter can be used with LFO or ADSR.
Two approaches have been investigated for the oscillators implementation:
Interpolation of band-limited (24 overtones) wavetables
Both are totally alias free, but interpolation lacks of high-end frequencies, especially when playing lower notes. MinBLEPs are much more interesting! On STM32F407 running at 168MHz (videos below), monophonic synth requires less than 30% of CPU time, with no compiler optimization and a latency of 3ms. There is room for some polyphony or additional effects.
Ongoing work targets STM32F746 running at 210MHz with AKM4554 codecs and a custom keyboard and control panel.
Source code is available here.
A dedicated shield for Nucleo-144 boards has been designed and fabricated to make digital audio developments easier with STM32 devices. The shield is suitable for high-end F4, F7 and H7 Nucleo boards, providing demanding applications with a lot of CPU power. That shield embeds:
Opto-isolated MIDI In/Out interface
Line-level buffered stereo In/Out interface
AKM AK4554 professional codec (ADC & DAC) wired to STM32 SAI interface
Jumpers to choose between STM32 embedded converters and AKM codec
64Mbit external RAM (for effects or samples storage)
SD card slot (for parameters and samples storage)
2 UART connectors (for HIM, debug, ...)
1 spare I/O connector for custom controls
On-going projects are based on this board are:
Sample-based drum engine
Analog virtual synth
Virtual tone wheel organ