MIDI Latency Compensation

For seeking technical help with Digital Performer and/or plug-ins on MacOS.

Moderator: James Steele

Forum rules
This forum is for seeking solutions to technical problems involving Digital Performer and/or plug-ins on MacOS, as well as feature requests, criticisms, comparison to other DAWs.
User avatar
terrybritton
Posts: 1117
Joined: Thu Jun 04, 2015 8:45 am
Primary DAW OS: Windows
Location: Elizabeth City, NC
Contact:

Re: MIDI Latency Compensation

Post by terrybritton »

Prime Mover wrote:Terry, this is obviously not a case of my rushing, and even if I was, the fact is that the MIDI is ahead of the recording. It doesn't matter if I play to a click or not, the MIDI is always ahead of where the audio was when it was initially recorded.
Believe it or not, I was only kidding around. I know you are frustrated with this. No way was I being serious in the slightest. I hope some solution is discovered.

Terry
Computer: Sweetwater CS400v7 Intel Core i7-10700K CPU @ 3.80GHz | 64Gigs RAM | Windows 11 Pro x64 |
MOTU 828 mk3 hybrid

DAWs & Live: MOTU Digital Performer 11.31 | Cantabile Performer 4
Keyboard Synths: Kawai K5000s, Korg Wavestation
Controllers: NI Komplete Kontrol S-88 Mk3 & S-49 Mk2; Maschine Mk3 & JAM;
Akai MPK249 & 225, Alesis QX49, Behringer BCF2000 & FCB1010
Rack Modules: Ensoniq ESQm, Yamaha TX81Z, Wavestation SR

Tutorials: https://youtube.com/@CreatorsMediaTools
User avatar
HCMarkus
Posts: 9713
Joined: Tue Jan 10, 2006 9:01 am
Primary DAW OS: MacOS
Location: Rancho Bohemia, California
Contact:

Re: MIDI Latency Compensation

Post by HCMarkus »

A workaround is to use a hardware synth and monitor thru a mixer, not DP while recording, then assign the MIDI track to your VI post-recording.
User avatar
Prime Mover
Posts: 2439
Joined: Tue Jul 03, 2007 1:19 am
Primary DAW OS: MacOS
Location: Fairbanks, Alaska

Re: MIDI Latency Compensation

Post by Prime Mover »

HCMarkus wrote:A workaround is to use a hardware synth and monitor thru a mixer, not DP while recording, then assign the MIDI track to your VI post-recording.
I don't think that would solve anything. The recording monitoring is actually pretty close, it's way farther off on playback. Any MIDI data coming from anywhere is being printed early, so a hardware synth won't be much better.
— Eric Barker
Eel House

"All's fair in love, war, and the recording studio"
MacPro 1,1 2Ghz 7GB RAM OS 10.6.8 | MacBook Pro 13" i5 1.8Ghz 16GB RAM OS 10.8.2
DP7/8 | Komplete 7 | B4II | Korg Legacy Analog | Waves v9 (various) | Valhalla Room | EWQLSO Gold
MOTU 828mkII | MOTU 8pre | Presonus BlueTube | FMR RNC
Themes: Round is Right and Alloy
User avatar
Prime Mover
Posts: 2439
Joined: Tue Jul 03, 2007 1:19 am
Primary DAW OS: MacOS
Location: Fairbanks, Alaska

Re: MIDI Latency Compensation

Post by Prime Mover »

terrybritton wrote:Believe it or not, I was only kidding around. I know you are frustrated with this. No way was I being serious in the slightest. I hope some solution is discovered.
Gotta admit, I was totally confused by your post.
— Eric Barker
Eel House

"All's fair in love, war, and the recording studio"
MacPro 1,1 2Ghz 7GB RAM OS 10.6.8 | MacBook Pro 13" i5 1.8Ghz 16GB RAM OS 10.8.2
DP7/8 | Komplete 7 | B4II | Korg Legacy Analog | Waves v9 (various) | Valhalla Room | EWQLSO Gold
MOTU 828mkII | MOTU 8pre | Presonus BlueTube | FMR RNC
Themes: Round is Right and Alloy
User avatar
terrybritton
Posts: 1117
Joined: Thu Jun 04, 2015 8:45 am
Primary DAW OS: Windows
Location: Elizabeth City, NC
Contact:

Re: MIDI Latency Compensation

Post by terrybritton »

Prime Mover wrote:
terrybritton wrote:Believe it or not, I was only kidding around. I know you are frustrated with this. No way was I being serious in the slightest. I hope some solution is discovered.
Gotta admit, I was totally confused by your post.
As I was confused by your confusion! I've never had a joke misunderstood before, literally never. It threw me a little. I thought the manual reference really made it obvious.

