Hello, I’m trying to develop an Auto-Wah effect for a university course. I’ve done some research about the auto-wah and the way to implement it, but I’m completely stuck to the first step, i.e. the envelope follower. I gave a look to different auto-wah projects on github, and none of them was clear to me. I understand that it tracks the amplitude of the signal, and it’s used by the autowah to modulate the center frequency of the Band-Pass filter. I also understand that it needs attack and release values to control the EF. By looking at other projects, I’ve found that these values are usually initialized in this way (which I do not understand):
a = pow( 0.01, 1.0 / ( attackMs * sampleRate * 0.001 ) );
r = pow( 0.01, 1.0 / ( releaseMs * sampleRate * 0.001 ) );
then for each sample in the buffer, the algorithm is usually something like this:
double v=fabs(sample);
if( v>envelope )
envelope = a * ( envelope - v ) + v;
else
envelope = r * ( envelope - v ) + v;
Can you help to understand how to design a proper envelop filter? Thank you!