Categories
Learning Music

On Clocks and MIDI

In the next post we will talk more in detail about how to use electro-physiological signals to control timing and tempo. But before we can talk more about that, we need to first understand how tempo is implemented in MIDI. In fact, we needed quite some time to figure this out ourselves, so that we would be able to design the EEGsynth in such a way that is consistent and compatible with MIDI. The following therefor should be a suffice-to-know summary about tempo and MIDI. It will be added to the EEGsynth documentation later, but until then please add comments below if anything is still unclear.

MIDI

MIDI, short for Musical Instrument Digital Interface, is a standard for communication with and between electronic, or rather digital, musical instruments. Its been around since the early eighties, and is one of those rare examples where competing companies decided to maintain a common communication protocol allowing their machines to be easily connected, rather than creating their own protocols, cables, plugs and formats, which is frustratingly common. MIDI carries event messages that specify notation, pitch, velocity, vibrato, panning, and, importantly for us now: clock signals, which set the tempo.

Tempo

Tempo is the speed at which something is played – e.g. fast and constant in electronic dance music, and slower and more variable in instrumental music. While between humans a drummer might snap his drumsticks to set the tempo, and while Latin (e.g. Adagio) and German words (e.g. kräftig) are using in classical music notation, in digital music we simply use beats per minute (BMP).

Beats

But what is a beat? Psychologically it’s that moment at which you tap your feet while you are listening to (or playing) music. And of course in common parlance ‘a beat’ often refers to the sound(s) used for the rhythm. However, in music theory, beats are the basic units of time that describe the moment when things happen, whether these are beats on a drum, the stroke of a violin, or a note on a keyboard. In fact, in music theory those events are described by ‘notes’. How beats are organized in time, and how they relate to notes is where the music starts to happen.

Time signature

In music theory, beats are organized in blocks of beats called measures or bars, which then repeat themselves throughout (parts of) a song. Within a measure, the way in which beats relate to events (notes) is called its time-signature. The most common time-signature is 4/4, therefor also called ‘common time’. In common time, one bar consists of four beats, and each beat corresponds to the duration of a quarter-note (one forth of a note). Wikipedia has a nice page with examples of different time-signatures, if you are interested. For now it’s just good to know that the elementary sequence of beats is a measure, consisting of a number of beats (commonly 4), which correspond to a particular note-duration (typically a quarter note).

Pulses Per Quarter Note

The time-signature says nothing about how slow or fast the notes are played. As I said earlier, that is determined by its tempo, described in BPM or more subjective descriptions (Andante, i.e. ‘at a walking pace’, referring to 76–108 BPM). The last thing we need to say is a bit technical: for a MIDI instruments to communicate the tempo, they need more than just one signal for every beat (or quarter-note) to code for slight variations in tempo. In MIDI, tempo is therefor defined in a number of Pulses Per Quarter Note (PPQN). In most step-sequencers, we are dealing with a 4/4 time signature with the common default set at 24PPQN, meaning that there are 24 pulses (or ‘ticks’) in a beat (or quarter-note). A single bar/measure will therefor have a total of 4×24=96 pulses. Most MIDI devices can be set at another PPQN rate, but 24 PPQN will suffice for most intends and purposes, especially when dealing with rather dumb step-sequencers.

As you can see, it’s complicated enough as it is! But with this out of the way, in the next post we can spend on explaining all the different ways in which we can use the EEGsynth to control step-sequencers, including MIDI.




Leave a Reply

Your email address will not be published. Required fields are marked *