Oh well - old age must be approaching. Must learn to stay serious like an adult is supposed to, I suppose.

Terry
Computer: Sweetwater CS400v7 Intel Core i7-10700K CPU @ 3.80GHz | 64Gigs RAM | Windows 11 Pro x64 |
MOTU 828 mk3 hybrid

DAWs & Live: MOTU Digital Performer 11.31 | Cantabile Performer 4
Keyboard Synths: Kawai K5000s, Korg Wavestation
Controllers: NI Komplete Kontrol S-88 Mk3 & S-49 Mk2; Maschine Mk3 & JAM;
Akai MPK249 & 225, Alesis QX49, Behringer BCF2000 & FCB1010
Rack Modules: Ensoniq ESQm, Yamaha TX81Z, Wavestation SR

Tutorials: https://youtube.com/@CreatorsMediaTools
User avatar
Prime Mover
Posts: 2439
Joined: Tue Jul 03, 2007 1:19 am
Primary DAW OS: MacOS
Location: Fairbanks, Alaska

Re: MIDI Latency Compensation

Post by Prime Mover »

I actually started reaching for my manual, then I realized something didn't make sense, but I still don't get the joke, TBH.
— Eric Barker
Eel House

"All's fair in love, war, and the recording studio"
MacPro 1,1 2Ghz 7GB RAM OS 10.6.8 | MacBook Pro 13" i5 1.8Ghz 16GB RAM OS 10.8.2
DP7/8 | Komplete 7 | B4II | Korg Legacy Analog | Waves v9 (various) | Valhalla Room | EWQLSO Gold
MOTU 828mkII | MOTU 8pre | Presonus BlueTube | FMR RNC
Themes: Round is Right and Alloy
User avatar
terrybritton
Posts: 1117
Joined: Thu Jun 04, 2015 8:45 am
Primary DAW OS: Windows
Location: Elizabeth City, NC
Contact:

Re: MIDI Latency Compensation

Post by terrybritton »

Prime Mover wrote:I actually started reaching for my manual, then I realized something didn't make sense, but I still don't get the joke, TBH.
I can wait... 8)

Terry
Computer: Sweetwater CS400v7 Intel Core i7-10700K CPU @ 3.80GHz | 64Gigs RAM | Windows 11 Pro x64 |
MOTU 828 mk3 hybrid

DAWs & Live: MOTU Digital Performer 11.31 | Cantabile Performer 4
Keyboard Synths: Kawai K5000s, Korg Wavestation
Controllers: NI Komplete Kontrol S-88 Mk3 & S-49 Mk2; Maschine Mk3 & JAM;
Akai MPK249 & 225, Alesis QX49, Behringer BCF2000 & FCB1010
Rack Modules: Ensoniq ESQm, Yamaha TX81Z, Wavestation SR

Tutorials: https://youtube.com/@CreatorsMediaTools
User avatar
HCMarkus
Posts: 9713
Joined: Tue Jan 10, 2006 9:01 am
Primary DAW OS: MacOS
Location: Rancho Bohemia, California
Contact:

Re: MIDI Latency Compensation

Post by HCMarkus »

It's the nature of jokes. Especially when written, as it is often hard to see the smile across the miles.

Back to the subject at hand...

I experimented with my system and confirmed the Fine Tune I/O Timing offset adjustment does work but only on audio that LEAVES from and RETURNS to DP; it does not effect internal timing (Audio to Audio, VI to Audio), which I found to be extremely accurate. I used a 44.1k sample rate to test and routed audio from DP thru my 828mkII and back again, all in the digital domain.

With playback/record values of -168/+160, timing on my system is super when running with buffers of 256 or greater.

Experimenting with BFD and NI VIs, I found BFD returned audio perfectly in time with the MIDI trigger at buffers of 256 or greater. NI Battery appeared to delay 40 samples even after I trimmed the hit hat sample I was using (about 1 millisecond at 44k sample rate), so I used BFD for my testing. At a buffer of 128, audio and VI's are returning about 6 samples early. I can't run a smaller buffer with my 828mkII.

Although audio and VI playback timing is very accurate and consistent across buffer sizes, triggering a Yamaha S90ES (via USB) returns ever-increasing lag as buffer size is increased:

Buffer 128 = 130 samples late (About 3 milliseconds)
Buffer 256 = 260 samples late (6 ms)
Buffer 512 = 520 samples late (12 ms)

