Basic question: smooth envelope follower

Peter Ostry's icon

I have an incoming audio signal like a voice or an instrument and want to let it control external effects, finally by sending out MIDI from Max. But I don't only need the signal strength, I want to smoothen the signal and apply compression, expansion, delay and so on. The result should look as if you would follow a singing voice with a fader.

I think what I try to explain is called a controllable envelope follower. But not for single waves, rather for longer periods of an audio signal, let's say up to one second.

Currently I am struggling with the very first step, smoothing the signal. I tried [average~], [degrade~], [sah~] and [adsr~] in several combinations but all of them were still to sensitive. Maybe a compressor could do the trick. Using the output of the levelmeter would also be an option but attack/release is not enough control.

I hope this explanation was clear. So far I've learned yet I should first tame the signal, then convert to numbers and process the rest afterwards. Although, I do not like mathematical orgies. Is there another approach to extract data from an audio signal in a less sensitive way?

goodparleyandorfing's icon

Have you looked at [rampsmooth~] and [slide~]?

pid's icon

if you are on Max 5.1 or above, you should take a look at:

Max5 > patches > m4l-patches > Tools resources > M4L.envfol~.maxpat

great starter example.

Peter Ostry's icon

@goodparleyandorfing
I tried [slide~] but it got re-triggered without getting the chance to slide. Maybe I was doing something wrong.

@ pid
Thanks very much for pointing me to M4L.envfol~.maxpat
This is what I basically need, there is a lot to explore and I can continue with that.

Jean-Francois Charles's icon

Or maybe what you really want to do is to study the MSP Compression tutorials - a lot to learn from them.

Anthony Palomba's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Here is the patch that I use for envelope following...

Steven Miller's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Here's my envelope follower abstraction:

hzd's icon

Thx Steven. Beautiful :)