Fade from current level, to a new level

Sam Papworth's icon

Hello hello,

Please forgive me if this is simple an my brain isn't seeing it!

I am trying to create a fade off of live.gain (doesn't have to be this object) which can have user set parameters, and then on a bang from a button, the initial signal fades up/down to another user selected position. I cant seem to get it so that the fade, using line, can take the variable from the currently set level, and would rather the user didnt have to go in and set current level separately (to avoid weird jumps in volume).

For example:

User is playing a sound at -6dB, and has set an end fade of -20dB over a transition time of 3 seconds., which should happen as a button is pressed.

Hopefully I have explained this enough, but, can probably explain more if needed.

TIA!

double_UG's icon

Max Patch
Copy patch and select New From Clipboard in Max.