How to dynamically change Source Effect Chain in Audio Component

Hey!)

Can someone please explain me how can i dynamically set Source Effect Chain in AudioComponent? I want to have several source effect chains and switch them dynamically.

This logic doesnt work( audio is an AudioComponent

It won’t work. It’s not hooked up to anything.

Thank!) I know - its just an example.

Well then it would help a ton if you shared the code you are attempting to link together to show how you are going about it. Because maybe that node is fine and the way you are getting there is faulty. Point is we have no way of knowing why it doesn’t work.

But to take a wild stab in the dark here, I would put all my sounds I want to play into an array, then get a copy, promote the index to a variable and then play your sound. Then set a delay, then get that index variable and add 1 to it then set that index variable. After that to keep the array in bounds do a branch check to see if the index variable is equal to the array length minus 1. If it is then set the index variable back to zero, if its not create a custom event at the beginning and call it here so it loops and voila you have a sound effect chain.

Thanks for your answer, but i think you dont understand what i want( It doesnt metter when this code execute. I can link this part with Begin Play, but there is no changes - the sound keeps unchanged. Source Effect Chain is a special type of asset, which can apply to Sound Cue, etc. I dont have several sounds, i have only one, and want to modify it with Source Effect Chain, which contains several Source Effects Presets. Before play i remove Source Effect Chain from my Sound Cue, on Begin Play after some delay i set it, but as i said before nothing changes. I want to note, that i use New Sound Engine. Source Effect Chain and Source Effects Presets exist only with New Sound Engine.

Hi, I am experiencing a similar issue and I was wondering if you happened to get your dynamic change working. I am attempting to dynamically change the settings of a source effect preset that is within a source effect chain.

Any help is greatly appreciated.

1 Like

Same problem… Any solution ?

I’ll put it in this thread since I’m having a similar problem, hopefully it will help you guys too if we get a solution…

I am setting the source effects panner with a slider. It works perfectly fine and pans the signal appropriately.

However, even though at runtime the value is updated and plays accordingly, the setting never changes when I try to recall it. I need to recall it to set the slider to the correct value, when I go back from that menu and go back in the slider is always at the default of half way, even when the signal is playing hard left.

Here it has been set on the slider to -1, the audio is still at this point playing hard left as it should be, yet it reads this as the default value of 0 and hence sets the slider to 0.5.

Below we have a saved value being loaded, it should be -1 again in this case. Print string in green giving us the value which has been set in ‘set settings’, and then print string pink the value taken from the settings immediately after it has been set.

So it loads up correctly and pans the sound hard to the left as one would expect, however…

It’s right there being set to the correct value, playing at the correct setting, then reading out the wrong setting. What is going on here please? The slider value on the right is also being set in this frame and as you can see it is at 0.5, corresponding with the 0 value coming from the panner. It should be hard to the left for the -1 value.

My solution was to save all pan settings into a separate array each time it is edited or loaded.



If you need to save more than one value then you may want to consider manually making a new struct matching the one you want to set, and saving it separately to be recalled as needed. This works perfectly fine and I will carry on with it like this, however it seems somewhat redundant.

So in summary what appears to be happening is you can edit source effect settings at runtime, but these settings will not be saved for recall as the saved settings are read-only. The edited setting exists somewhere in the memory to ensure they play as you have set them, which it does so consistently, however they can not be recalled.

I’m not sure I am understanding this correctly but that’s what I gathered from this slightly confusing arrangement.