Do you mean identify the files by modifying the signature to "MIDd"?
Naaaah!!!
That MIDd example was to show how OCP handles it internally. OCP has an built-in filebrowser which in addition allows you to add further information (author, style, release-date, filetype etc.) and to store all this into a playlist which enables for
very fast loading of files/directories, because files available in such playlists doesn't get rescanned (unless you tell it to do).
Here's an example of my Open Cubic Player playlist for MIDI files, Genre "Rock and Pop", hence the filename.
POP.MDZ:
MODINFO1
MODULE LASTDAYS.MID
SIZE 22978
TYPE MID
TITLE Last Days of Summer (Piano edition)
CHANNELS 16
COMMENT MOVIE: Last Days of Summer
MODULE LASTDAY_.MID
SIZE 14338
TYPE MIDd
TITLE Last Days of Summer
CHANNELS 16
COMMENT MOVIE: Last Days of Summer
First file in the example is a common MIDI file (TYPE MID), the second uses an additional drum track at Channel 16 (TYPE MIDd).
I'm not thinking about modifying the header of the MIDI file itself (no way, sir), but a simple per-file-toggle which allows the user to notify XMP of such MIDI files thus handling those with the flag set as MIDI's with a second drum track. And eventually this flag could be saved within XMP's per-track-settings/playlists as well.
So in addition to your solution (which of course rox
) you may want to add the option to let the user decide when and when not to use the "Channel 16 = drum track" logic, because as you said, it doesn't detect all files, and on the other hand autodetection might trigger false positives.