Skip to main content
BrianDavison
Known Participant
October 5, 2018
Answered

Adjust audio levels of a clip with ExtendScript

  • October 5, 2018
  • 2 replies
  • 3936 views

Hey folks, I'm just starting out trying to learn some scripting and so I'm not entirely sure what's even possible yet, but one thing I'm trying to figure out is if it's possible to select multiple clips in a bin, then run a script and set all of their audio levels to a pre-defined value. Browsing around, I can't really find any attributes related to this, but like I said, I'm just starting to learn.

Thanks! 

This topic has been closed for replies.
Correct answer Bruce Bullis

Project items (things in bins) have only their intrinsic audio levels, which aren't modifiable.

Are you hoping instead to adjust/control the volume of clips in sequences?

2 replies

Legend
October 9, 2018

Not sure you really need to script this! Select clips, hit ‘G’, Set gain to -16dB. Job done.

BrianDavison
Known Participant
October 9, 2018

I tried that for a while Trevor, but found myself annoyed at having the waveform of the track crunched down. And also, while my music generally is somewhere around -16dB, sometimes I'll have it up at -6dB, so I'd like to preserve the ability to do that.

I concede, I'm probably more finicky than most. I ended up getting a keyboard macro program and set it up to do the 5 or so commands necessary to lower the level of a clip in the clip mixer.

Bruce Bullis
Bruce BullisCorrect answer
Legend
October 8, 2018

Project items (things in bins) have only their intrinsic audio levels, which aren't modifiable.

Are you hoping instead to adjust/control the volume of clips in sequences?

BrianDavison
Known Participant
October 8, 2018

Thanks for the help bob,

Really, I was hoping to be able to batch effect the clip level of a bunch of music cues that are sitting in a bin. In essence, as if I had opened them in the source, gone to the audio clip mixer, and dialed it down to -16dB.

I often import scores of cues at the same time, and when I'm clicking through picking a music cue, I either have to turn down the volume of my speakers, or individually go through the process of opening, switching the clip mixer, and dialing down for every one. Since there's no built in functionality to do that en masse (that I know of), I was hoping I could script it, but alas I may be searching in a dry well.

Bruce Bullis
Legend
October 9, 2018

Are all cues from a given source of a similar volume level, higher than you'd like?

Based on your description [above], if the cues have similar volume levels, it would seem that adjusting your system's output (speaker) volume would be more efficient than programmatically re-interpreting the volume of each cue.


Option 1, the "Using a bandsaw to slice bread" ExtendScript approach:

  • Import all the cues into the project
  • Create new sequences with correct audio settings (based on a sequence preset of your creation)
  • Insert each cue into a new sequence
  • Modify the volume of the newly-created clip in that sequence
  • Set sequence in/out points to match cue's in/out points
  • Render the sequence to an output preset of your choosing
  • Import the resultant media into the project

After all that, you'd end up with cues at a new "correct" volume...and half the available hard drive space you previously had.

Option 2, the "Gordian Knot" approach:

  • Turn down your system's output volume.


PS: Funny, people usually mistake me for a 'Bill'...