How to dynamically mod volume of one track to match another?

Using Nyquist scripts in Audacity.
Post and download new plug-ins.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Raiten
Posts: 9
Joined: Mon Oct 19, 2009 11:20 pm
Operating System: Please select

How to dynamically mod volume of one track to match another?

Post by Raiten » Mon Oct 19, 2009 11:27 pm

Hello,

I am trying to dynamically modulate the volume of one track to match the volume of another. So when the reference track is loud, the volume of the second track will be loud. When the reference track is low, the volume of the second track will be low. In areas of silence on the reference track, the second track will be silent.

Is there a plug-in for doing something like this?

Thank you,
Matt

Trebor
Posts: 9954
Joined: Sat Dec 27, 2008 5:22 pm
Operating System: Windows 8 or 8.1

Re: How to dynamically mod volume of one track to match anot

Post by Trebor » Tue Oct 20, 2009 7:10 am

http://en.wikipedia.org/wiki/Envelope_detector#Audio

Apply this full wave rectifier plugin applied to the control track ... http://www.shellworld.net/~davidsky/rectimod.zip

Then apply a low pass filter to the rectified track to smooth out the ripples.

Those two processes will create the envelope track.

Raiten
Posts: 9
Joined: Mon Oct 19, 2009 11:20 pm
Operating System: Please select

Re: How to dynamically mod volume of one track to match anot

Post by Raiten » Tue Oct 20, 2009 2:24 pm

Fabulous! Thank you very much.

Matt

Trebor
Posts: 9954
Joined: Sat Dec 27, 2008 5:22 pm
Operating System: Windows 8 or 8.1

Re: How to dynamically mod volume of one track to match anot

Post by Trebor » Tue Oct 20, 2009 8:34 pm

You'll still have to multiply your audio with the envelope track using something like this Nyquist code ...

Code: Select all

    (sim (mult (aref s 1) -0.5)
       (mult (sum 0.5 (scale 0.5 (aref s 0)))(aref s 1)))
http://forum.audacityteam.org/viewtopic ... 121#p37075

(I think :? )

steve
Site Admin
Posts: 81627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: How to dynamically mod volume of one track to match anot

Post by steve » Tue Oct 20, 2009 9:59 pm

Trebor wrote:http://en.wikipedia.org/wiki/Envelope_detector#Audio

Apply this full wave rectifier plugin applied to the control track ... http://www.shellworld.net/~davidsky/rectimod.zip

Then apply a low pass filter to the rectified track to smooth out the ripples.

Those two processes will create the envelope track.
Probably better to use "follow"
http://www.audacity-forum.de/download/e ... l#index189
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Trebor
Posts: 9954
Joined: Sat Dec 27, 2008 5:22 pm
Operating System: Windows 8 or 8.1

Re: How to dynamically mod volume of one track to match anot

Post by Trebor » Wed Oct 21, 2009 3:19 pm

My method does work ...
"Follow" is a more elegant solution though, (I wasn't aware of its existence).

[BTW I bet no-one can correctly "name that tune" :) ].
Last edited by Trebor on Wed Oct 21, 2009 3:29 pm, edited 3 times in total.

Raiten
Posts: 9
Joined: Mon Oct 19, 2009 11:20 pm
Operating System: Please select

Re: How to dynamically mod volume of one track to match anot

Post by Raiten » Wed Oct 21, 2009 3:23 pm

Thanks for both the solutions.

Matt

Raiten
Posts: 9
Joined: Mon Oct 19, 2009 11:20 pm
Operating System: Please select

Re: How to dynamically mod volume of one track to match anot

Post by Raiten » Tue Apr 13, 2010 4:42 am

So I finally got the tracks recorded that I wanted to use this function with and I can't figure out how to use this command. So I figure I highlight two tracks, select Nyquist Prompt, then I am not sure about what to enter for the variables.

Any suggestions for this application?

Thanks,
Matt

steve
Site Admin
Posts: 81627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: How to dynamically mod volume of one track to match anot

Post by steve » Tue Apr 13, 2010 4:59 am

Trebor's code works on one stereo track with the "control" track as one channel and the "tune" (to be modulated) as the other channel.

The exact steps to do this depend on which version of Audacity you are using (it's easier if you are using Audacity 1.3.12 than with 1.2.6, so if you're still on the (very) old 1.2.6, this could be a good opportunity to upgrade.)

Also, do you have your tracks as mono or stereo files? Have you exported them as WAV files? Do you need your final result to be in stereo, or is mono OK?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Raiten
Posts: 9
Joined: Mon Oct 19, 2009 11:20 pm
Operating System: Please select

Re: How to dynamically mod volume of one track to match anot

Post by Raiten » Tue Apr 13, 2010 5:20 am

Hi Steve,

I am using 1.3.12, had a few crashes with this project so far but I am saving after every command so its okay.

I wanted to use your suggestion to use the "follow" command and it was my understanding that this is a function of the Nyquist Prompt.

The "tune" track is a stereo .wav file and the "control" track is a stereo .wav file. My goal is to produce the final resulting track in stereo. What I am creating will not work if the stereo aspect of the "tune" track is not preserved.

Thank you for your help.

Matt

Post Reply