MIDI Latency vs. Audio Latency?

Discuss music production with Ableton Live.
rikhyray
Posts: 3644
Joined: Wed Aug 25, 2004 12:13 pm
Contact:

Re: MIDI Latency vs. Audio Latency?

Post by rikhyray » Wed Nov 25, 2009 12:31 am

Tone Deft wrote:those links go to blank pages.

can you find that SOS article? is it the one from 2002?
Just tried to find the SOS - no result, might be 2002 (post the link plz if you find it).
I did some experiments with my own equipment, 2-3 years back, after reading Martins article and apply those findings in my work.
those links I send work, I checked them right now from my own post.
FOUND IT!
http://www.soundonsound.com/sos/Sep02/a ... an0902.asp
Last edited by rikhyray on Wed Nov 25, 2009 12:45 am, edited 1 time in total.

leedsquietman
Posts: 6659
Joined: Sun Nov 19, 2006 1:56 am
Location: greater toronto area

Re: MIDI Latency vs. Audio Latency?

Post by leedsquietman » Wed Nov 25, 2009 12:40 am

Yeah, Midex with Cubase using the LTP protocol was really rock solid. I don't understand why Steinberg refuse to write 64 bit drivers for it and have ditched it, it was top notch. People have even offered to pay for 64 bit drivers, given the MIDEX was a $700 piece of kit, but no joy. It also was typically lower in jitter and had a latency of only around 3.7ms which for a USB 1.1 device was amazing.

There was a huge MIDI interface test that went on at Cubase's forum a couple of years ago which showed variance of 1.6 - 8ms variance on MIDI latency depending on interface. The PC midi results also varied depending on which protocol was being used, i.e. MME, Direct MIDI or emulated Direct MIDI, the latter tending to show the worst performance with proper Direct MIDI the best and MME inbetween. Because Mac only has one MIDI protocol, CoreMIDI, it's results tended to be in the 2-4.5 ms latency range and more consistent. Actually, Firewire cards tended to show the most variance, between 3-8ms of latency, USB 2.0 tended to almost always be in the 4-6 ms range, with the EMU 0404USB running at 3.7ms which was really good for a USB product. RME tended to be in the 3-4ms range with their products and were also deemed good for firewire MIDI. PCI based products were best in the 1.6-3.5ms latency range. This also showed that drivers played a huge part, some companies just seemed unable to write efficient drivers.

MIDI latency isn't typically a major problem, I mean even an 8ms latency is still low unless you have notes played in 64ths trying to pull off a Rick Wakeman moog solo or something ;).

Midi jitter causing drifting and syncing issues is more of an issue than latency but as people said, when added up with the audio latency it can have an impact.
http://soundcloud.com/umbriel-rising http://www.myspace.com/leedsquietmandemos Live 7.0.18 SUITE, Cubase 5.5.2], Soundforge 9, Dell XPS M1530, 2.2 Ghz C2D, 4GB, Vista Ult SP2, legit plugins a plenty, Alesis IO14.

Tone Deft
Posts: 24152
Joined: Mon Oct 02, 2006 5:19 pm

Re: MIDI Latency vs. Audio Latency?

Post by Tone Deft » Wed Nov 25, 2009 12:50 am

thank guys.

rikhray yeah, that's the article. I was excited to find it but it's pretty outdated at this point. I wish they'd revisit it.

I know you two have been around the block a few times, I'm listening but I'd love to find a definite answer.
In my life
Why do I smile
At people who I'd much rather kick in the eye?
-Moz

rikhyray
Posts: 3644
Joined: Wed Aug 25, 2004 12:13 pm
Contact:

Re: MIDI Latency vs. Audio Latency?

Post by rikhyray » Wed Nov 25, 2009 1:17 am

Tone Deft wrote: . I was excited to find it but it's pretty outdated at this point.
Not really, unfortunately, there is nothing new as far as the midi goes. I want to be wrong, give me some good news, that there is modern better interface... shame really, 2002, long time and we still have same old rubbish.

@ leedsq. exactly that is why I can mostly get away with my Novation SL via USB, I am guitarist and percussionist, my keyboard chops are limited (the other thing is that I can go down to 0.35 audio latency using express so overall latency is hardly significant). Frankly the only case I had to pullout hardware sequencer was recording Latin Jazz pianist, even the Midex/Cubase was irritating her but for a Cuban (who generally have insanely tight timing) she was exceptionally good rhythmically. Most keyboardist are not so demanding.

morerecords

Re: MIDI Latency vs. Audio Latency?

Post by morerecords » Wed Nov 25, 2009 5:22 pm

