dual amplify

I am looking for amplify that lets me adjust the volume for both left and right channels either by db or percent.
has to have separate volume controls for each track that can be locked or unlocked to adjust one or the other.
if anyone has or knows or can write one please give me a shout
thanks

;version 4
(setf left-gain 0.5)   ;Amplification amount for left channel
(setf right-gain 0.8)  ;Amplification amount for right channel
(vector
  (mult (aref *track* 0) left-gain)
  (mult (aref *track* 1) right-gain))

thanks steve it works but not quite what i want here is a screenshot of what i am looking for
Selection_001.png

If you [u]Split Stereo Track[/u] you can edit the channels independently. Then you can use the Amplify effect (or other effects) on one channel at a time.

thanks i used to have a p;ug-in like what i want but can’t find it no idea where i got it from

This forum board is for help with Nyquist. I assumed that you wanted to make a plug-in, so I posted the core code that you would need. Did I assume incorrectly?

If you just want to amplify the left / right channels independently using existing tools, then see the previous post (by DVDdoug).

If you want to make your own plug-in, you just need to add appropriate headers to the code that I posted to turn it into a plug-in.

i do have this

;nyquist plug-in

;version 1

;type process

;name "Amplify left or right channel..."

;action "Amplifying one channel..."

;info "Amplify left or right channel by David R. Sky"



;control channel "Channel" int "0=left 1=right" 0 0 1
;control amp "Amplification" real "db" 0.0 -24.0 24.0

;; Amplify lef or right channel by David R. Sky, October 18, 2004
;; This plug-in was written specifically to help people who use
;; a screen reader, and people who prefer to use the keyboard
;; over a mouse.

;; 
;; Select audio in Audacity, select left or right channel and
;; amout to amplify that track (in decibels).



(if (= channel 0)



(vector 

(mult (aref s 0) (db-to-linear amp))

(aref s 1))



(vector 

(aref s 0) 

(mult (aref s 1) (db-to-linear amp))))

i tryed to add headers etc but failed like a first grader new at just need to learn much more

this is what i tryed

;nyquist plug-in
;version 4
;type process
;name "Amplify tracks..."
;action "Amplifying tracks..."
;info "Amplify by percent


;control channel "Channel" int "0=left" 0 0 0
;control channel "Channel" int "1=right" 0 0 1

(setf left-gain 0.6)   ;Amplification amount for left channel
(setf right-gain 0.6)  ;Amplification amount for right channel
(vector
  (mult (aref *track* 0) left-gain)
  (mult (aref *track* 1) right-gain))

it error out

i must be doing something when sending a reply with code thought you hit code then under it add code or what do i need to do

i must be doing something when sending a reply with code thought you hit code then under it add code or what do i need to do

ok guess it went thru lots of times i get the 503 error when replying or posting

To use “code” tags:

  1. Click the “</>” button. That will add:
  2. Paste your code between the two code tags, like this:
    ** Code goes here... **

Pretty close for a first attempt :slight_smile:

The “;action” and “;info” headers are no longer used, so they can be left out.

I’d suggest replacing these two lines:

(setf left-gain 0.5)
(setf right-gain 0.8)

with controls:

;control left-gain "Left gain" float "" 1 0 2
;control right-gain "Right gain" float "" 1 0 2

Then you just need the processing part:

(vector
  (mult (aref *track* 0) left-gain)
  (mult (aref *track* 1) right-gain))

amplify.png

ok getting farther still is not adjusting volume just does a nyquist returned the value 0.8000000

;nyquist plug-in
;version 1
;type process
;name "Amplify both channels..."

(setf left-gain 0.5)
(setf right-gain 0.5)

;control left-gain "Left gain" float "" 1 0 2
;control right-gain "Right gain" float "" 1 0 2
;;control left-gain "Left gain" int "" 1 0 2
;;control right-gain "Right gain" int "" 1 0 2

(vector
  (mult (aref *TRACK* 0) left-gain)
  (mult (aref *TRACK* 1) right-gain))

after running get this

error: unbound variable - TRACK
if continued: try evaluating symbol again
1>

;version 1 is for ancient versions of Audacity.
For current versions of Audacity, plug-ins should be set to ;version 4.

Also, you don’t need the lines:

(setf left-gain 0.5)
(setf right-gain 0.5)

because left-gain and right-gain are set by the controls:

;control left-gain "Left gain" float "" 1 0 2
;control right-gain "Right gain" float "" 1 0 2

ok that did the trick thanks for all the help working like i wanted

I have tis plug-ing for you:

 ;nyquist plug-in
;version 4
;type process
;name "Amplify channels by percent"
;action "Amplifying channels..."
;info "Amplify channels independently by percent


;control left-gain "Left channel amplification" int "Percent" 100 0 100
;control right-gain "right channel amplification" int "Percent" 100 0 100

(setf left-gain (/ left-gain 100.0))   ;Amplification amount for left channel
(setf right-gain (/ right-gain 100.0))  ;Amplification amount for right channel
(vector
  (mult (aref *track* 0) left-gain)
  (mult (aref *track* 1) right-gain))