STM32 Nucleo-l476 based MIDI-Merger


NucleoSynth - Audio Synthesizer based on STM32 Nucleo-F446

This is a DIY construction manual for a digital 10 voices polyphonic Audio Synthesizer
based on STM32 Nucleo-F446, which is plugged onto a specific PCB.

The instrument is controlled completely digital. The only analog controller is the LCD contrast pot. Internal digital data are transformed to an analog output signal using the internal DAC of the STM32F446 processor and finally amplified to headphone impedance with an audio amplifier IC.

To play the instrument and for configuration, communication is possible via USB and USART. MIDI and RS-232 modes are selectable with a dual DIP switch. Additionally a local Operator Panel is supported by hard- and firmware.

NucleoSynth in alu box
NucleoSynth simply built into aluminium box

A design intention was to keep the additional hardware technology as low as possible. For most people, making a PCB is the biggest barrier. For this reason a completely 2.54mm Veroboard compatible design is proposed here. It can be wired manually or manufactured as a one (or two) layer PCB too. Smallest PCB wire width is 0.8mm, smallest distance between wires etc. is 0.4mm, optimized for most simple PCB production technologies.

Most essential features of the NucleoSynth:

  • Two oscillators, each is configured independently with a variety of waveforms, detune, transposition and modulation. In addition to additive mixture of both waveforms, Oscillator1 can be frequency modulated by Oscillator2 in a basic way.
  • Both oscillators 10 voices polyphonic, can be switched to monophonic.
  • Four digital IIR filters with selectable shape characteristics, resonance and keytrack. Can be cascaded serially or in parallel.
  • Very simple routing scheme. Most features have an individually configurable ADSR.
  • Three Lfo's with a simple scheme to use them together with different features.
  • Digital delay up to 250ms at the output stage with Chorus, Feedback and simple Comb Filter effect.
  • A simple Drum Set is included with Kick Drum, High Tom, Snare, RimShoot, Clap, HiHat, Cymbal and Cowbell. It uses its own MIDI channel.
  • The proposed Operator Panel is connected flexibly with wires crimped on 2.54mm connectors. Design can be easily modified for different cases and user's taste.
  • 4 line LCD display, 3 rotary encoders (with pushbuttons), 6 pushbuttons and 2 LEDs at the Operator Panel. The bushbuttons are used for quick selection of sound sets (play mode) or selection of different parameter change pages (configuration mode).
  • The instrument can be played via USB and conventional (USART) MIDI interface. Configuration is possible (in addition to the Operator Panel) by MIDI interface (Pgm Change and Control Change) and via COM port with ASCII text commands.
  • USB and legacy MIDI IN are merged correctly and can be played simultaneously (e.g. keyboard against PC based sequencer)
  • Up to 60 user configurable sound sets are stored in SRAM memory to be stored in /reloaded from microcontroller flash. Furthermore, sound sets can be dumped/uploaded externally via MIDI as SysEx messages.
  • Up to 4 user defined waveforms can be uploaded as MIDI SysEx messages. Primarily stored in SRAM memory, they can be stored permanently in /reloaded from microcontroller flash.
  • Powered by USB, USB Power Bank or by external regulated 5Volt. Supply current ca. 130mA (unmodified Nucleo) or 85mA (ST-LINK cut from F446 kernel)
NucleoSynth fully assembled
NucleoSynth fully assembled with unmodified Nucleo-F446

For a first test or as "embedded instrument" without operator panel, the unmodified Nucleo board can be completed with a minimal hardware, which is supported by a special firmware version:

minimal hardware

A detailled Operation Manual is provided here (PDF file),
and a detailled hardware DIY Construction Manual is provided here (PDF file).

Downloads:
The subsequently downloadable material is copyrighted (c)2019 by Wolfgang Schemmert.
Assembly and use of the device is permitted for free by everybody for any purpose ("freeware").
All information is based on best knowledge, but "as is" and without any warranty. Any responsibility is excluded.

PCB layout for the "base board" PCB (1:1 TIF format, BOTTOM layer as well as component placement view "from component side", but TOP layer shown mirrored "from solder side" (as needed for PCB production))

Firmware "nucleosynth-14.hex" rev1.4 for the NucleoSynth
(Version 1.4 , 14 May 2019: sound examples and wave patterns are still under optimization)
--- some bugfixes and improvements
--- ASCII commands added to trigger MIDI SysEx Dump, activate Filter Test and Panic Off.

Firmware "nucleosynth-14-minhw.hex" rev1.4 for the NucleoSynth
(Version 1.4 , 14 May 2019: sound examples and wave patterns are still under optimization)
Modified for minimal hardware: The F446 onboard USB is off, instead the F446 USART2 is activated for communication via the ST-LINK USB (virtual COM port). USART1 works as legacy MIDI IN. Else same features as above.

Source code "nucleosynth-14.zip" (status 14 May 2019)
This source code is provided as complete "EmBitz1.11" project (ZIP file, 2.419 kB. Parts published by EmBitz are under license of Embitz, parts published by STM are under license of STM, parts programmed by me are provided under GNU GPL3 license.)

Alternative firmware:
The first filter in the filter cascade has a set of clones for every voice. This improves polyphonic play while frequency shift of this filter is modulated by key pitch.

Firmware "xf-nucleosynth-14.hex" rev1.4 for the NucleoSynth
(Version 1.4 , 14 May 2019: sound examples and wave patterns are still under optimization)
--- some bugfixes and improvements
--- ASCII commands added to trigger MIDI SysEx Dump, activate Filter Test and Panic Off.

Firmware "xf-nucleosynth-14-minhw.hex" rev1.4 for the NucleoSynth
(Version 1.4 , 14 May 2019: sound examples and wave patterns are still under optimization)
Modified for minimal hardware: The F446 onboard USB is off, instead the F446 USART2 is activated for communication via the ST-LINK USB (virtual COM port). USART1 works as legacy MIDI IN. Else same features as above.

Source code "xf-nucleosynth-14.zip" (status 14 May 2019)
This source code is provided as complete "EmBitz1.11" project (ZIP file, 2.711 kB. Parts published by EmBitz are under license of Embitz, parts published by STM are under license of STM, parts programmed by me are provided under GNU GPL3 license.)

This project is programmed directly on register level, no external libraries (except "cmsis" and startup code), no drivers or HAL are used. So it may be helpful for other projects with STM32F446 or similar processors like F411, F405 -- especially concerning USB, USART communication, LCD based user panels, rotary encoders.

Some of my own help files:
"waves14bit.zip" archive contains source code for a Windows console app to design and calculate user waveforms based on simple mathematical models. Furthermore a set of example userwaves (MIDI SysEx conformant .syx files) is included, generated with this software. (status 24 April 2019)
It generates the corresponding SysEx (.syx) files for direct upload to NucleoSynth. Furthermore, C-Code compatible source code snips of waveform data are generated. Developed with good old Dev-C++ 9.9.9.2, other compilers may require changes.

"Dump2C.zip" archived Windows console app of "Dump2C.exe" (status 07 May 2019).
The packed file dump2c.eee must be renamed to dump2c.exe before use.
With this simple program dumped sound sets are transferred to C-Code compatile source code snips for integration of user own factory presets into the source code of NucleoSynth. Updated to fit with firmware rev1.3++



* State of information May 2019.
* Right of technical modifications reserved. Provided 'as is' - without any warranty. Any responsibility is excluded.
* This description is for information only. No product specification or useability is assured in juridical sense.
* Trademarks and product names cited in this text are property of their respective owners.