MUSC 108. Introduction to Music Technology - Winter 2013

03 MIDI Time Bases

[Overview] [Syllabus]

MIDI Time Bases

The MIDI standard does not specify how MIDI timing is done. That is left to the computer clock chip and the software programmer. There are three time systems used in MIDI software: Chronological time, Difference time, PPQ time. All three of them are implemented in MIDIDisplay.

MIDIDisplay Time Base menu

Chronological time in ms

When using Chronological time the software is constantly checking the time. The software just sits and waits until the clock time is greater than or equal to the MIDI time stamp. When it is, the message is sent. There are at least two drawbacks to this method: the constant checking of the clock takes time away from other tasks, and any tempo changes during playback require recalculation of all time stamps not yet played.

Difference time in Ms

Difference time calculates the time difference between the note just sent and the next note. It is more efficient than chronological time because the difference indicates how long to wait before sending the next message. The software can create a timer (just like an alarm clock) that can be set to go off when the difference time has expired. Once the timer is set, it runs in the background leaving the computer free to do other tasks. When the timer goes off, the message is sent. Tempo changes can be handled easily because the difference time can be multiplied by the ratio of the original tempo (60 for your projects) and the current tempo setting.

PPQ (Parts Per Quarter Note)

In music notation all rhythm values are proportions of a quarter note. In PPQ time all note values are proportional to the PPQ value of a quarter note. A standard PPQ value is 480. PPQ time is similar to difference time in that timers can be programmed to go off when the PPQ duration has expired. PPQ time is easily converted to difference time by multiplying the PPQ value by the millisecond duration of one PPQ at the current tempo. The number of PPQs in one quarter note is chosen to provide an integer value for subdivisions of the quarter note down to the 128th note, including dotted values. Many software programs give you a choice of PPQ settings. These numbers have been used as PPQ values in various software programs. Rhythmic nuances can be expressed more precisely with larger PPQ values.

  PPQ values
Multiples of 96 96 192 384 768  
Multiples of 120 120 240 480 960 3840
Multiples of 128 128 256 512 1024  

You'll use a PPQ of 480 in this class.

Note Value PPQ = 480
Whole 1760
Dotted Half 1440

Half

960
Dotted Quarter 720
Quarter 480
Dotted Eighth 360
Eighth 240
Dotted 16th 180
16th 120
Dotted 32nd 90
32nd 60
Dotted 64th 45
64th 30
Dotted 128th 22 or 23
128th 15

Duration of a Quarter note

The duration of a quarter note can only be determined if we know the tempo. Tempo is measured as beats per minute. Usually the quarter note represents one beat. The general formula for the duration of one quarter note, at any tempo, for any duration unit (seconds, milliseconds, or PPQ) is:

PPQ formula

Duration Unit Tempo Formula Duration of One Quarter Note
Milliseconds 60 1000 * 60/60 1000 milliseconds
  120 1000 * 60/120 500 milliseconds
Seconds 60 1 * 60/60 1 second
  90 1 * 60/90 0.67 seconds
PPQ (480) 60 480 * 60/60 480 PPQ
  100 480 * 60/100 288 PPQ

[Overview] [Syllabus]

Revised John Ellinger, January - March 2013