# How to modify all audio under Bus, or the single playback speed of EventInstance

**URL:** <https://qa.fmod.com/t/how-to-modify-all-audio-under-bus-or-the-single-playback-speed-of-eventinstance/20224>\
**Category:** Unity\
**Tags:** unity, csharp\
**Created:** [May 16, 2023, 9:33am UTC](https://qa.fmod.com/t/how-to-modify-all-audio-under-bus-or-the-single-playback-speed-of-eventinstance/20224 "2023-05-16T09:33:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lxx](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@lxx](https://qa.fmod.com/u/lxx)\
**Post date:** [May 16, 2023, 9:33am UTC](https://qa.fmod.com/t/how-to-modify-all-audio-under-bus-or-the-single-playback-speed-of-eventinstance/20224/1 "2023-05-16T09:33:48Z")

</div>

At present, I want to realize the function of program acceleration, so the sound effect will be accelerated accordingly, but I have tried the SetPatch interface, but it will cause the pitch to become higher.

I searched for a long time and found that most of them use DSP, including official recommendations, but DSP has limitations, because its value is 0.5-2, so the maximum supported speed is 2 times.

I also found that setMusicSpeed in Sound seems to be able to meet the requirements without causing the pitch to become higher. However, I am currently using EventInstance to play audio, and it seems a bit troublesome to obtain it.

So I would like to ask if there is a better solution that can change the overall audio speed under the Bus, or change the speed of a single EventInstance.

What is the official recommended practice? The current DSP should not be able to meet the demand, or is there any third-party DSP that can meet this demand?

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [May 17, 2023, 12:38am UTC](https://qa.fmod.com/t/how-to-modify-all-audio-under-bus-or-the-single-playback-speed-of-eventinstance/20224/2 "2023-05-17T00:38:24Z")

</div>

We have a way to speed up sound and pitch using `setPitch`, and we have a way to change pitch without changing sound using a `DSP`, so combined you have a way to speed up sound without changing pitch by playing at twice the speed and half the pitch.  
To do this at the bus level you will need to drill down to get the `ChannelGroup` and call [`ChannelGroup.setPitch`](https://fmod.com/docs/2.01/api/core-api-channelcontrol.html#channelcontrol_setpitch) on that- you can also set the pitch to greater than double the speed in this way.

```cpp
FMOD.DSP pitchShift;
FMOD.System coreSystem;
system.getCoreSystem(out coreSystem);

system.getBus("bus:/", out FMOD.Studio.Bus master);
master.getChannelGroup(out FMOD.ChannelGroup masterChannelGroup);
if (masterChannelGroup)
{
    masterChannelGroup.setPitch(2.0f); // Play twice as fast
    coreSystem.createDSPByType(FMOD.DSP_TYPE.PITCHSHIFT, out pitchShift);
    pitchShift.setParameterFloat(FMOD.DSP_PITCHSHIFT.PITCH, 0.5f); // Play at half pitch
    masterChannelGroup.addDSP(FMOD_CHANNELCONTROL_DSP_HEAD, pitchShift);
}

...

// Clean up dsp when finished

masterChannelGroup.removeDSP(pitchShift);
pitchShift.release();

```

[`Sound.setMusicSpeed`](https://fmod.com/docs/2.01/api/core-api-sound.html#sound_setmusicspeed) only works for MIDI/MOD/IT etc files.

---

<div class="post-metadata">

**Author:** ![lxx](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@lxx](https://qa.fmod.com/u/lxx)\
**Post date:** [May 17, 2023, 2:29am UTC](https://qa.fmod.com/t/how-to-modify-all-audio-under-bus-or-the-single-playback-speed-of-eventinstance/20224/3 "2023-05-17T02:29:18Z")

</div>

Hi Jeff, thanks for your reply.

`ChannelGroup` or `EventInstance` has a `setPitch` interface, which can set the speed above 2x, but it will cause the pitch to become higher, which sounds uncomfortable.

Yes, the `DSP` can support 2x speed very well, but if it exceeds 2x speed, the pitch will still become very high, because of its value of 0.5-2.

I wonder or is there any other solution that can be implemented? Because what I probably need now is up to 6x speed.

Looking forward to your next reply.

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [May 24, 2023, 7:19am UTC](https://qa.fmod.com/t/how-to-modify-all-audio-under-bus-or-the-single-playback-speed-of-eventinstance/20224/4 "2023-05-24T07:19:06Z")

</div>

Hi,

Unfortunately, we do not support speeds above x2. I will make a note of your interestest and pass it on to our development team to look into further.

Apologies I cannot assist further.

---

<div class="post-metadata">

**Author:** ![lxx](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@lxx](https://qa.fmod.com/u/lxx)\
**Post date:** [May 24, 2023, 8:06am UTC](https://qa.fmod.com/t/how-to-modify-all-audio-under-bus-or-the-single-playback-speed-of-eventinstance/20224/5 "2023-05-24T08:06:27Z")

</div>

Hi Connor,

Not supporting speeds higher than 2x might sound like bad news, but over time I’ve been prepared because the only solution I’ve found so far is for 2x.

I’m trying to convince the team to change their minds, unless a higher pitch is acceptable.

Thanks again for your reply.