hmmm, well I dont know what to comment, it seems more or less like there is no solution. Strange, it seems you would be able to toggle between better MIDI thru for hardware, anyway, I can see why it would take a moment for a software synth to respond, but damn! I need at least my hardware to respond with no latency, I mean, 10 ms defintely IS noticable and a bother. I got rid of my piano recently, nowI have nothing to play in realtime, i think for me the best solution will have to sit within what I already planned, to buy a nice digital piano next week....god it really does seem like there is always something which I have to buy...but, at least then I will have something to play in realtime. For midi seqeuncing, I suppose I will go back to Logic to start my tracks, and then bounce midi files for live and arranging, PAIN IN THE ASS

Tone Deft
Posts: 24152
Joined: Mon Oct 02, 2006 5:19 pm

Re: MIDI Latency vs. Audio Latency?

Post by Tone Deft » Wed Nov 25, 2009 7:06 pm

morerecords wrote:I mean, 10 ms defintely IS noticable and a bother.
disagree. even hardware synths have latencies up to 5mS.

the other problem is that software doesn't seem to report the correct latency. I used to think I could feel 10mS then I checked my latency with DPC latency checker. what I read from Live as 10mS was actually 35mS.

you're reading 10mS and feeling it, but it's actually much longer. check it out.

http://www.thesycon.de/deu/latency_check.shtml



really, this kind of tuning for your DAW is just something you get used to doing as you learn. for me, when building a set, recording stuff I go to 96kHz or 192kHz for low latency. when I'm more into putting the loops together I change to 48kHz and use large buffers. I change my settings all the time, it's just something you get used to.
In my life
Why do I smile
At people who I'd much rather kick in the eye?
-Moz

[nis]
Posts: 578
Joined: Tue Dec 19, 2006 2:31 pm
Location: Ableton Headquarters
Contact:

Re: MIDI Latency vs. Audio Latency?

Post by [nis] » Wed Nov 25, 2009 7:49 pm

<em>Tone Deft</em> wrote:disagree. even hardware synths have latencies up to 5mS.
Indeed. Some older synths have even more latency, MIDI latency and also DSP latency (on digital synths), which can be a lot. More than you would expect.
Nico Starke
Ableton Product Team

Hermanus
Posts: 1659
Joined: Mon Apr 20, 2009 7:47 pm
Location: Belgium

Re: MIDI Latency vs. Audio Latency?

Post by Hermanus » Wed Nov 25, 2009 8:49 pm

Thanks for the link ToneD

leedsquietman
Posts: 6659
Joined: Sun Nov 19, 2006 1:56 am
Location: greater toronto area

Re: MIDI Latency vs. Audio Latency?

Post by leedsquietman » Wed Nov 25, 2009 10:37 pm

