Add -PMAR option to emit MIDI marker meta-events for P: part labels (#16)

* Add -PMAR option to output `P:` information as MIDI part meta-event

* Update man page and comments

* Add the instance number of a part like `Part T-4`

This allows better tracking of parts played more than once with complex `P:`
header.

* Updated CHANGES file and added author change comments in the code
This commit is contained in:
Ronan Keryell
2026-04-01 04:12:55 -07:00
committed by GitHub
parent 41264221f4
commit c7f4015945
4 changed files with 65 additions and 12 deletions

View File

@@ -15675,3 +15675,16 @@ February 24 2026
midistats: the summary includes ntimesig, triplets, unquantized when appropriate.
March 30 2026 [RK]
abc2midi: added -PMAR option to emit MIDI marker meta-events (0x06) for
P: part labels. When a header P: field specifies a play order (e.g.
P:(AB)3), a marker is emitted each time a section begins during the
expanded playback, with an instance number (e.g. "Part A-1", "Part B-2").
When no header P: field is present, inline P: labels in the body are
emitted as simple section markers (e.g. "Part A"). The existing code at
genmidi.c:3187 that was meant to write markers was unreachable dead code;
it has been restructured. Changes in genmidi.c (PART case in writetrack,
partmarkers global) and store.c (event_part, event_init for -PMAR flag).
Man page updated in doc/abc2midi.1.