Program to check midi clock timing and note delay

Any music gear discussions that don't fit into one of the other forums.

Moderators: lisa, Kent, Joe.

Post Reply
User avatar
acidbob
Super Deluxe Wiggler
Posts: 2618
Joined: Mon Sep 19, 2011 2:48 am
Location: Denmark

Program to check midi clock timing and note delay

Post by acidbob » Tue Feb 04, 2020 3:57 am

Hi,

I am trying to work out what is causing problems with midi timing, both clock and delayed notes.
Do you have any ideas as to what method or maybe a PC software I can use to check it?

I am using an all hardware setup with seveal sequencers and kenton midi merge4 and thru25

I am aware of midiOX, but not sure it can do what I need.

I have a midibro so maybe I could use this https://midisizer.com/midigal/midiclock-tester/ But not sure if it's compatible

Thank you :tu:

thekernel
Common Wiggler
Posts: 74
Joined: Wed Aug 18, 2010 7:44 am

Re: Program to check midi clock timing and note delay

Post by thekernel » Tue Feb 04, 2020 8:23 am


User avatar
Graham Hinton
Super Deluxe Wiggler
Posts: 3001
Joined: Fri Jul 02, 2010 6:28 pm
Location: England
Contact:

Re: Program to check midi clock timing and note delay

Post by Graham Hinton » Tue Feb 04, 2020 11:53 am

acidbob wrote:
Tue Feb 04, 2020 3:57 am
I am trying to work out what is causing problems with midi timing, both clock and delayed notes.
Do you have any ideas as to what method or maybe a PC software I can use to check it?
MIDI Delays

The problem lies mainly in the PC and the MIDI interface, but all MIDI devices have a delayed response time as well. You can't use them or any other software to check themselves. Only an oscilloscope will show you what is really happening, although you can almost see it using a DAW as a chart recorder, subject to the lack of bandwidth.

User avatar
acidbob
Super Deluxe Wiggler
Posts: 2618
Joined: Mon Sep 19, 2011 2:48 am
Location: Denmark

Re: Program to check midi clock timing and note delay

Post by acidbob » Tue Feb 04, 2020 7:30 pm

Thank you. I saw a test on various sequencers and drum machines, I dont recall the thread but I think he was using the midigal.
Maybe I could try and create a click sound with one of my synths and drum machines, record that into two track and check the drift in a audio editor.
I never had issues before, but I seem to be able to hear it with my new sequencer - not mentioning any names at this point.
Anyway, when the basics like BD, SN and bassline doesnt line up correctly it sounds kind of weird.
I stopped using software or DAW many years ago, I could never get it working correctly, that is just one of the problems I had with DAW's but that is a different story all together.

Thanks for the link.

Not sure how I am going to decide what the problem is specifically, if its the notes or the clock...
I think the clock is as steady as it sort of can be, I am using the machinedrum as master.
But maybe the new sequencer doesnt work well as slave?

User avatar
acidbob
Super Deluxe Wiggler
Posts: 2618
Joined: Mon Sep 19, 2011 2:48 am
Location: Denmark

Re: Program to check midi clock timing and note delay

Post by acidbob » Wed Feb 05, 2020 4:30 am

Hi again Graham,

I read your article on your site. Thanks for posting and writing down all of this.

Basically my setup is:
midi.png
(Kenton midi thru 4: MIDI Clock When power is first applied, no input is defined as a master and all clock messages from all inputs will be passed until one input is defined as a master.The most recent input to receive a START command (or Song Position Pointer=0 followed by CONTINUE) will become the clock master.That input continues to be the clock master until another input satisfies the above condition.)

So I was under the impression that when I press play on the main sequencer (Elektron MD "1") the midi merge 4 would detect it and start using that clock.

But it might be that I need to invest in another Thru 25. And have the MD "1" and Seq. Split out to to different midi lines not to bottleneck.
The thing is, with the seq. You cannot turn incomming midi messages off completely. So that is why I am running it through the RYTM, RYTM can be set to only output clock.

