Expandmenu Shrunk


STM32F4 Envelope Generator & LFO

After writing the common programs for LED blinking, fading etc,
i started porting my Envelope Generator to my new developing platform.

STM32 DISCO
STM32F Discovery Board with MIDI interface

I used the two built in 12bit DACs to generate the CVs. The update rate is 1ms.

 

This is dual ADSR configuration
This is dual ADSR configuration

This envelope is triggerd by one Gate signal and the attack Rate is controlled by the NoteOn velocity.

 

ADSR and sine LFO
ADSR and sine LFO
ADSR and tri LFO
ADSR and tri LFO

The LFOs are DDS based implementations with 12Bit resolution and a tablesize of 256 elements.

 

Process Time with no optimization O0
Process Time with no optimization O0

Generating the two EGs lasts 2µs with no compiler optimizations -O0

Process Time with no optimization O3
Process Time with no optimization O3

With full optimization -O3 it’s only 1 µs

 

Share Button