Here’s something I’m trying to do which I think is not possible right now, but I want to document it a) to make the case for its possible addition in future UE versions and b) on the off-chance that someone can suggest a workaround
We’re dynamically spawning synth instrument instances, where an instrument is an instance of a BP class that can contain a Modular Synth, a Granular Synth or a custom multisample player. We set these up from a user struct-based datatable which acts as our instrument bank. The bank also contains arrays of Source Effect Preset Settings, as well as an array of Effect types referencing each setting.
This means we can construct a per-instrument Source Effect chain which we can re-order dynamically, and which can contain multiple instances of the same effect type with different settings (e.g. a 120hz EQ cut at position 0 in the chain, then a compressor, then a 1400hz EQ boost at position 2).
To be able to do all that without having to create and organise a directory full of Preset assets in advance is great for workflow and reusability! The only stumbling block is that it seems to be impossible to dynamically add SourceEffectPresetChains to audio components (or remove them); nor can they be linked to a local variable in your BP. They have to be explicitly set in the audio component’s Effects config. While submix and bus stuff can be changed at run-time, SEPCs can’t.
So the result is that, if I use an empty SEPC asset as a placeholder for all instances, every new instance overwrites that Chain with its own Effect Presets and so all ‘instruments’ end up with the same effects chain (ie that of the last instrument to be spawned). One of our C++ coders wonders if the SEPC asset type can be forced to have a UPROPERTY of ‘instanced’ (I don’t know how to do this, but I’ll ask him to give it a try).
Is there any reason why this wouldn’t work? I mean, is there any Audio Mixer ‘magic’ going on that means we won’t be able to mess without building our own fork of the engine? Because we’d like to avoid that if possible
And, of course, can anyone think of a workaround for this - maybe something obvious that I’ve missed? Attempts to use ‘Construct Sound Effect Source Preset Chain’ to assign an instance of a Chain to a local variable were my first thought, and this works, but they then can’t be applied to the audio component…so no dice. Any suggestions appreciated!