Converting FMOD Ex pitch values to FMOD Studio pitch values

I’m refactoring legacy code to use FMOD Studio EventInstance objects instead of FMOD Designer (FMOD Ex) Event object. The most common case is to have pitch set to 0.0 (i.e. normal pitch) which can be then set to be 1.0 in the new implementation.

In FMOD Designer API the call to Event::setPitch() sets the overall pitch of an event . The default value of pitch is 0.0 ( = normal pitch). The pitch value can be negative as well.

FMOD Studio API call EventInstance::setPitch() sets the pitch multiplier for the event instance. The default value is 1.0 ( = normal pitch) and setting the value 0 means no sound at all.

  • How should I interpret old pitch values outside of the normal pitch in the new code?
  • What should I put as the value for EventInstance in the refactored code if the pitch for Event in the old implementation is for example -8.0?
  • Can I even achieve same functionality in FMOD Studio?

In the legacy code the pitch for Events is described mostly in FMOD_EVENT_PITCHUNITS_SEMITONES and sometimes in FMOD_EVENT_PITCHUNITS_RAW.

Edit: In this discussion a formula for calculating pitch from semitones was given: pitch = 2 ^ ( semitone / 12.0f). I originally thought it would be the answer to my question but some sound still sound way off compared to the original implementation.

After some investigation, it seems that the formula you found (2^(x/12)=s, where x is the FMOD Ex pitch adjustment expressed as a shift in octaves, and s is the FMOD Studio pitch adjustment measured as a linear value) should be correct.

Can you describe in more detail how the adjustment in FMOD Studio seems to be off when you compare it?

It’s hard to describe because I’m not an audio engineer. The new implementation sounds like there was some kind of “metallic echo” in all the played sounds. My colleague wondered if there sounds had an reverb effect on, but closer examination proved that it wasn’t the case (EventInstance::getReverbProperties returned value 0).

We are now checking if the conversion from FMOD Designer project to FMOD Studio project made some changes to the sound parameters.

Thanks, we’d be interested to hear what you discover.