You are here

How much Variation in MIDI timing is expected/acceptable in a DAW?

All about the tools and techniques involved in capturing sound, in the studio or on location.

How much Variation in MIDI timing is expected/acceptable in a DAW?

Postby alexis » Mon May 07, 2012 5:20 pm

Hi - WARNING - LOTS OF RAW TIMING MEASUREMENTS MEASURED IN SAMPLES AHEAD!

There is a lot of posting on the Cubase forum about MIDI timing (most lately in the "early MIDI in VSTi's" thread), and so I wanted to test my own system. I have a pre-built computer from a reputable company, though getting a bit long in the tooth (the computer). I came up with some hard #s, but I'm not really sure how to interpret them, specifically, are these what is to be expected with the average DAW? ... or are these really not up to snuff at all?

I did 2 sets of measurements, the 1st simply measuring the difference in timing between when the audio from my hardware synth was printed relative to the MIDI in.

The second set of measurements were similar, but with a VSTi loaded up - here, as before, I measured when the direct audio from the hardware synth and the MIDI data were printed; I also measured when the VSTi audio was printed (when routed from a group).


Here are my specs:
Cubase 6.0.5 (32-bit), XP SP2, Seagate Barracuda 80/160/160GB; Intel 550 Pentium 4 3.4GHz, 2GB RAM, HT+; Intel D915PBL mobo; Dual Radeon ATI X300SE 128MB video; Delta 66 in Omni I/O Studio; Motif8 hardware synth


Here is how I ran the test:
-44.1KHz. 256 sample buffer.
-Audio beats for metronome (not MIDI clicks).
-Headphones!
-Windows MIDI driver, with "Use System Timestamp" checked
-Cubase 6.05 is 32-bit.

Here's what I did:
Played Motif Synth into Cubase, one note per audio metronome beat:
a) audio cables DIRECTLY into my interface, and
b) Midi via USB.

For the testing with the VSTi loaded, I also had:
c) Motif MIDI > VSTi (Halion Sonic SE) > Group > VSTi Group Audio
.
.
.
.
Here are the testing results without the VSTi (simply the Motif sending Audio and MIDI to Cubase):

MIDI --47-- samples BEFORE Audio
MIDI --25-- samples BEFORE Audio
MIDI --24-- samples BEFORE Audio
MIDI --83-- samples AFTER Audio
MIDI --38-- samples AFTER Audio
MIDI --16-- samples AFTER Audio
MIDI --21-- samples AFTER Audio
MIDI --32-- samples AFTER Audio
MIDI --28-- samples AFTER Audio
MIDI --7-- samples AFTER Audio
-----------------------------
Therefore, MIDI was printed an average of 13 samples AFTER Audio was printed, when no VSTi was loaded up. The largest amount of time difference was just under 2 msec (83 samples at 44.1K).

