Envelopes for selected data/events

I would love to have a command that envelopes the selected data (look at pictures)

from start to finish. Perhaps with a few options for what kind of curve. This would greatly speed up work with midi, especially when working with expressions.
I know there is a line tool (parabola/sine etc) but I find it a little clunky, and I have to deselect snap every time to make it fit my selection. And I don’t find it that precise. The tool is good for other purposes though.

Has anyone managed to create a macro for this? Or is there a function in cubase I have missed?

There is of course envelope for recorded events, but for midi data I have not found anything similar.

So, something like, “envelope selected data” with a dialog box of what kind of curve.