# Can't change pitch through a snapshot using parameters

**URL:** https://qa.fmod.com/t/cant-change-pitch-through-a-snapshot-using-parameters/23168
**Category:** Unity
**Tags:** csharp
**Created:** [July 17, 2025, 9:11am UTC](https://qa.fmod.com/t/cant-change-pitch-through-a-snapshot-using-parameters/23168 "2025-07-17T09:11:21Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![NeddoFreddo](https://avatars.discourse-cdn.com/v4/letter/n/53a042/32.png) [@NeddoFreddo](https://qa.fmod.com/u/NeddoFreddo)
#### Post date: [July 17, 2025, 9:11am UTC](https://qa.fmod.com/t/cant-change-pitch-through-a-snapshot-using-parameters/23168/1 "2025-07-17T09:11:21Z")

</div>

Hi,  
Trying to do a slowmo effect that also lowers the pitch of all sounds in the SFX Group.

I have a local parameter called Bullet Time Pitch that, when its 1, has the pitch modified by 0 using an automation curve, and -24st at 0.

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

in my code I’m doing this:

```auto
void Awake()
{
BulletTime = FMODUnity.RuntimeManager.CreateInstance("snapshot:/Bullet Time");
}

void StartSlowMo(float TargetTimeScale)
{
BulletTime.setParameterByName("Bullet Time Pitch", targetTimeScale);
}

void StopSlowMo()
{
BulletTime.setParameterByName("Bullet Time Pitch", 1f);
}

```

but it doesn’t work. if I debug.Log the value of “Bullet Time Pitch” using getParameterByName, it always returns as 0 even when it should be my given value.

if I add a global parameter instead, and do

```auto
FMODUnity.RuntimeManager.StudioSystem.setParameterByName("Bullet Time Pitch", 1f);

```

it does _actually_ set the value of the parameter to my given float, as I can tell through a debug.log print + getParameterByName. however, in game, nothing happens.

Additionally the documentation says it’s supposed to return an error if it can’t find a parameter with the given name, but even if I type in some random nonsense, I don’t get any errors; it just always returns 0 if I try to getParameterByName, which means that I’m not really sure how to debug this.

Any help would be appreciated, thanks.

---

<div class="post-metadata">

### Author: ![NeddoFreddo](https://avatars.discourse-cdn.com/v4/letter/n/53a042/32.png) [@NeddoFreddo](https://qa.fmod.com/u/NeddoFreddo)
#### Post date: [July 17, 2025, 12:46pm UTC](https://qa.fmod.com/t/cant-change-pitch-through-a-snapshot-using-parameters/23168/2 "2025-07-17T12:46:29Z")

</div>

Figured it out, I had to call eventinstance.start() on the BulletTime instance (i.e. play it, and leave it looping in the background.)

Still not sure why there are no error messages for this sort of thing as it makes missing things quite easy.

---

<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: [July 21, 2025, 3:43am UTC](https://qa.fmod.com/t/cant-change-pitch-through-a-snapshot-using-parameters/23168/3 "2025-07-21T03:43:13Z")

</div>

Hi,

> [@NeddoFreddo](#):
>
> Figured it out, I had to call eventinstance.start() on the BulletTime instance (i.e. play it, and leave it looping in the background.)

Thank you for sharing the solution!

Yes, from my understanding, [Studio::EventInstance::getParameterByName](https://www.fmod.com/docs/2.02/api/studio-api-eventinstance.html#studio_eventinstance_getparameterbyname) will still return `FMOD_OK` in this case because:

- The parameter technically exists in the event’s definition.
- FMOD does not treat it as an error if the instance is inactive or the parameter hasn’t been instantiated yet.

> [@NeddoFreddo](#):
>
> Additionally the documentation says it’s supposed to return an error if it can’t find a parameter with the given name, but even if I type in some random nonsense, I don’t get any errors;

Could you please let me know which part of the documentation mentioned that an error should be returned?

From what I can see, the [getParameterByName](https://www.fmod.com/docs/2.02/api/studio-api-eventinstance.html#studio_eventinstance_getparameterbyname) documentation describes how `value` and `finalvalue` are returned, but it doesn’t mention specific error codes for invalid or unknown parameter names.

In practice, the function typically returns FMOD\_OK and silently returns 0.0f for the value even if the parameter name is invalid or the instance hasn’t been started. I agree this can be confusing at times.

I’ll forward this feedback to the dev team to see if we can clarify the documentation. Thanks again for pointing this out!

---

<div class="post-metadata">

### Author: ![NeddoFreddo](https://avatars.discourse-cdn.com/v4/letter/n/53a042/32.png) [@NeddoFreddo](https://qa.fmod.com/u/NeddoFreddo)
#### Post date: [July 22, 2025, 2:50am UTC](https://qa.fmod.com/t/cant-change-pitch-through-a-snapshot-using-parameters/23168/4 "2025-07-22T02:50:15Z")

</div>

it says it here: (in setParameter not getParameter)  
[https://fmod.com/docs/2.00/api/studio-api-eventinstance.html#studio\_eventinstance\_setparameterbyname](https://fmod.com/docs/2.00/api/studio-api-eventinstance.html#studio_eventinstance_setparameterbyname)

`If the event has no parameter matching name then FMOD_ERR_EVENT_NOTFOUND is returned.`

I never got that error when calling setParameterByName, even when I passed a keyboard smash as the name argument (to see if it ever returned an error), so I couldn’t tell if my parameter was set up incorrectly, it was an error with the name, or something else.

---

<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: [July 22, 2025, 4:26am UTC](https://qa.fmod.com/t/cant-change-pitch-through-a-snapshot-using-parameters/23168/5 "2025-07-22T04:26:19Z")

</div>

Thank you for sharing the documentation and pointing out my misunderstanding!

> [@NeddoFreddo](#):
>
> I never got that error when calling setParameterByName, even when I passed a keyboard smash as the name argument (to see if it ever returned an error), so I couldn’t tell if my parameter was set up incorrectly, it was an error with the name, or something else.

Yes, I can definitely see why that was confusing. The reason is that FMOD is designed for performance-critical environments, where logging or throwing exceptions on every small error could cause **frame hitches, audio glitches, or CPU spikes**.

Instead, FMOD follows a C-style convention: you get a [FMOD\_RESULT](https://fmod.com/docs/2.00/api/core-api-common.html#fmod_result) from every API call, and it’s up to the developer to check the result manually.

In other words, FMOD expects you to write something like:

```auto
FMOD.RESULT result = eventInstance.setParameterByName("NonexistentParam", 0.5f);
if (result != FMOD.RESULT.OK)
{
    UnityEngine.Debug.LogWarning($"FMOD error: {result}"); 
   // This would return FMOD_ERR_EVENT_NOTFOUND
}

```

Hope this clears things up, let me know if you have questions.
