# Send automation curve from fmod to unity

**URL:** <https://qa.fmod.com/t/send-automation-curve-from-fmod-to-unity/13953>\
**Category:** Unity\
**Created:** [June 19, 2018, 12:09pm UTC](https://qa.fmod.com/t/send-automation-curve-from-fmod-to-unity/13953 "2018-06-19T12:09:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gioripoliti](https://avatars.discourse-cdn.com/v4/letter/g/53a042/32.png) [@gioripoliti](https://qa.fmod.com/u/gioripoliti)\
**Post date:** [June 19, 2018, 12:09pm UTC](https://qa.fmod.com/t/send-automation-curve-from-fmod-to-unity/13953/1 "2018-06-19T12:09:47Z")

</div>

Hello,  
Is there a way to send automation curve from an fmod event to unity for controlling game parameters?

The only way i found was to create an audio channel with a static sound, automating the level of it and send it to a parameter’s side chain. Then i was able to read the parameter value in unity.

It works, but little expensive in resources if i need to run many instances together.

is there a more straightforward way doing this?

Thanks,

Giori

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [June 25, 2018, 4:12am UTC](https://qa.fmod.com/t/send-automation-curve-from-fmod-to-unity/13953/2 "2018-06-25T04:12:39Z")

</div>

> [@](#):
>
> Hello,  
> Is there a way to send automation curve from an fmod event to unity for controlling game parameters?
> 
> The only way i found was to create an audio channel with a static sound, automating the level of it and send it to a parameter’s side chain. Then i was able to read the parameter value in unity.
> 
> It works, but little expensive in resources if i need to run many instances together.
> 
> is there a more straightforward way doing this?
> 
> Thanks,
> 
> Giori

Just to clarify, you want to automate something in Studio and get the value of that in Unity to drive something in the game?

---

<div class="post-metadata">

**Author:** ![gioripoliti](https://avatars.discourse-cdn.com/v4/letter/g/53a042/32.png) [@gioripoliti](https://qa.fmod.com/u/gioripoliti)\
**Post date:** [June 25, 2018, 5:49am UTC](https://qa.fmod.com/t/send-automation-curve-from-fmod-to-unity/13953/3 "2018-06-25T05:49:53Z")

</div>

Yes, exactly.

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [June 25, 2018, 6:07am UTC](https://qa.fmod.com/t/send-automation-curve-from-fmod-to-unity/13953/4 "2018-06-25T06:07:14Z")

</div>

At the moment that is the only way to get an automated value out of an event. Some built in properties are accessible through EventInstance::getProperty, although those don’t really fit into this purpose.

Using getParameterByIndex is cheaper than using getParameterValue, which uses a string lookup. As long as you already know the index of parameter you need, which you could cache earlier from the EventDescription.

We do have plans to make this easier/cheaper but those changes aren’t currently on the roadmap.

---

<div class="post-metadata">

**Author:** ![gioripoliti](https://avatars.discourse-cdn.com/v4/letter/g/53a042/32.png) [@gioripoliti](https://qa.fmod.com/u/gioripoliti)\
**Post date:** [June 25, 2018, 11:28am UTC](https://qa.fmod.com/t/send-automation-curve-from-fmod-to-unity/13953/5 "2018-06-25T11:28:35Z")

</div>

Thanks Cameron.

Regarding the side chain method,  
I am using a dedicated 1kHz sine wave and automating it’s gain for creating the envelope. This is sent to the parameter’s side chain pre track fader.  
If i set the track’s volume to minimum (I don’t want this sound to be a part of the mix), then in the build it doesn’t work (I assume because Fmod knows no sound is coming out so disabling the track).  
So what i do is set the volume to -79 dB in order for it to work.

Is theres a way to set the volume to minimum but still force the sound to play?

Thanks,

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [June 27, 2018, 6:49am UTC](https://qa.fmod.com/t/send-automation-curve-from-fmod-to-unity/13953/6 "2018-06-27T06:49:15Z")

</div>

> [@](#):
>
> Thanks Cameron.
> 
> Regarding the side chain method,  
> I am using a dedicated 1kHz sine wave and automating it’s gain for creating the envelope. This is sent to the parameter’s side chain pre track fader.  
> If i set the track’s volume to minimum (I don’t want this sound to be a part of the mix), then in the build it doesn’t work (I assume because Fmod knows no sound is coming out so disabling the track).  
> So what i do is set the volume to -79 dB in order for it to work.
> 
> Is theres a way to set the volume to minimum but still force the sound to play?
> 
> Thanks,

Setting the events priority to ‘Highest’ should cause all voices in the event to never virtualize.

[https://fmod.com/resources/documentation-studio?page=event-macro-controls-reference.html#priority](https://fmod.com/resources/documentation-studio?page=event-macro-controls-reference.html#priority)

---

<div class="post-metadata">

**Author:** ![gioripoliti](https://avatars.discourse-cdn.com/v4/letter/g/53a042/32.png) [@gioripoliti](https://qa.fmod.com/u/gioripoliti)\
**Post date:** [June 28, 2018, 9:55am UTC](https://qa.fmod.com/t/send-automation-curve-from-fmod-to-unity/13953/7 "2018-06-28T09:55:59Z")

</div>

great.  
thanks
