Importing MIDI files with most metadata

While working on a lua script to automate some actions from MIDI metadata, I just realize that most of the metadata are just thrown away in libs/evoral/SMF.cc SMF::load_markers(), so it will never work. :grimacing:
Could I add a new button on the β€œAdd Existing Media” form along β€œUse MIDI Tempo Map” and β€œImport MIDI markers” and implement the storage of all the missing event types? Storage is cheap nowadays… :slight_smile:
This is somewhat related to Importing markers - #7
To give some context on my use case, I use a lot the abc format along abc2midi https://github.com/sshlien/abcmidi to manage my band repertoire and would like to keep most of the information with this mapping:

  Meta events generated by abc2midi

  Meta type: 0x01 Text
  What writes it: Track-type annotation at track start
  ABC source: Internal: "note track", "lyric track", "gchord track", "drum track",
    "drone track", "notes/lyric track"
  ────────────────────────────────────────
  Meta type: 0x01 Text
  What writes it: %%MIDI text directives or !text! annotations
  ABC source: %%MIDI text, %%MIDI annotation
  ────────────────────────────────────────
  Meta type: 0x01 Text
  What writes it: Lyrics syllables
  ABC source: w: lines β€” note: abc2midi uses 0x01 here, not the proper 0x05 Lyric event
  ────────────────────────────────────────
  Meta type: 0x02 Copyright
  What writes it: Copyright field
  ABC source: C: field
  ────────────────────────────────────────
  Meta type: 0x03 Sequence/Track Name
  What writes it: Song title β€” track 0 and track 1; Karaoke track 2 gets "Words"
  ABC source: T: field
  ────────────────────────────────────────
  Meta type: 0x06 Marker
  What writes it: Part marker β€” but stored as a single raw byte with the ASCII value
    of the part letter, not as a string
  ABC source: P: field
  ────────────────────────────────────────
  Meta type: 0x51 Set Tempo
  What writes it: Initial tempo and all tempo changes
  ABC source: Q: field
  ────────────────────────────────────────
  Meta type: 0x58 Time Signature
  What writes it: Meter
  ABC source: M: field
  ────────────────────────────────────────
  Meta type: 0x59 Key Signature
  What writes it: Key
  ABC source: K: field

Thanks!

1 Like