I have an engine that is the main event in my app. The engine was recorded with 4 microphones. One in front, behind and on each side. I have 4 tracks to my main “Engine” event..one for each direction that was recorded.
What I’d like to have happen is as my user walks in circles (orbits) around the engine, I need to select and mix between the various loops. For example, if i’m standing on the right side of the engine, I want to hear 80% of the “right” loop and maybe 10% of the “front” loop and 10% of the “rear” loop. As you walk around that mix should continuously blend between the 4 tracks.
To complicate things more, the user can also turn on their own axis while they orbit around the engine. So the user may be on the right side of the engine but may be facing forward with the engine off his left shoulder. In this situation, only his POSITION should affect the 80/10/10 mix that i mentioned earlier, however it should spatially sound like most the sound is coming from his left ear.
What I really want is a Parameter that just tells my event where the listener is standing, relative to the event.
I looked at the Direction and Orientation Parameters but those seem to be more concerned about which way the user’s head is facing and not about where the user’s feet are with respect to the event.
Can anyone make a suggestion about how to best implement this?
- You must login to post comments
This answer is going to be long, and will have multiple parts, because there’s some background I need to explain first.
FMOD Studio has three different built-in parameters that describe the relative facings of the listener and emitter: Direction, Event Cone Angle, and Event Orientation. While these three parameters are related, they each describe something very different.
Direction (big D) is the angle between the direction (small d) the listener is facing in and the direction (small d again) from it to the emitter. Negative values represent the emitter being to the listener’s left, and positive values to the listener’s right. Thus, if the emitter is directly in front of the listener, Direction is 0 degrees; if the emitter directly to the listener’s left, Direction is -90 degrees; if the emitter directly to the listener’s right, Direction is 90 degrees; and if the emitter is directly behind the listener, Direction is 180 degrees (or -180 degrees, if you prefer).
Direction is sometimes used to make events that get louder when the listener focuses on them, or which make strange noises whenever the listener looks away.
Event Cone Angle is almost the reverse of Direction: It’s the angle between the direction (small d) the emitter is facing in and the direction (small d again) from it to the listener. Unlike the Direction, Event Cone Angle does not distinguish between left and right. Thus, if the listener is directly in front of the emitter, Event Cone Angle is 0 degrees; if the listener is directly to the emitter’s left, Event Cone Angle is 90 degrees; if the listener is directly to the listener’s right, Event Cone Angle is 90 degrees; and if the listener is directly behind the emitter, Event Cone Angle is 180 degrees.
Event Cone Angle is commonly used to to make events that sound loudest when you’re in front of them, and quieter from other angles. (The name ‘event one angle’ is a holdover from FMOD Designer, in which Event Cone Angle could only be used to attenuate volume in a conical pattern.)
Event Orientation is the angle between the direction (small d) the listener is facing in and the direction (small d) the emitter is facing in. Thus, if the emitter and listener are facing the same way, Event Orientation is 0 degrees; if the emitter is facing to the east while the listener is facing north, Event Orientation is 90 degrees; if the emitter is facing to the east while the listener is facing south, Event Orientation is -90 degrees, and if the emitter is facing south-west while the listener is facing north-east, Event Orientation is 180 degrees (or -180 degrees, if you prefer).
Event Orientation is almost never needed, but is occasionally used to create in-game compasses with audible properties.
You can observe the behavior of all these parameters by using the 3D Preview: You can click and drag the arrow icon to reposition the emitter, you can rotate the emitter by spinning the mouse wheel, and the listener is always in the center of the circle, facing forward (up).
The 3D Panner Effect
The 3D Panner is an effect that applies panning to an event’s master track based on the event’s position in 3D space relative to the listener. It both attenuates the event based on distance, and pans the event based on its Direction (big D).
You want an event that is panned based on which side of the listener it is on, and you also want it to sound different based on which side of it the listener stands. You therefore want both a 3D Panner effect, and for the sound modules in the event to be automated based on Event Cone Angle. There is absolutely nothing preventing both of these things from existing in the same event.
There is one wrinkle. As I mentioned above, Event Cone Angle does not distinguish between left and right. This means that while it’s possible to use it to make an event that sounds different when you’re in front of it compared to being beside it or behind it, it’s not possible to make an event that sounds different when you’re standing on its right side as opposed to standing on its left. If you want to make an event with bilateral asymmetry, you need to work around this limitation by creating an event that represents the left/right asymmetry as front/back asymmetry, and position it in the same location as the original event, but perpendicular to it.
Incidentally, you mentioned in a comment that Event Cone Angle would for some reason require you to make four separate events. This is incorrect; It would have been true if you were using FMOD Designer, but only because FMOD Designer’s version of Event Cone Angle was not as flexible as the one in FMOD Studio, and did not allow arbitrary automation of volume.
Thanks for the extensive write up! This clears up some of my hunches….but it sounds like i still need TWO events. One for Front/Back and another rotated 90 degrees to be Left/Right. This also means that I need to programmatically rotate the Left/Right event as there seems to be no way to create a relative rotation in FMOD Studio. Is this correct?
I have to ask since this is a lot messier than I had hoped…would it not be useful to introduce a new built-in parameter that simply reported the angle of the listener’s position (not orientation) relative to the emitter? Essentially, it’d be Cone Angle but not abs(Cone Angle) which is what it does now.
Yes, if you want to create an event that’s left/right asymmetrical as well as front/back asymmetrical, you’ll need to create two events, and rotate one by 90 degrees relative to the other. This is no different to the usual requirement that you set each event emitter’s direction of facing in code, however.
The new built-in parameter you describe would indeed be useful in cases like yours. I’ll add it to our feature tracker.
- You must login to post comments
It looks like I should be using the Event Cone Parameter? The issue with that is that I believe I have to create 4 separate events and place them each in a different direction programmatically? Is this correct?
Is there a way in FMOD Studio to create a relative rotation for a track or event so they can be positioned relative to one another there and not require programatic changes?
Fear not! there’s no need to create four different events. I’ll write up an answer explaining why now.
- You must login to post comments
Please login first to submit.