Importing markers

Is there a way to import markers from a MIDI file or from a text file? I have a MIDI file containing lots of markers exported from a pro-tools session and I’d like to be able to import them into Ardour directly rather than recreating them one-by-one. I’ve been able to convert the MIDI markers to a text file so could easily make something like a CSV to import from.

I’m not even aware of whatever part of the SMF specification allows for markers. We certainly don’t handle them in our use of libsmf, and I don’t recall anything in libsmf’s source code that would deal with them.

So I suppose 1 question is: what are these markers?

Your fastest approach would be to generate XML and hand-merge that into that session file. Add a marker or two to an existing session, then search the session file for “Locations” to get an idea of the node format.

Ok, I’ll add them via XML.

I think they are meta events. I just found this in the MIDI spec

FF 06 len text Marker Normally in a format 0 track, or the first track in a format 1 file. The name of that point in the sequence, such as a rehearsal letter or section name (“First Verse”, etc.)

I’m using midicomp to pull the markers out of the MIDI file and into a text file and a quick glance at the source shows that it is also treating them as meta events. I assume this is how most DAWs are handling it.

As of right now no, but I am wondering if that would be difficult to do in Lua to write a script to do that, especially going from text might not be hard.

The alternative is a separate program to convert the text files and insert them into the session file (Which is just XML) but that would likely be more difficult, and should be thoroughly tested to ensure it doesn’t corrupt the session.

1 Like

Ardour can open an external text file via lua?

I believe Lua can, but haven’t looked into that particular functionality myself, so I may have been talking out of my arse:)

1 Like