gpt4 book ai didi

midi - Synthesia 可以很好地播放 midi 文件而没有任何音符关闭事件?

转载 作者:行者123 更新时间:2023-12-01 16:23:51 28 4
gpt4 key购买 nike

我有一个 .mid 文件 - this一个具体的。除了标题 block 之外,这里是 midi 的相关部分。第一个轨道 block 仅包含元事件,描述为

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

这是第二个轨道 block ,仅包含注意事件:

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

轨道 block #4、#5 和#6 与#3 具有相同的结构; #7 仅包含两个元事件。

请注意,每个不仅包含元事件的轨道 block 都以两个 Note on 事件开头,并且其中没有一个包含单个 Note off 事件。

但这是 synthesia(一个 midi 播放器)在加载文件时看到的,就在歌曲的开头:

Synthesia capture

此 MIDI 的结构将是 Note on 事件后跟同一轨道 block 中的 Note off 事件,但这并没有发生。

这里发生了什么?

最佳答案

96 40
90 4B 50 // Midi "Note on" event
81 63
4B 00 // Midi "Note on" event because of running status
^^

MIDI specification说:

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.

关于midi - Synthesia 可以很好地播放 midi 文件而没有任何音符关闭事件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43321950/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com