Envelope
Last updated
Last updated
This all started with a discussion over at diystompboxes.com. The goal was to make an "auto-swell" which led to investigation of the Envelope block(s). This is a bit of a neglected block in my book. I've used the first Envelope block for controlling LFO speed and things where a more overall level effect is in order. But it's not good at those "plucky" sort of sounds. Not only that, but the sliders are nonintuitive, so I'm showing you what they do here.
This shows the envelope block in a test patch arrangement with the input and two-slope output going to the output pins. This lets me simulate the patch and watch what the signals do on the "scope".
The scope has a number of bugs at the moment:
It doesn't really trigger
The scale and time base settings aren't saved between passes
There's no vertical offset or "AC" coupling mode to be able to zoom in on small signals that are not near zero.
WARNING-TURN YOUR SPEAKERS DOWN OR OFF FOR THIS TEST!
That said, I can still use it. My test WAV file is a short tone burst of 220 Hz at -12 dB.
I enable the scope view.
Then I set the simulator Source File to the tone burst:
Since I know something about how this block works, I set the attack frequency high (which means a fast attack) and the decay somewhat medium. As my test WAV file is normalized to -12 dB, adding another 12 dB of gain will supposedly give me 0 - 1 control voltage range after rectification.
Now I start the simulator:
and turn the Pot 0 slider all the way up:
Here's what I see in the "scope" after tweaking the settings:
I believe that the circled glitches are artifacts of the way the scope works (it occasionally drops some of the audio data).
Now let me make the attack long and the decay shorter.
Notice hardly anything happens at all! This is because we've made the attack long enough that it doesn't rise all the way up during the length of the tone burst. Notice also that the decay doesn't seem very short. In fact the decay is longer than the attack because the two filters are in series! That is probably a stupid design decision but it's just the way it works today.
So this means that really, the most useful settings here are going to be fairly fast attack and decay to taste.
I'm pretty sure I can easily improve this by putting the two filters in parallel, but with the peak detector in there, it will always pick the fastest one when the level is rising and the slowest one when the level is falling.
Note that I didn't include any discussion of the single slope output as it just uses the attack filter so will have identical rise and fall times.
I'd like to add control inputs for the attack and delay times. This makes the filters more complicated since as far as I know this prevents you from using the fancy RDFX instructions.