It appears MOTU has not properly compensated for buffer size impacts on MIDI data output; interesting to note that the relationship between buffer size and delay in samples is linear, suggesting a possible easy fix in an equation somewhere within DP. This finding is somewhat troubling but, because I don't often record hardware synths, not a big issue for me. Of course, latency like this can be easily fixed by sliding a track in time post-recording.

If you want MIDI to line up with your VIs sounding on input, I continue to believe the "Sync MIDI" preference I discussed earlier in this thread is the key.

I'll reiterate my suggestion you contact MOTU if timing issues mentioned (like the failure of plugins to sync) are not otherwise resolvable. Here's hoping a fix is quickly found.
HC Markus
M1 Mac Studio Ultra • 64GB RAM • 828es • macOS 13.6.4 • DP 11.31
User avatar
Prime Mover
Posts: 2439
Joined: Tue Jul 03, 2007 1:19 am
Primary DAW OS: MacOS
Location: Fairbanks, Alaska

Re: MIDI Latency Compensation

Post by Prime Mover »

Yeah, where-as on my machine, MIDI Timing I/O DOES seem to adjust the timing of VIs, but "Sync MIDI" does NOTHING.
— Eric Barker
Eel House

"All's fair in love, war, and the recording studio"
MacPro 1,1 2Ghz 7GB RAM OS 10.6.8 | MacBook Pro 13" i5 1.8Ghz 16GB RAM OS 10.8.2
DP7/8 | Komplete 7 | B4II | Korg Legacy Analog | Waves v9 (various) | Valhalla Room | EWQLSO Gold
MOTU 828mkII | MOTU 8pre | Presonus BlueTube | FMR RNC
Themes: Round is Right and Alloy
User avatar
terrybritton
Posts: 1117
Joined: Thu Jun 04, 2015 8:45 am
Primary DAW OS: Windows
Location: Elizabeth City, NC
Contact:

Re: MIDI Latency Compensation

Post by terrybritton »

I was reading about a different issue, and the subject of "MIDI-Jitter" was brought up. As I'd never heard of it before (!) I Googled it, and found a couple interesting articles.

This one suggests that DP 8 is one of many hosts guilty of exhibiting Jitter and it looks very much like the kind of situation brought up by Prime Mover:

http://expressiveness.org/2012/12/04/MIDI-jitter

The author made these remarks concerning the test methodology in this thread here.
I purposely [ED] left some details out to prevent the article from getting too long. Here are some answers:

1. Tests are perfectly reproducible, I ran them at lest three times for each host and the results were always exactly the same.
2. The behavior is totally consistent when using other VST or AudioUnit instruments.
3. I manually zoomed in to sample precision, snipped at the first non zero sample, zoomed back out and then used bar boundary snapping in the DAW to align the start of the snipped clip with the beginning of the bar.
4. The signal chain was exactly the same for each test, just switching out the final host/DAW. I performed the same tests to another box over Ethernet MIDI though and also using iConnectMIDI for MIDI over USB. The behavior is exactly the same.

Actually, the behavior has been confirmed by plugin developers for Logic (see the comments on my article). The MIDI sample offsets in Logic are not set when processing live MIDI, they are set when using the built in sequencer.
Sound-On-Sound magazine had an article on reducing MIDI timing problems, but I have not read it yet. They also admit their solutions will not work for everybody.
http://www.soundonsound.com/techniques/ ... g-problems

Here is the google search I did - perhaps there are more gems in here, but I cannot read all this tonight.
https://www.google.com/search?q=MIDI%20jitter

So, latency might not be the problem - jitter may be the culprit!

Terry
Last edited by terrybritton on Fri Feb 24, 2017 5:38 am, edited 3 times in total.
Computer: Sweetwater CS400v7 Intel Core i7-10700K CPU @ 3.80GHz | 64Gigs RAM | Windows 11 Pro x64 |
MOTU 828 mk3 hybrid

DAWs & Live: MOTU Digital Performer 11.31 | Cantabile Performer 4
Keyboard Synths: Kawai K5000s, Korg Wavestation
Controllers: NI Komplete Kontrol S-88 Mk3 & S-49 Mk2; Maschine Mk3 & JAM;
Akai MPK249 & 225, Alesis QX49, Behringer BCF2000 & FCB1010
Rack Modules: Ensoniq ESQm, Yamaha TX81Z, Wavestation SR

Tutorials: https://youtube.com/@CreatorsMediaTools
User avatar
Yiannis
Posts: 242
Joined: Sat Oct 16, 2004 10:01 pm
Primary DAW OS: MacOS

