I’m trying to import some MIDI markers, originally exported from a Pro-Tools session. I remember Paul implemented marker import a couple of years ago - MIDI Markers (again)
MFile 0 1 9600
MTrk
0 SMPTE 96 0 0 0 0
0 Tempo 1000000
115200 Meta Marker "No Vibrato Piano Down"
5452800 Meta Marker "No Vibrato Piano Up"
10905600 Meta Marker "No Vibrato Mezzo Down"
16320000 Meta Marker "No vibrato Mezzo Up"
21696000 Meta Marker "No Vibrato Forte Down"
27110400 Meta Marker "No Vibrato Forte Up"
32563200 Tempo 600000
32563200 Meta Marker "100 bpm"
32640000 Meta Marker "Tremollo Mezzo"
40473600 Meta Marker "Tremolo Forte"
40473600 Meta TrkEnd
TrkEnd
Dave - how did you generate that file? The last marker has the same position as the “end” of the track, which by my reading means that it is technically outside of the track. I may need to re-read the SMF specs more carefully …
The file was provided to me by the studio I’m working with. They exported from pro-tools which I believe has an option to export a marker track as MIDI. I’m not a pro-tools user but I’ll ask some colleagues who use it if they can give me some more information about this process.
I checked the official MMA specification for SMF, and it remains silent on whether the Trk end event should have its time handled as an exclusive or inclusive time.
Consequently, markers with the same timestamp as the Trk end are ambiguously either part of the region, or not.
That’s why your second marker here doesn’t show up.
There’s an “obvious”-style solution, which that all markers listed for a given SMF Trk are considered to be inside the track, but for this to work in ardour we’d have to make the region created for the Trk be 1 MIDI tick longer than is stated in the SMF.
Say you have MIDI file with a track exactly 1 beat long at 1920 ticks/beat.
Now add a marker on every tick. With inclusive end that would allow to have 1921 markers (0, 1, 2, … 1920) which seems wrong (tick 1920 is really beat 2 tick 0).