Page 1 of 16

MIDI notes recorded earlier than they sound

Posted: Sat Jan 14, 2012 6:49 pm
by Guest
I've had this problem since SX3, never been able to fix it....

If there is high latency on my system (big buffer and/or using hi-latency plugins) I have to hit the MIDI keys early in order to get the sound to come out in time with the rest of the track. This is normal.
However, when I look at the recorded MIDI in the sequencer, the notes are recorded early; they appear at the times when the keys were hit, not when the sound came out of the speaker. ie Cubase is not compensating for the soundcard latency and plugin latency correctly.

I was hoping upgrading to Win7 might do the trick so I created a fresh Win7 (x64) install on a spare partition, installed C6.05 on it, and tested the MIDI recording. The notes are still early !
(I'm using an Oxygen 49 USB keyboard btw)

I have tried trashing prefs - this made no difference. It was a fresh install anyway.
I have tried "using system time stamp" - no difference
I have also tried using "emulated" versions of the ports described in another post - no difference.

Can someone help me out of this big pit of FAIL ?

Re: MIDI notes recorded earlier than they sound

Posted: Sat Jan 14, 2012 7:13 pm
by Jarno
FunkyDrummer wrote:However, when I look at the recorded MIDI in the sequencer, the notes are recorded early; they appear at the times when the keys were hit, not when the sound came out of the speaker.
This is normal. MIDI should be recorded when you hit the key. That's why it's essential to have lowest possible latency.
1. Get an audio interface with lowest possible latency.
2. Don't use any VST F/X plugins on audio path of the instrument being recorded.

But then: if you're used to record by hitting keys early, why dont you just move the newly created MIDI-part forward on timeline? It takes only couple of seconds if you know your latency firures.

Re: MIDI notes recorded earlier than they sound

Posted: Sat Jan 14, 2012 7:30 pm
by Guest
Jarno wrote: This is normal. MIDI should be recorded when you hit the key. That's why it's essential to have lowest possible latency.
Hmmm I'm pretty sure this isn't normal. I have read posts from other users who used to have this problem, but who managed to solve it in some way or other.

I use UAD plugins a lot which run on a PCIe card. This means that data has to be sent across the PCI bus and back again in order to be processed. Plus, some of the UAD plugins themselves have high internal latency. If I insert a few of these plugins in sequence then the latency soon adds up to an audible amount, even with a relatively small ASIO buffer size.

I know how to work around the problem by shifting the parts after recording - but that's the whole point of my post - I just want it to work automatically.

Re: MIDI notes recorded earlier than they sound

Posted: Sat Jan 14, 2012 7:39 pm
by Guest
I forgot to mention that when I try this in Reason, the notes are recorded at the correct time with no shifting required, ie they are recorded exactly as they sound.

This suggests to me that the problem is not related to the USB keyboard, drivers, sound card or the operating system... which only leaves Cubase itself.

Re: MIDI notes recorded earlier than they sound

Posted: Sat Jan 14, 2012 7:54 pm
by Guest
Make sure Restrain Delay Compensation isn't enabled.

Re: MIDI notes recorded earlier than they sound

Posted: Sat Jan 14, 2012 8:19 pm
by Guest
The "constrain delay compensation" button does reduce the overall latency by disabling high latency plugins, but still the notes are recorded early.

Re: MIDI notes recorded earlier than they sound

Posted: Sat Jan 14, 2012 8:26 pm
by Guest
Could have sworn you said the notes are correct in relation to the grid so it's be the latency that's the issue, not early notes. Cubase automatically takes into account latency of internal VSTi and External kit set up as External Instruments unless the CDC is enabled. You can adjust the threshold for recording in Prefs.

Re: MIDI notes recorded earlier than they sound

Posted: Sat Jan 14, 2012 9:10 pm
by Guest
mashedmitten wrote:Could have sworn you said the notes are correct in relation to the grid so it's be the latency that's the issue, not early notes. Cubase automatically takes into account latency of internal VSTi and External kit set up as External Instruments unless the CDC is enabled. You can adjust the threshold for recording in Prefs.
the sound of the notes is correct in relation to the sound of the click or whatever I am playing along to, but appear early in the sequencer. cubase is supposed to compensate for this, but in my case doesn't for some reason...

Re: MIDI notes recorded earlier than they sound

Posted: Sat Jan 14, 2012 10:09 pm
by Guest
Emulated Ports is the fix for that. Did you re-start Cubase after moving the file to get them to show? What's the signal chain fron the controller to Cubase?

Re: MIDI notes recorded earlier than they sound

Posted: Sat Jan 14, 2012 10:58 pm
by Guest
Yes I copied the two files "enableemulated" and "ignoreportfilter" to the cubase directory,
then restart cubase. Then in device setup, another input appears for my keyboard, called "Oxygen 49 MIDI IN [emulated]".
I then select this as the MIDI input of the track in cubase.

Re: MIDI notes recorded earlier than they sound

Posted: Sat Jan 14, 2012 11:16 pm
by Guest
You don't copy them, you move them.

Re: MIDI notes recorded earlier than they sound

Posted: Sat Jan 14, 2012 11:41 pm
by Guest
The emulated ports appeared in the list when i copied the two files...
But I tried what you suggested, and moved them instead of copying them.
Then restarted and retested, with and without system timestamp.... still no difference in timing.

Re: MIDI notes recorded earlier than they sound

Posted: Sun Jan 15, 2012 12:09 am
by Split
Still confused to what you're saying?

Is this correct?

You are running a noticeable latency

When you press a key on the keyboard the sound happens at the through latency ,ie delayed

Cubase records the key press when you actually press the key

You are playing ahead of the beat to manually compensate for the latency

The result is you end up with a midi track that's ahead of the beat.

Re: MIDI notes recorded earlier than they sound

Posted: Sun Jan 15, 2012 12:29 am
by Guest
Split wrote:When you press a key on the keyboard the sound happens at the through latency ,ie delayed

Cubase records the key press when you actually press the key
This is how I read his first post but he says no, sounds on time but records early.

What's the Audio Priority set to? What if you lower it?

Re: MIDI notes recorded earlier than they sound

Posted: Sun Jan 15, 2012 1:17 pm
by Guest
Split wrote:Still confused to what you're saying?

Is this correct?

You are running a noticeable latency
When you press a key on the keyboard the sound happens at the through latency ,ie delayed
Cubase records the key press when you actually press the key
You are playing ahead of the beat to manually compensate for the latency
The result is you end up with a midi track that's ahead of the beat.
Yes, correct! This is much harder to describe than to demonstrate, sorry.

The latencies I have are not mega huge -- somewhere between a 1/16th and 1/32nd note, once I have a few UAD plugins running at a 256 buffer size --- and I can workaround the problem by shifting the MIDI part after. But the amount of shift can vary from one moment to the next, depending on whether or not I've added more UAD plugins somewhere else in the signal chain, and what their latency is.... The shift required is usually in the region of 10 - 60 ticks.

And like I said earlier, Reason has no problem compensating for this... so that when you play back the recording, it sounds exactly like it did when you played it, not 1/16th note earlier....

Re: MIDI notes recorded earlier than they sound

Posted: Sun Jan 15, 2012 1:20 pm
by Guest
PS thanks for takin the time to help with this, I know it's well trodden ground but I just can't get to the bottom of it...

Re: MIDI notes recorded earlier than they sound

Posted: Sun Jan 15, 2012 7:53 pm
by Conman
Use / check the "Use System Timestamp" in Devices Setup.

Re: MIDI notes recorded earlier than they sound

Posted: Sun Jan 15, 2012 8:10 pm
by thinkingcap
Conman wrote:Use / check the "Use System Timestamp" in Devices Setup.
FunkyDrummer wrote:I have tried "using system time stamp" - no difference
@FunkyDrummer: There are two options somewhere in device setup IIRC that are supposed to do what you want for audio recording, maybe they work for MIDI too? Tried that already..?

Re: MIDI notes recorded earlier than they sound

Posted: Sun Jan 15, 2012 9:15 pm
by Split
Is it not the case that Reason records midi as in when you hear and Cubase records midi as in when you play? That doesn't actually make any sense :lol:

Thus to get close midi playing in cubase you have to play with very low latency?

Re: MIDI notes recorded earlier than they sound

Posted: Sun Jan 15, 2012 9:32 pm
by Guest
Thinkingcap: under "VST Audio System" in device setup, "adjust for record latency" is already enabled. So I disabled it, and retested all ports, including emulated ones, with and without the timestamps - no improvement. I think these settings only affect audio recording... worth trying though (audio priority is set to "normal", btw)

Split: Yes it makes sense! In Reason when I play back my recording, it sounds just like it did when I recorded it, with no further intervention required... and yes low latency is def the way to go. But even small delays are a PITA due to the lack of auto correction....

Re: MIDI notes recorded earlier than they sound

Posted: Sun Jan 15, 2012 9:36 pm
by thinkingcap
FunkyDrummer wrote:Thinkingcap: under "VST Audio System" in device setup, "adjust for record latency" is already enabled. So I disabled it, and retested all ports, including emulated ones, with and without the timestamps - no improvement. I think these settings only affect audio recording... worth trying though (audio priority is set to "normal", btw)
That´s what I meant...

Re: MIDI notes recorded earlier than they sound

Posted: Mon Jan 16, 2012 1:51 pm
by Conman
This is a problem of old which had been fixed.
My theory is that whatever caused it was part of the development process but conflicted with something in WinXP. Now, with their announcement about a year ago of dropping support for WinXP they think that only a few are using XP so they've reintroduced the process.
Keep an eye on other posters with the same symptoms for a couple of weeks and if none turn up get yourself Win7. (sheat! just noticed you seem to have dual boot, sorry but still, as before but sack the XP, keep the W7. Can't see the specs when I'm writing the replies)
Or check "Use system timestamp."
Again.
Cubase does not cause latency. Data round trips through the computer cause latency.
What are those M-Audio drivers like lately? Sometimes, like the Emu I use the latest drivers can be the problem and I have to revert back to an earlier one. Is the M-Audio Control Panel set up OK?

Re: MIDI notes recorded earlier than they sound

Posted: Mon Jan 16, 2012 5:24 pm
by Guest
Windows 7 is not the solution.. I have windows 7, I have also had this same problem since I started using cubase.. I have just learned to live with it.. even low latency isnt perfect. notes are always recorded early regardless.

I wonder if the UAD is part of the problem... I also have a UAD...

also I have had this same issue through 3 different PC's / soundcards.

i'm also convinced most people have this same issue but don't realise.. so here is a test

1. add a vst instrument to your project, a synth for example with a fast attack
2. add a group channel
3. route vst to group channel
4. add an audio channel
5. set inputs of audio channel to be the group channel
6. enable record on audio chan and VST instrument
7. start recording
8. play a single note.
9. stop recording
10. zoom in to see the waveform / midi

now, is the midi significantly earlier than the audio ?

Re: MIDI notes recorded earlier than they sound

Posted: Mon Jan 16, 2012 5:54 pm
by Guest
Xtigma, thanks for your input!

It will be very interesting to see the results of this!
Here, at a buffer size of 256 samples, my MIDI note is 8 ticks earlier than my audio :(

Re: MIDI notes recorded earlier than they sound

Posted: Mon Jan 16, 2012 10:04 pm
by NYC Composer
I run into this all the time. AFAIK, it is purely a latency/buffer size issue. When playing virtual instruments, you need the lowest buffer size your computer can handle in any specific project to hear and record notes close to where you actually play them. This has been the case since I started using VSTis in Cubase, back in 1997.