Post by JohnG on Jul 5, 2011 13:53:41 GMT
Article 4 The MIDI clock.
Before I submit my article on mp3 etc. I thought I'd delve into another area more associated with the name of the forum. What I'm going to do is to try to explain what MIDI clockis, why it's important to us and how it is or can be used. Once again I'll try to keep my explanations as simple as I can even to the point where some precision may be lost.
So what is the MIDI time clock? It's a way of expressing within a MIDI file and in the sequencer we are using, exactly where we are within a piece of music we are playing or preparing.
Firstly we shouldn't confuse the MIDI clock with something called SMPTE (Society of Motion Picture and Television Engineers) timing or the MIDI time code.
What's the difference? Well, MIDI clock is purely focussed upon playing notes at the correct time within any bar (or measure) of music and with their relationship to other notes. SMPTE or MIDI time code, on the other hand, is concerned with starting and stopping (synchronising) the piece of music with relation to a piece of film or television.
How can a layman tell the difference? Quite easily actually, MIDI has 3 sets of numbers seperated (usually) by full stops e.g. 01.01.000 or 04.03.240 whereas SMPTE (Time code) has 4 sets e.g. 00.00.00.00 or 01.03.27.16.
What do the numbers mean? In MIDI they mean, starting at the left, first the measure or bar number, second the beat within the bar and third a subdivision of each beat into a smaller unit usually referred to these days as a tick (previously called a pulse).
These 'ticks' are always subdivisions of a quarter note (or crotchet if you prefer) represented on sheet music as a black dot with a vertical line usually rising from the right edge (sometimes descending from the left edge) and with no curlicue (flag) at the top. A piece of music in 'common time' would often have a 'C' or the numbers '4/4' written at the beginning. i.e. each measure contains four notes, each a quarter note long. More on this later.
SMPTE timing, again from the left, means 1st hours, 2nd minutes, 3rd seconds and 4th the frame number. Films and television have different standards in different countries, so you can have 24, 25, 29.97 or 30 frames per second depending upon where it was created. (Yea, I know, 29.97 frames per second? What kind of standard is that?) So, for most of us, we can ignore SMPTE timing and that's what I'm going to do for the rest of this article.
Back to the MIDI clock and, more specifically, to ticks (or pulses). I'm assuming that we all know that 1/4 notes can be divided in half giving 1/8th notes, 1/8ths can be divided in half giving 1/16ths and so on down to 1/64ths? Yeah?(Actually even 1/128th notes but I've never come across any piece of music with them.)
So, one would think, if we could divide each quarter note by sixteen (i.e. 16 ticks per quarter note (tpqn once ppqn)) then that would be adequate to express our music? Not so, because we've forgotten dotted 1/64th notes. So we need another subdivision, i.e. at least 32 tpqn. Oh-ohh! I've forgotten triplets. So I need to be able to subdivide a 1/64th note by 2 or by 3. (So that makes 96 tpqn (2 x 3 x16)). In fact 96 tpqn should define the worst resolution we should use. There's an argument that we should use a much finer division than this to give our computerised music a much more human feel.
A lot of musicians give expression to their music by playing a note or a drum beat just before (driving) or just after (lazy) the beat. How much sooner or later? Well, you choose, but I'd say just a small fraction. So, let's say a quarter of what we had previously. That makes 384 tpqn (96 x 4). Mmm! That sounds fine enough. But there's another consideration too. Oh no, this has been hard enough!
Many of us are using some kind of module to create the sounds we play along to. Often from Roland or Yamaha but from other manufacturers too. Just before we start a song playing it's a good idea to send a MIDI reset to the module to put all the controllers back to their default positions and this is usually embedded in the MIDI file. With older units this reset can take up to 200 milliseconds to perform (1/5th of a second). So it would be a good idea if we could use the ticks in MIDI timing to get the resets and subsequent set up commands sent in the right order and time so that the module obeys them all correctly. If we use 480 tpqn then each tick takes almost exactly 1 millisecond to perform at 4/4 time and at 120 beats per minute (my sequencer sets this as the default).
When setting up MIDI files for my own use, all the initial stuff like sequence name, beats per minute (120), beats per measure (4/4) etc. is sent in the first 10 ticks i.e. 01.01.000 to 01.01.009 then a MIDI reset at 01.01.010. The next command (for me an XG reset which takes 50 milliseconds to perform) goes at 01.01.240 then subsequent commands like system reverb settings and so on go from 01.01.300 to 01.01.479. The next three beats i.e. 01.02.000 to 01.04.479 are used to send all the channel messages i.e. instrument settings, channel expression, channel volume, pan etc.
It's a good idea to try to make sure that each MIDI command for voice change or anything similar is seperated from the next by at least one but better five ticks. It gives the sound module time to perform it. In the first tick of the second measure the time settings for the song can be placed (02.01.000) so maybe 106 bpm, 3/4 time and the first note if appropriate. For me the music notes always start in measure 2, never earlier. Another benefit is that the music always starts after a 2 second pause, plus any pause in the first measure of the song itself.
If you need another second to pick up your guitar then insert another measure of 2/4 at 120 bpm. If the song is a slow one and the first note is on the last beat of the measure, then don't put the change of tempo (bpm) until the first note. You could even speed up (300 bpm) then slow down again to the required timing e.g. 68 bpm at exactly the right moment.
Well, there you go, my take on MIDI timing. The last part might also be suitable for a suggested section on MIDI hints and tips.
As always, any questions, comments, corrections(?), please fire away.
© John L. Garside, 2007.
Before I submit my article on mp3 etc. I thought I'd delve into another area more associated with the name of the forum. What I'm going to do is to try to explain what MIDI clockis, why it's important to us and how it is or can be used. Once again I'll try to keep my explanations as simple as I can even to the point where some precision may be lost.
So what is the MIDI time clock? It's a way of expressing within a MIDI file and in the sequencer we are using, exactly where we are within a piece of music we are playing or preparing.
Firstly we shouldn't confuse the MIDI clock with something called SMPTE (Society of Motion Picture and Television Engineers) timing or the MIDI time code.
What's the difference? Well, MIDI clock is purely focussed upon playing notes at the correct time within any bar (or measure) of music and with their relationship to other notes. SMPTE or MIDI time code, on the other hand, is concerned with starting and stopping (synchronising) the piece of music with relation to a piece of film or television.
How can a layman tell the difference? Quite easily actually, MIDI has 3 sets of numbers seperated (usually) by full stops e.g. 01.01.000 or 04.03.240 whereas SMPTE (Time code) has 4 sets e.g. 00.00.00.00 or 01.03.27.16.
What do the numbers mean? In MIDI they mean, starting at the left, first the measure or bar number, second the beat within the bar and third a subdivision of each beat into a smaller unit usually referred to these days as a tick (previously called a pulse).
These 'ticks' are always subdivisions of a quarter note (or crotchet if you prefer) represented on sheet music as a black dot with a vertical line usually rising from the right edge (sometimes descending from the left edge) and with no curlicue (flag) at the top. A piece of music in 'common time' would often have a 'C' or the numbers '4/4' written at the beginning. i.e. each measure contains four notes, each a quarter note long. More on this later.
SMPTE timing, again from the left, means 1st hours, 2nd minutes, 3rd seconds and 4th the frame number. Films and television have different standards in different countries, so you can have 24, 25, 29.97 or 30 frames per second depending upon where it was created. (Yea, I know, 29.97 frames per second? What kind of standard is that?) So, for most of us, we can ignore SMPTE timing and that's what I'm going to do for the rest of this article.
Back to the MIDI clock and, more specifically, to ticks (or pulses). I'm assuming that we all know that 1/4 notes can be divided in half giving 1/8th notes, 1/8ths can be divided in half giving 1/16ths and so on down to 1/64ths? Yeah?(Actually even 1/128th notes but I've never come across any piece of music with them.)
So, one would think, if we could divide each quarter note by sixteen (i.e. 16 ticks per quarter note (tpqn once ppqn)) then that would be adequate to express our music? Not so, because we've forgotten dotted 1/64th notes. So we need another subdivision, i.e. at least 32 tpqn. Oh-ohh! I've forgotten triplets. So I need to be able to subdivide a 1/64th note by 2 or by 3. (So that makes 96 tpqn (2 x 3 x16)). In fact 96 tpqn should define the worst resolution we should use. There's an argument that we should use a much finer division than this to give our computerised music a much more human feel.
A lot of musicians give expression to their music by playing a note or a drum beat just before (driving) or just after (lazy) the beat. How much sooner or later? Well, you choose, but I'd say just a small fraction. So, let's say a quarter of what we had previously. That makes 384 tpqn (96 x 4). Mmm! That sounds fine enough. But there's another consideration too. Oh no, this has been hard enough!
Many of us are using some kind of module to create the sounds we play along to. Often from Roland or Yamaha but from other manufacturers too. Just before we start a song playing it's a good idea to send a MIDI reset to the module to put all the controllers back to their default positions and this is usually embedded in the MIDI file. With older units this reset can take up to 200 milliseconds to perform (1/5th of a second). So it would be a good idea if we could use the ticks in MIDI timing to get the resets and subsequent set up commands sent in the right order and time so that the module obeys them all correctly. If we use 480 tpqn then each tick takes almost exactly 1 millisecond to perform at 4/4 time and at 120 beats per minute (my sequencer sets this as the default).
When setting up MIDI files for my own use, all the initial stuff like sequence name, beats per minute (120), beats per measure (4/4) etc. is sent in the first 10 ticks i.e. 01.01.000 to 01.01.009 then a MIDI reset at 01.01.010. The next command (for me an XG reset which takes 50 milliseconds to perform) goes at 01.01.240 then subsequent commands like system reverb settings and so on go from 01.01.300 to 01.01.479. The next three beats i.e. 01.02.000 to 01.04.479 are used to send all the channel messages i.e. instrument settings, channel expression, channel volume, pan etc.
It's a good idea to try to make sure that each MIDI command for voice change or anything similar is seperated from the next by at least one but better five ticks. It gives the sound module time to perform it. In the first tick of the second measure the time settings for the song can be placed (02.01.000) so maybe 106 bpm, 3/4 time and the first note if appropriate. For me the music notes always start in measure 2, never earlier. Another benefit is that the music always starts after a 2 second pause, plus any pause in the first measure of the song itself.
If you need another second to pick up your guitar then insert another measure of 2/4 at 120 bpm. If the song is a slow one and the first note is on the last beat of the measure, then don't put the change of tempo (bpm) until the first note. You could even speed up (300 bpm) then slow down again to the required timing e.g. 68 bpm at exactly the right moment.
Well, there you go, my take on MIDI timing. The last part might also be suitable for a suggested section on MIDI hints and tips.
As always, any questions, comments, corrections(?), please fire away.
© John L. Garside, 2007.