# FMOD Scripting - Create New Event from DefaultEvent in Project

**URL:** <https://qa.fmod.com/t/fmod-scripting-create-new-event-from-defaultevent-in-project/16621>\
**Category:** FMOD Studio\
**Created:** [January 9, 2021, 12:46am UTC](https://qa.fmod.com/t/fmod-scripting-create-new-event-from-defaultevent-in-project/16621 "2021-01-09T00:46:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rconnors](https://avatars.discourse-cdn.com/v4/letter/r/96bed5/32.png) [@rconnors](https://qa.fmod.com/u/rconnors)\
**Post date:** [January 9, 2021, 12:46am UTC](https://qa.fmod.com/t/fmod-scripting-create-new-event-from-defaultevent-in-project/16621/1 "2021-01-09T00:46:49Z")

</div>

Hello.

Looking over the scripting api documentation, I see two mechanisms I can leverage to create new FMOD Events, studio.project.create(“Event”) and workspace.addEvent.

For my purposes, I have a default Event that we currently use to generate events from source assets. I’d like to use that default to create new events in scripting.

Is there a way to create an event using a default Event?

Alternatively, is there any way to deep clone the default event, if I retrieve it with a LookUp.

Thanks.

---

<div class="post-metadata">

**Author:** ![richard\_simms](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/richard_simms/32/261_2.png) [@richard\_simms](https://qa.fmod.com/u/richard_simms)\
**Post date:** [January 14, 2021, 2:04am UTC](https://qa.fmod.com/t/fmod-scripting-create-new-event-from-defaultevent-in-project/16621/2 "2021-01-14T02:04:58Z")

</div>

Currently it is not possible to create events from Defaults via scripting. You are able to find all defaults by putting all events into an array and iterating through it looking for if the `isDefault` property is true.

```auto
var allEvents = studio.project.model.Event.findInstances();
allEvents.forEach(function(event) {
    if(event.isDefault) {
        console.log(event.name);
    }
});

```

We are looking into ways to copy or create an event based on another event.

---

<div class="post-metadata">

**Author:** ![rconnors](https://avatars.discourse-cdn.com/v4/letter/r/96bed5/32.png) [@rconnors](https://qa.fmod.com/u/rconnors)\
**Post date:** [January 14, 2021, 5:03pm UTC](https://qa.fmod.com/t/fmod-scripting-create-new-event-from-defaultevent-in-project/16621/3 "2021-01-14T17:03:16Z")

</div>

Thanks, due to the complexity of the default events in question, and the time consumption of trying to parse out on console the ways I might be able to add SendMixers and Automation via scripting, I’ve abandoned that route and resolved to just generate the blank events for authors to manipulate.

Nonetheless, I appreciate your time in replying!

---

<div class="post-metadata">

**Author:** ![ianberman](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/ianberman/32/2319_2.png) [@ianberman](https://qa.fmod.com/u/ianberman)\
**Post date:** [February 8, 2023, 4:45pm UTC](https://qa.fmod.com/t/fmod-scripting-create-new-event-from-defaultevent-in-project/16621/4 "2023-02-08T16:45:27Z")

</div>

Sorry to necro this thread, but is this possible with any later versions of FMOD? How would I go about doing so?

---

<div class="post-metadata">

**Author:** ![ianberman](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/ianberman/32/2319_2.png) [@ianberman](https://qa.fmod.com/u/ianberman)\
**Post date:** [February 8, 2023, 5:23pm UTC](https://qa.fmod.com/t/fmod-scripting-create-new-event-from-defaultevent-in-project/16621/5 "2023-02-08T17:23:08Z")

</div>

Also wondering if it’s possible to add a preset effect chain to an event via the API

---

<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 12, 2023, 11:15pm UTC](https://qa.fmod.com/t/fmod-scripting-create-new-event-from-defaultevent-in-project/16621/6 "2023-02-12T23:15:57Z")

</div>

Hi,

Unfortunately, there hasn’t been any progress on these.  
The method provided by Richard for retrieving a list of the default devices still works, however, there isn’t a way to easily copy events. I will bump the ticket.

To find a list of all your presets you can use

```auto
var presets = studio.project.model.EffectPreset.findInstances();

```

Then for each `Preset Effect` you can check their variable `presets[X].effect` for `ManagedObject:EffectChain`. Then to add the `Effect Chain` to the `Events Master Track` you can use

```auto
events.masterTrack.mixerGroup.effectChain.addEffect(EffectChain)

```

Hope this helps!

---

<div class="post-metadata">

**Author:** ![ianberman](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/ianberman/32/2319_2.png) [@ianberman](https://qa.fmod.com/u/ianberman)\
**Post date:** [February 13, 2023, 1:58pm UTC](https://qa.fmod.com/t/fmod-scripting-create-new-event-from-defaultevent-in-project/16621/7 "2023-02-13T13:58:54Z")

</div>

Thank you Connor, super helpful.
