MIDI beat clock
{{Short description|Clock signal broadcast via MIDI}}
{{Use American English|date = March 2019}}
MIDI beat clock, or simply MIDI clock, is a clock signal that is broadcast via MIDI to ensure that several MIDI-enabled devices such as a synthesizer or music sequencer stay in synchronization. Clock events are sent at a rate of 24 pulses per quarter note. Those pulses are used to maintain a synchronized tempo for synthesizers that have beats-per-minute-dependent voices and also for arpeggiator synchronization.
The clock is presented as a stream of single-byte MIDI messages. Playback at the tempo presented by the beat clock can be started, stopped and resumed with other single-byte MIDI messages. Location information can be specified using Song Position Pointer messages.
MIDI beat clock differs from MIDI timecode in that MIDI beat clock is tempo-dependent.
Messages
{{Unreferenced section|date=December 2023}}
MIDI beat clock defines the following real-time messages:
- clock (decimal 248, hex 0xF8)
- start (decimal 250, hex 0xFA)
- continue (decimal 251, hex 0xFB)
- stop (decimal 252, hex 0xFC)
MIDI also specifies a System Common message called Song Position Pointer (SPP). SPP can be used in conjunction with the above real-time messages for complete sync. This message consists of 3 bytes; a status byte (decimal 242, hex 0xF2), followed by two 7-bit data bytes (least significant byte first) forming a 14-bit value that specifies the number of "MIDI beats" (1 MIDI beat = a 16th note = 6 clock pulses) since the start of the song. This message only needs to be sent once if a jump to a different position in the song is needed. Thereafter, only real-time clock messages need to be sent to advance the song position one tick at a time.
Pulses per quarter note
Pulses per quarter note (PPQN), also known as pulses per quarter (PPQ), and ticks per quarter note (TPQN), is the smallest unit of time used for sequencing note and automation events.{{Cite book |last=Anderton |first=Craig cn |url=http://archive.org/details/midiformusicians0000ande |title=MIDI for musicians |date=1986 |publisher=New York : Amsco Publications |others=Internet Archive |isbn=978-0-8256-1050-9 |pages=8–10}}
The number of pulses per quarter note is sometimes referred to as the resolution of a MIDI device, and affects the timing of notes that can be achieved by a sequencer.{{Cite book |last=Rumsey |first=Francis |url=http://archive.org/details/midisystemscontr0000rums |title=MIDI systems and control |date=1990 |publisher=London; Boston : Focal Press |others=Internet Archive |isbn=978-0-240-51300-3 |pages=88}}{{Cite book |last=Price |first=Zack |url=http://archive.org/details/beginnersguideto0000pric |title=The beginner's guide to computer-based music production |date=2004 |publisher=New York : Cherry Lane Music; [Milwaukee, WI : Distributed by Hal Leonard] |others=Internet Archive |isbn=978-1-57560-564-7 |pages=77–79}} If the resolution is too low (too few PPQN), the performance recorded into the sequencer may sound artificial (being quantized by the pulse rate), losing all the subtle variations in timing that give the music a "human" feeling. Purposefully quantized music can have resolutions as low as 24 (the standard for Sync24 and MIDI, which allows triplets and swinging by counting alternate numbers of clock ticks) or even 4 PPQN (which has only one clock pulse per 16th note). At the other end of the spectrum, modern computer-based MIDI sequencers designed to capture more nuance may use 960 PPQN and beyond.
This resolution is a measure of time relative to tempo since the tempo defines the length of a quarter note and so the duration of each pulse. The resulting PPQN per MIDI clock is thus related to the TimeBase in Microseconds defined as 60.000.000 / MicroTempo = Beats per minute.{{Cite web|url=http://midi.teragonaudio.com/tech/midifile/ppqn.htm|title=MIDI File Format: Tempo and Timebase}}
See also
References
{{Reflist}}
External links
- [http://nic-nac-project.org/~rocket/midi/midiclockdetect/ Freeware to measure a midiclock beat signal]
- [http://www.cycling74.com/docs/max5/refpages/msp-ref/sync~.html MAX/MSP documentation to their sync~ object]
- [http://www.midi.org/techspecs/midispec.php MIDI specification]
- [http://www.midi.org/techspecs/midimessages.php Summary of MIDI messages] {{Webarchive|url=https://web.archive.org/web/20160112192415/http://www.midi.org/techspecs/midimessages.php |date=2016-01-12 }}
- [https://www.sweetwater.com/insync/song-position-pointer-spp-2/ Song Position Pointer (SPP)]
- [https://demonstrations.wolfram.com/MIDIPPQNDurationCalculator/ PPQN Timing Calculator]
- [https://www.sweetwater.com/insync/ppqn-pulses-per-quarter-note-parts-per-quarter-note/ Explanation on Sweetwater]
- [https://books.google.com/books?id=kSzeZWR2yDsC&q=%22Pulses+per+quarter+note%22+-wikipedia Information Retrieval for Music and Motion, Meinard Müller, Springer Science & Business Media, 09.09.2007 - 318 pages]