# How can I get callback when an async sound with quantization triggered?

**URL:** <https://qa.fmod.com/t/how-can-i-get-callback-when-an-async-sound-with-quantization-triggered/13956>\
**Category:** FMOD Studio\
**Created:** [June 20, 2018, 6:45am UTC](https://qa.fmod.com/t/how-can-i-get-callback-when-an-async-sound-with-quantization-triggered/13956 "2018-06-20T06:45:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wandermyz](https://avatars.discourse-cdn.com/v4/letter/w/e5b9ba/32.png) [@wandermyz](https://qa.fmod.com/u/wandermyz)\
**Post date:** [June 20, 2018, 6:45am UTC](https://qa.fmod.com/t/how-can-i-get-callback-when-an-async-sound-with-quantization-triggered/13956/1 "2018-06-20T06:45:12Z")

</div>

I’m trying to create music stingers that align well with the BGM bars, and visual effect that aligns with such stingers. I need to know when such music stinger actually happens, as it is quantized to bars.

Currently, I’m using an async nested event that triggered by a parameter. My idea is to add a destination marker at the beginning of the nested event, and listen to FMOD\_STUDIO\_EVENT\_CALLBACK\_TIMELINE\_MARKER. However, it seems this callback does not work for nested or referenced events.

Any suggestion?

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:** [June 21, 2018, 2:54am UTC](https://qa.fmod.com/t/how-can-i-get-callback-when-an-async-sound-with-quantization-triggered/13956/2 "2018-06-21T02:54:28Z")

</div>

Hi Yang,

That is correct, currently it is not possible to get event callbacks from nested or referenced events.

You can try placing all the stingers in the same music event and using the FMOD\_STUDIO\_EVENT\_CALLBACK\_SOUND\_PLAYED callback to check when your instrument has been triggered (it will return its name).

Thanks,  
Richard

---

<div class="post-metadata">

**Author:** ![wandermyz](https://avatars.discourse-cdn.com/v4/letter/w/e5b9ba/32.png) [@wandermyz](https://qa.fmod.com/u/wandermyz)\
**Post date:** [June 21, 2018, 7:03pm UTC](https://qa.fmod.com/t/how-can-i-get-callback-when-an-async-sound-with-quantization-triggered/13956/3 "2018-06-21T19:03:25Z")

</div>

> [@](#):
>
> Hi Yang,
> 
> That is correct, currently it is not possible to get event callbacks from nested or referenced events.
> 
> You can try placing all the stingers in the same music event and using the FMOD\_STUDIO\_EVENT\_CALLBACK\_SOUND\_PLAYED callback to check when your instrument has been triggered (it will return its name).
> 
> Thanks,  
> Richard

Hi Richard,

Thanks for your suggestion. I tried your idea, and it turns out the callback actually happens right after I set the parameter, rather than when the sound actually plays after a quantized delay. How could I monitor when the playback actually starts?

Thanks,  
Yang

---

<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:** [June 25, 2018, 3:46am UTC](https://qa.fmod.com/t/how-can-i-get-callback-when-an-async-sound-with-quantization-triggered/13956/4 "2018-06-25T03:46:17Z")

</div>

Hi Yang,

You’re right - the SOUND\_PLAYED callback is fired once the sound is created not when it’s played. I have raised a ticket internally to discuss this further.

In the meantime, I think the best alternative would be to set up a parameter (called “isPlaying” for example) and have a sidechain connected from the track the stingers are on. This way you can check if the isPlaying parameter’s value is more than 0 to see if any audio is playing or not.

Thanks,  
Richard
