Take a look at the patches I posted for a “Discarder” here and a “Pressure added to CC” thing here
Both use a message going through the pipeline to create a virtual mapping which then modifies an Argument setting in a Transform in the same line.
The diagram in the second one makes this clear (I hope)
As virtual mappings are still pretty new, we’re probably all still learning the subtleties:
both the above were handling a flow/series of messages so it maybe wasn’t super important if the updater message was maybe late.
With the patch mentioned here, though, it most definitely was† and I had to delay the messenger note a tiny amount to make it work.
†check it out and see what happens when you disable the Delay…
So you might need to play around and learn what'll make your thing work.
PS. My delayed "messenger note " didn’t need a Note Off cos it was getting just Transformed back immediately after.
If I was going to delay both a “true” Note On and its Note Off I think it’d need another trick
(Delay is not my forte – both @Giedrius & @JoeyButters are more skilled than me at making a delay of both without extra repeats)