Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
greg79
Level 4
Level 4
25 replies posted 25 sign-ins 10 replies posted

I wonder how one would implement an envelope generator for a synthesizer with UDB or LUT? An envelope generator is a finite state machine so it makes sense implementing one with UDB. 

greg79_0-1629113106225.jpeg

What I'm interested is if it even makes sense to implement hardware envelope instead of software one? I'm concerned multiple envelope generators  would take up too much memory, CPU time or hog DMA channels. Thank you for the help in advance!

0 Likes
1 Solution
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

greg79,

CPU is more flexible compared to hardware when it comes to generating sound. This is because of relatively slow output rate needed for tone generation (40-200kHz). It is convenient to store ADSR profile in memory array, rather than calculating it each time. Usually the ADSR profile is much slower than waveform period, so small inaccuracies do not matter. For better accuracy and smaller RAM space, two arrays can be utilized to store the AD (fast) and SR (slow) portions of the envelope. 

      Another issue using UDB is that each voice requires its own ADSR generator, so you will run out of hardware rather quickly.

      You can find a polyphonic piano basic demo project, using simple interrupt technique here:

Polyphonic piano basic demo using KIT-059 and MIDI Keyboard

/odissey1

View solution in original post

0 Likes
2 Replies
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

greg79,

CPU is more flexible compared to hardware when it comes to generating sound. This is because of relatively slow output rate needed for tone generation (40-200kHz). It is convenient to store ADSR profile in memory array, rather than calculating it each time. Usually the ADSR profile is much slower than waveform period, so small inaccuracies do not matter. For better accuracy and smaller RAM space, two arrays can be utilized to store the AD (fast) and SR (slow) portions of the envelope. 

      Another issue using UDB is that each voice requires its own ADSR generator, so you will run out of hardware rather quickly.

      You can find a polyphonic piano basic demo project, using simple interrupt technique here:

Polyphonic piano basic demo using KIT-059 and MIDI Keyboard

/odissey1

0 Likes
greg79
Level 4
Level 4
25 replies posted 25 sign-ins 10 replies posted

The idea is to drive an analog synth chip, AS3944. I believe you have had a project based on the same voice IC.  I think I will just  generate envelopes using tables in the memory, instead of calculating them sample-by-sample. Thanks for the brilliant and informative reply, I accepted it is a solution. 

0 Likes