When I import this into Ardour, I would expect to see the midi region end right after the eighth rest. Instead the region is extended to the entire bar:
How did you create that .mid file? perhaps due to 4/4 the TrkEnd was placed at the end of the bar?
–
Only very recently (Ardour/git, upcoming Ardour 9) Ardour expands MIDI files up to the next bar by popular request (loop patterns). I don’t know the details about that though. ben and @paul were in charge of that part.