Custom Amplify-2-db plug-in

I hate to bother you folks (I feel like a freeloader) but some time ago a kind soul on here cooked up this great custom Cut-10-db plug-in for me that I tied to a hot key, saving me countless hours during editing as I use it for breath suppression (attached). Now that I’ve gotten both spoiled and more demanding of myself, is there any way someone could modify this to give me an Amplify-2-db plug-in? It would come in handy when I have to manually adjust levels (and tied to a hot key I could just hit it several times and watch the signal grow until I get the signal where I want it.) I tried to crack the attached file open using a text editor, hoping the modification would be obvious and simple, but no luck.

Thanks in advance.

cut-10-db.ny (395 Bytes)

Ooh, that “kind soul” appears to have been me :wink:

Let’s see now. Open the file in a plain text editor (such as NotePad) and it looks like this:

;nyquist plug-in
;version 3
;type process
;name "Cut 10 dB"
;action "Amplifying -10 dB..."
;author "Steve Daulton"
;copyright "Released under terms of the GNU General Public License version 2"

;; cut-10-db.ny
;; by Steve Daulton Jan 2015
;; Released under terms of the GNU General Public License version 2:
;; .

(mult s (db-to-linear -10))

The lines that start with semicolons are ignored by Nyquist, which gives us just one line of Nyquist code:

(mult s (db-to-linear -10))

“S” represents the Sound from the selection.
MULT means “multiplying”, which for a sound is the same as “amplifying”.
(DB-TO-LINEAR -10) converts “-10” from dB to a linear amount. You can change that to whatever you want. So, for example, to amplify by +3dB you would change that line to:
(mult s (db-to-linear 3))

Have a go at doing that yourself.

Oh yes, and there’s a couple of lines near the top:

;name "Cut 10 dB"
;action "Amplifying -10 dB..."

These are ignored by Nyquist, but they tell Audacity that the name of the plug-in is “Cut 10 dB”, and if you are processing a long enough selection, the progress bar will show “Amplifying -10 dB…”
You will probably want to update those lines too.

Apart from all that, you should try Steve’s recent amplify plug-in with in- and out-fades as it prevents from having nasty clicks at the beginning and end.

You can find it here:

Many thanks, Steve. You guys are the best. I also appreciate you showing me how to do it myself. The more I learn, the less I have to pester you all for help. :slight_smile: