How to get / set volume of event through studio .js script?

The title says it all. The reason being, I’m trying to make a simple automation script to Normalize all the event volumes in a project.

Hi,

There are a couple of ways you can do this. To change to volume of an events master track you use:

var event = studio.window.browserCurrent();
event.masterTrack.mixerGroup.volume = X;

Or you can change the volume of each audio track using:

var event = studio.window.browserCurrent();
var audioTrack = event.groupTracks[X];
audioTrack.mixerGroup.volume = X;

Hope this helps!

2 Likes

Thankyou!

1 Like

For any future googlers that may also want to do this.

1 Like

Thank you for sharing!

2 Likes