Create Metasound Interface

In this video, it’s shown that custom Interfaces for metasounds can be made.

Minute 19:

I’ve scoured the docs and internet but can not find anyone who’s done this.

I’d like to make an interface the returns a custom hearing state for the player listening to the metasound, similar to how attenuation gives info about the distance a metasound has to a listener.

Goal would be to have a hearingComponent which would populate this interface for any metasound they are listening to.

Any help or resource, or where for instance the other interfaces are made. I found the IAudioParameterInterfaceRegistry where the other default interfaces are added:

Audio::IAudioParameterInterfaceRegistry& InterfaceRegistry = Audio::IAudioParameterInterfaceRegistry::Get();
InterfaceRegistry.RegisterInterface(Audio::AttenuationInterface::GetInterface());
InterfaceRegistry.RegisterInterface(Audio::SpatializationInterface::GetInterface());
InterfaceRegistry.RegisterInterface(Audio::SourceOrientationInterface::GetInterface());
InterfaceRegistry.RegisterInterface(Audio::ListenerOrientationInterface::GetInterface());

but that’s as far as I’ve got in the code rabbit hole. Will post here if I find more.

Ok, I’ve created an interface by copying the SountAttenuation interface example.

AudioSettings.cpp
ActiveSound.cpp
SoundAttenuation.h
SoundAttenuation.cpp

While this works, I’m pretty sure an external interface can be defined and registered using RegisterExternalInterfaces → MetasoundInterface.cpp

I’ll look into how this can be done, instead of injecting code into the files to include a custom interface where the engine default interfaces be.

Hey man, I’m in the same position, also curious how to add custom Metasound interface, please let us here know if you found something

IAudioParameterInterfaceRegistry::RegisterInterface works well to register my custom interface (provided it’s done early enough) - but I have no idea how to update the parameters without severly hacking it into ActiveSound.cpp