I suspect your brief can be done using fade commands in the macro. However another way of achieving it would be an envelope-follower, like Steve’s dynamic-mirror plugin. A very intricate envelope template could be followed using that method …
I’ve never used Dynamic mirror in a macro though.