Synthesia 可以很好地播放 midi 文件而没有任何音符关闭事件?
Synthesia plays well midi file without any note off event?
我有一个 .mid
文件 - this 一个具体的文件。来自 header 块的 Appart 是 midi 的相关部分。第一个轨道块仅包含元事件,描述为
4D 54 72 6B 00 00 00 52 // Track chunk #1 info
00 FF 58 04 04 02 18 08 // Meta event
00 FF 59 02 00 00 // Meta event
00 FF 51 03 15 CC 5B // Meta event
81 88 70 FF 51 03 16 E3 60 // Meta event
81 70 FF 51 03 1A 28 6E // Meta event
81 70 FF 51 03 1C 9C 38 // Meta event
81 70 FF 51 03 1E 84 80 // Meta event
81 70 FF 51 03 20 B2 89 // Meta event
81 70 FF 51 03 23 36 6C // Meta event
81 70 FF 51 03 2B 98 B7 // Meta event
00 FF 2F 00 // Meta event. End of track #1
这是第二个音轨块,仅包含事件注意事项:
4D 54 72 6B 00 00 04 02 // Track chunk #2 info
00 FF 21 01 00 // Meta event
00 FF 03 1F 53 69 6E 66 6F 6E 69
61 20 66 72 6F 6D 20 4B 61 6E 74 61 74 61 20 23
31 30 36 20 2D 4A 53 20 // Meta event
00 C0 4A // Midi event
00 B0 07 7C // Midi event
00 B0 0A 52 // Midi event
00 B0 5B 4B // Midi event
96 40 90 4B 50 // Midi "Note on" event
81 63 4B 00 // Midi "Note on" event because of running status
... // No note offs event in this track chunk.
FF 2F 00 // Meta event. End of track #2
这是第 3 首曲目:
4D 54 72 6B 00 00 03 27 // Track chunk #3 info
... // Some meta and non-note-on, non-note-off midi events
96 40 91 4B 50 // "Note on" event
81 63 4B 00 // Another "Note on" event
... // No note offs
FF 2F 00 // End of track #3
轨道块#4、#5和#6与#3的结构相同; #7 仅包含两个元事件。
请注意,每个不仅包含元事件的轨道块都以两个 Note on 事件开头,并且其中没有一个包含单个 Note off 事件。
但这就是 synthesia(一个 midi 播放器)在加载文件时看到的,就在歌曲的开头:
这个 midi 的结构将是一个 Note on 事件,然后是同一轨道块中的 Note off 事件,但是这个不会发生。
这里发生了什么?
96 40
90 4B 50 // Midi "Note on" event
81 63
4B 00 // Midi "Note on" event because of running status
^^
MIDI provides two roughly equivalent means of turning off a note (voice). A note may be turned off either by sending a Note-Off message for the same note number and channel, or by sending a Note-On message for that note and channel with a velocity value of zero. The advantage to using "Note-On at zero velocity" is that it can avoid sending additional status bytes when Running Status is employed.
Due to this efficiency, sending Note-On messages with velocity values of zero is the most commonly used method.
我有一个 .mid
文件 - this 一个具体的文件。来自 header 块的 Appart 是 midi 的相关部分。第一个轨道块仅包含元事件,描述为
4D 54 72 6B 00 00 00 52 // Track chunk #1 info
00 FF 58 04 04 02 18 08 // Meta event
00 FF 59 02 00 00 // Meta event
00 FF 51 03 15 CC 5B // Meta event
81 88 70 FF 51 03 16 E3 60 // Meta event
81 70 FF 51 03 1A 28 6E // Meta event
81 70 FF 51 03 1C 9C 38 // Meta event
81 70 FF 51 03 1E 84 80 // Meta event
81 70 FF 51 03 20 B2 89 // Meta event
81 70 FF 51 03 23 36 6C // Meta event
81 70 FF 51 03 2B 98 B7 // Meta event
00 FF 2F 00 // Meta event. End of track #1
这是第二个音轨块,仅包含事件注意事项:
4D 54 72 6B 00 00 04 02 // Track chunk #2 info
00 FF 21 01 00 // Meta event
00 FF 03 1F 53 69 6E 66 6F 6E 69
61 20 66 72 6F 6D 20 4B 61 6E 74 61 74 61 20 23
31 30 36 20 2D 4A 53 20 // Meta event
00 C0 4A // Midi event
00 B0 07 7C // Midi event
00 B0 0A 52 // Midi event
00 B0 5B 4B // Midi event
96 40 90 4B 50 // Midi "Note on" event
81 63 4B 00 // Midi "Note on" event because of running status
... // No note offs event in this track chunk.
FF 2F 00 // Meta event. End of track #2
这是第 3 首曲目:
4D 54 72 6B 00 00 03 27 // Track chunk #3 info
... // Some meta and non-note-on, non-note-off midi events
96 40 91 4B 50 // "Note on" event
81 63 4B 00 // Another "Note on" event
... // No note offs
FF 2F 00 // End of track #3
轨道块#4、#5和#6与#3的结构相同; #7 仅包含两个元事件。
请注意,每个不仅包含元事件的轨道块都以两个 Note on 事件开头,并且其中没有一个包含单个 Note off 事件。
但这就是 synthesia(一个 midi 播放器)在加载文件时看到的,就在歌曲的开头:
这个 midi 的结构将是一个 Note on 事件,然后是同一轨道块中的 Note off 事件,但是这个不会发生。
这里发生了什么?
96 40
90 4B 50 // Midi "Note on" event
81 63
4B 00 // Midi "Note on" event because of running status
^^
MIDI provides two roughly equivalent means of turning off a note (voice). A note may be turned off either by sending a Note-Off message for the same note number and channel, or by sending a Note-On message for that note and channel with a velocity value of zero. The advantage to using "Note-On at zero velocity" is that it can avoid sending additional status bytes when Running Status is employed.
Due to this efficiency, sending Note-On messages with velocity values of zero is the most commonly used method.