How to capture envelope from one track and apply to another

Dear Steve,

This post was very helpful. I wanted to do the same thing, copy envelope from one track to another and this code worked 9/10 for my needs. The only knock is that it moved the envelope as opposed to copying it. With some creative copy/undo/paste, it was a mere speedbump.

I signed up for an account simply to say “Thanks for posting this”.

Can anyone please help me?

For many years I’ve used an ‘envelope follower’ script which worked perfectly.

The script no longer works when I updated Audacity, so I’ve used the one in this thread (above), but this doesn’t work, as you can see:

Obviously, I want it to look more like this…

(Note: this envelope is just an extreme example to clearly demonstrate the problem. If I wanted this kind of simple ‘on/off’ effect I would just use Duck.)

time-resolution is to blame.png
Try a shorter “time resolution”, say 10ms.
(also check envelope-follower is on “Peak”, not “RMS”).

Ah, thank you, that worked!

I changed line 2 from:
;control res “Time resolution” float “seconds” 0.1 0.01 10
to
;control res “Time resolution” float “seconds” 0.01 0.01 10