Trying to drive local Fmod parameter that automates Pitch Shifter in an Event with Unity variable, it plays the right sound from the event, but changing the float pitchBend doesn’t change pitch at all for me.
noteEvent = FMODUnity.RuntimeManager.CreateInstance(fullEventPath);
noteEvent.set3DAttributes(RuntimeUtils.To3DAttributes(gameObject.transform));
fmodEmitter.EventReference = EventReference.Find(fullEventPath);
noteEvent.setParameterByName(“PitchBend”, pitchBend);
noteEvent.start();
noteEvent.release();
Debug.Log($"Playing note with event ‘{fullEventPath}’ at pitchBend {pitchBend} ");
FMOD.RESULT result = noteEvent.setParameterByName(“PitchBend”, pitchBend);
if (result != FMOD.RESULT.OK)
{
Debug.Log("Parameter not found: " + result);
}
FMOD.Studio.EventDescription desc;
int paramCount;
noteEvent.getDescription(out desc);
desc.getParameterDescriptionCount(out paramCount);
Debug.Log("Parameter count: " + paramCount);
here’s what the console logs say:
Playing note with event ‘event:/Pianos/GrandPiano/WhiteKeys/Key_ C4’ at pitchBend 3.12
Parameter not found: ERR_INVALID_PARAM
Parameter count:1
