Automating Assigning Control Buses to Soundclasses

I’m using AI to build me a python script to automatically assign Control Buses to the Modulation->Volume property in Soundclasses but I haven’t been successful. I seem to be running into a dead end where it thinks this property simply isn’t exposed. So far these scripts have been excellent in other areas (including assignins assets to other assets) but for this particular one it doesn’t work.

I’m wanting to check here if it’s possible to do this? And if so, that are the exact properties the script should be playing with?

Thanks

Hello,

Yes, you can assign Modulation to Sound Classes. The list of Modulators on the Sound Class destination is accessed via USoundClass::ModulationSettings::VolumeModulationDestination::Modulators, which is a container of type TSet<TObjectPtr<USoundModulatorBase>>. Adding to that set will add the modulators to the sound class. Hope this helps!

Thanks a lot! I’m just wondering where exactly in the online documentation can I find this info? I’ve looked here https://dev.epicgames.com/documentation/en\-us/unreal\-engine/API/Plugins/AudioModulation and maybe it’s right in front of my face. I’ve no coding experience so it’s confusing to me. But it will be helpful for me to know where exactly to look and what info to feed into the LLM in future when it struggles to know what to do.

In this case, you would find this name by looking at the USoundClass documentation instead of the Modulation documentation, and on there you would go to this FSoundClassProperties object. You can find the Modulation settings there.

This is something somewhat unique about the documentation for Audio Modulation; it has its own documentation, but a lot of the destinations live on other audio-related objects. There is a list of the places to start looking in the Audio Modulation Reference Guide.