I’m trying to construct a simple system for dynamic audio layering that takes as a real-time argument an integer input (“intensity”) and uses it to control the relevant mix level of several simultaneous wave players. Currently I am using Trigger Compare and Trigger Route nodes so that at specific cue points in the base layer, I can check the intensity value, and use that to determine whether or not I should fade in/out the other layers.
This works fine for the most part. However, I am struggling a bit, because what I would like to do is have the ability to independently control the “fade in” and “fade out” times when a change is triggered. Which is to say, if intensity increases, the added layers should fade in quickly, but when intensity decreases, there should be a more gradual decay.
In Blueprint, this would be easy; we would simply cache the old int32 value before doing the check, and then compare the new value to the old value; if it is higher, we would use X fade time, and if it was lower, we would use Y fade time, and then we would update the int32.
However in MetaSounds, the trigger “execution” path doesn’t seem to be in any way related to the setting of variables? A variable setter is just an undecorated node that takes an input. It doesn’t seem to have any “place” within the execution chain. I cannot say
“Trigger > check int vs input > set input” to ensure I am comparing the old value to the new value, because the variable and the input value are just sort of… the same. Always. There doesn’t seem to be any way to specify WHEN a setter occurs.
Interestingly, this is not true of arrays. If I go to set an array, I get the appropriate trigger input to set the array. And this would be a workable solution, except I have a very hard time believing the correct way to manually set vars in MetaSounds is to make all vars into arrays of size 1. Surely I’m just missing something?
EDIT: actually I think I misunderstand how array trigger execution works because even trying to set this up with size-one arrays it’s nonfunctional. The value I am passing into the array and the value previously contained in the array are always identical, even if the array getter’s execution is sequentially before the array setter.