I am developing a macro to calculate a moving average to smooth out some sound amplitude data, and I am running into a problem where the “Running Sum” variable below remains 0, does not get updated through the course of the ForEach loop, as if it is being reset on every step of the loop.
What am I doing wrong?
Thanks in advance!
Haven’t done too much with macros but doesn’t that “Assign” need to be connected to the output as it is the “loop body”? Because to me this seems like the only time you will have an “output” variable from this macro is when the loop is “completed” since that is the only execution pin that actually heads toward what I assume to be the “output” node. So basically this loops through. sets the variable over and over again but you never see that as an output because it actually never gets “outputted” from this macro until the entire loop is complete, at which point it flows through the complete execution pin, resets the variable to 0 and finally “outputs” the result, which is always going to be 0…