I have a midibro that I could use to filter with. So maybe Kenton midi thru directly to midibro and then to Seq.
From Seq to midi merge.

What is your pro-tip? :tu:
You do not have the required permissions to view the files attached to this post.

User avatar
Graham Hinton
Super Deluxe Wiggler
Posts: 3001
Joined: Fri Jul 02, 2010 6:28 pm
Location: England
Contact:

Re: Program to check midi clock timing and note delay

Post by Graham Hinton » Wed Feb 05, 2020 6:43 am

acidbob wrote:
Wed Feb 05, 2020 4:30 am
What is your pro-tip?
The merger is the most likely cause of your problems. If the manufacturer does not provide a spec for the timing delays don't assume they will be what you want them to be. Any device that processes MIDI data introduces a delay.

Try the sequencer > thru-box > modules and see if the timing is acceptable.

By having individual MIDI triggered drums you cannot have two trigger at exactly the same time, you will get a flam with them separated by 640 microseconds or 1ms. Track allocation is important here. It is better to use separate MIDI ports in parallel.

User avatar
acidbob
Super Deluxe Wiggler
Posts: 2618
Joined: Mon Sep 19, 2011 2:48 am
Location: Denmark

Re: Program to check midi clock timing and note delay

Post by acidbob » Wed Feb 05, 2020 7:06 am

Thanks Graham I will try that.

I have just now made this filter for the midibro, so maybe that will work. I.e. Not running thru the RYTM. I really never liked the midi thru system.
2020-02-05 13_01_59-Midibro filter - www.midipal-editor.appspot.pdf - Adobe Acrobat Reader DC.png
TBH it's only the Seq. That is causing trouble. The Merge works excellent with all other machines, even my PC (I use it in emergency situations for CC automations)

I really wish there was some kind of good cheap midi utility box that is as easy to configure as the midipal.

Maybe there is?

I heard good things about this machine:
http://www.polynominal.com/roland-a-880/index.html

[EDIT1] I just found out that Kenton will release 1U rack box that can do exactly all of this. They say it will be out in a few months.
[EDIT2] Couldnt get the midibro working with filtering, but there is a specific channel filter app in there, and it did work, but no performance difference.
So to conclude, yes, there seems to be issues with first of all my sync in general. That is the sync coming from the Machinedrum it self and being received by the other machines, about 0,1 bpm off in worst case. But it does catch up after a short while.
And Graham you were right, the merger is indeed also a problem. So to sum this up. It's a combination of the clock not being accurate, and the receiving machines also not being able to sync properly, and lastly the merger. it all sums up.

I guess one other option would be to get another thru box and take the clock out of "MD1" I.e. My masterclock, and distribute the clock from there to all the other sequencers. That way I dont have to go into the merger first.
You do not have the required permissions to view the files attached to this post.

User avatar
acidbob
Super Deluxe Wiggler
Posts: 2618
Joined: Mon Sep 19, 2011 2:48 am
Location: Denmark

Re: Program to check midi clock timing and note delay

Post by acidbob » Thu Feb 06, 2020 7:44 am

From Kenton.

On latency and the Merge-4 -

The actual processing inside the Merge-4 is around 0.1mS (100uS)

