technically this is impossible because midi is just midi notes on or off… The easy answer is the one bachstudies mentions, which is to make Ardour route synthesize a MIDI track onto an Audio one, and then you can use further things with the audio waveform data that you can’t otherwise do on the midi track.
If you’re thinking of repairing something with MIDI gates to have more control over how “synthesis” is working for each note, there’s a special plugin I previously posted about as this might sound what you’re looking for. There’s ways you can change the BPM of a re-factored MIDI instrument plugin but still be working within the MIDI Track. Essentially it’s a “wrap-around” plugin that can help “tune” your MIDI instrument plugin with various parameters… — if this interests you, it would be the non-free DiscoDSP Bliss plugin with its “resampling” features…