How Busy Will the Microcontroller Be for Generating Envelopes?

In the previous article, I described how to calculate envelope curves and how to determine the calculation parameters. This article is about calculation speed. I implemented the ADSR calculation and found that it's desirable to update envelope values as fast as every 125 microseconds (8 kHz). The STM32C092KCT controller has clock frequency 48 MHz at the highest. Each update interval has 6,000 clock cycles. I wonder the number of cycles are enough to run the envelope generator. I'm sure they are enough to calculate the values, but the controller has more jobs than that in order to run as a module: Send data to DAC, there will be two channels…

My Next Envelope Generator

I started prototyping my next envelope generator in parallel with the slow-moving VCA unit development. Unlike my previous envelope generators, this one will make envelopes by calculation instead of using an analog circuit. I'll use microcontroller STM32C092KCT as usual that has a built-in CAN controller. I expect several advantages with making an envelope generator using a microcontroller: Gate signals can be retrieved from the CAN bus; patching cables are not necessary for receiving gate signals Easy to support velocity Any curves are possible as long as the calculations catch up; it's possible to do more than ADSR You can save and load parameters I first implemented fundamental code for the…