作者vivimice (麦斯◎我的奶酪在哪里﹖)
看板Visual_Basic
标题[API] Timing Information
时间Wed Jul 27 15:26:51 2005
来源﹕mk:@MSITStore:E:\Microsoft%20Visual%20Studio\MSDN98\98VS\2052\
MultiMed.chm::/devdoc/live/pdgrmm/midi_95f2.htm
翻译﹕vivimice 智慧权所有
定位﹕平台SDK/Graphics and MultiMedia Services/MultiMedia Audio/
Musical Intrument Device Interface/About MIDI/Stream Buffers
原载﹕缥缈水云间 (bbs.freecity.cn)
Timing Information
关於计时的信息
Timing information for a MIDI event is stored in the dwDeltaTime member of the
MIDIEVENT structure. Time is given in ticks, as defined in the Standard MIDI
Files 1.0 specification. The length of a tick is defined by the time format
and possibly the tempo associated with the stream.
MIDI事件的计时信息保存在MIDIEVENT结构的dwDeltaTime成员中。按照标准MIDI文件1.0
规范﹐时间的单位是tick。一个tick的长度是由时间格式和流的可能速度决定的。
A tick is expressed either as microseconds per quarter note or as ticks of
SMPTE (Society of Motion Picture and Television Engineers) time. Applications
that send MIDI messages individually or use unprocessed MIDI messages use
quarter note time and tempo information to determine the duration of a tick.
Applications that preprocess MIDI messages can store the elapsed time as a
count of the SMPTE units being used.
tick可以由下面两种方式表达﹐每个四分音符所占的微秒数﹐以及SMPTE(全称为﹕电影
电视工程师协会)时间中的tick。应用程序发送单独的MIDI消息或者使用未处理的MIDI消
息时应该使用四分音符时间和速度信息来决定一个tick的时长﹔预处理MIDI消息时则可
以通过计算已使用的SMPTE单位的个数来保存总时间。
Quarter note time is indicated with a zero in the high-word bit (bit 15) of
the time-division word. The remainder of the word contains the ticks per
quarter note. A tempo associated with a stream of MIDI data is kept in units
(microseconds per quarter note) consistent with the Standard MIDI Files 1.0
specification. For example, a quarter note in 4/4 time that uses a tempo of
500,000 microseconds per quarter note plays at the rate of 120 beats per
minute.
四分音符时间是由高字位(位15)为零的时间分割字指定的。该字的剩余部分包含了每个
四分音符占用的tick数。与MIDI数据的流相联系的速度是以unit(每个四分音符所占用
的微秒数)为单位保存的﹐该unit和标准MIDI文件1.0规范中所规定的一致。例如﹕在每
四分音符(四四拍子)500,000微秒的速度下﹐曲子的速度应该是120拍每分钟。
SMPTE time division formats completely specify the length of a tick without
the need for tempo information. In using SMPTE time formats, MIDI sequences
can be synchronized with other SMPTE events, such as video or striped audio.
SMPTE time is indicated with a 1 in the high-order bit (bit 15) of the
time-division word. The rest of the most-significant byte specifies the SMPTE
format in use as negative values. The supported SMPTE formats and their
corresponding values (in parentheses) are 24 (-24), 25 (-25), 30 (-30), and
30 drop (-29). The low byte of the time-division word specifies the number of
ticks per SMPTE frame.
SMPTE时间分割格式可以在不需要速度信息的情况下指出一个tick的时长。在使用SMPTE
时间格式的情况下﹐MIDI序列可以和其他SMPTE事件同步﹐比如视频和条状音频。SMPTE
时间是由高位(位15)为1的时间分割字指定的﹐剩余的最高有效字节以负值的形式指定
了使用中的SMPTE格式。支持的SMPTE格式和它们对应的值(在括号中)分别是﹕24(-24)、
25(-25)、30(-30)和30降(-29)。时间分割字的低字节指定了每个SMPTE帧占用的tick数。
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 218.108.88.250