# Issues with looping time-stretched music in Unity

**URL:** <https://qa.fmod.com/t/issues-with-looping-time-stretched-music-in-unity/23763>\
**Category:** FMOD Studio\
**Tags:** unity\
**Created:** [December 4, 2025, 1:52pm UTC](https://qa.fmod.com/t/issues-with-looping-time-stretched-music-in-unity/23763 "2025-12-04T13:52:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![NovaRaze](https://avatars.discourse-cdn.com/v4/letter/n/b19c9b/32.png) [@NovaRaze](https://qa.fmod.com/u/NovaRaze)\
**Post date:** [December 4, 2025, 1:52pm UTC](https://qa.fmod.com/t/issues-with-looping-time-stretched-music-in-unity/23763/1 "2025-12-04T13:52:06Z")

</div>

Hi all! First off, I’m new to FMOD so apologies if there is an easy fix for this!

I’ve started to use FMOD for a recent game project and have created a discrete parameter in respect to player lives (3, 2, 1 and 0 respectively. Just as a side note, 0 is pitched down 15 semitones and has a seek modulation to simulate a tape stop effect). I am automating the pitch of the audio file using the clip pitch and not the pitch shifter effect. This creates a nice combination of stretching/slowing down the audio as well as pitching. This is perfect and exactly what I want. I also created three separate loop points that are the exact length of the original and time stretched versions (this was worked out by adding extra audio tracks and pitching the audio directly to see what the new length would be for each one). I then setup these loops with conditions that they only trigger if the player lives are 3, 2 or 1. These loops work perfectly in FMOD but for some reason, Unity is refusing to playback the extended audio and has silence during those extended loop points. Unity will correctly use the loop points for each respective life value but refuses to ‘see’ the longer time stretched clip, resulting in a cutoff in sound.

Does anyone have any workarounds for this kind of thing? I’m not a dev so am unsure whether this can be fixed via scripting in Unity.

Thanks in advance 🙂

 ![Screenshot 2025-12-04 at 13.48.00](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/4/4d207d3c5c6c8469fd8313c49af6f35cc7e66cc1.png)

---

<div class="post-metadata">

**Author:** ![li\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/li_fmod/32/6577_2.png) [@li\_fmod](https://qa.fmod.com/u/li_fmod)\
**Post date:** [December 10, 2025, 9:19pm UTC](https://qa.fmod.com/t/issues-with-looping-time-stretched-music-in-unity/23763/2 "2025-12-10T21:19:34Z")

</div>

Hi,

Thank you for sharing the information and screenshot!

> [@NovaRaze](#):
>
> Does anyone have any workarounds for this kind of thing? I’m not a dev so am unsure whether this can be fixed via scripting in Unity.

I tried to follow up your setup in FMOD, but so far I haven’t been able to reproduce the extended audio silence issue in Unity, and the stretched part seems keeps playing on my side.

Could you please share a bit more details on how you are triggering the event and setting the parameter in your game? For example:

- Are you starting the event via a `StudioEventEmitter`component, or through code?
- How are you changing the lives parameter value?

---

<div class="post-metadata">

**Author:** ![NovaRaze](https://avatars.discourse-cdn.com/v4/letter/n/b19c9b/32.png) [@NovaRaze](https://qa.fmod.com/u/NovaRaze)\
**Post date:** [December 11, 2025, 3:03pm UTC](https://qa.fmod.com/t/issues-with-looping-time-stretched-music-in-unity/23763/3 "2025-12-11T15:03:25Z")

</div>

Hiya! Thanks for the reply!

I am using a StudioEventEmitter to trigger the music on object start, see screenshot below of the current setup of the component:

 ![Screenshot 2025-12-11 at 14.50.30](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/e/ebc434d2f2b153a251fc6444eb2e26a6b4cf5db7.png)

Edit: One of the Devs just told me:

_we start from event emitter but change it from code_

_so we have this field in our script  
[SerializeField] private StudioEventEmitter \_musicEmitter;_

\*then we do for example  
\_musicEmitter.EventInstance.setParameterByName(“livesLeft”, 2);  
\*  
Hopefully this helps a bit!

---

<div class="post-metadata">

**Author:** ![li\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/li_fmod/32/6577_2.png) [@li\_fmod](https://qa.fmod.com/u/li_fmod)\
**Post date:** [December 12, 2025, 1:03am UTC](https://qa.fmod.com/t/issues-with-looping-time-stretched-music-in-unity/23763/4 "2025-12-12T01:03:59Z")

</div>

Thank you for the extra info!

I was able to reproduce the issue on my side when changing the parameter during runtime, so I will forward this to the dev team for further investigation.

In the meantime, another possible workaround you could try is using an [Autopitch Modulator](https://www.fmod.com/docs/2.03/studio/modulator-reference.html#autopitch-modulator).

Here’s a quick setup to test:

1. Create a new event and add only the livesLeft parameter sheet
2. Drag your asset onto the audio track, click the single instrument and enable [Loop Instrument](https://www.fmod.com/docs/2.03/studio/instrument-reference.html#loop-instrument-toggle-button)
3. Right click on the pitch knob, select `Add Modulation > Autopitch`
4. Set the root pitch to 3 and tweak the min pitch to match your design

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/6/682971266d75361a589412ce940e12c544b2ec58.png)

Hope this helps! Let me know if this works for your project.

---

<div class="post-metadata">

**Author:** ![NovaRaze](https://avatars.discourse-cdn.com/v4/letter/n/b19c9b/32.png) [@NovaRaze](https://qa.fmod.com/u/NovaRaze)\
**Post date:** [December 12, 2025, 9:51am UTC](https://qa.fmod.com/t/issues-with-looping-time-stretched-music-in-unity/23763/5 "2025-12-12T09:51:02Z")

</div>

Thank you! I will certainly give your suggestion a try!
