Control (and fade in) volume of bus effect with Midi CC (64)


Noob in frenzy loop
How do I fade in the volume of a bus effect using the MIDI CC 64 (sustain pedal) as the trigger?

I have been looking at ways to trigger the send level of an insert slot on a bus, using the sustain pedal, or a MIDI CC 64. How can I do that?

My issue:

I want to add more reverb (from say -30db to about -10db) to a bus when the sus pedal is pressed down. I also want to do this with a fade-in time of about 1-2 seconds. It´s a key instrument.

There are ways of doing this on groups, which is good, but it will be polyphonic, and that would use too much resources. I need this to happen on a bus, preferably. All layers/groups go to certain buses, and it´s there I need it to happen.

The KSP "set_engine_par" does not seem to include any fade in options for controls...

I could perhaps use the "wait" command a few times, and raising the volume multiple times. Since it is for a reverb it could end up working okay, but probably not without one hearing glitches or incremental clips or so. :/



Noob in frenzy loop
You specify the fade in time by wait() time and number of iterations of the while loop.
I see, well ish. Is there an example script somewhere I could have a look at? Have not found much while loops in the scripts I´ve looked at. Thanks.