How to Make Sound Cones in FMOD Using X-Plane

An author asked me how to make a sound cone in FMOD for X-Plane.

For example, our Cessna features recordings of the engines from four different mic positions (front, left, right, and back) - our engine sound event contains four sub-sound events, with sound cones modulating when the sound can be heard.  Think of a 90 degree cone sticking out from the engine to the front, the right, etc. Only if the listener is in the sound cone can you hear it.

Here's the trick: X-Plane provides two special parameters that give you the bearing of the listener relative to the event. From this you can create your attenuation shapes.

  • Facebook
  • Reddit
  • Twitter
  • LinkedIn

About Ben Supnik

Ben is a software engineer who works on X-Plane; he spends most of his days drinking coffee and swearing at the computer -- sometimes at the same time.
This entry was posted in Development. Bookmark the permalink.

26 Responses to How to Make Sound Cones in FMOD Using X-Plane

  1. Daniela Rodriguez Careri says:

    Question: How are `xpevent_rel_heading` and `xpevent_rel_pitch` different from FMOD's built-in `Event Cone Angle` and `Elevation`? Is there any special meaning or behavior?

    • Ben Supnik says:

      Hi Daniela,

      Good question! First: "elevation" is similar to the built-in "direction" - it's the bearing of the _sound_ from the listener's perspective. So it's not ever useful for doing sound cones because the "cone" would be on the listener, not the sound emitter.

      Event cone angle is very similar to our rel_heading and rel_pitch values -- they do provide the offset of the listener from the event's "straight forward", allowing for true sound cones.

      Event cone angles provide true circular cones - the angle is the offset in ANY direction, while ours are flattened to the horizontal and vertical planes.

      So why did we roll our own? The problem with event sound cones is that you get _one_ sound cone per event, because the every sub-event within an event has the _same_ orientation.

      We wanted to be able to build a master engine event that is built of four (or more) sub-events, each with its own cone (e.g. for the front/back/left/right recordings) and we wanted to be able to attach the event to the airplane only once. But FMOD does not provide relative transformations of sub-events with an event, so all four sub-events are all facing 'forward' like the main engine.

      We could have worked around this by having our art guy provide four 'engines' that we attached in X-Plane -- we even could have automated this in the .snd file. But this is a bit of a messy solution - in the end, we don't know what sub-directions authors will want, so it inevitably turns into a lot of the sound design work being done in the .snd attachment file and not FMOD itself, which kind of sucks. Sound done entirely in FMOD provides really great preview WYHIWYG options, where-as the attachments file is more cumbersome.

      So we chose to make new parameters that provided relative heading in _absolute_ terms -- ours is clamped to the horizontal plane (which is almost always the way your mics are going to be placed in the real world) and thus you can place out multiple sound cones in a single event with a single orientation. Since this is a parameter, our sound guy can simply preview the parameter by "spinning" the listener (e.g. by changing the relative heading from -180 to 180) and hear the cross-blend in real-time, even without the app.

      For a _single_ event that has a sound cone, I'd still recommend FMOD's -- since it's a true cone it will sound more natural than key-framing the horizontal and vertical. But if you have circular recordings around a source, our relative heading may be more useful.

      • Daniela Rodriguez Careri says:

        Thanks Ben, I *think* I understand. It might be that I've never stumbled on a use case yet. And yes, sub-events in FMOD are tricky, I see why this can help.

  2. sebastian says:

    I love this. The default Cessna sound ambience is marvellous! All I can say

  3. fred says:


    How I'm supposed to use it? sorry if I'm confused.

    I should add this as parameter on fmod? If it's the case, I did it but I'm not getting any effect I've tried "xpevent_rel_heading" and "xpevent_rel_heading[*]", both has no effect on the sound, any idea?

    • Ben Supnik says:

      You add xpevent_rel_heading (no array dim) and map its movement from -180 to 180 to the attenuation volume.

    • Chris Serio says:

      They will not directly affect the sound in any way. They just give you another FMOD parameter upon which you need to modulate your sound event. Most people will use this parameter to crossfade between different sound recordings (left, front, right, rear etc) but you can do anything you want...add a low pass filter, change volumes etc etc.

  4. Dr Eric Addinall says:

    Why is nobody talking about coping with Mac OS High Sierra? I had to reinstall Sierra after making the mistake of waiting until X-Plane said it would work properly with High Sierra. Don't know why it always seems difficult to let us know when you are aware of problems and are addressing these issues. Even for those of us who are still with X-Plane 10!

    • Ben Supnik says:

      Probably because it's TOTALLY OFF TOPIC for an FMOD post? 🙂 Do you mean:

      "...had to reinstall Sierra after making the mistake of installing High Sierra without checking whether X-Plane actually worked right first"?

      I don't know what to tell you - it's beyond the scope of what we can do to guarantee that every Apple OS upgrade works well with X-Plane. They control the entire driver stack and we have zero insight into it. If you want X-Plane to work really well, don't jump on free major version upgrades when they first come out - wait and let other people be the early adopters.

      We've reached a point where new OS upgrades (1) are free and (2) don't contain mind-blowingly awesome new features. (That might be part of why they're free.) If what you mainly care about is machine stability, there isn't a win here.

      • Ben,
        I realize it is off topic and I did not heed your oft stated advice. You need not publish this if you feel it detracts from what you are doing; I just thought it appropriate to interject that everything is not OK for us iMac users.

  5. Daniela Rodriguez Careri says:


    I've stumbled upon a problem that I don't really know how to fix. I'm trying to create a "turbulence shake" sound event which will play, for example, when ABS_DELTA=sim/flightmodel/forces/g_nrml > 0.32. The event on FMOD has a multi-sound module with different shake sounds. As the event doesn't have parameters and it's single layered, it should be deemed "oneshot" so it doesn't need an end condition.

    That seems to work, but hearing closely you notice that everytime it's triggered it cuts the previous sound tail. I've checked on the profiler and yes, there is only 1 instance of the event created, so everytime the condition is true, the event "restarts", thusly interrupting the playback of the previous sound.

    That made me think, is there any moment where X-Plane triggers a new instance instead of reusing the same event or always uses 1 instance? Is there any way to force X-Plane into triggering more than one instance of an event?


    • Ben Supnik says:

      We currently do _not_ have support for fire-and-forget, which makes event-triggered polyphony a mess.

      That might not be the best technique anyway -- if your g_nrml goes up and down across the 0.32 threshold, you'd get a giant pile of sounds overlapping and it'd sound silly. I'd suggest a few other approaches:

      Consider a looping sound and a different dataref indicator. You might have to use something like a Lua script to calcuate it, but I'd be concerned that the G forces could fluctuate wildly but not 'per frame' and the delta won't give you great results. If you can get an indicator that stays on for "yep, we're in turbulance" you can make a looping sound, nest a few events inside it, and hopefully get something that doesn't sound silly if it is sustained on. You can then end it with a cue.

      You can also look at having the noise loop and using a volume key frame to bring it in and out with the severity of the turbulence.

      • Daniela Rodriguez Careri says:

        Thanks Ben, it's good to know we don't have support for fire-and-forget. I'll try a different technique. 🙂

  6. Axel says:

    This is a bit off-topic for this particular post, but my question is as follows: On the G1000 flight plan page, I am unable to enter any VNAV altitudes. I can only enter VNAV altitudes when using Direct To navigation. Is this to be considered a bug, or is the feature just not fully implemented yet? In other words, my question is whether I should report this as a bug or not.

  7. Jim says:

    Hi Ben,

    With VR support being imminent, any chance you guys could publish which headsets you will support. Christmas is coming and I am sure many in the XP community will have VR headsets on their lists. I recently purchased the new Samsung Odyssey as it has a little better resolution than my Rift, but unfortunately I can not currently use it in XP as it is not supported by the Fly-inside plugin. If it will not work in the native implementation, than it will probably be going back. Thanks for the continued great work.

    • Ben Supnik says:

      As of now, we support only the Rift and Vive. I do not know what the support status is for the wireless revisions that are coming out, but 95% of it is "does it work with SteamVR". If it does, there's a good chance we can make it work - if there's no SteamVR integration, we are not going to support it.

      (IF someday there emerges a major headset that does not support SteamVR, but does move a lot of units, we will consider doing a separate support implementation, but I'm not too worried about this scenario. Any hardware vendor who _wants_ to sell a lot of units is incentivized to write their own SteamVR driver to become compatible with the existing Steam and SteamVR gaming eco-system.)

      TO BE CLEAR: YOU DO NOT NEED TO BUY X-PLANE THROUGH STEAM TO USE VR!!!! We require SteamVR, which is a _free_ app available via the Steam store, so you will need a free Steam account to use VR, but X-Plane can be the LR edition.

  8. Vimal says:

    Kind of unrelated, but when’s your next Facebook live event? I miss those. It’s always nice to hear Austin’s raw passion for aviation and life. Plus, I have some really cool questions and suggestions myself! They are all really cool ideas. I promise!

  9. Bruno says:

    Anyone else not able to change the "CRS" in the G1000? I see a lot of G1000 related changes in the latest "beta", I think someone broke something.

Comments are closed.