Input, Output and Midi latency?

I think I’ve half-a**ed understood this about 5 times … and forgotten it 6.

  1. Is there midi latency completely independent of audio latency and, if so, what does it depend on and how do you measure it?

I started wondering about this because when learning that the purpose of the External Instruments VST Connections is to permit delay compensation for hardware instruments, and that this is accomplished by ‘pinging’ a signal that Cubase measures … I wondered if the delay measured was only the ASIO latency or also included some amount of system midi latency.


2. Is there any practical difference between input and output latency, or should you just add them up and forget about it?

I’m sort of thinking that if you are concerned about studio monitoring through Cubase (not direct monitoring through your audio interface) with respect to a headphone mix you add them up. But if you are concerned about recording a soft or hard synth along with Cubase main out, you’re only concerned with input latency since it (am I really saying this?) all comes out together. Is this a correct understanding?

Como

Hi Como,

I saw your post sitting out here w/ no replies; so I thought I’d give it a shot.

I’m not sure if this will be helpful or not, but here’s what I know.

  1. There is such a thing as “MIDI” latency.

  2. How noticable it is depends on several factors like: your interface, CPU, and software.

  3. I do know that if you “daisy chain” several external instruments together (one after the other using 'MIDI Thru") it gets worse.

  4. The latency value shown under the “Device Set Up / ASIO” menu is the value for audio only (MIDI latency, whatever that may or may not be) is not included there. And to the best of my knowledge; isn’t explicitly stated anywhere.

Here are a few links to good articles on the subject, sorry that I can’t provide anything more exact. If you encounter a specific problem, please feel free to post or PM.

Cheers, WPH (links below)

http://www.soundonsound.com/sos/oct02/articles/pcmusician1002.asp

http://forum.recordingreview.com/f23/midi-latency-issue-cubase-5-a-25807/

Walter P …

Thanks so much. Irony of ironies I had just looked for this post so I could post the link to Martin Walker’s SOS 2002 ‘Part 2’ article, which I’d found through Google.

I forgot to check ‘notify’ when I posted this … so I didn’t know you’d responded.

I must say, Walker’s article is deep and with respect to specifics obsolete, but the basic concepts of what midi latency is and why are very clear. Since I can pretty well stay around 128 samples with my PC and RME sound card … I shouldn’t have to worry about it or notice it … or if I do, then will be sure to know something in my setup needs trouble shooting.

I am bothered that my beloved MOTU Midi Timepiece ATV serial is no longer going to work under Windows x64, since there are no 64 bit drivers from MOTU … and that the firewire multi-port midi interface Walker for saw seems to never have arrived.

If you … or someone … could still address the the proper understanding of why Cubase reports separate ASIO latencies for input and output as opposed for a simple total figure adding both, I’d appreciate it. In otherwords, what are the practical implications of looking at latency as ‘input’ or ‘output’ as opposed to just the total derived from adding them together.

Como

Hi Como,

Sorry for the delay in getting back you you. To try and answer your questions:

  1. MIDI latency is entirely sepearte from audio latency to the best of my knowledge, and I’ve never really seen any where that its displayed as a seperatre value. Usually its near zero because (compared to audio) MIDI is really really light on data! So there’s no need to buffer in the first place.

THe only times I’ve run into noticable MIDI latency issues have been with a daisy-chain of many instruments. I’ve been able to solve those issues with a MIDI spliter or a MIDI router.

The other time I ran into it was because of a delay in how the sequencer program behaved (wrong setting, had a “MIDI echo” function on by accident.

Last but not least, I’ve had what appeared to be MIDI latency issues while setting up KORE Player a long time ago. Turns out I had the sounds stored in a weird location and it was taking the VST instrument a long time (in computer terms) to find, load and play the sound. But it was a disc-access issue not a MIDI data transmission issue.

  1. Regarding audio latency and the two values for input and output. I can only speak for myself, but we tend to look at the input value (only) when we’re recording / tracking etc.

The output value only really comes into play when working with external instrumnets or when making adjustments to the PDC (plug in delay compensation). Sometimes on really processor-intensive mixes we’ll have the buffer size set very high (1040+) to help lighten the load on the CPU. But then you sometimes have to adjust PDC (esp. if your have a big chain of outboard instruments trying to keep up) That’s about the only time I’ve really used the output latency value on its own.

That’s a long winded answer, but I hope it helps!

Cheers!

Walt

Very much appreciated, Walter.

I’ll just focus on the input latency and forget the output as I don’t anticipate a situation where I’d be using a large amount of external instruments.

Como

Just so I understand correctly,when recording audio or MIDI AND monitoring the signal at the same time( listening through speakers), it is just the case of the input latency + the output latency right?


So if I’m using the General Low Latency Driver with roughly 20ms latency of input and output respectively, I’d be hearing a 40ms delay right from the moment I play on my MIDI keyboard, to hearing it on the speakers? :question:

Daniel

Anyone? :frowning:

Yes that would be the minimum latency encountered from sound in to sound out.

40ms is way to big a delay to play accurately, you need to get it down hopefully to below 10ms

I’m pretty sure that the total latency will be heard more if you play a midi keyboard into and then trigger a midi module, say.
Audio? Can’t say I’ve ever noticed any delay inputting audio and hearing it thru monitors live. May have been a factor about ten years ago.
It’s the buffer size and the packages/traffic going thru the bus that mainly affect the midi data which gives the more extreme effects.
The soundcard processes the audio but the midi has to use the computer ram and so on thru to the CPU and back to the soundcard that slows things up. The new i7 machines have direct connection from the ram to the cpu and so are faster. Older machines the data had to go via the Northside bridge for translation thru to the CPU and, depending on components and the speed of the CPU’s Front Side Bus, varied in transmission speed.

My combined I+O latency is something like 24 msec. I’ll see if I can drop from 512 samples to 256 when recording, thanks!

Were talking ASIO buffering here, simply put at a given buffer size at a given sampling rate it will take a defined amount of time for a signal to go from input to output. Thats not including any processing delay encountered outwith the defined ASIO buffering.

Agreed. FX will also have latency. As far as I can tell, though, bare audio latency appears to be very small.
On an i7 system under normal recording conditions, studio, project studio etc. the effects should be minimal and latency should fall well below 10ms.
Optimum I’d say should be 5 - 8 ms for monitoring and playback without glitches.
Orchestral and heavy experimental music plus large use of FX may sometimes require careful balancing.

Can someone help me understand this please?

My buffer size is 512, so at 44.1K, my latency is 11.6 msec (right?).

I wanted to see how much of a delay it would take to make a round trip, first out of the sound card, then back in, just to see if I had a handle on what was going on. I’m afraid I don’t … :blush:

Here’s the signal path:

Original Audio Snippet routed to Hardware 3.4 out of my soundcard’s breakout box … Hardware 3,4 out is connected via audio cables to Hardware 1,2 in of the same box …

New Audio Snippet is recorded with inputs being Hardware 1,2.

Since the signal had to get out of the sound card via Hardware 3,4 out, I figured that would take 11.6 msec.
Since the signal then had to get into Cubase via the soundcard’s Hardware 1,2 in, I figured that would take an additional 11.6 msec.

So I figured when I measured, New Audio Snippet would be 23.2 msec later than Original Audio Snippet.

But, when I zoomed in and measured them … there was no slippage of the tracks at all - they were simultaneous! Also, when listening, they didn’t sound phasy.

Why wasn’t New Audio Snippet delayed by 23.2 msec?

Thanks for any clarification!

It magic :laughing:

The system is aware of the delay as reported via the ASIO protocol, as time machines aren’t a practical solution as of yet, the system will automatically place the new audio in the correct place by simply subtracting the total latency on to the track placement. If you actually monitor in real time through Cubase whilst recording you will of course hear the track delayed by the amount reported in the latency boxes.

Hi Split - So, which one is it … magic or the other thing? :laughing:

Seriously, thanks so much, that is very cool, and now I can sleep better. Though I regret giving that guy the money to build me a time machine.

Here, though, is another observation I made, that i can’t reconcile with the “Cubase adjustment based on known latency” concept:

When I render an audio track from MIDI, the audio track is delayed relative to the MIDI by what seems to be the latency (about 10 msec, with latency about 11 msec).

Some facts that may be relevant: I do have that “Use system timestamp” toggle on … My MIDI runs to a Yamaha Motif via USB MIDI cable, then back via audio cable to my soundcard.

Does Cubase not do the same thing when the source track is a MIDI one? Or is it something like “jitter”? I have an M-Audio Delta 66 sound card.

Thanks again for any insight!

Midi latency: the time it takes for an impulse on an external midi control unit to reach the sound module or computer.

Audio input and output latency: The time it takes for the sound module or your computer to generate the sound once it has received the intructions do to so (by an impulse on an external keyboard via midi or on a virtual keyboard on your monitor…).

Midi latency is outside the computer or sound module. Audio latency is inside the sound module or computer.

Midi Latency can show up in a recording simply because the human being will create an impulse (by hitting a key) that will take time to travel to the sound module that will either record it or play it or both. So even if the human has perfect timing when he hits the key, the sound module or computer will only receive it delayed by the midi latency, and will record it or play it with that delay. Midi latency can be accounted for in some DAWs. Generally it is sufficiently minimal that you don’t have to worry about it. Avoid chaining to many midi devices to maintain midi latency at a minimum so that you do not need to ajust for it. (Note that Mlan can introduce significant midi latency simply because midi and audio are traveling on the same wire and tend to create bottlenecks…).

Even your Motif has latency between the keyboard impulse and the sound module inside the Motif that generates the sound. The sound module inside the Motif also has Audio latency. But both are not noticeable to the human ear.

Audio latency: Most DAWs will ignore latency when recording because the DAW compensates for it as suggested further above. If you actually record the sound source going out of the computer and back in, then it is likely that you will see the audio latency as a slight delay in the recording. Note however that recording the audio produced by a VSTi should not show the latency because the DAW knows when it should produce the sound and places it appropriatly on the track timeline eventhough the sound is actually coming out of the computer slightly delayed by the audio output latency.

Audio input and output latency need to be added only if you are inputing an audio source in the computer that is being subject to audio treatment by a DAW (effect or whatever), and then output by the DAW. This is why most people monitor the audio before it goes into the DAW, and not after.

12ms is the standard audio latency that is considered acceptable by most so that a person doesn’t feel the effect of the audio latency. Some people claim they need less…

Keep in mind that there isn’t a famous musician out there who can play rock solid to a rythm with less then ±12ms error. Some people call this groove, others the human factor. Going for less turns the music into robotic music. So don’t worry to much about this unless you or someone around you can really hear it!

:wink:

Good reply, I find that not zooming in to much helps :laughing:

:laughing:


YES!

Awesome helpful replies chrismcc and others … thanks!

I guess it’s not important at all, since it’s not audible, but I was just wondering about the theory of it … I guess the 10 msec or so of delay is the latency INTO the soundcard from my Motif (in my example of rendering MIDI to audio)? Plus a little bit here and there for processing by the Motif, I suppose …

Does that sound reasonable!

TY, Chrismcc. Excellent!

But just when I thought I got it, the ‘well behaved atom’ pipes in with “zooming in too much,” rekindling my insecurity about fully comprehending latency issues. :astonished:

I’m thinking this is an inside joke about looking at the actual transients on the timeline with respect to the accuracy of players keeping the beat?

Yes?

Como