Momentary fade in and out function

I noticed that when i use an external momentary switch the parameters it’s assigned to instantly change but fade back into their original settings when i let go. This made me think that being able to control the speed of the fade in and out would allow us to easily create effects like the Digitech Ricochet, and maybe even a Freqout like effect. For instances the Freeze effect already has an attack and release function, i don’t know it these work the same way in the code but if they are similar maybe it wouldn’t be too much of a challenge to implement.