If you're standing 6 feet away from a guitar amp, that's 11 ms of latency. How many people on stage are stood only 6 feet away from their amps (and haven`t gone deaf), even shredders doing a million notes per hour. Not many I`ve seen.

Hardware synths especially older ones often run anywhere from 4-8 ms latency.

I think the problem is that 10ms of latency is usually NOT 10ms of latency. Latency comes in and out, so 10ms in with whatever the out latency is (10ms if not buffered any further, most cards have options to buffer or correct compensation, I can get my Alesis IO to have 10ms in and 38 ms out if I want to add buffers for smoother playback by choosing that option) and then the converters typically add another 1-2ms latency and sometimes the manufacturer adds a buffer themselves, such as the Fireface 800 and many others (it`s only 32 samples which is less than 1ms and they do declare it to the host) and some others try to be sneaky and don`t declare extra buffers to the host. So that 10ms, could really be 12ms, 20 ms, 22ms (combined in and out) or more.
http://soundcloud.com/umbriel-rising http://www.myspace.com/leedsquietmandemos Live 7.0.18 SUITE, Cubase 5.5.2], Soundforge 9, Dell XPS M1530, 2.2 Ghz C2D, 4GB, Vista Ult SP2, legit plugins a plenty, Alesis IO14.

Tone Deft
Posts: 24152
Joined: Mon Oct 02, 2006 5:19 pm

Re: MIDI Latency vs. Audio Latency?

Post by Tone Deft » Wed Nov 25, 2009 10:40 pm

leedsquietman wrote:If you're standing 6 feet away from a guitar amp, that's 11 ms of latency.
1 foot = 1ms

6 feet = 6ms



Hermanus - cool! I hope it helps, it changed how I look at latency and drove home the need to actually test stuff for real and not rely a few data points.
In my life
Why do I smile
At people who I'd much rather kick in the eye?
-Moz

leedsquietman
Posts: 6659
Joined: Sun Nov 19, 2006 1:56 am
Location: greater toronto area

Re: MIDI Latency vs. Audio Latency?

Post by leedsquietman » Thu Nov 26, 2009 2:28 am

Thanks TD. Upon further investigation it seems pretty much universally agreed that latency is within a cat's whisker of 1 ft = 1ms (nice and convenient).
http://soundcloud.com/umbriel-rising http://www.myspace.com/leedsquietmandemos Live 7.0.18 SUITE, Cubase 5.5.2], Soundforge 9, Dell XPS M1530, 2.2 Ghz C2D, 4GB, Vista Ult SP2, legit plugins a plenty, Alesis IO14.

crumhorn
Posts: 2503
Joined: Fri Sep 26, 2008 6:04 pm

Re: MIDI Latency vs. Audio Latency?

Post by crumhorn » Thu Nov 26, 2009 3:10 am

Tone Deft wrote:
morerecords wrote:I mean, 10 ms defintely IS noticable and a bother.
disagree. even hardware synths have latencies up to 5mS.

the other problem is that software doesn't seem to report the correct latency. I used to think I could feel 10mS then I checked my latency with DPC latency checker. what I read from Live as 10mS was actually 35mS.

you're reading 10mS and feeling it, but it's actually much longer. check it out.

http://www.thesycon.de/deu/latency_check.shtml



really, this kind of tuning for your DAW is just something you get used to doing as you learn. for me, when building a set, recording stuff I go to 96kHz or 192kHz for low latency. when I'm more into putting the loops together I change to 48kHz and use large buffers. I change my settings all the time, it's just something you get used to.
I think you are mixing up two different things there. DPC latency is not the same thing as audio latency. It's related to the maximum length of time that the cpu is kept busy by device drivers when it can't be interrupted to deal with a user mode task. If it is too high it can cause drop outs in your audio, because the sound card is waiting for some more data and the processor is tied up with another device driver for too long to get the audio data there on time.

That wasn't very clearly put, but it is the early hours of the morning here.

But It's true that sound cards tend to misreport latency. But not by as much as 25 mS!

I did some tests on my FirePod using the the latency test utility available on the CEntrance web site --> http://www.centrance.com/products/ltu/

It gives an accurate measure of the total round trip latency of your system.

These are the results I got:
Sample Rate = 44.1 KHz
Driver Latency Setting in Samples: 88 / 176 / 352 / 704 / 1410
Driver Latency Setting in mS: 2/ 4 / 8 / 16 / 32 ( round trip = 4 / 8 / 16 / 32 / 64 )
Reported latency in Live's Preferences: 9.12 / 13.1 / 21.1 / 37.1 / 69.1
CEntrance LTU Test Result: 10.41 /14.4 / 22.38 / 38.38 / 70.36
Live Latency adjustment required: approx 1.3 mS on all settings

"Extra" Latency due to OS and Drivers etc: approx 6.4 mS on all settings


PS. Not only does 1ft/mS work out very nicely for the speed of sound but by a spooky coincidence the speed of light is very close to 1ft/nS
"The banjo is the perfect instrument for the antisocial."

(Allow me to plug my guitar scale visualiser thingy - www.fretlearner.com)

Tone Deft
Posts: 24152
Joined: Mon Oct 02, 2006 5:19 pm

Re: MIDI Latency vs. Audio Latency?

Post by Tone Deft » Thu Nov 26, 2009 3:51 am

crumhorn wrote:DPC latency is not the same thing as audio latency. It's related to the maximum length of time that the cpu is kept busy by device drivers when it can't be interrupted to deal with a user mode task. If it is too high it can cause drop outs in your audio, because the sound card is waiting for some more data and the processor is tied up with another device driver for too long to get the audio data there on time.
wow, thanks for that!!! "Thanksgiving" (US holiday) is tomorrow, so it's Friday night for me <burrrp *cough*> and that made total sense.

for kicks I looked up DPC
http://en.wiktionary.org/wiki/DPC

to that excellent info I'd add this quote I caught once from Ableton on the latency of Live's effects. someone was ranting, they chimed in.
[mid] wrote:Hi there,

the AAS instruments introduce the latency of the set CPU buffer size.

Compressor and Limiter introduce the latency of the set look-ahead. Gate has 1.5ms. Erosion has 5ms.
Reverb introduces 8 samples of latency. The other Ableton plugins have just a few samples of latency.

Best,
Michael
Ableton HQ
In my life
Why do I smile
At people who I'd much rather kick in the eye?
-Moz

rikhyray
Posts: 3644
Joined: Wed Aug 25, 2004 12:13 pm
Contact:

Re: MIDI Latency vs. Audio Latency?

Post by rikhyray » Thu Nov 26, 2009 1:29 pm

morerecords wrote:hmmm, well I dont know what to comment, it seems more or less like there is no solution. Strange, it seems you would be able to toggle between better MIDI thru for hardware, anyway, I can see why it would take a moment for a software synth to respond, but damn! I need at least my hardware to respond with no latency, I mean, 10 ms defintely IS noticable and a bother. I got rid of my piano recently, nowI have nothing to play in realtime, i think for me the best solution will have to sit within what I already planned, to buy a nice digital piano next week....god it really does seem like there is always something which I have to buy...but, at least then I will have something to play in realtime. For midi seqeuncing, I suppose I will go back to Logic to start my tracks, and then bounce midi files for live and arranging, PAIN IN THE ASS
Now , when I reflect, something so obvious that dont even think about it anymore, realised that I never use live for anything midi/rhythmically significant. I am not whinning type, once see something does not work, waste no time and look for alternatives. It was great live got midi in ver.4, and supposedly midi is getting better with every version but not up to Logic or Cubase level, what I need. I record hardware direct to audio and my midi workaround is using Reason which as close system is as tight as it gets considering computers limitations. Anyway Reason is my sketchpad, Triton, Motif style workstation then I export midi track if I want to replace with VST or record live the hardware (sometimes using midi or audio from reason as guiding/reference track).
If you real keyboard player, get some E or better regular piano for sure, all that VST/controller playing is like sex using condoms, necessity but sometimes you want real thing. All that software stuff is OK but it is also important to just play, jam, get some new ideas or have simply playing fun and from my experience it works only with regular instruments.

REF. monitoring latency, amps,monitors etc on stage
It is only excuse, explanation - that something is "as bad" does not make anything better. All the years till In Ear monitoring came it was always pain ( everyone had to compensate, adjust,predict mentally and really looking at each other), specially in band like mine where velocity, virtuosity of guitarists, percussionist was important part of the show. The inEar monitoring (=cutting the latency) was real revelation and salvation

crumhorn
Posts: 2503
Joined: Fri Sep 26, 2008 6:04 pm

Re: MIDI Latency vs. Audio Latency?

Post by crumhorn » Thu Nov 26, 2009 7:16 pm

For the sake of sheer geekishness I just did some Loop Back MIDI timeing tests on my FirePod using Live.

This is on a 2GHz dual core PC laptop running vista.

Basic method:

set record quantise off.
create one bar midi clip on track 1 with a few chords exactly on the beat.
send output to FirePod with MIDI out looped back to MIDI in.
set track 2 to record, monitor off.
global quantise = 1 bar.
launch the clip on track 1 then launch recording on track 2 for a bar or two.
build a nice collection of recorded clips with different settings.
For comparison some recordings were done via MIDI Yoke.

Variables:

FirePod MIDI or MIDI Yoke
Delay Compensation on/off
MME or DirectMusic
FirePod ASIO driver @176 samples or SonicReality (built in soundcard) ASIO driver @2000 samples

In the image:

the first track (white) is the original midi being sent out.

The next two tracks - MYFP and MYSR - are using MIDI Yoke and the FirePod / SonicReality - Delay compensation had no effect on this setup and using DirectMusic with MIDIYoke severely mangled the data.

All remaining tracks are recorded via the FirePod's MIDI interface.

Tracks 4 - 7 use MME and tracks 8 - 11 use Direct Music
Tracks 4, 5, 8 and 9 were recorded with the FirePod ASIO driver selected
Tracks 6, 7, 10 and 11 were recorded with the SonicReality ASIO driver enabled.
In each pair of tracks with the same colour the second one has Delay Compensation turned on

Here are the results
Image

It seems that time travel is possible after all!

Look at the bottom of the picture to see the time in minutes, seconds and thousandths.

Scroll to the right because the note off timing is interesting too.

I'm not sure what conclusions can be drawn from this except that ableton must be doing some interesting adjustments behind the scenes, and that getting the right combination of settings can make quite a difference to the result.

Edit - further thoughts...

The notes recorded via DirectMusic are probably adjusted by Live to reflect the Time Stamp from the hardware. This probably has little relation to the actual MIDI delay, since clearly a message can't possibly be recieved before it is sent. Either the time stamp must be wrong or Live is overcompensating in some way.

The notes recorded via MME driver without Delay Compensation probably give a better indication of the actual delays.

It seems bizzar that the choice of ASIO driver affects the MIDI timing so much. I'm sure that if I could understand this then I would know a lot more about audio software than I do now.
"The banjo is the perfect instrument for the antisocial."

(Allow me to plug my guitar scale visualiser thingy - www.fretlearner.com)

Post Reply