# fading a loop out?

**URL:** <https://qa.fmod.com/t/fading-a-loop-out/11379>\
**Category:** FMOD Studio\
**Created:** [April 7, 2014, 10:39pm UTC](https://qa.fmod.com/t/fading-a-loop-out/11379 "2014-04-07T22:39:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![simon\_kamakazi](https://avatars.discourse-cdn.com/v4/letter/s/9e8a1a/32.png) [@simon\_kamakazi](https://qa.fmod.com/u/simon_kamakazi)\
**Post date:** [April 7, 2014, 10:39pm UTC](https://qa.fmod.com/t/fading-a-loop-out/11379/1 "2014-04-07T22:39:19Z")

</div>

probably im missing something super easy , but i need a looping sound to fade out rather than stop abruptly when the code stops it. how to do this in fmod studio? in designer i could set a fade in and out time for the event . i tryed doing the adsr thing but it will only fade in but not out.

---

<div class="post-metadata">

**Author:** ![halfasemitone](https://avatars.discourse-cdn.com/v4/letter/h/cdc98d/32.png) [@halfasemitone](https://qa.fmod.com/u/halfasemitone)\
**Post date:** [May 10, 2014, 12:14am UTC](https://qa.fmod.com/t/fading-a-loop-out/11379/2 "2014-05-10T00:14:33Z")

</div>

So if this is the case, would it be easier to just have your programmer use the FMOD\_STUDIO\_STOP\_ALLOWFADEOUT call every time and we just control the envelope?

What would be the advantage of using the FMOD\_STUDIO\_STOP\_IMMEDIATE call then?

---

<div class="post-metadata">

**Author:** ![joseph](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/joseph/32/264_2.png) [@joseph](https://qa.fmod.com/u/joseph)\
**Post date:** [May 12, 2014, 12:06am UTC](https://qa.fmod.com/t/fading-a-loop-out/11379/3 "2014-05-12T00:06:14Z")

</div>

> [@halfasemitone](#):
>
> So if this is the case, would it be easier to just have your programmer use the FMOD\_STUDIO\_STOP\_ALLOWFADEOUT call every time and we just control the envelope?
> 
> What would be the advantage of using the FMOD\_STUDIO\_STOP\_IMMEDIATE call then?

In some circumstances the ability to immediately “slam on the brakes” can be useful. Exactly when it will be useful will, of course, depend on the needs of your project, but it’s not uncommon that a game event that usually fades out gradually needs to be cut off abruptly due to a particular in-game event.

---

<div class="post-metadata">

**Author:** ![joseph](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/joseph/32/264_2.png) [@joseph](https://qa.fmod.com/u/joseph)\
**Post date:** [April 8, 2014, 12:41am UTC](https://qa.fmod.com/t/fading-a-loop-out/11379/4 "2014-04-08T00:41:39Z")

</div>

AHDSR on the event’s master track volume knob does work; I’m guessing this is what you’ve tried. However, I suspect that you’re not aware of how to audition the event’s stop behaviour; Simply click and hold the stop transport button until it begins to flash, and the event’s stop behaviour will play out in the tool.

More information about the behaviour of the stop transport button is available in the FMOD Studio manual.

---

<div class="post-metadata">

**Author:** ![simon\_kamakazi](https://avatars.discourse-cdn.com/v4/letter/s/9e8a1a/32.png) [@simon\_kamakazi](https://qa.fmod.com/u/simon_kamakazi)\
**Post date:** [April 8, 2014, 10:18am UTC](https://qa.fmod.com/t/fading-a-loop-out/11379/5 "2014-04-08T10:18:55Z")

</div>

thanx for the reply, yes im using an adsr on the master volume and it fades out in studio but in game it just cuts off . what should the programers be sending this event for it to use the adsr values when the event is stopped? cue? i have a sustain point on the loop too.

i suspect it is being sent some sort of “stop right now no matter what” command. im not a programmer sorry.

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://qa.fmod.com/u/Guest)\
**Post date:** [April 9, 2014, 6:35am UTC](https://qa.fmod.com/t/fading-a-loop-out/11379/6 "2014-04-09T06:35:19Z")

</div>

Your programmer may be calling EventInstance::stop with FMOD\_STUDIO\_STOP\_IMMEDIATE. If they pass FMOD\_STUDIO\_STOP\_ALLOWFADEOUT instead, the event should obey your fadeout.
