Hi! It’s not a simple question, I’ll try to explain.
Suppose we have a audiomixer with several groups, for example “Interactive”, “Voices”, “UI”, “Environment”, etc…
Imagine that in our game the protagonist has several statuses, for example, he is wounded, he is hungry, he is insane, and they can all occur at the same time.
For immersion, we want to run all these sounds through effects on the AudioMixer (components with effects like ReverbZone are not considered). For example, if a character is wounded, the sound is “muted”, if he is hungry, his hearing becomes “sharper”, and if he is insane, we apply some distortion.
I had two ideas how to implement this, both failed. First, I thought about snapshots - there are 2 problems with them, first: we can not know which snapshot is active at the moment, although this can be solved by caching in the script. Secondly: I know about TransitionToSnapshots() that mixing several snapshots, but I’m not sure what to do if I want to turn off one of the snapshots, and as far as I understand the snapshots are mixed, and I need the effects to overlap each other.
The second idea was: create several separate audio groups, each containing a particular effect(Lowpass, Distortion, etc.). And when we need, we can use Send and Receive in out audiomixer groups to manipulate, for example, our “Interactive” audio group, sending it to effector-group.
But here we have a second problem: If we send sound from one audio group to three different audiogroups-effectors, it is all played at the same time, it is chaos. I thought about building a Send-Receive-Send-Receive chain between effectors, but that didn’t work either. That is, I can’t make the effects overlap each other.
At the moment, the only way I can see is to write classes to each audio group and then expose their properties to the code, which would be incredibly boring. And then I would need a huge class that would set the right values for each audio group and for each effect.
All this would be easily solved by accessing the effects on the mixer audiogroups through code, but it’s impossible, and so I’ll have to write classes for these effects myself, through “Expose Parameter”
Does anyone have any ideas? Thanks!