Plus it has to wait for the MIDI message to arrive before it can process
it and re-send it (it won't know what it is until it has all arrived).

So in the case of a clock message (single byte) you get the MIDI
transmission time of around 0.3mS per byte plus the processing time of
the Merge-4 making a total of around 0.4mS.

However if a Note message (2 or 3 bytes) has just started being sent
then it would have to wait for all 2 or 3 bytes to be sent before it
could send the clock message - giving a worst case of around 1mS.

So, depending on what was happening the delay would be 0.4mS to 1mS.

User avatar
Graham Hinton
Super Deluxe Wiggler
Posts: 3001
Joined: Fri Jul 02, 2010 6:28 pm
Location: England
Contact:

Re: Program to check midi clock timing and note delay

Post by Graham Hinton » Thu Feb 06, 2020 5:39 pm

acidbob wrote:
Thu Feb 06, 2020 7:44 am
Plus it has to wait for the MIDI message to arrive before it can process
it and re-send it (it won't know what it is until it has all arrived).
Nonsense. MIDI has Status bytes so that you know what the following data will be. Waiting for a message to finish is a guarantee for bad timing.
So, depending on what was happening the delay would be 0.4mS to 1mS.
So the notes jitter relative to the clock from the same source with no other inputs?
Sounds like a crapp algorithm based on an incorrect premise that you are better off without.

User avatar
acidbob
Super Deluxe Wiggler
Posts: 2618
Joined: Mon Sep 19, 2011 2:48 am
Location: Denmark

Re: Program to check midi clock timing and note delay

Post by acidbob » Fri Feb 07, 2020 1:58 am

Graham Hinton wrote:
Thu Feb 06, 2020 5:39 pm
acidbob wrote:
Thu Feb 06, 2020 7:44 am
Plus it has to wait for the MIDI message to arrive before it can process
it and re-send it (it won't know what it is until it has all arrived).
Nonsense. MIDI has Status bytes so that you know what the following data will be. Waiting for a message to finish is a guarantee for bad timing.

I think you are right here, but not entirely sure how it's programmed in the merge.
It has to do some sort of sorting and injecting, so maybe that is what he means?

So, depending on what was happening the delay would be 0.4mS to 1mS.
So the notes jitter relative to the clock from the same source with no other inputs?

The clock is not completely stable when running through the merge, that is one thing, I can see that it's jumping around once every 16 - 32 steps.

Now, when injecting notes into the merge the problem get's much more pronounced. But it's mostly the notes coming from the Seq.
So it wasn't really a problem before running only Elektron machines. It might be that the Seq. Doesnt send note off?
There is definitely more investigation to be done.

I tried switching the cable, I tried running directly from MD1 thru the Midibro with filter, I tried changing the inputs around on the merge - my idea was that its scanning the inputs (instead of actually having 4 real inputs).

All I can say is that when I run the notes of the Seq. into the merge, something happens, so one could argue that maybe the seq. Doesnt sync as well as the other sequencers or there is something with the messages that it's sending that isn't working well with the merge.

It's kind of like Sherlock Holmes...


Sounds like a crapp algorithm based on an incorrect premise that you are better off without.

I think it's a combo.
One thing I am going to try is using the midibro as clock
https://forum.mutable-instruments.net/t ... 750?page=2

Thank you for trying to help Graham

Actually I think the picture I first attached isnt entirely correct.
Maybe this will clarify a bit.

I was thinking that i could try option 2 and bypass the merge by placing another thru before.

midi.png
midi2.png
You do not have the required permissions to view the files attached to this post.

User avatar
Graham Hinton
Super Deluxe Wiggler
Posts: 3001
Joined: Fri Jul 02, 2010 6:28 pm
Location: England
Contact:

Re: Program to check midi clock timing and note delay

Post by Graham Hinton » Fri Feb 07, 2020 8:15 am

acidbob wrote:
Fri Feb 07, 2020 1:58 am
It has to do some sort of sorting and injecting, so maybe that is what he means?
No. They just told you that their software was not very good (without realising it).
I tried changing the inputs around on the merge - my idea was that its scanning the inputs (instead of actually having 4 real inputs).
Mergers are software devices, they have to have a UART for each input and read them with software. You cannot merge MIDI in hardware. It is actually a very difficult problem to solve well and there are lots of half baked attempts on the market.

Any MIDI device that processes the data introduces a delay and jitter and, as you say, they all add up. You cannot patch MIDI as if it is analogue audio where you don't consider the delays. Real time software is a plate spinning act creating an illusion of being instantaneous and it doesn't take much to start dropping plates.

Post Reply

Return to “General Gear”