So, my question is ...: Is this "OK"? Or is "sample accuracy" the expected standard? I think I understand from this article ( http://www.soundonsound.com/sos/dec07/a ... h_1207.htm ) that sample accuracy isn't going to happen , perhaps it's due to jitter or something else, but whatever the reason, there is up to a 2 msec difference. Is that enough to cause "phasiness" or other artifacts if things are played together? I have noticed phasiness when I play/record live ... I can live with that ... but what about when mixing - should I be shifting tracks by 10 or 20 or 80 samples before I get down to it?
.
.
.
.
.
Here are the testing results with the VSTi loaded:

MIDI printed---9--samples before "Direct Audio" and --500-- samples before VSTi>Group>Audio

MIDI printed--40--samples before "Direct Audio" and --370-- samples before VSTi>Group>Audio

MIDI printed---2--samples before "Direct Audio" and --475-- samples before VSTi>Group>Audio

MIDI printed--62--samples AFTER "Direct Audio" and --515-- samples before VSTi>Group>Audio

MIDI printed--58--samples AFTER "Direct Audio" and--365-- samples before VSTi>Group>Audio

MIDI printed--19--samples before "Direct Audio" and--425-- samples before VSTi>Group>Audio

MIDI printed-113--samples AFTER "Direct Audio" and--275-- samples before VSTi>Group>Audio

MIDI printed--74--samples AFTER "Direct Audio" and--455-- samples before VSTi>Group>Audio
-----------------------------------------------------------
Therfore, MIDI was printed an average of 30 samples AFTER audio was printed directly from the Motif (i.e., audio out of Motif > audio into interface), when a VSTi was loaded. This is similar to the 14 samples that the MIDI was "late" compared to the direct audio when a VSTi was not loaded, but the variation seemed higher here. Is the increased variability in this situation just random? I don't know. Should I be concerned about the higher variability in MIDI timing when a VSTi is used any more than when it isn't?

Finally, for what it's worth, The MIDI was printed (on the average) --423-- samples before the VSTi>Group>Audio was printed. Doing the math, the audio recorded directly from the Motif was printed (on the average) about --453-- before the VSTi>Group>Audio was. This is just under twice my buffer setting, for what it's worth.

Thanks for any perspective on these questions. I can crunch #s, but as far as what is important ... I'm so grateful for the experts on this forum!!

Thanks -
User avatar
alexis
Frequent Poster
Posts: 2932
Joined: Fri Jan 10, 2003 12:00 am
Location: San Antonio, TX USA

Cubase7.5.40 64bit;i5-4570 3.2GHz,16GB RAM;W10 64bit on Samsung SSD840 Pro256GB;Seagte 1TB SATA600 Audio;UR28M;Motif8;UAD2Solo;Jamstix 3.3;BCF2K;TC Helicon VoiceOne;RevoicePro3.2


Re: How much Variation in MIDI timing is expected/acceptable in a DAW?

Postby alexis » Mon May 07, 2012 9:29 pm

For reference, here is a nice, albeit old, article article written by our very own Martin Walker http://www.soundonsound.com/sos/Sep02/a ... an0902.asp about all kinds of latency - hardware, computer, etc., as well as the usual buffer-associated latency. I was kind of bumming because on the average it looked like I was striking my keys about 300 samples (about 7 msec) earlier than I should have, based on all the timing delays and latencies I could identify, when trying to play a VSTi on a hard synth in time with a Cubase-generated metronome beat. Reading that article, I see that there are enough other possible causes of latency (hardware synth, computer OS, etc.) that I can relax and get back to thinking maybe I can play on time!

I see I didn't get any answers to my above post ... I was afraid of that happening, possibly scaring everyone away by its length and it sure was hard for me to write it so that it flowed. Of course I'm also open to the possibility nobody is answering because they're too kind to point out that I'm horribly in error in my thinking ...

Summarizing it: How are people treating the lack of sample accuracy with MIDI (see, since the original post I learned that sample accuracy is NOT to be expected! )? Just ignoring it, because it sounds OK? I don't do loops and such, just free-flowing piano, and it sounds "OK" to me and friendly audiences (family and friends), but if there's a way people are routinely tidying up their MIDI before editing,I'd like to at least consider it.

Also - the variability in MIDI printing (relative to direct audio in from the hardware synth) seems higher when there is a VSTi loaded up. Is there a reasonable mechanism for that, or do people think it is just a statistical anomaly arising from the measurements I made?

Thanks much -
User avatar
alexis
Frequent Poster
Posts: 2932
Joined: Fri Jan 10, 2003 12:00 am
Location: San Antonio, TX USA

Cubase7.5.40 64bit;i5-4570 3.2GHz,16GB RAM;W10 64bit on Samsung SSD840 Pro256GB;Seagte 1TB SATA600 Audio;UR28M;Motif8;UAD2Solo;Jamstix 3.3;BCF2K;TC Helicon VoiceOne;RevoicePro3.2


Re: How much Variation in MIDI timing is expected/acceptable in a DAW?

Postby dadking » Mon May 07, 2012 11:01 pm

I think like me a lot of people have been following the cubase thread pretty closely. As I have been having the problem with early Midi since SX3. I run a commercial studio and it gets embarassing when clients say to me thats not what i played, or did i really play that bad.
A big problem
dadking
Poster
Posts: 34
Joined: Mon Aug 09, 2010 11:00 pm

Re: How much Variation in MIDI timing is expected/acceptable in a DAW?

Postby ef37a » Mon May 07, 2012 11:26 pm

I have probably got the wrong end of this stick but surely you can "lock" MIDI by engaging "Use system timestamp"?

Dave.
ef37a
Jedi Poster
Posts: 7085
Joined: Sun May 28, 2006 11:00 pm
Location: northampton uk

#They did not listen, they are not listening still...Perhaps they never will?#


Re: How much Variation in MIDI timing is expected/acceptable in a DAW?

Postby Martin Walker » Tue May 08, 2012 12:10 am

alexis wrote:For reference, here is a nice, albeit old, article article written by our very own Martin Walker http://www.soundonsound.com/sos/Sep02/a ... an0902.asp about all kinds of latency - hardware, computer, etc., as well as the usual buffer-associated latency.

...Reading that article, I see that there are enough other possible causes of latency (hardware synth, computer OS, etc.) that I can relax and get back to thinking maybe I can play on time!

...Summarizing it: How are people treating the lack of sample accuracy with MIDI (see, since the original post I learned that sample accuracy is NOT to be expected! )? Just ignoring it, because it sounds OK?

Hi alexis!

I think you ought to relax and start playing again

Seriously, MIDI is a serial protocol, so even if you play a chord, all its notes emerge in a string at slightly different times separated by a minimum of about 1mS.

Sample accuracy is only possible on hardware sequencers and when softsynths are triggered inside a computer - in other words when MIDI isn't totally in charge

Remember also that there will be a delay of several milliseconds between MIDI Note On data and the audio output of hardware synths - in most cases digital synths are themselves driven by microprocessors, and although their operating system are obviously fine-tuned for real-time playing, it still takes a finite time to process everything.


Martin
User avatar
Martin Walker
Moderator
Posts: 9579
Joined: Wed Jan 13, 2010 8:44 am
Location: Cornwall, UK

Re: How much Variation in MIDI timing is expected/acceptable in a DAW?

Postby alexis » Tue May 08, 2012 1:33 am

Martin - thank you for the calming post!

That article from 2002 seemed to make it sound like Cubase had more problems than some others. Have things more or less even'd out between DAWs in the last 10 years from that point of view?
User avatar
alexis
Frequent Poster
Posts: 2932
Joined: Fri Jan 10, 2003 12:00 am
Location: San Antonio, TX USA

Cubase7.5.40 64bit;i5-4570 3.2GHz,16GB RAM;W10 64bit on Samsung SSD840 Pro256GB;Seagte 1TB SATA600 Audio;UR28M;Motif8;UAD2Solo;Jamstix 3.3;BCF2K;TC Helicon VoiceOne;RevoicePro3.2


Re: How much Variation in MIDI timing is expected/acceptable in a DAW?

Postby alexis » Tue May 08, 2012 2:29 am

alexis wrote:Martin - thank you for the calming post!

That article from 2002 seemed to make it sound like Cubase had more problems than some others. Have things more or less even'd out between DAWs in the last 10 years from that point of view?

Sorry, too late to edit, I did want to also ask:

Just as a reality check, does it sound about right that in Cubase on average my USB-MIDI and audio are printed at about the same time when connected directly to the Motif hard synth?

My computer does have a USB-2 listed in the Devices section of the control panel, but it also has several "regular" ones as well, so I'm not quite sure if I'm transmitting from my Motif to my Carillon c. 2005 via USB-1 or -2.
User avatar
alexis
Frequent Poster
Posts: 2932
Joined: Fri Jan 10, 2003 12:00 am
Location: San Antonio, TX USA

Cubase7.5.40 64bit;i5-4570 3.2GHz,16GB RAM;W10 64bit on Samsung SSD840 Pro256GB;Seagte 1TB SATA600 Audio;UR28M;Motif8;UAD2Solo;Jamstix 3.3;BCF2K;TC Helicon VoiceOne;RevoicePro3.2


Re: How much Variation in MIDI timing is expected/acceptable in a DAW?

Postby ef37a » Tue May 08, 2012 4:16 am

alexis wrote:
alexis wrote:Martin - thank you for the calming post!

That article from 2002 seemed to make it sound like Cubase had more problems than some others. Have things more or less even'd out between DAWs in the last 10 years from that point of view?

Sorry, too late to edit, I did want to also ask:

Just as a reality check, does it sound about right that in Cubase on average my USB-MIDI and audio are printed at about the same time when connected directly to the Motif hard synth?

My computer does have a USB-2 listed in the Devices section of the control panel, but it also has several "regular" ones as well, so I'm not quite sure if I'm transmitting from my Motif to my Carillon c. 2005 via USB-1 or -2.

Again, probably wrong but surely even usb 1.0 is so much faster than MIDI (~38KhZ?)that it makes no difference? BTW in Samplitude, even back to Sam 8 you can set the MIDI offset + or - as you please.
Dave.
ef37a
Jedi Poster
Posts: 7085
Joined: Sun May 28, 2006 11:00 pm
Location: northampton uk

#They did not listen, they are not listening still...Perhaps they never will?#


Re: How much Variation in MIDI timing is expected/acceptable in a DAW?

Postby ef37a » Tue May 08, 2012 5:48 am

There is a very long thread going on over 2 years about sample timing on the M-Audio forum. Specifically about the ProFire 610 and a bug in the driver.

It is said to be fixed for macs but no sign of a Windows solution?

Dave.
ef37a
Jedi Poster
Posts: 7085
Joined: Sun May 28, 2006 11:00 pm
Location: northampton uk

#They did not listen, they are not listening still...Perhaps they never will?#


Re: How much Variation in MIDI timing is expected/acceptable in a DAW?

Postby Richie Royale » Tue May 08, 2012 10:19 am

These guys are obsessed with MIDI timing!

http://www.innerclocksystems.com/New%20ICS%20Litmus.html

I'm not that bothered, provided it hasn't slipped so far out to be audible. Lots of people complain about MIDI music being mechanical, so a few errors here and there don't bother me, it adds something less mechanical to the mix!
User avatar
Richie Royale
Jedi Poster
Posts: 4406
Joined: Mon Sep 11, 2006 11:00 pm
Location: Bristol, England.

Re: How much Variation in MIDI timing is expected/acceptable in a DAW?

Postby nathanscribe » Tue May 08, 2012 12:58 pm

Richie Royale wrote:These guys are obsessed with MIDI timing!

http://www.innerclocksystems.com/New%20ICS%20Litmus.html

The problem with testing MIDI timing by sequencing a hardware synth/sampler from a separate sequencer is that you're not simply measuring errors in the timing of the sequencer, you're confusing the data with timing errors on the receiving end too - I did a whole bunch of tests using Logic, a MOTU MIDI Express 128, and various hardware synths, all recorded using the same setup and settings - and found that even repeating tests for one synth gave me very different results - sometimes the things were nice and tight, sometimes they were all over the place. Given that the MOTU is supposed to have pretty tight timing itself, being timestamped, I concluded that the variations were down to the receiving synth not processing the incoming data efficiently enough to keep things together.

So I don't hold much water with using MIDI to keep time, nor with obsessing over generating as tight a MIDI source as possible, given the failure of those devices receiving it to act on it as tightly as expectation would demand, if that's your cup of tea.

Luckily, for recording purposes, it's relatively easy to quantise recorded audio after the fact.
User avatar
nathanscribe
Frequent Poster
Posts: 847
Joined: Fri Jan 19, 2007 12:00 am
Location: Yorkshire, by 'eck.

my nerdy synth tech blog


Re: How much Variation in MIDI timing is expected/acceptable in a DAW?

Postby chris... » Tue May 08, 2012 3:59 pm

nathanscribe wrote:Luckily, for recording purposes, it's relatively easy to quantise recorded audio after the fact.

Or to use softsynths...

That said, has anyone tested whether triggering softsynths really IS sample-accurate, in the way that is claimed...?
User avatar
chris...
Frequent Poster
Posts: 2685
Joined: Wed Mar 12, 2003 12:00 am
Location: Sunny Glasgow

Re: How much Variation in MIDI timing is expected/acceptable in a DAW?

Postby alexis » Tue May 08, 2012 6:09 pm

chris... wrote:
nathanscribe wrote:Luckily, for recording purposes, it's relatively easy to quantise recorded audio after the fact.
Or to use softsynths...

That said, has anyone tested whether triggering softsynths really IS sample-accurate, in the way that is claimed...?

Messing around I noticed that playing Halion SE from MIDI in Cubase 6.05 (routing to a group and then to an audio track) that the audio track was CONSISTENTLY early by one or two samples compared to the MIDI track. I tried it 10 times, and each time the Audio started either 1 or 2 samples before the MIDI. It was a square-wavish looking audio onset, so I don't think it was a matter of having to decide when the audio actually started like it is sometimes.

Does that count as "sample accurate"?
User avatar
alexis
Frequent Poster
Posts: 2932
Joined: Fri Jan 10, 2003 12:00 am
Location: San Antonio, TX USA

Cubase7.5.40 64bit;i5-4570 3.2GHz,16GB RAM;W10 64bit on Samsung SSD840 Pro256GB;Seagte 1TB SATA600 Audio;UR28M;Motif8;UAD2Solo;Jamstix 3.3;BCF2K;TC Helicon VoiceOne;RevoicePro3.2


Re: How much Variation in MIDI timing is expected/acceptable in a DAW?

Postby artifus » Tue May 08, 2012 8:53 pm

coming soon to some advertising blurb near you - sample accurate latency.
artifus
Regular
Posts: 155
Joined: Wed May 21, 2008 11:00 pm

Re: How much Variation in MIDI timing is expected/acceptable in a DAW?

Postby SecretSam » Wed May 09, 2012 7:22 am

Just to put this in perspective:

Mechanical instruments have latencies too; such as the time it takes the hammer to strike a piano chord or the time it takes to engage and release a guitar string. As long as these latencies are short and consistent, an experienced musician will instinctively work around them. The latency on some exceptionally clunky stops of some old cathedral organs can be as much as half a second (said my mate who used to play them).

And if you really want to get paranoid: the speed of sound is about 340 metres per second, suggesting that sound travels about a third of a metre in one millisecond. So in theory the latency of your system will partly depend on how far your head is from the speaker ....

In next week's installment: how many angels can dance on the head of a Studer 24-track ?
SecretSam
Frequent Poster
Posts: 812
Joined: Tue Oct 29, 2002 12:00 am
Location: Officially, I do not exist.

Instant gratification is actually pretty good. It's fast as well.



Who is online

Users browsing this forum: Bassman99 and 1 guest