# How to adjust the speed of the audio without changing the pitch?

**URL:** https://qa.fmod.com/t/how-to-adjust-the-speed-of-the-audio-without-changing-the-pitch/20831
**Category:** FMOD Studio
**Created:** [November 2, 2023, 11:08am UTC](https://qa.fmod.com/t/how-to-adjust-the-speed-of-the-audio-without-changing-the-pitch/20831 "2023-11-02T11:08:15Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![MisakaCirno](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@MisakaCirno](https://qa.fmod.com/u/MisakaCirno)
#### Post date: [November 2, 2023, 11:08am UTC](https://qa.fmod.com/t/how-to-adjust-the-speed-of-the-audio-without-changing-the-pitch/20831/1 "2023-11-02T11:08:15Z")

</div>

I’ve noticed that there are a lot of people in the forums with similar questions, and I’ve found three threads discussing this issue:  
In 2018: [How to Speed Up music/sound without changing its pitch? - Unity - FMOD Forums](https://qa.fmod.com/t/how-to-speed-up-music-sound-without-changing-its-pitch/13978/6)  
In 2020: [Can FMOD make the playback rate of audio faster without changing the pitch - FMOD Studio - FMOD Forums](https://qa.fmod.com/t/can-fmod-make-the-playback-rate-of-audio-faster-without-changing-the-pitch/16052)  
In 2022: [How to: SFX for a game that can speed up? - FMOD Studio - FMOD Forums](https://qa.fmod.com/t/how-to-sfx-for-a-game-that-can-speed-up/18696)

Do we have a better solution to this problem now? The responses given in these threads are not a perfect solution to the problem I am currently experiencing.

Is there some plugin that can do this?FMOD Studio itself seems to support the use of plugins, but there’s not much in the way of documentation about it.

---

<div class="post-metadata">

### Author: ![MisakaCirno](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@MisakaCirno](https://qa.fmod.com/u/MisakaCirno)
#### Post date: [November 3, 2023, 10:06am UTC](https://qa.fmod.com/t/how-to-adjust-the-speed-of-the-audio-without-changing-the-pitch/20831/2 "2023-11-03T10:06:05Z")

</div>

I noticed in the [documentation](https://fmod.com/docs/2.02/api/white-papers-dsp-plugin-api.html#dsp-plug-in-api) it says:

> It is recommended you follow along with our examples found in **api/core/examples/plugins** as they are fully implemented working effects you can use or base your code on.

But I didn’t find exactly what this relative path refers to, can you explain what it means?

* * *

Ok, after some searching I found it: [Where is the plugin example code?](https://qa.fmod.com/t/where-is-the-plugin-example-code/18930)

---

<div class="post-metadata">

### Author: ![MisakaCirno](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@MisakaCirno](https://qa.fmod.com/u/MisakaCirno)
#### Post date: [November 6, 2023, 11:19am UTC](https://qa.fmod.com/t/how-to-adjust-the-speed-of-the-audio-without-changing-the-pitch/20831/3 "2023-11-06T11:19:53Z")

</div>

It seems that using the FMOD Pitch Shifter to adjust the pitch of the audio is the best way to do this, but it only has a parameter range of 0.5~2.  
If we need to adjust the playback speed for a larger range, its parameter limit will be a problem.  
Is there any way to adjust its parameter range? Or can you provide us a copy of the source code for it like the other effects in api/core/examples/plugins?

---

<div class="post-metadata">

### Author: ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)
#### Post date: [November 8, 2023, 4:52am UTC](https://qa.fmod.com/t/how-to-adjust-the-speed-of-the-audio-without-changing-the-pitch/20831/4 "2023-11-08T04:52:55Z")

</div>

As of the time of writing (November 2023), FMOD has no simple solution for pitch-invariant time stretching, or time-invariant pitch shifting. There are number of recommended solutions and workarounds, as you’ve noted, the most commonly used among them being automating a pitch shift effect inversely to the pitch of an instrument/event.

Unfortunately, there’s no way to adjust the parameter range of the pitch shift effect, besides to add an additional pitch shift effect to the chain. An alternative might be to also use an two additional copies of your source asset, pitch shifted outside of FMOD Studio, and blend between them and the original asset alongside the use of a pitch shift effect to work around this.

> [@MisakaCirno](#):
>
> FMOD Studio itself seems to support the use of plugins, but there’s not much in the way of documentation about it.

FMOD provides a Plugin API that can be used to define a DSP plugin that can be placed into your effect chain - it is entirely possible for you to implement your own pitch shift plugin using this API, if desired. However, this is notably **not** support for common DAW plugin formats such as VST.

---

<div class="post-metadata">

### Author: ![MisakaCirno](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@MisakaCirno](https://qa.fmod.com/u/MisakaCirno)
#### Post date: [November 8, 2023, 7:33am UTC](https://qa.fmod.com/t/how-to-adjust-the-speed-of-the-audio-without-changing-the-pitch/20831/5 "2023-11-08T07:33:52Z")

</div>

Thanks for the reply, I have found the documentation: [FMOD - White Papers | DSP Plugin API](https://www.fmod.com/docs/2.01/api/white-papers-dsp-plugin-api.html)

And I’ve gotten a general idea of the FMOD Studio plugin production process with the sample project that comes with the FMOD Engine.

* * *

Regarding your suggestion of using multiple pitch shifters to achieve the effect, I have already tried it. But it seems that using that DSP one more time reduces the sound quality again. And it doesn’t seem to be that easy to make a pitch shifter completely by myself.

* * *

But the source code for the pitch shifter doesn’t seem to be given in FMOD Engine, is this something that can’t be published? If it can’t be published, can you provide some information about the principle or algorithm of its implementation?

---

<div class="post-metadata">

### Author: ![MisakaCirno](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@MisakaCirno](https://qa.fmod.com/u/MisakaCirno)
#### Post date: [November 8, 2023, 7:37am UTC](https://qa.fmod.com/t/how-to-adjust-the-speed-of-the-audio-without-changing-the-pitch/20831/6 "2023-11-08T07:37:00Z")

</div>

> [@MisakaCirno](#):
>
> It seems that using the FMOD Pitch Shifter to adjust the pitch of the audio is the best way to do this, but it only has a parameter range of 0.5~2.

To make it easier for others to find related posts as well, I’ll reply with the link here: [How to add a dsp pitch-shifter for eventInstance - FMOD Studio - FMOD Forums](https://qa.fmod.com/t/how-to-add-a-dsp-pitch-shifter-for-eventinstance/18783)

---

<div class="post-metadata">

### Author: ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)
#### Post date: [November 10, 2023, 1:35am UTC](https://qa.fmod.com/t/how-to-adjust-the-speed-of-the-audio-without-changing-the-pitch/20831/7 "2023-11-10T01:35:55Z")

</div>

> [@MisakaCirno](#):
>
> But the source code for the pitch shifter doesn’t seem to be given in FMOD Engine, is this something that can’t be published? If it can’t be published, can you provide some information about the principle or algorithm of its implementation?

Unfortunately, I cannot provide you with the source code. However, the algorithm is based on a pitch shifting implementation by Stephan Bersnee. An article explaining the implementation can be found [here](http://blogs.zynaptiq.com/bernsee/pitch-shifting-using-the-ft/), and an example .cpp can be downloaded [here](http://blogs.zynaptiq.com/bernsee/download/).
