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

**URL:** <https://qa.fmod.com/t/how-to-get-set-volume-of-event-through-studio-js-script/19805>\
**Category:** FMOD Studio\
**Tags:** javascript\
**Created:** [January 29, 2023, 11:46pm UTC](https://qa.fmod.com/t/how-to-get-set-volume-of-event-through-studio-js-script/19805 "2023-01-29T23:46:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![EdenJeffrey](https://avatars.discourse-cdn.com/v4/letter/e/73ab20/32.png) [@EdenJeffrey](https://qa.fmod.com/u/EdenJeffrey)\
**Post date:** [January 29, 2023, 11:46pm UTC](https://qa.fmod.com/t/how-to-get-set-volume-of-event-through-studio-js-script/19805/1 "2023-01-29T23:46:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [January 31, 2023, 12:46am UTC](https://qa.fmod.com/t/how-to-get-set-volume-of-event-through-studio-js-script/19805/2 "2023-01-31T00:46:12Z")

</div>

Hi,

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

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

```

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

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

```

Hope this helps!

---

<div class="post-metadata">

**Author:** ![EdenJeffrey](https://avatars.discourse-cdn.com/v4/letter/e/73ab20/32.png) [@EdenJeffrey](https://qa.fmod.com/u/EdenJeffrey)\
**Post date:** [January 31, 2023, 10:42pm UTC](https://qa.fmod.com/t/how-to-get-set-volume-of-event-through-studio-js-script/19805/3 "2023-01-31T22:42:51Z")

</div>

Thankyou!

---

<div class="post-metadata">

**Author:** ![EdenJeffrey](https://avatars.discourse-cdn.com/v4/letter/e/73ab20/32.png) [@EdenJeffrey](https://qa.fmod.com/u/EdenJeffrey)\
**Post date:** [January 31, 2023, 11:13pm UTC](https://qa.fmod.com/t/how-to-get-set-volume-of-event-through-studio-js-script/19805/4 "2023-01-31T23:13:24Z")

</div>

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

> **[FMOD Studio Script: Normalize All Events - Pastebin.com](https://pastebin.com/bY9rd5T9)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [February 1, 2023, 12:36am UTC](https://qa.fmod.com/t/how-to-get-set-volume-of-event-through-studio-js-script/19805/5 "2023-02-01T00:36:55Z")

</div>

Thank you for sharing!
