What a great series. I only 'discovered' today. But hey, never too late 😃 BTW I have been using the K4815 for a couple of years, and still using every day in my eurorack set up (connected by midi through a MI Yarns to a Korg Electribe 2 and a Focusrite Scarlett - iMac Ableton Live)
Thank you for this video, you are very well informed on this subject. I like using midi started learning about the clock and the 24PPQ note when I bought my Ensoniq EPS and started using its sequencer. Some things i knew others not. So I will follow all your tutorials.
Awesome tutorials you have made... very good. Question: Is MIDI Time Code (MTC) similar to MIDI clock or more like position pointer? I have found that the Alesis HD24 spits out MTC but for some reason the slave device doesn’t seem to lock in tight and after say 5 minutes it has wondered badly out of time. Either I’m suspect that the HD24 isn’t sending out a message or the slave device is not picking up a lock message. Is there a way to read MTC ...does it use hex language? Thanks 🔎
Thanks for explaining an area of the MIDI spec where the details can be misinterpreted and not well understood. I made a stand-alone MIDI Clock device, and one of the important principles I followed that you touched on is, Clock Pulses and the RT Start/Stop/Continue Commands should not necessarily be bound together. In my device, Clock can continuously send without a RT Start command being sent (and continue after Stop has been sent). Clock pulses have an independent control. If you want to check out the MIDI Clock device I built, it's on my channel. Called CLOCKstep. Another area some devices drop the ball on is that they respond to a RT Start command without waiting for the next clock pulse (they start without any clock pulses present). RT Start is sometimes mistakenly mapped to the devices own internal Start and Clock mechanics. This can cause sync problems also because not every device can process and react to the Start command at the same speed. As you said, RT Start is supposed to signal the receiving device to place it in a pending start state, ready to go instantly when it processes the next MIDI Clock pulse (along with every other device waiting). Vendors who want to have a MIDI command that maps to their own internal Start and Clock mechanics should add that command separately to their MIDI Implementation as a CC and leave RT Start to its intended purpose.
Hi Andrew, first of all a thousand thank you for this amazing detailed and well explained course, I learned a lot! I have 3 questions : 1) If I understand well for best rhythmical accuracy using clock messages, it’s best to use MIDI DIN over Usb and to chose your DAW (in my case Ableton) as the master over most or any hardware sequencers correct? 2) If possible, is it best to send the highest PPQN value for best accuracy or can it cause problems down the path? 3) Also how much more reliable is analog pulse for clocking?
I was writing a song that had an arp occurring over an upward sloping tempo automation, and I think you just explained why one note would seemingly randomly be incorrect in the arpeggio (it wasn't really random, more like a "modular skip" perceived as random because of such tiny time intervals), and why I had to "flatten" the tempo automation for a few ms to get it to work.
Thank you, this series really helps me understand Midi messages more. Just a question: I'm using an Arduino to send Midi messages to a Korg Volca Bass sequencer. I wanted to send a message to set the sequencer's tempo (there's a button to set the bpm) , do you have any idea how to do this? Like you said, it's not convenient to send Clock messages when you use a sequencer, but I can't find any other way to do this...
I'm not familiar with the Volca Bass specifically. I would be surprised if it didn't support MIDI clock. Some MIDI hardware supports either controlling internal settings (might allow the clock speed to be adjusted) or even pressing of panel buttons over MIDI. Sorry I can't help you with specifics.
@@shiftedphase Yeah, I did the math and seems like it is applicable to 99% of songs. I suppose the other question would be... with clock pulses and spp, how can one figure the time signature?
@@brdane You cannot figure out the time signature from the clock signal alone. The MIDI file format contains message types which describe time and key signatures, so if you load a MIDI file you can determine it. But not by just receiving the MIDI clock signal by itself.
@@shiftedphase Gotcha.... what about a DAW's bpm? Still no way? I think I read something in the official spec about MTC having some time signature defining within it.
Andrew, can I ask you something? I want to stream a MIDI song from the computer to the module. I don't want to create an ms generator. Can I divide the song into frames and send the song in pieces? And implement DeltaTime for midi events in frames? Will the instrument interpret this? Is it done differently? Thank you!
How can a clock message be sent in the middle of another message (say, a NOTE OFF) and have both still remain coherent? For example, if a clock message begins in the middle of a NOTE OFF message, what prevents the clock data bits from being read as part of the NOTE OFF data?
System Realtime messages are handled immediately by a MIDI receiver. So any message that is currently received is unaffected. Let's say you've already received 0x90 0x3f ... (first 2 bytes of a note on) and then 0xf8 comes along... it just gets processed and the state of the note on message being received is not changed. Then along comes 0x7f or so, and 3 bytes are processed as a note on message.
Question. If you are not working with music, is a clock message needed? The project I'm wanting to work on involves using software to control an audio mixer that can be controlled via midi.
You can use as much or as little of the MIDI spec as you need for your project. As long as your MIDI parsing code knows how to correctly handle (and discard) any data that might be received, you can safely ignore stuff you don't have a use for.
Because of Running Status you do need to at least do some minimal amount of parsing to make sure the messages you want are handled correctly. A finite state machine is the easiest way to do this.
I have three devices all connected to my computer via USB connections that have midi clock master capability. Should I set one to master and the other two to receive clock information? Does it work that way going through my computer?
All MIDI messages over USB have to be interpreted / routed by your music software. Most software will have a selection to choose an external MIDI clock. But I highly recommend letting your music software be the clock instead because it will likely work better.
Do I understand correctly: the midi stream flows with a resolution of 24 (sequencer-module), and a higher message density (480) is realized by the receiving device?
Hi! congrats for your videos, they're kinda useful! I would like to ask you on which software you would recommend me to edit an existing midi clock file to change the bpm? I've just bought a Cymatic LP16 that can't send midi clock but can read it. Thank you!
Hi Jose, MIDI clock is not stored inside a MIDI song file. Instead it uses tempo events which tell the sequencer which speed to run at for different parts of the song. You can use any DAW or MIDI sequencer software that supports MIDI tempo maps. I personally use a really old (like 1990s) version of Cakewalk for stuff like this. But there are probably newer solutions too.
@@shiftedphase Yes I know, sorry for my english probably I didn´t explain myself. What I have is a four bars midi clock file set at 95bpm. What I need is to edit the those tempo events and put that .mid file inside the LP16. The issue is that most DAWS don't recognize the file or don't allow me to edit real time messages.
Thanks for your response! I was trying with Reaper which have a great midi editor for this purpose, but there's something I'm missing I guess. I've never heard about Cakewalk but I'll check out.
@@joseblancodoel2787 It's SUUUPER old... see if you can find an ancient copy from the 90s. Cakewalk 3.0 is the one I use for basic MIDI stuff since it supports a huge amount of the MIDI file spec.
Hi Andrew. If the sync signal in a MIDI network is sent in two different directions at some point, and these two paths merge again later in the network, do conflicts arise affecting downstream devices? Similarly, if a software clock source sends sync out over two USB paths which are converted to DIN by 1) a MIDI interface and 2) a drum machine (local off), and the signals then merge in between the drum machine and the sound module the drum machine is driving, is the sound module likely to become confused (dropped notes) even though the sound module is set to ignore sync? Is it at all possible for MIDI messages (CC, etc.) or clock sync to interfere with devices in an upstream leg of a MIDI network? Thanks for your video above and for considering these questions. John
Merging is fairly uncommon in MIDI systems. The main place where it occurs is within a DAW software or some other kind of sequencer. You can really only have 1 source. A typical setup would be to have a sequencer lock onto an external clock, and then generate a new clock to send to other devices. But yes, if some kind of merging allows two streams of data to mix together it could be weird. I think that's why most sequencers (hardware or software) kind of handle all the signal routing in and out themselves.
@@shiftedphase Thanks so much for the reply. So, do you think most hardware devices replicate the signal and send this fresh version downstream, or do they essentially just read it and pass it along?
@@mandolier Devices with a THRU port just pass through the signal. Something like a drum machine that can receive / send clock might either pass it through or re-generate it. It's probably difficult to know for sure and they probably don't say in the manual. I've done designs both ways... it depends on the design.
Word clock is used to synchronize digital audio systems together. It is a square wave that runs at the sampling frequency and allows multiple systems to lock together so they can exchange audio data without any loss or resampling.
I'd be really interested in how you "up-sample" the resolution of the ppq in a slave sequencer/looper... especially if you are catering for in-song tempo changes. I notice that a lot of (software)sequencers don't tend to slave either and I wounder if it's for this reason. My other question is I know that we talk about sequencers being at 96,480 etc ppq but how much of a musical difference on playback than say at 24ppq, especially when there is potential for lots of data across 16 channels?
I'll try to do a video explaining the upsampling process. As for resolution, yes it makes a big difference in being able to do accurate math to subdivide notes, record accurate note lengths, produce effects like swing, etc. with minimal error. It is true though that notes going over a standard MIDI cable take some time, but a higher internal clock rate will almost always make internal processing easier.
Oohhh.... suddenly the keyboards in the background, that can be seen in the previous videos are gone! I have one more comment, when you say 24 ppq has been chosen, because 24 is divisible by 3 and 4, actually, to break it down to prime numbers, 24 is divisible by 2 and 3, otherwise you would not be able to make 2 and similar.
Yes, also divisible by 2, but I mention 3 and 4 specifically because those are popular rhythmic values which might seem unrelated normally but are necessary to generate within the same piece of music. (i.e. triplets) Most sequencers multiply the 24 PPQ rate by some factor like 4 or more to create a higher resolution version for more precise note timing. But the number they choose is also always divisible into 3s and 4s.
Fantastic video on MIDI Clock. Thank you for creating this video!
What a great series. I only 'discovered' today. But hey, never too late 😃 BTW I have been using the K4815 for a couple of years, and still using every day in my eurorack set up (connected by midi through a MI Yarns to a Korg Electribe 2 and a Focusrite Scarlett - iMac Ableton Live)
Thank you for this video, you are very well informed on this subject. I like using midi started learning about the clock and the 24PPQ note when I bought my Ensoniq EPS and started using its sequencer. Some things i knew others not. So I will follow all your tutorials.
Thanks again. A neat and tidy video description ! Well Done !
Thanks man, I work with MIDI since 1997 but I never really knew how the clock worked.
I am currently working on building a sequencer (as a hobby) and this video was exactly what I needed. Thanks a lot!
Cool! Good luck with your project! I'm also working on a new sequencer... fun stuff!
great series, really getting a good understanding thanks very much for your effort
Man this is some good stuff. Thanks.
I just finished your course. You are a superstar for putting this together! So useful, and enjoyable to watch/listren. Thanks!
Thanks! There is a part 7 which I forgot to add to the playlist. (now fixed) I'm glad that you enjoyed it and hope that it helped you!
@@shiftedphase👍🇲🇹
Awesome tutorials you have made... very good. Question: Is MIDI Time Code (MTC) similar to MIDI clock or more like position pointer? I have found that the Alesis HD24 spits out MTC but for some reason the slave device doesn’t seem to lock in tight and after say 5 minutes it has wondered badly out of time.
Either I’m suspect that the HD24 isn’t sending out a message or the slave device is not picking up a lock message. Is there a way to read MTC ...does it use hex language? Thanks 🔎
My guess is that your devices (master and slave) are not set to the same frame rate. This would cause drift.
@craigvanhise3014 The frame rates are the same at 30fps non drop
Thanks for explaining an area of the MIDI spec where the details can be misinterpreted and not well understood. I made a stand-alone MIDI Clock device, and one of the important principles I followed that you touched on is, Clock Pulses and the RT Start/Stop/Continue Commands should not necessarily be bound together. In my device, Clock can continuously send without a RT Start command being sent (and continue after Stop has been sent). Clock pulses have an independent control. If you want to check out the MIDI Clock device I built, it's on my channel. Called CLOCKstep.
Another area some devices drop the ball on is that they respond to a RT Start command without waiting for the next clock pulse (they start without any clock pulses present). RT Start is sometimes mistakenly mapped to the devices own internal Start and Clock mechanics. This can cause sync problems also because not every device can process and react to the Start command at the same speed. As you said, RT Start is supposed to signal the receiving device to place it in a pending start state, ready to go instantly when it processes the next MIDI Clock pulse (along with every other device waiting). Vendors who want to have a MIDI command that maps to their own internal Start and Clock mechanics should add that command separately to their MIDI Implementation as a CC and leave RT Start to its intended purpose.
All good thoughts here, and congrats on your project!
Hi Andrew, first of all a thousand thank you for this amazing detailed and well explained course, I learned a lot!
I have 3 questions :
1) If I understand well for best rhythmical accuracy using clock messages, it’s best to use MIDI DIN over Usb and to chose your DAW (in my case Ableton) as the master over most or any hardware sequencers correct?
2) If possible, is it best to send the highest PPQN value for best accuracy or can it cause problems down the path?
3) Also how much more reliable is analog pulse for clocking?
I remember striping a MIDI SMPTE clocks on 16 track tape to sync audio and midi ... it was fun
be blessed for this detailed and practical explanation of the standard.
Glad you found it useful!
@@shiftedphase👍🇲🇹
I was writing a song that had an arp occurring over an upward sloping tempo automation, and I think you just explained why one note would seemingly randomly be incorrect in the arpeggio (it wasn't really random, more like a "modular skip" perceived as random because of such tiny time intervals), and why I had to "flatten" the tempo automation for a few ms to get it to work.
Glad it helped you! I've always believed that knowing at least a bit of what goes on "under the hood" helps us use our music tools better. :)
Bringing light to the musical darkness
Outstanding information..
Any chance of doing a video on ERM MULTICLOCK / MIDRONOME AUDIO TO MASTER MIDI CLOCK SYNC?
Much appreciated.
I would but I have no experience with that stuff.
@shiftedphase same.!!
Thanks for the reply..
Excellent info. Thanks 👍
What is the simplest midi controller you'd recommend? Something that doesn't have any synth functions itself but everything else in a minimal package?
great video!
Thank you, this series really helps me understand Midi messages more. Just a question: I'm using an Arduino to send Midi messages to a Korg Volca Bass sequencer. I wanted to send a message to set the sequencer's tempo (there's a button to set the bpm) , do you have any idea how to do this? Like you said, it's not convenient to send Clock messages when you use a sequencer, but I can't find any other way to do this...
I'm not familiar with the Volca Bass specifically. I would be surprised if it didn't support MIDI clock. Some MIDI hardware supports either controlling internal settings (might allow the clock speed to be adjusted) or even pressing of panel buttons over MIDI. Sorry I can't help you with specifics.
@@shiftedphase Yeah I just figured out how to control the bpm with the clock messages while the sequencer is running. Thanks again!!
Great video! So, if I wanted to position the song at a place that is greater than 16383 sixteenths, will I not be able to use SPP?
Correct. But most songs don't have that many bars.
@@shiftedphase Yeah, I did the math and seems like it is applicable to 99% of songs. I suppose the other question would be... with clock pulses and spp, how can one figure the time signature?
@@brdane You cannot figure out the time signature from the clock signal alone. The MIDI file format contains message types which describe time and key signatures, so if you load a MIDI file you can determine it. But not by just receiving the MIDI clock signal by itself.
@@shiftedphase Gotcha.... what about a DAW's bpm? Still no way? I think I read something in the official spec about MTC having some time signature defining within it.
@@brdane There might be some extensions to the main MIDI protocol but I don't recall.
Andrew, can I ask you something?
I want to stream a MIDI song from the computer to the module. I don't want to create an ms generator.
Can I divide the song into frames and send the song in pieces? And implement DeltaTime for midi events in frames? Will the instrument interpret this? Is it done differently?
Thank you!
How can a clock message be sent in the middle of another message (say, a NOTE OFF) and have both still remain coherent?
For example, if a clock message begins in the middle of a NOTE OFF message, what prevents the clock data bits from being read as part of the NOTE OFF data?
System Realtime messages are handled immediately by a MIDI receiver. So any message that is currently received is unaffected. Let's say you've already received 0x90 0x3f ... (first 2 bytes of a note on) and then 0xf8 comes along... it just gets processed and the state of the note on message being received is not changed. Then along comes 0x7f or so, and 3 bytes are processed as a note on message.
Question. If you are not working with music, is a clock message needed? The project I'm wanting to work on involves using software to control an audio mixer that can be controlled via midi.
You can use as much or as little of the MIDI spec as you need for your project. As long as your MIDI parsing code knows how to correctly handle (and discard) any data that might be received, you can safely ignore stuff you don't have a use for.
Because of Running Status you do need to at least do some minimal amount of parsing to make sure the messages you want are handled correctly. A finite state machine is the easiest way to do this.
I have three devices all connected to my computer via USB connections that have midi clock master capability. Should I set one to master and the other two to receive clock information? Does it work that way going through my computer?
All MIDI messages over USB have to be interpreted / routed by your music software. Most software will have a selection to choose an external MIDI clock. But I highly recommend letting your music software be the clock instead because it will likely work better.
Do I understand correctly: the midi stream flows with a resolution of 24 (sequencer-module), and a higher message density (480) is realized by the receiving device?
Yes.
@@shiftedphase
OMG, And I'm struggling with the microseconds clock in C# :))
Thank you very much !
Hi! congrats for your videos, they're kinda useful!
I would like to ask you on which software you would recommend me to edit an existing midi clock file to change the bpm?
I've just bought a Cymatic LP16 that can't send midi clock but can read it.
Thank you!
Hi Jose, MIDI clock is not stored inside a MIDI song file. Instead it uses tempo events which tell the sequencer which speed to run at for different parts of the song. You can use any DAW or MIDI sequencer software that supports MIDI tempo maps. I personally use a really old (like 1990s) version of Cakewalk for stuff like this. But there are probably newer solutions too.
@@shiftedphase Yes I know, sorry for my english probably I didn´t explain myself. What I have is a four bars midi clock file set at 95bpm. What I need is to edit the those tempo events and put that .mid file inside the LP16. The issue is that most DAWS don't recognize the file or don't allow me to edit real time messages.
@@joseblancodoel2787 That's an issue these days. The best I can suggest would be to find a really old MIDI sequencer.
Thanks for your response! I was trying with Reaper which have a great midi editor for this purpose, but there's something I'm missing I guess. I've never heard about Cakewalk but I'll check out.
@@joseblancodoel2787 It's SUUUPER old... see if you can find an ancient copy from the 90s. Cakewalk 3.0 is the one I use for basic MIDI stuff since it supports a huge amount of the MIDI file spec.
Hi Andrew. If the sync signal in a MIDI network is sent in two different directions at some point, and these two paths merge again later in the network, do conflicts arise affecting downstream devices?
Similarly, if a software clock source sends sync out over two USB paths which are converted to DIN by 1) a MIDI interface and 2) a drum machine (local off), and the signals then merge in between the drum machine and the sound module the drum machine is driving, is the sound module likely to become confused (dropped notes) even though the sound module is set to ignore sync?
Is it at all possible for MIDI messages (CC, etc.) or clock sync to interfere with devices in an upstream leg of a MIDI network?
Thanks for your video above and for considering these questions. John
Merging is fairly uncommon in MIDI systems. The main place where it occurs is within a DAW software or some other kind of sequencer. You can really only have 1 source. A typical setup would be to have a sequencer lock onto an external clock, and then generate a new clock to send to other devices. But yes, if some kind of merging allows two streams of data to mix together it could be weird. I think that's why most sequencers (hardware or software) kind of handle all the signal routing in and out themselves.
@@shiftedphase Thanks so much for the reply. So, do you think most hardware devices replicate the signal and send this fresh version downstream, or do they essentially just read it and pass it along?
@@mandolier Devices with a THRU port just pass through the signal. Something like a drum machine that can receive / send clock might either pass it through or re-generate it. It's probably difficult to know for sure and they probably don't say in the manual. I've done designs both ways... it depends on the design.
What is "Word" Clock used for?
Word clock is used to synchronize digital audio systems together. It is a square wave that runs at the sampling frequency and allows multiple systems to lock together so they can exchange audio data without any loss or resampling.
Bless your soul
I'd be really interested in how you "up-sample" the resolution of the ppq in a slave sequencer/looper... especially if you are catering for in-song tempo changes. I notice that a lot of (software)sequencers don't tend to slave either and I wounder if it's for this reason.
My other question is I know that we talk about sequencers being at 96,480 etc ppq but how much of a musical difference on playback than say at 24ppq, especially when there is potential for lots of data across 16 channels?
I'll try to do a video explaining the upsampling process. As for resolution, yes it makes a big difference in being able to do accurate math to subdivide notes, record accurate note lengths, produce effects like swing, etc. with minimal error. It is true though that notes going over a standard MIDI cable take some time, but a higher internal clock rate will almost always make internal processing easier.
That would be awesome - I look forward to it.
HI there very much for the videos. What language(s) did you use to implement MIDI?
Mostly C, although any language is okay as long as you can manipulate bits and bytes easily.
Thank you.@@shiftedphase
Thank you. Best,
thanks
Wooo Thanks :D
Oohhh.... suddenly the keyboards in the background, that can be seen in the previous videos are gone! I have one more comment, when you say 24 ppq has been chosen, because 24 is divisible by 3 and 4, actually, to break it down to prime numbers, 24 is divisible by 2 and 3, otherwise you would not be able to make 2 and similar.
Yes, also divisible by 2, but I mention 3 and 4 specifically because those are popular rhythmic values which might seem unrelated normally but are necessary to generate within the same piece of music. (i.e. triplets) Most sequencers multiply the 24 PPQ rate by some factor like 4 or more to create a higher resolution version for more precise note timing. But the number they choose is also always divisible into 3s and 4s.
@@shiftedphase Ok, thanks.
Midi specs look good but in real life midi sucks like hell)
That seems a pretty general statement, but yes there are definitely bad implementations. It’s still holding together everything in music though. :)