# Ambisonics and FMOD

**URL:** <https://qa.fmod.com/t/ambisonics-and-fmod/12650>\
**Category:** FMOD Studio\
**Created:** [August 12, 2016, 6:59pm UTC](https://qa.fmod.com/t/ambisonics-and-fmod/12650 "2016-08-12T18:59:30Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![sassota](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@sassota](https://qa.fmod.com/u/sassota)\
**Post date:** [August 12, 2016, 6:59pm UTC](https://qa.fmod.com/t/ambisonics-and-fmod/12650/1 "2016-08-12T18:59:30Z")

</div>

Is it possible to add ambisonics (b-format files) support? at least a playback system…

tks

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [August 14, 2016, 9:56pm UTC](https://qa.fmod.com/t/ambisonics-and-fmod/12650/2 "2016-08-14T21:56:55Z")

</div>

Thanks for the feature request, Ambisonics is something we’re keeping an eye on and b-format decoding is on our todo list.

EDIT:  
We now have support for Ambisonics decoding via the GoogleVR plugin that ships with FMOD on Windows, Mac, Linux, iOS and Android.

---

<div class="post-metadata">

**Author:** ![AlecB](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@AlecB](https://qa.fmod.com/u/AlecB)\
**Post date:** [April 18, 2017, 5:58pm UTC](https://qa.fmod.com/t/ambisonics-and-fmod/12650/3 "2017-04-18T17:58:54Z")

</div>

> [@](#):
>
> Thanks for the feature request, Ambisonics is something we’re keeping an eye on and b-format decoding is on our todo list.
> 
> EDIT:  
> We now have support for Ambisonics decoding via the GoogleVR plugin that ships with FMOD on Windows, Mac, Linux, iOS and Android.

Hey Mathew - any update on this?

---

<div class="post-metadata">

**Author:** ![bgallaghermusic](https://avatars.discourse-cdn.com/v4/letter/b/50afbb/32.png) [@bgallaghermusic](https://qa.fmod.com/u/bgallaghermusic)\
**Post date:** [April 21, 2017, 9:20am UTC](https://qa.fmod.com/t/ambisonics-and-fmod/12650/4 "2017-04-21T09:20:02Z")

</div>

I’m having issues with the GVR Soundfield plugin. The info from Google’s site is not specific enough. Since the Soundfield plugin goes on the audio track and not the master, does there need to be anything special on the master track? Should there be no plugins on the master track? I’m assuming the event should be placed on the Player but I can’t get this going. Would be grateful for some help. Thanks!

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [April 26, 2017, 4:42am UTC](https://qa.fmod.com/t/ambisonics-and-fmod/12650/5 "2017-04-26T04:42:54Z")

</div>

Put the GVR soundfield plugin on the master track of the event, also place the FOA file on the event master track. The Google documentation is incorrect and needs updating.

---

<div class="post-metadata">

**Author:** ![Luis1](https://avatars.discourse-cdn.com/v4/letter/l/91b2a8/32.png) [@Luis1](https://qa.fmod.com/u/Luis1)\
**Post date:** [April 28, 2017, 1:08pm UTC](https://qa.fmod.com/t/ambisonics-and-fmod/12650/6 "2017-04-28T13:08:07Z")

</div>

Mathew, thank you so much, you seem the only one addressing this important issue. I did as you suggested, the FOAfile on the vent master track and the sound field plugin as well. I can not audition through my headphones, is that normal? Do I have to imported into a 360 video in Unity?

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [May 1, 2017, 3:38am UTC](https://qa.fmod.com/t/ambisonics-and-fmod/12650/7 "2017-05-01T03:38:00Z")

</div>

Have you added the GVR listener to the master of the global mixer? This is where the signal created by the GVR soundfield and source plugins send their audio.

---

<div class="post-metadata">

**Author:** ![r618](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/r618/32/36_2.png) [@r618](https://qa.fmod.com/u/r618)\
**Post date:** [July 4, 2017, 1:41pm UTC](https://qa.fmod.com/t/ambisonics-and-fmod/12650/8 "2017-07-04T13:41:43Z")

</div>

Mathew, is GVR accessible from low level API, or any plans of doing so if not ?  
I’m specifically looking at C# wrapper in Unity.

---

<div class="post-metadata">

**Author:** ![r618](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/r618/32/36_2.png) [@r618](https://qa.fmod.com/u/r618)\
**Post date:** [July 10, 2017, 7:33pm UTC](https://qa.fmod.com/t/ambisonics-and-fmod/12650/9 "2017-07-10T19:33:17Z")

</div>

Matthew, is DSP::setParameterData implemented correctly in the low level C# wrapper in Unity plugin ?

I keep getting ‘Exception: dsp.setParameterData ERR\_INVALID\_PARAM - An invalid parameter was passed to this function.’ with testing/garbage data, e.g. something like

byte[] bdata = new byte[1];  
dsp.setParameterData(di, bdata);

- I’ve tried passing more meaningful byte array marshaled from new FMOD.DSP\_PARAMETER\_3DATTRIBUTES struct, but the results are exactly the same

- paramdesc.desc.datadesc.datatype is FMOD.DSP\_PARAMETER\_DATA\_TYPE.DSP\_PARAMETER\_DATA\_TYPE\_3DATTRIBUTES  
, for other FMOD\_DSP\_PARAMETER\_TYPEs I can read, and set values of the DSPs created from all three nested plugins in of gvraudio OKay in quicky built testing UI in unity. i.e. gain, spread, occlusion and all other scalars modify the channel correctly.

I’ve modified dsp\_inspector low level c++ sample, where the same - setParameterData for loaded nested gvraudio plugins - call succeeds.

- Both of them can’t read though, both failing with Exception: dsp.getParameterData ERR\_UNSUPPORTED ( FMOD error 68 ) ) - don’t know if that’s relevant…

Should I assume that c# wrapper simply does not work for now ?  
If yes is there something what can be done ?

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [July 11, 2017, 5:46am UTC](https://qa.fmod.com/t/ambisonics-and-fmod/12650/10 "2017-07-11T05:46:29Z")

</div>

The data type expected by the DSP\_PAN.\_3D\_POSITION is FMOD\_DSP\_PARAMETER\_3DATTRIBUTES\_MULTI. Using this should fix the ERR\_INVALID\_PARAM.

---

<div class="post-metadata">

**Author:** ![r618](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/r618/32/36_2.png) [@r618](https://qa.fmod.com/u/r618)\
**Post date:** [July 12, 2017, 5:00am UTC](https://qa.fmod.com/t/ambisonics-and-fmod/12650/11 "2017-07-12T05:00:56Z")

</div>

Thanks, Cameron! Helped a bit.

I’ve been trying to drive the Google GVR Source DSP with transform position, but am getting questionable results.  
The up/down direction seem to morph the signal a little, but change in left/right and fwd/back position seem to have no effect on it. - I listen to it on normal stereo / headphones setup playing fmod sound/channel.  
( For velocity and forward/up vector I am substituting some bogus/defaults for real values )

I was getting tons of crashes. Never entirely figured what was the cause, but generally - I think - zero vectors values in data, maybe ?  
Supplied room definition from gvr github sdk at the end, too - no idea if it _that_ helped entirely, but editor seems to be more stable for now.

At this point I can’t seem to see any obvious problem in my code. Do you have an idea where I could look further ?

Not touching ambisonics / Google GVR Soundfield for now, but I guess that requires rotation only.

This was the most prominent stacktrace

========== OUTPUTING STACK TRACE ==================

0x00007FFE15D1F62B (gvraudio) FMODGetPluginDescriptionList  
0x00007FFE15D1E4B8 (gvraudio) FMODGetPluginDescriptionList  
0x00007FFE15D1DF5A (gvraudio) FMODGetPluginDescriptionList  
0x00007FFE15D1C9E8 (gvraudio) FMODGetPluginDescriptionList  
0x00007FFE15D1DF32 (gvraudio) FMODGetPluginDescriptionList  
0x00007FFE15D1C9E8 (gvraudio) FMODGetPluginDescriptionList  
0x00007FFE15D1DF32 (gvraudio) FMODGetPluginDescriptionList  
0x00007FFE15D1C9E8 (gvraudio) FMODGetPluginDescriptionList  
0x00007FFE15D1DF32 (gvraudio) FMODGetPluginDescriptionList  
0x00007FFE15D1C9E8 (gvraudio) FMODGetPluginDescriptionList  
0x00007FFE15CF8148 (gvraudio) FMODGetPluginDescriptionList  
0x00007FFE15CF3FE8 (gvraudio) FMODGetPluginDescriptionList  
ERROR: SymGetSymFromAddr64, GetLastError: ‘Attempt to access invalid address.’ (Address: 00007FFE15CF082E)  
0x00007FFE15CF082E (gvraudio)  
0x00007FFE0A00639D (fmodstudiol) FMOD::ChannelGroup::release  
0x00007FFE0A0044C1 (fmodstudiol) FMOD::ChannelGroup::release  
0x00007FFE0A044CC6 (fmodstudiol) FMOD::GeometryI::setUserData  
0x00007FFE0A045226 (fmodstudiol) FMOD::GeometryI::setUserData  
0x00007FFE0A04501C (fmodstudiol) FMOD::GeometryI::setUserData  
0x00007FFE0A0B5921 (fmodstudiol) FMOD::GeometryI::setUserData  
0x00007FFE0A018791 (fmodstudiol) FMOD::ChannelI::validate  
0x00007FFE09FE8217 (fmodstudiol) FMOD::DSP::showConfigDialog  
0x00007FFE0A101C17 (fmodstudiol) FMOD::GeometryI::setUserData  
0x00007FFE0A101DBE (fmodstudiol) FMOD::GeometryI::setUserData  
0x00007FFE4E968364 (KERNEL32) BaseThreadInitThunk

========== END OF STACKTRACE ===========

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [April 18, 2017, 10:01pm UTC](https://qa.fmod.com/t/ambisonics-and-fmod/12650/12 "2017-04-18T22:01:05Z")

</div>

I’ve updated my answer to reflect that we do indeed have FOA support now via the GVR plugin.

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [July 5, 2017, 2:46am UTC](https://qa.fmod.com/t/ambisonics-and-fmod/12650/13 "2017-07-05T02:46:13Z")

</div>

Yes, it is accessible, just a bit of work. You can use System::loadPlugin to load the DLL, System::getNumNestedPlugins and System::getNestedPlugin to get the 3 GVR plugin handles, then System::createDSPByPlugin to create them from the nested handles. You can add them to Channels or ChannelGroups with addDSP and control the parameters via DSP::setParameter. You can enumerate the parameters with DSP::getNumParameters and DSP::getParameterInfo. Be aware you’ll also need to drive the 3D attributes for the panner yourself with FMOD\_DSP\_PARAMETER\_3DATTRIBUTES.

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [July 12, 2017, 10:43pm UTC](https://qa.fmod.com/t/ambisonics-and-fmod/12650/14 "2017-07-12T22:43:04Z")

</div>

Try using none bogus values, as we don’t have any vision into Google’s plugin code it may be affecting it. Make sure you are setting the number of listeners to 1, setting values on the zero-th listener and using unit vectors for up and forward.

If none of that helps you may need to contact Google because, as I mentioned, we don’t have access to their plugin/code.

---

<div class="post-metadata">

**Author:** ![r618](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/r618/32/36_2.png) [@r618](https://qa.fmod.com/u/r618)\
**Post date:** [July 13, 2017, 6:43am UTC](https://qa.fmod.com/t/ambisonics-and-fmod/12650/15 "2017-07-13T06:43:26Z")

</div>

yup, using 1 listener all along  
will set up all vectors properly and possibly reply here  
btw thanks for guide, hope I didn’t hijack the thread completely )

---

<div class="post-metadata">

**Author:** ![r618](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/r618/32/36_2.png) [@r618](https://qa.fmod.com/u/r618)\
**Post date:** [July 16, 2017, 9:55pm UTC](https://qa.fmod.com/t/ambisonics-and-fmod/12650/16 "2017-07-16T21:55:24Z")

</div>

Just FYI - DSP\_PARAMETER\_3DATTRIBUTES works for me consistently with sane input values. \*  
( it’s probably not possible to get something reasonable with \_MULTI - the weird overlap with DSP\_PARAMETER\_3DATTRIBUTES would explain the inability to get meaningful output, inconsistent crashes and various other dragons ).

Thank you both very much for patience and answering the questions.

- for 3d source, should I say. 🙂 - ambisonics seem to be better with DSP\_PARAMETER\_3DATTRIBUTES\_MULTI
