Errors, suggestion, requests, etc. on midi files
(r1753 on Vista 64-bit)
After realizing that MuseScore uses quarternote=480 ticks in the midi files it produces while my old CakewalkExpress coarsens it to quarternote=120 ticks, I sat down and wrote a program to decode midi files into more readable form for humans. Having examined several midi files that MuseScore produces, here are a few observations, comments, error reports, and suggestions.
1. Question and suggestion: First of all, an apology to MDMilford. MS does use zero-velocity noteon instead of noteoff. This is being used with Running-Status to reduce the size of the midi file. A question comes to mind: Why then does MS choose QN=480 ticks rather than 120 or even 96, both of which are quite commonly used? Remember that a delta time of 128 or more would take 2 or 3 bytes instead of just 1 byte. With QN=480, this means that any event slightly later than a 32th note (120 ticks) after its predecessor will need extra byte(s). With QN=120, events up to a quarter note apart would still need only 1 byte for delta time. Unless one is using the midi files in conjunction with applications that requires very fine timing (videos maybe?), QN=120 and 96 yield 15 and 8 ticks for a 64th note, repectively, which seems very adequate for musical purposes alone.
2. Error report: In the file ChopinEtude11-r1753.mid, the noteoff (i.e., zero-vel. noteon) for note F7 shows up at offset 0xe9 while the actual noteon appears LATER at offset 0xf2. Looking at the delta times, the real noteon's for that chord (1st chord, 2nd measure, not counting the pickup) are all at the right places but the 3 noteoff's have wrong delta times: Relative to the first note of the chord, the tick offset should be 203; the value of 119 (0x3c+0x3b) is used. Same mistake also happens for the first chord in measure 3, wherein the noteoff's for G7 and A#6 show up at offsets 0x155 and 0x158, repectively, while the real noteon's are at 0x161 (A#6) and 0x164 (G7). Again it's the noteoff's that are out of place.
3. Error report (maybe) and suggestion: I noticed that MS uses Meta Event types 0x08, 0x09, 0x0a and 0x0c for title, subtitle, composer and lyricist, repectively. In RP19 (see http://www.midi.org/techspecs/rp19.php), type 0x08 and 0x09 are defined as 'PROGRAM NAME' AND 'DEVICE NAME', repectively, and intended for other purposes. As far as I know, types 0x0a and 0x0c are currently undefined, but that can change. So perhaps using them for title, subtitle, etc. may cause problems. Why not just use Meta Text event (0x01) and start the text with "Title: ", "Subtitle: ", etc.?
4. Feature request: Could lyrics be produced in the midi file, please? And when it's done, please implement RP26 (see http://www.midi.org/techspecs/rp26.php) so that all languages can be used. (Although only Latin and JP are defined code_set in that document dated 1999, I would expect more have been define by now.)