smoothing should be every frame
smoothing should happen every every frame not on midi event -- (afaik I can see, smoothing is happening here....
https://github.com/ofZach/dayForNightSFPC/blob/master/addons/ofxParameterMidiSync/src/ofxParameterMidiInfo.cpp#L100-L107
I can't find an easy way to duplicate a parameterGroup (having a kind of shadow param group might be one way to do this, one gets update from midi, the other catches up to the unsmooth value)....
one simple solution (but requires editing projects) is to add variables that track, and add a function called smooth to baseScene, ie for yosukeJhonWhitneyMtrix:
// ofParameter
//----------------------------------------- if it can be smoothed, smooth it
ofParameter<float> radiusSmooth;
ofParameter<float> speedSmooth;
ofParameter<float> ballRadiusSmooth;
void smooth(){
radiusSmooth = SMOOTH_AMOUNT * radiusSmooth + (1-SMOOTH_AMOUNT) * radius;
speedSmooth = SMOOTH_AMOUNT * speedSmooth + (1-SMOOTH_AMOUNT) * radius;
ballRadiusSmooth = SMOOTH_AMOUNT * ballRadiusSmooth + (1-SMOOTH_AMOUNT) * radius;
}
//-----------------------------------------
SMOOTH_AMOUNT can be defined in baseScene or appConstants (like 0.95, etc).
you will need to call smooth in scene manager before update....
can't seem to find a way to do this more automatically.... at least the params are pretty clear per project and it's just the floats to smooth. I hope this helps! zach
not clear that radiusSmooth, etc need to be ofParameter
then, you need to use them in the code instead of the unsmoothed params like radius...
(so the smoothing happens in the visuals but not on the parameters / code side of the screens...)