Builds a digital guitar multi-effects prototype for the STM32F746G-DISCO development board, using its audio I/O and touch display as the user interface.
The software uses C++17, MVC separation, and event-driven RTOS queues, with audio processing handled in double-buffered 128-sample blocks.
The audio path runs at 24-bit/48kHz, and the block size adds about 6 ms of input-to-output delay.
Six effects work: tremolo, echo/delay, chorus, reverb, overdrive, and cab sim, with chain order selectable from the menu.
It remains a concept/prototype rather than a stage-ready pedal, and planned additions include a tuner, presets, a vocoder, custom panels, and footswitch support.
Generated by the language model.
Hi
I`ve wanted to make my own digital multi-effect for electric guitar for a long time. I couldn`t get around to it for a long time due to various things, but it`s finally here. My project only concerns software for the ready-made STM32F746G-DISCO development board. It is a concept/prototype of a device rather than a ready-made device that can be taken on stage and played.
What is this?
For those who don`t know, a guitar effect is a device (or software) used to modify a guitar`s signal to obtain a characteristic sound. Such effects may be based solely on analog electronics, but they can also be achieved using digital signal processing, either on a microcontroller or in computer software.
How it`s working?
Below is a short video briefly showing how the device works. I add three effects there: overdrive, cab sim and reverb and then I play a short melody. An electric guitar is plugged directly into the multi-effects input and its output is connected to a regular portable speaker. Later, separate audio samples for each effect will appear in the description.
Equipment
I had no plans to build a dedicated hardware platform for this purpose, because I already had a development board with everything necessary, and I was more interested in signal processing algorithms. Therefore, as I mentioned earlier, the project works on the STM32F746G-DISCO board. From the user`s point of view, the audio line input and output as well as the graphic touch display are important here.
Software
It will be difficult for me (and I don`t want) to describe the code in detail here, so I will summarize it to the most important things. The project is written in C++17. The application code is separated from the hardware and RTOS using abstraction layers. We`ll see if I did it right when I need to move the code to something else . In addition, the application is written in the MVC (Model-View-Controller) pattern to achieve separation between the main modules. Model includes an effects processor with algorithms, view contains everything related to the display and interaction with the user a controller is the intermediary between the two. Thanks to this, you can easily add another module, for example view where interaction with the user and device control will take place via e.g. a terminal. The mentioned modules communicate using events (event-driven), the mechanism of which is based on RTOS queues.
The source code is on mine github , a project created in Eclipse.
Effects
Currently, six popular guitar effects work: tremolo, echo/delay, chorus, reverb, overdrive and cab sim (speaker cabinet simulator). Effects can be added to the processing "chain" in any order from the menu. Audio signal processing is double-buffered and takes place in blocks, where the size of one block is 128 samples. The block size translates directly into the delay between input and output, which is approximately 6ms. Digital audio parameters are 24bit/48kHz.
In the following description of the effects, in a "pathological" way, I will summarize the basics of their operation (and for details, please refer to the literature provided at the end). The included audio samples contain a pure guitar signal at the beginning, and only in the second half the effect is active.
Tremolo
This is probably the simplest effect, which involves modulating the amplitude of the guitar signal using a low-frequency oscillator.
tremol..wav (1.82 MB)You must be logged in to download this attachment.
The main element of this effect is the delay line. As the name suggests, it is used to delay the input signal by a given amount of time, which can be adjusted. To obtain the effect of many repetitions (echo), the signal from its output is fed to the input, previously multiplied by a factor less than 1 so that the repetitions fade out. In addition to multiplication, a low-pass filter can be used here to suppress high repetition rates and obtain an effect similar to analog echo effects based on magnetic tape.
echo.wav (1.85 MB)You must be logged in to download this attachment.
Sound modification controls: - blur: blur repetitions (low-pass filter), range 2 – 8kHz - time: delay time, range 0.05 – 1s - feedback: repetition fading, range 0 – 1 - mode: selection of echo/delay mode
Chorus
It`s just a choir. The main mechanism of this effect is doubling the original sound source, then slightly shifting it in time (and possibly modulating this time) and finally summing it with the original. A delay line is also used here, but its delay time is modulated with a low-frequency oscillator.
chorus.wav (2.09 MB)You must be logged in to download this attachment.
Sound modification controls: - depth: modulation intensity, range 0 – 1 - rate: modulation frequency, range 0.05 – 4Hz - mix: mix of the original with the effect, range 0 – 1 - mode: selection of the effect type
Reverb
This is an effect that simulates the reverberation in a room, hall, etc. The task of the algorithm is to create a fairly large number of "reflections" of the original signal, circulate them, possibly modulate them, sustain them and then dampen them. A good-sounding reverb algorithm is difficult to develop and is usually computationally demanding due to its complexity. Here I used a certain well-known topology by J. Dattorro from the 1990s, simulating an analog plate reverb.
reverb.wav (3.05 MB)You must be logged in to download this attachment.
Sound modification controls: - bandwidth: low-pass filter on the input, range 0 – 24kHz - decay: reverb length, range 0 – 0.999 - damping: reflection suppression (DP filter), range 0 – 24kHz - mode: effect mode without/with modulation
Overdrive
One of the most popular effects in rock and metal music. The main task of the algorithm is to change the shape of the signal in such a way as to "cut" or "flatten" the signal when it exceeds a certain value. In analog effects this is achieved, for example, by using diodes connected in anti-parallel (symmetrical clipping). In digital, however, a non-linear function is usually used, e.g.: y = tanh(kx)/tanh(k) where the argument x is the input signal and y is the output. Using such procedures introduces a number of harmonics into the signal, so it is necessary to remember to reduce the phenomenon of aliasing. Overdrive algorithms use oversampling and decimation for this purpose.
overdri...wav (2.2 MB)You must be logged in to download this attachment.
Sound modification controls: - gain: signal gain, range 1 – 200 - tone: tone change (bass/treble), range 0 – 1 - mix: mix of the original with the effect, range 0 – 1 - mode: selection of soft/hard clipping type
Cab sim
This is a simulation of the sound of a guitar cabinet. It is usually "applied" directly after the overdrive, so that we do not hear the terrible clamor of the distorted signal in the headphones. . It is actually a graphic equalizer without the possibility of adjustment. The algorithm involves convolving the impulse response of a given column with the audio signal. Such a convolution for long impulse responses is computationally expensive, therefore the so-called "fast" convolution using FFT.
cab si..wav (2.28 MB)You must be logged in to download this attachment.
Sound modification controls: - list with impulses of guitar columns
What can be added/improved
I have a list of a few things I plan to add in the future: 1) guitar tuner 2) saving/reading effect settings (presets). 3) designing unique effect panels (currently each panel looks almost the same) 4) Vocoder effect 5) footswitch support for changing effects
What are your suggestions?
Photos
Below are a few photos of the screen (sorry for their quality, but it`s hard for me to take a good photo of this LCD screen :/)
Sources
I found most of the theories about audio effects in the following sources:
1) Udo Zölzer, DAFX: Digital Audio Effects ,Second Edition 2) Will C. Pirkle, Designing Audio Effect Plugins in C++ ,Second Edition 3) J. Dattorro, Effect Design, Parts 1 – 3
and beyond that, all corners of the Internet.
If I forgot to write about something important - ask in the comments.
About Author
Kwarcu wrote 78 posts with
rating 66 , helped 5 times.
Live in city Kraków.
Been with us since 2007 year.
Thanks for the presentations! Only modernity has crept in.
Recently, my friends` kids had an electric guitar connected to a tablet and headphones, they were strumming it and the effect was amazing.
Soon... [Read more]
Kwarcu
13 Dec 2023 13:36
Such things are already happening. A recently created project called "Neural Amp Modeler" (as a DAW plug-in) uses machine learning to model the sounds of amplifiers. Apparently it sounds really good. [Read more]
austin007
13 Dec 2023 18:19
Nice project and definitely a lot of work. Would it work on weaker platforms like STM32F7F4 or does it have to be on STM32F7F7? [Read more]
Kwarcu
13 Dec 2023 18:48
Single effects can be easily achieved on Cortex M4 with FPU. It is important that it has hardware support for float numbers and some decent clock speed, above 100MHz. However, a lot depends on the effect... [Read more]
katakrowa
13 Dec 2023 19:26
Great stuff and congratulations on your determination. A nice piece of programming work.
However, I have a few questions because I got stuck in a very similar topic... and as you can see, it is worth... [Read more]
Kwarcu
13 Dec 2023 20:10
@katakrowa
Thanks for showing interest ;)
As for the questions:
1. Yes, the ADC/DAC is WM8994, the jack sockets on the board are connected to it.
2. I did it on this platform because I simply had it... [Read more]
katakrowa
13 Dec 2023 20:14
I`m blind... it actually has both ADC and DAC.
Sounds easy :-) I will have to approach this topic again.
Thanks for the answers. [Read more]
viayner
14 Dec 2023 06:53
Hello,
bravo for the idea and execution,
I used to play around with dsPIC, delay effects, thermolo modulations, simple filters and overdrive can be calculated quite easily and without FFT, even simpler... [Read more]
katakrowa
14 Dec 2023 09:43
Delay, echo and reverbs, however, require a lot of RAM (a lot for microcontrollers). To make a one-second mono delay, a minimum of 88KiB is needed. [Read more]
pierkwadrat
14 Dec 2023 19:44
If there were also phase and flanger effects, it would be a dream set :) [Read more]
Kwarcu
14 Dec 2023 20:10
Nothing stands in the way, but I`m more interested in the vocoder effect, e.g. the one in the video:
The microphone signal can be fed to the second channel of the line input (or use MEMS microphones... [Read more]
Hello,
It`s actually not that bad:
- the effects of mixing the original signal with the modified one can be achieved more easily and many serious companies do it.
- the signal is sampled with a lower... [Read more]
Kwarcu
15 Dec 2023 11:49
Interesting optimization tips ;)
When it comes to RAM, I had no worries about running out of it because there is an external 8MB SDRAM chip on the board in which I keep large buffers for delay lines... [Read more]
yogi009
17 Dec 2023 00:02
More and more from Lem m wondering about the quality level, is this an acceptable signal on a big stage? [Read more]
Kwarcu
17 Dec 2023 11:35
I think it s enough for home gaming - it`s fun :D [Read more]
Will the firmware run on a cheaper Cortex-M4 board?
Yes—if the M4 includes hardware floating-point and clocks above 100 MHz. Simple effects stay below 10 % CPU in that case, but heavy blocks (reverb, cab-sim) will rise because M4 lacks cache and branch prediction [Elektroda, Kwarcu, post #20859962]
How do I add a new effect module to the code?
Create a C++ class that inherits the IEffect interface in /model.
Register the class in the processor chain factory.
Add a LVGL panel in /view and link controls via the controller events.
Compiling adds the block automatically; MVC separation keeps UI independent [Elektroda, Kwarcu, post #20859439]
What causes aliasing in the overdrive block?
The nonlinear tanh() waveshaper produces high-order harmonics. If you skip oversampling and decimation, those harmonics fold back into the audible band, creating harsh alias noise [Elektroda, Kwarcu, post #20859439]
Can stage musicians rely on the sound quality?
Dynamic range equals the WM8994’s 98 dB spec, and latency stays under 6 ms—both acceptable live. However, algorithms are still “basic topologies” that need fine-tuning before large-venue use [Elektroda, Kwarcu, post #20865148]
How much RAM does a one-second delay line need?
At 48 kHz stereo, 24-bit samples take 288 kB. The board’s 8 MB SDRAM easily covers this plus GUI frame buffers [Elektroda, Kwarcu, post #20862199]
Can I load impulse responses from microSD instead of compiling them?
Yes. LVGL allows JPEG or raw data from SD-card; simply mount FATFS and point the cab-sim loader to the file path rather than the .c array [Elektroda, Kwarcu, post #20860088]
What happens if I shrink the audio block to 64 samples?
Latency drops to ≈3 ms, but CPU rises roughly 2× because ISR and cache thrash doubles. Frame-rate of the GUI may also stutter on heavy chains [Elektroda, Kwarcu, post #20860088]
Which CMSIS-DSP setup macros are required?
Define ARM_MATH_CM7 (or _CM4) before including arm_math.h, then link the compiled libarm_cortexM*.a. No extra config was needed [Elektroda, Kwarcu, post #20860088]
Is FFT mandatory for phaser or vocoder effects?
A classic phaser can use cascaded all-pass filters—no FFT needed. Vocoders do need either multiple band-pass filters or frame-based FFT to extract envelopes and apply formants [Elektroda, viayner, post #20861994]
Edge case: what fails if external SDRAM is absent?
Large delay and convolution buffers fall back to on-chip 320 kB SRAM. Long echoes will clip to <120 ms, and cab-sim IRs >512 taps will not load, producing flat, thin tone.
Are AI-based amp models compatible with this board?
Projects like Neural Amp Modeler run as floating-point inference. In theory, small CNNs fit on the F7, but real-time 48 kHz throughput would exceed its 216 MHz budget without a DSP accelerator [Elektroda, Kwarcu, post #20859489]
How do I avoid audible zipper noise when changing parameters?
Use parameter-smoothing: run a first-order IIR or simple linear ramp over 1–5 ms whenever a knob value changes. This hides stepping artifacts, especially in amplitude-modulated blocks.
What’s the cost to replicate the hardware platform?
The STM32F746G-DISCO board retails for about US-$60–70 (Dec 2023) on major distributors, codec and LCD included “ST online store”.
Expert tip for beginners?
“Start with tremolo; it’s one multiply per sample and gives instant audible feedback,” notes audio-DSP engineer Will Pirkle [Pirkle, 2022].
Comments
Thanks for the presentations! Only modernity has crept in. Recently, my friends` kids had an electric guitar connected to a tablet and headphones, they were strumming it and the effect was amazing. Soon... [Read more]
Such things are already happening. A recently created project called "Neural Amp Modeler" (as a DAW plug-in) uses machine learning to model the sounds of amplifiers. Apparently it sounds really good. [Read more]
Nice project and definitely a lot of work. Would it work on weaker platforms like STM32F7F4 or does it have to be on STM32F7F7? [Read more]
Single effects can be easily achieved on Cortex M4 with FPU. It is important that it has hardware support for float numbers and some decent clock speed, above 100MHz. However, a lot depends on the effect... [Read more]
Great stuff and congratulations on your determination. A nice piece of programming work. However, I have a few questions because I got stuck in a very similar topic... and as you can see, it is worth... [Read more]
@katakrowa Thanks for showing interest ;) As for the questions: 1. Yes, the ADC/DAC is WM8994, the jack sockets on the board are connected to it. 2. I did it on this platform because I simply had it... [Read more]
I`m blind... it actually has both ADC and DAC. Sounds easy :-) I will have to approach this topic again. Thanks for the answers. [Read more]
Hello, bravo for the idea and execution, I used to play around with dsPIC, delay effects, thermolo modulations, simple filters and overdrive can be calculated quite easily and without FFT, even simpler... [Read more]
Delay, echo and reverbs, however, require a lot of RAM (a lot for microcontrollers). To make a one-second mono delay, a minimum of 88KiB is needed. [Read more]
If there were also phase and flanger effects, it would be a dream set :) [Read more]
Nothing stands in the way, but I`m more interested in the vocoder effect, e.g. the one in the video: The microphone signal can be fed to the second channel of the line input (or use MEMS microphones... [Read more]
Unfortunately, I can`t :( [Read more]
Hello, It`s actually not that bad: - the effects of mixing the original signal with the modified one can be achieved more easily and many serious companies do it. - the signal is sampled with a lower... [Read more]
Interesting optimization tips ;) When it comes to RAM, I had no worries about running out of it because there is an external 8MB SDRAM chip on the board in which I keep large buffers for delay lines... [Read more]
More and more from Lem m wondering about the quality level, is this an acceptable signal on a big stage? [Read more]
I think it s enough for home gaming - it`s fun :D [Read more]