Resonance Audio Source Gizmo

Hi there!

I got a request from my team’s audio lead recently, and I’ve been doing a bit of research into whether it’s actually possible. Basically, he was wondering whether it would be possible to take the values from the Resonance Audio Source and display that within Unity as a gizmo/custom editor around an object with the FMOD Event Emitter component - much like how the Override Attenuation gizmo appears in the scene.

So far I haven’t been able to find any examples of this sort of thing being done, and from my understanding those values would be built into our banks and thus inaccessible, though I’m not very experienced with Resonance Audio. However, I figured I would ask in the case that I might potentially be missing something.

For further context, the Resonance Audio SDK (which I’m aware is it’s own separate thing from how the plugin works with FMOD) does provide something similar to what he may want implemented, but this works specifically with the Unity component Audio Source.

Hope to hear back! Even if it’s not possible, it would be great to get a definitive answer on that. Thanks!

There is no easy way to do what you want to achieve, it’s possible, but no easy. To access the data you need you would have to create an instance of the Event, then using the API navigate the ChannelGroup hierarchy looking for the Resonance Source DSP. Once there you could find the DSP parameter and extract its value.

If you surfaced the information you need as an Event parameter with a well known name (by automating Directivity and Dir Sharpness), you could short cut a bunch of the complexity. You could cache the default values of the paramters at the same time we cache the min / max distance, store it in the EditorEventRef and draw it in StudioEventEmitterEditor.

Again this would involve some edits to our script, but if your keen, it should be possible.
Note the above won’t update the editor if you change the directivity and sharpness via the parameter as it only caches the default value.

As this is very specific it’s not likely something we would implement as part of the FMOD package I’m afraid.

1 Like

Hi Mathew, thanks for the response! That does seem awfully complex, but thank you for some further info. I’ll have to get back to our audio lead and see where he wants to go from here, but I get the feeling if changing the value in FMOD Studio does not automatically change what is seen within Unity, it won’t particularly satisfy what he’s hoping to achieve (which I believe is what you’re saying).

It depends how the value is changed, if the default is changed in Studio and the banks are rebuilt, Unity will update using this method. If you set the value in Studio via Live Update without rebuilding Unity won’t see it and if you set it via the initial parameter value as presented in Unity it won’t update.