Re: MIDI Latency Compensation

Post by Yiannis »

I just saw this topic....its related to my problem with Kronos.....

"Fine Tune Audio Timing" could be a solution,but how can I fix it if the problem is not stable?

Here is an example at 512 buffer.Same pass recorded several times.
Marker is where the hits should normally be.

Kronos is connected via USB to my mac for MIDI...Audio is via SPDIF and ANALOG.


The brown tracks are via ANALOG outputs, greens are SPDIF.

Image

Last one using DP 8.

Image
-----------------------------------------

I am a very happy DAD.


MacPro 3.33Ghz 6core-32g Ram-10T HDs-10.12.6-Dp-10.0.1.
Korg Kronos 2-Korg Pa4X-Ensonic TS 10-Korg T3-Yamaha Dx 7iiFD-Akai S3000xl-Roland JV 2080
Genelec 1031A with KRK 10S sub-Yamaha NS10m
ULN-2..Tubetech Lca2B-Avalon 737sp-HEDD 192-Lexicon PCM 90.
Soundcraft Sapphyre 28ch
User avatar
Yiannis
Posts: 242
Joined: Sat Oct 16, 2004 10:01 pm
Primary DAW OS: MacOS

Re: MIDI Latency Compensation

Post by Yiannis »

Another test........blue is MIDI via micro express......green is via usb.
Marker shows where the hit should be in the first place....... :x


Image
-----------------------------------------

I am a very happy DAD.


MacPro 3.33Ghz 6core-32g Ram-10T HDs-10.12.6-Dp-10.0.1.
Korg Kronos 2-Korg Pa4X-Ensonic TS 10-Korg T3-Yamaha Dx 7iiFD-Akai S3000xl-Roland JV 2080
Genelec 1031A with KRK 10S sub-Yamaha NS10m
ULN-2..Tubetech Lca2B-Avalon 737sp-HEDD 192-Lexicon PCM 90.
Soundcraft Sapphyre 28ch
User avatar
Prime Mover
Posts: 2439
Joined: Tue Jul 03, 2007 1:19 am
Primary DAW OS: MacOS
Location: Fairbanks, Alaska

Re: MIDI Latency Compensation

Post by Prime Mover »

Anyone test this with DP9? I haven't bothered to update since it really didn't seem to offer any features that interest me, but if it cures this problem, it would be worth it.
— Eric Barker
Eel House

"All's fair in love, war, and the recording studio"
MacPro 1,1 2Ghz 7GB RAM OS 10.6.8 | MacBook Pro 13" i5 1.8Ghz 16GB RAM OS 10.8.2
DP7/8 | Komplete 7 | B4II | Korg Legacy Analog | Waves v9 (various) | Valhalla Room | EWQLSO Gold
MOTU 828mkII | MOTU 8pre | Presonus BlueTube | FMR RNC
Themes: Round is Right and Alloy
User avatar
HCMarkus
Posts: 9713
Joined: Tue Jan 10, 2006 9:01 am
Primary DAW OS: MacOS
Location: Rancho Bohemia, California
Contact:

Re: MIDI Latency Compensation

Post by HCMarkus »

My testing was DP9.12 under Sierra.

I suspect that the variation Yiannis is seeing may be the synth he is driving. I couldn't read the demarcations in his screen shots and am thus unable to determine how much latency he is recording.

Latency via MIDI as opposed to USB is likely to be higher due to low MIDI baud rate.
User avatar
Yiannis
Posts: 242
Joined: Sat Oct 16, 2004 10:01 pm
Primary DAW OS: MacOS

Re: MIDI Latency Compensation

Post by Yiannis »

Hi Marcus,

I don't know if its Kronos so I have two more tests.
One in LogicX and one in DP 9.12 both at 256 buffer.

As you can see Logic is more accurate but a little ahead..perhaps not a big deal.

Dp 9.12 on the other hand is about a 64th later......thats a lot!!

Image

Image
-----------------------------------------

I am a very happy DAD.


MacPro 3.33Ghz 6core-32g Ram-10T HDs-10.12.6-Dp-10.0.1.
Korg Kronos 2-Korg Pa4X-Ensonic TS 10-Korg T3-Yamaha Dx 7iiFD-Akai S3000xl-Roland JV 2080
Genelec 1031A with KRK 10S sub-Yamaha NS10m
ULN-2..Tubetech Lca2B-Avalon 737sp-HEDD 192-Lexicon PCM 90.
Soundcraft Sapphyre 28ch
Post Reply