After you open the sequencer device, query the division type of the device element with a status command. Division type refers to the method used to represent the time between MIDI events in the sequence.

open mysong.mid alias midi1 shareable
status midi1 division type wait

A MIDI file's division type can be either PPQN or any of the following SMPTE formats:

After you determine the file division type, you can make other status queries such as:

Query

length length track n position position track n tempo

Responses are all in the current time format. PPQN files return length and position information in song pointer units. However, SMPTE files return the information in colon format HOURS:MINUTES:SECONDS:FRAMES.

PPQN files return the tempo in beats per minute; SMPTE files return the tempo in frames per second.


[Back] [Next]