That actually should work. I’m surprised nobody found this before.
I just looked at the declaration of that function and it seems I forgot to add the Autotype attribute to it. I’ve just fixed that and it will be in the next update (coming quite soon)
The Autotype is designed to handle certain kinds of conversions based on relationships.
NoteMessage, ChannelMessage, etc are all specialized versions of MidiMessage and if Autotype is defined, then you can pass any of those as an actual argument.
That said, using such a feature with your own functions requires a deep understanding of type relationships and should be done with care (i.e, you’re on your own if you break something)