Have you set the event to be persistent? The button for doing so in the macro controls section of the deck when you select the event in FMOD Studio. I ask because it sounds like the event might be stopping itself before it plays if none of its instruments are triggered at that point.
hey joseph, so I saw that it was definately being triggered in the profiler.
I managed to get it working with the built in distance parameter, it works great.
But I can’t get the built in speed parameter to work, so the whoosh just continuously plays. I’ve set a relative speed parameter to control have the volume at 0db at 0 speed, and full volume at 10 speed, but sitting completely still next to an object that is also still, and the volume is still staying at 0.
I also tried with the absolute speed but same thing.
If you have any ideas on this I’d really appreciate it.
I’m afraid I don’t understand the problem. If you have automated the volume on the speed built-in parameter such that the volume is 0 dB when speed is 0, and the listener is sitting still next to an emitter that is also still, then the relative speed of the emitter is 0, and a volume of 0 dB is the expected behavior. Since that’s the volume you’re observing, what’s the problem?
There are two apporaches that I used and other games also use. Maybe there are more but these work very well:
You place overlap spheres in your game and when either your pawn or your camera overlaps the sphere you play the woosh sound at the center of the sphere. you can interpolate the volume depending on the speed, you don’t need much else.
all objects you “woosh by” have a simply collision around them that you can trace for. I would eg. trace in a sphere from the left and right of your pawn or camera so you don’t miss an object at higher speeds. Ss soon this trace hits the objects play the woosh sound at the location of the object. you can change some location params, eg. you can set the height of the sound to the height of the trace hit.
All in all i would set the distance volume falloff to something like 25m or so.
When your game’s code changes the position of the emitter and listener, exactly how is it setting the event’s velocity?
I ask because we support changing an emitter or listener’s position without setting its velocity in order to allow things to “teleport” without causing sudden spikes in the event instance’s speed built-in parameter or Doppler effect. If your code is setting the emitter or listener’s velocity to 0 or null, that could explain why the speed built-in parameter isn’t being updated correctly.
Yeah this is interesting, thanks!
I can see this being more efficient than my idea with the continuous ‘whoosh’ loop. I’d still like to see if I can get it working that way with the built in speed parameter too.
I love how simple your first approach sounds. When you say “overlap spheres” do you mean like, collision spheres?.. what exactly are overlap spheres?
At the moment, my programmer says she is manually positioning the camera every frame. She asked, "is it intended that I feed in the velocity value to the listener manually, or does the listener automatically look for a rigidbody or something to listen to?
Are you in unreal engine or unity? i could help particularly on unreal engine but the concept is always the same regardless of the engine. example:
if you have a streetlamp you would like to have the whoosh sound played at you place a giant sphere with eg. a 25m radius at its pivot. you can only trace for it but not actually collide with this sphere. as soon your car OR you camera starts overlapping the sphere you place the woosh sound at the pivot of the sphere. the distance to the pivot automatically regulates the volume of the woosh sound. the sound is a fire and forget, it is automatically destroyed after it finished playing. you can additionally decrease the volume by the speed of your car. eg. you inverselerp the car speed between 5m/s to 30m/s and clamp the output to [0, 1].
FMOD Studio has no concept of rigid bodies; those are a feature of your game engine, not of the FMOD Engine. The only place the FMOD engine gets the 3D attributes of listeners and event emitters is the API calls your game’s code uses.
Have you tried setting the Rigidbody property isKinematic to true, or using Rigidbody methods that allow Unity’s physics system to handle movement, such as Rigidbody.AddForce()? As described in the section on this topic of the Troubleshooting chapter of the FMOD for Unity documentation, doing so should ensure that the velocity is automatically calculated.