Page 1 of 1
Envelope Detector Example
Posted: Mon Dec 28, 2009 7:53 am
by Sweetalk
There is any example code for an envelope detector?. I want to do an envelope filter and other effects using the picking strenght but I don't know where to start.
Happy Holidays!
Posted: Mon Dec 28, 2009 10:37 am
by frank
Basically, an envelope detector is just a low pass filter. I don't have code at hand but basically low pass the signal with a filter that has it's corner at a really low frequency because the volume will change much slower than the frequencies the source signal contains. The resulting output from the low pass is the control signal to the other filter/effect.
Posted: Tue Dec 29, 2009 9:27 pm
by livingston
I'm finding that something like
absa
rdfx
wrlx
is a good start, though plenty of tweaking is needed depending on the intended app and the particulars of the instrument you're playing into it. The lowpass frequency (rdfx coefficient) determines the speed of the response.
This is exactly equivalent to the analog technique of full wave rectifying then filtering to get the envelope; when I left off the absa (=rectification) it gave me a very ripply filter sound like the "Dirty Bird" pedal:
http://moosapotamus.net/THINGS/dirtybird.htm
Posted: Wed Dec 30, 2009 10:23 am
by frank
Ah yeah, forgot to mention to rectify it. Good catch livingston.