Hi! How could I create audio options ( change audio volume ) using MetaSound/Audio Modulation plugins?
Before:
Sound/Sound Cue
→ Class ( Sound Class )
Sound Class
Sound Class Mix
→ Sound Class Effect ( Sound Class Array )
Sound/Sound Cue has Sound Class.
Sound Class Mix has Sound Classes and change its volume.
UGameplayStatics::SetSoundMixClassOverride(GetWorld(), SoundMix, SoundClass, Volume);
UGameplayStatics::PushSoundMixModifier(GetWorld(), SoundMix);
===========================================================================
Now ( using Lyra as an example ) :
MetaSound
→ Class ( Sound Class ) or
→ Base Submix ( Sound Submix )
Sound Class
→ Default Submix ( Sound Submix )
→ Volume Modulator ( Parameter Patch )
Control Bus
→ Parameter: Volume
→ Mix: What is this for?
Control Bus Mix
→ Mix Stages ( Control Bus Array )
- Replace for Sound Class Mix?
Parameter Patch
→ Parameter: Volume
→ Input ( Control Bus Array )
- Blend values between Control Bus parameters, right?
Sound Submix
- When to use?
MetaSound has Sound Class or Sound Submix ( or both using specific values ).
Sound Class has Sound Submix ( Parameter Patch if needed ).
Control Bus has Parameter I want to change.
Control Bus Mix has Control Bus and change its parameters? NOT WORKING
Parameter Patch has Control Bus and Parameter I want to blend.
Sound Submix what it does?
// initialize
UAudioModulationStatics::ActivateBusMix(World, MyControlBusMix);
// update values
FSoundControlBusMixStage ControlBusMixStage;
ControlBusMixStage.Bus = ControlBusPtr;
ControlBusMixStage.Value.TargetValue = InVolume;
ControlBusMixStage.Value.AttackTime = 0.01f;
ControlBusMixStage.Value.ReleaseTime = 0.01f;
TArray<FSoundControlBusMixStage> ControlBusMixStageArray;
ControlBusMixStageArray.Add(ControlBusMixStage);
UAudioModulationStatics::UpdateMix(World, MyControlBusMix, ControlBusMixStageArray);
In my case the volume is not changed.
I’m using MetaSound with both Sound Class and Base Submix.
What am I missing?
Thank you!