Ambisonics and FMOD

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

tks

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.

1 Like

Hey Mathew - any update on this?

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!

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.

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?

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.

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.

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 ?

The data type expected by the DSP_PAN._3D_POSITION is FMOD_DSP_PARAMETER_3DATTRIBUTES_MULTI. Using this should fix the ERR_INVALID_PARAM.

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 ===========

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

1 Like

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.

1 Like

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.

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 )

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. :slight_smile: - ambisonics seem to be better with DSP_PARAMETER_3DATTRIBUTES_MULTI