AnsweredAssumed Answered

ADSR/alternative envelope generation using counters?

Question asked by iampoor on Jan 16, 2017
Latest reply on Jan 17, 2017 by mmmike



I have been trying to build some sound synthesizers, and believe that the sigma studio platform is a good place to start. :-)


I have played around with the envelope generator block, but find it fairly limited for my application. I would like to have ADSR coefficients with a maximum value of ~5 seconds per period (A, D, S, and R) and need to be able to update them in real time. I was initially thinking about generating these in the microcontroller that I am using for control, but I believe that the DSP would be better suited as I would like to generate 16 envelopes simultaneously. 


Of course, I have been trying to figure out how to implement ADSR envelopes in Sigma studio. My initial ideas have not been very good. :-) 


Synthesizer - Wikipedia Here is a link to what a typical ADSR envelope shape looks like. 


Initially, I tried to break down the problem into just the attack and release phases. I was thinking of using a counter that would increment every X number of clock cycles. Every increment of this counter would increment another counter by 1 until it reaches 255 (an 8 bit counter). This value would then control a multiplier. 


Of course, scaling this into an envelope with D and S phases will be somewhat harder.


Has anyone tried this? Or have any ideas on how to implement this? I have read the only other post I could find on the forum about it, using a low pass filter, but that seems to be fairly limited as well. I figure that counters are very cheap resource wise, just not sure if the logic elements in Sigma Studio can accomplish this.


I will also update this thread as I make progress, as of now, I am just a newbie trying to think out the problem before jumping in head first.