如何区分运行状态的DeltaTime(VLQ),南部规格
问题描述:
我读这篇文章:https://www.midikits.net/midi_analyser/running_status.htm如何区分运行状态的DeltaTime(VLQ),南部规格
我读一个MIDI文件,这里的最后一个片段以字节为单位:
00 B2 07 64 00 0A 40 00
5B 00 00 5D 00 00 FF 21
01 00 83 5F 90 3C 00 01
FF 2F 00
阅读第91页,Delta Time
显然不发送,而不是发送带有“运行状态”相关的两个字节
这里我的解释(我知道是不好的,由于我没有考虑运行状态)
00 B2 07 64
// track event size: '4', delta time: '0', event: 'status byte 'B2',
// data length: '2', data: '0764', description: 'Controller Change',
// channel: '2 - Midi Event Type'
00 0A // track event size: '2', delta time: '0', event: ' - '
40 00 // track event size: '2', delta time: '64', event: ' - '
5B 00 // track event size: '2', delta time: '91', event: ' - '
00 5D // track event size: '2', delta time: '0', event: ' - '
00 00 // track event size: '2', delta time: '0', event: ' - '
FF 21 01 // track event size: '3', delta time: '16289', event: ' - '
00 83 5F 90
// delta time: '0', event: 'status byte '83', data length: '2', data: '5F90',
// description: 'Note Off', channel: '3 - Midi Event Type'
3C 00 // track event size: '2', delta time: '60', event: ' - '
01 FF 2F 00
//track event size: '4', delta time: '1', event: 'type: '2F',
// data length: '0', data: '', description: 'End of Track - Meta Event Type'
正如你可以00 0A
线看00
是像Delta Time一样对待,但0A
与某些事件类型无关。 (我认为这是一个运行状态),同样的情况发生在3C 00
行。
问:
什么是区分当是运行状态当是delta time
线索?
编辑1:
在我的例子能解释像Control Changes Messages
:
0A 40 // 0A Pan
检查的网页链接相关为例。
假设相同Delta Time
00
00 // Delta Time
90 3C 7F // Note ON, Channel 0, Key 3C , Velocity 7F
00 // Delta Time
90 40 7F // Note ON, Channel 0, Key 40 , Velocity 7F
00 // Delta Time
90 43 7F // Note ON, Channel 0, Key 43 , Velocity 7F
例如变换像
00 // Delta Time
90 3C 7F // Note ON, Channel 0, Key 3C , Velocity 7F
00 // Delta Time
40 7F // Note ON, Channel 0, Key 40 , Velocity 7F
00 // Delta Time
43 7F // Note ON, Channel 0, Key 43 , Velocity 7F
之前但是,正如我不CONTROL CHANGE MESSAGES (DATA BYTES)
40 7F // 40 Damper Pedal on/off (Sustain)
43 7F // 43 Soft Pedal On/Off
答
混淆内部的轨道,每事件的前缀是一个增量时间值。增量时间值的长度是显而易见的:它以没有设置最高有效位的字节结束。
MIDI事件本身的长度由状态字节决定。使用运行状态时,使用前一个状态字节。状态字节和数据字节可以通过最高有效位来区分。 当你阅读的增量时间,下一个字节没有MSB集,你已经运行状态,并根据需要通过事件必须尽量多的数据字节:
00 delta time B2 07 64 control change: volume = 100 00 delta time 0A 40 (running status) expression = 64 00 delta time 5B 00 (running status) reverb = 0 00 delta time 5D 00 (running status) chorus = 0 00 delta time FF 21 01 00 meta event: port number = 0 83 5F delta time 90 3C 00 note-off 01 delta time FF 2F 00 meta event: end of track
谢谢你,我找到了运行状态的解释... https://www.midi。org/specifications/item/table-3-control-change-messages-data-bytes-2 –
运行状态可用于任何事件类型;你必须记住最后的实际状态字节。 –
但是,当从文件中读取字节时,如何知道必须应用哪种解释?控制更改消息或运行状态有任何限制? (不含ambiguos数据字节) –