Perceived note onset compensation for MIDI tracks

Hi…
When a singer sings a syllable on a note, that note is perceived to start at the first vowel, even if there are consonants before it. Similarly, instruments produce attack times or some noise (e.g. the mechanism noise of a piano before the hammer hits the strings) even before a note starts, that also influence the perceived onset time. A good instrumentalist can compensate for that, but there’s no such compensation for MIDI that I know of. (Recorded audio of singers/instrumentalists is already pre-compensated and trivially adjusted in Ardour)

I know I could just move the notes or the regions backwards to manually compensate for it, but I feel that this is an ugly hack, and it is unclear to me how to do that in the face of changing musical tempo that scales linearly, but the compensation is constant.

I wonder, if I could contribute a feature that allows for automatic compensation of perceived note onset. I was thinking of allowing to set either a constant offset or a profile on a per track/per channel/per region basis. A profile would be a mathematical model that describes perceived note onset times for an instrument (think physically modeled organs, pianos, but also samplers,…) or a specific synth preset based on pitch and maybe also velocity and other parameters.

I don’t really know if there is any pre-existing work in that direction. I’m just a hobbyist producer, and I don’t use other DAWs besides Ardour, but ChatGPT claims other DAWs might have something like a constant time compensation already.

I’m also a professional Java developer with a secret love for C++. If someone could show me the ropes and give me an overview of which classes I’d need to touch to implement that feature and Ardour doesn’t need a complete rewrite for it (i.e. the amount of work is reasonable), I could imagine developing the feature myself in my spare time and contributing it.

What do you think?