# How to add EffectPreset to event's master track

**URL:** https://qa.fmod.com/t/how-to-add-effectpreset-to-events-master-track/21391
**Category:** FMOD Studio
**Tags:** javascript
**Created:** [March 21, 2024, 11:39am UTC](https://qa.fmod.com/t/how-to-add-effectpreset-to-events-master-track/21391 "2024-03-21T11:39:38Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![katharinab15](https://avatars.discourse-cdn.com/v4/letter/k/dfb087/32.png) [@katharinab15](https://qa.fmod.com/u/katharinab15)
#### Post date: [March 21, 2024, 11:39am UTC](https://qa.fmod.com/t/how-to-add-effectpreset-to-events-master-track/21391/1 "2024-03-21T11:39:38Z")

</div>

Hello,

I am trying to add an EffectPreset to the master track of an event. So far I managed to add a default spatialiser effect by using

`event.masterTrack.mixerGroup.effectChain.addEffect('SpatialiserEffect');`

The API documentation for [MixerBusEffectChain.addEffect(effectDefinition)](https://www.fmod.com/docs/2.00/studio/scripting-api-reference-project.html#mixerbuseffectchainaddeffecteffectdefinition) states that “The `effectDefinition` argument can either be an `EffectPreset`, a `MixerEffect` that is a preset […]”.

Now, I know the MixerBusEffectChain and my master track effect chain are two different things, but I was wondering if it works the same? If so, what would be the best way to do it and if not, is there a workaround?

---

<div class="post-metadata">

### Author: ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)
#### Post date: [March 27, 2024, 4:50am UTC](https://qa.fmod.com/t/how-to-add-effectpreset-to-events-master-track/21391/2 "2024-03-27T04:50:29Z")

</div>

> [@katharinab15](#):
>
> Now, I know the MixerBusEffectChain and my master track effect chain are two different things, but I was wondering if it works the same?

Under the hood, your master track’s effect chain is an object of type `MixerBusEffectChain` - you can observe this by doing `event.masterTrack.mixerGroup.effectChain.dump()` and observing the type at the top of the dump.

In the case of adding an `EffectPreset` to `effectChain`, you need to have a reference to the specific `EffectPreset` you want to add to the chain. The easiest way to demonstrate this is to open the Preset Browser, select a preset effect from the “Effects” tab, and run `var effectPreset = studio.window.browserCurrent()` in the console to store a reference. You can then run `event.masterTrack.mixerGroup.effectChain.addEffect(effectPreset);`, which will add the preset effect you selected to the event’s master track.

---

<div class="post-metadata">

### Author: ![katharinab15](https://avatars.discourse-cdn.com/v4/letter/k/dfb087/32.png) [@katharinab15](https://qa.fmod.com/u/katharinab15)
#### Post date: [April 11, 2024, 6:27pm UTC](https://qa.fmod.com/t/how-to-add-effectpreset-to-events-master-track/21391/3 "2024-04-11T18:27:26Z")

</div>

Hey Leah,

thanks so much, that works!  
One follow up question: Is there a way to find all effect presets in the project and display them by name without using `studio.window.browserCurrent()`? I want to have a dropdown to choose an effect chain to add to an event.

I used this: `var presetEffectChain = studio.project.model.EffectChain.findInstances();` but I can’t figure out how to get to the effect chain name.

---

<div class="post-metadata">

### Author: ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)
#### Post date: [April 11, 2024, 11:31pm UTC](https://qa.fmod.com/t/how-to-add-effectpreset-to-events-master-track/21391/4 "2024-04-11T23:31:53Z")

</div>

> [@katharinab15](#):
>
> I used this: `var presetEffectChain = studio.project.model.EffectChain.findInstances();` but I can’t figure out how to get to the effect chain name.

To get an array of all effect presets in the project, you’ll want to use `var effectPresets = studio.project.model.EffectPreset.findInstances();`. This array will include Effect Chains. You can then get the name of each preset/chain from the `name` member, i.e. `effectPresets[i].name`.
