I set up an event with one parameter and two effects(volume and pitch), affected by that parameter. I modify the parameter in-game which gives the desired effect of modifying pitch and volume.
[u:8h32qlhb][b:8h32qlhb]I call getPitch() after the parameter on the event has been changed.[/b:8h32qlhb][/u:8h32qlhb]
However, when I use the getPitch() function on the EventCategory the event is contained within or getPitch() on the ChannelGroup of the event or getPitch() on the event itself I get incorrect values. I always get a value of 0.0 from EventCategory::getPitch() and Event::getPitch() and I always get a value of 1.0 from ChannelGroup::getPitch().
Strangely EventCategory::setPitch() has no effect either.
Also getVolume() for EventCategory, ChannelGroup, and Event always return 1 even when the parameter has definitely modified the sound volume(I hear it working).
Now here’s the really strange thing. For an entirely different EventCategory, the EventCategory::setPitch() works as desired. The scale is weird, but it works(negative values slow down sound and vice-versa).
If you can follow that explanation above, then maybe you can tell me that is exactly how the FMOD Designer API is supposed to function. But can you answer this? How come the sound pitch and volume are modified when I modify its parameter, but when I use the EventCategory::setPitch() on another category I don’t hear any of its events change; however, calling EventCategory::getPitch() right after the call to EventCategory::setPitch() on that category yields the value which I input? Remember, I did not hear any change and the input was a significant change.
Please, oh please, help me.
- yoshi9784 asked 10 years ago
I see what you’re asking, and it is just not as simple as you are expecting.
The event level pitch and volume are not changing when a parameter controlled pitch or volume effect on a layer is changed as an event is played; rather the sound instance playing on the particular event layer is changing its specific pitch and volume. The event level pitch and volume are not affected by this at all, just the resulting sound instances inside the event. When there are more than one layer and sound instances in an event, there can be in essence multiple pitches and volumes going on inside the event. Which one would you expect fmod to return in this case?
Setting the pitch and volume at the event level will appropriately scale any pitch and volume effects that may exist in the event layers.
Category bus level pitch and volume changes are changing the event level pitch and volumes, not the event user parameters.
hope that helps
- jcobb answered 10 years ago
Please login first to submit.