[API] Timing Information
來源﹕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
Visual_Basic 近期熱門文章
PTT數位生活區 即時熱門文章