[BUG] MIDI note timing off when at high buffer sizes

I’m running Cubase 6.0.4 64-bit on Mac.

  1. Create empty project
  2. Add Halion One instrument track and set it to a drum kit
  3. Set buffer to 2048 samples at 44.1KHz (also noticeable well before 2048, but that setting makes it EXTREME)
  4. Hit Record and use my Akai MPD18 to send it straight 16th notes via USB MIDI

RESULT:
While monitoring the recording, the notes are way, way, off as if there was some sort of super sloppy shuffle. There is some sort of periodic shuffling to the notes.

However, if I play back that recording, it sounds perfectly fine. So the problem only occurs during realtime monitoring/recording.

If I set my buffer to 64 samples, then the timing problem is either gone or not noticeable.

Forgive me if I’m missing something, but aren’t you simply reporting that setting a high buffer results in a delay between hitting the pad and hearing the sound?

If so, that isn’t a bug, it’s entirely normal.

If you’re saying that the delay VARIES from beat to beat (you say the ‘timing is off’) that’s a different thing - but I don’t know how you would know that - you’re listening to playback and hearing a delay between hitting the pad and hearing the sound - how do you know the delay is altering?

What you’re talking about is latency, and it is not a bug.

At lower buffer settings your DAW will respond more quickly, but your maximum processing power is drawn down, as the system has less time to make all of its computations. With larger buffer settings, there is more time allowed for the system to process audio, but that extra time also becomes the delay between input and output you are experiencing.

In other words:

small buffer size = less input/output delay
large buffer size = more processing available

So to clarify, I am not talking about latency. Latency would mean that all the notes are equally delayed but still playing on beat. I’m saying that the notes are playing off beat while recording and then on beat when playing back.

The rhythm is being changed. So to respond to David, yes it appears that the delay changes for each note. You can hear it easily by ear in this test.

I am playing straight 16ths using my MPC pad which has a button that plays continuous 16th of whatever note you hold down. I know the MPC pad is working right because when I set the buffer to 64, I can hear it play the correct timing.

You could repeat the same test using a separate sequencer to play the 16th notes into Cubase if you don’t have the MPC for example.

Would anyone mind checking this out on their system? If you have a separate sequencer, put a bunch of 16th notes in and then play the sequencer and record the MIDI output into a Cubase VSTi and see if the timing is off when at high buffer.

Maybe we aren’t as bad keyboard players as we thought! :smiley:

I’m still struggling to understand whether what you’re describing is just normal latency, ie delayed response from VSTi when playing live from a keyboard ( or auto-generated notes from your MPC), or something else.

When you hit the auto 16th beat button on the MPC, how does the MPC sync to Cubase?

What I suspect is happening is that when you’re recording, you hit the auto button right on the beat, but the latency during the recording makes it sound off beat. When you play it back, the effect of the latency is no longer audible, so it’s on the beat.

Have you looked in the knowledge base for topics on “Use System Timestamp” and “Emulated Ports”?
You might find some answers to your problem there.
HTH
J.L.

Of course. We all can. But it’s years, decades even, since anyone needed to use that high a buffer.
128 or 64 would suit you just fine. Even if your system overloads the buffers and you hear crackling, with a computer built within the last 5 years the most you need go up to is about 256.
However, if you’re describing something different or it still happens that timimng is off on your system at a setting of, say, 128 then you need to use, as suggested by jaslan, “Use system timestamp”.

Bad keyboard player? Me!? I use boxing gloves and pitch-correction. :mrgreen: It’s the claws you know. Keep getting caught between the keys.

“But it’s years, decades even, since anyone needed to use that high a buffer.”

I have to take exception to that. Yes, you can operate your DAW at lower buffer settings now than in the past, but the benefit of larger buffers is far from outdated. There have been many projects that have been finished at 1024, because I couldn’t use the number plugins I wanted to at lower buffer settings.

Also, you must have noticed that many newer plugins have followed the curve of processor power, and require more CPU cycles to operate.

High buffer settings are certainly not a thing of the past.

I take the point but most studio engineers use VSTs and FX at a low enough concentration not to need go that high. There’s only so much you can use realistically before the ears go Dumbo shaped. :mrgreen:
The OP is talking about input not playback.
And if you’re “real world” recording if you need buffer sizes that high then you’ve lost control of the recording by reaching the limits of your equipment. No good monitoring live midi input half a second after the other tracks. I think you’re taking us off a simple track here.

:mrgreen: Now someone will tell me I’m totally wrong.

But not quite why. :sunglasses: But that’s cool.

Thanks for the responses guys. When I originally googled about this problem, I did see posts about “use system timestamp”. I couldn’t find this anywhere in Cubase and I later found a post that says this is a Windows only preference. I’m on a Mac here so I’m unable to try that.

to David (ffg), I’m not syncing to anything. I just play in the straight 16th notes without trying to be on beat with Cubase’s metronome. If Cubase was operating correctly, I should hear the correct steady 16th notes regardless of what the internal Cubase tempo is. I hope I’m making sense here.

The buffer doesn’t have to be 2048 to hear the problem. I first noticed it at my normal session settings of 1024 @ 88.2KHz which has the same latency as 512 @ 44.1KHz. I just recommend using the 2048 @ 44.1KHz to make it blindingly obvious. Either way, there is a problem happening in Cubase for me that gets worse at higher latencies but appears to be present at ALL latencies. Only its more pronounced at the higher settings.

Ok, I have been googling around again and I think I found something about this. It looks like this problem has been around a long time because a SOS article from 2007 talks about it in a Cubase Tech article. The problem is called, “Live MIDI Buffering Jitter”.

"
Unfortunately, most sequencers choose not to calculate any offsets within the next buffer relating to ‘live’ MIDI data — they just quantise them all to the nearest buffer boundary, and rely on the buffers being short enough to mask unwanted rhythmic artifacts. The main reason they do this is to keep every note’s MIDI latency as low as possible, but at the expense of extra jitter.

For instance, if you play regular 16th notes at 120bpm, each note will occur at an interval of 125ms, but when a soft synth is played ‘live’ through an audio interface with a buffer size of 5ms you’ll perhaps hear them with spacings such as 125ms, 125ms, 125ms, 130ms, 120ms, 130ms, 125ms and so on, where occasional notes get shoved into adjacent buffers. For most people this is still scarcely audible, but if you raise the buffer size to 20ms then you might hear a string of ‘live’ notes emerging with spacings of 120ms, 120ms, 120ms, 140ms, 120ms, 120ms, 140ms and so on: the ‘granularity’ has increased.
"

So this may be a “known” issue. But I still wish there was something that could be done about it.

Awwww man. Too good to resist responding. So where do I start…

I am not talking about VST instruments. Most of my work is done with Superior Drummer, for triggers or programmed drums. That’s usually it. The load comes from dynamics and EQ. The stuff that sounds the best uses a lot more CPU, and I use compression and EQ a lot, though often minimally… Because I like to have control of the recording.

As far as MIDI monitoring… If I’m tracking live MIDI, obviously I use low buffer sizes, just as while tracking live acoustically (if you are thinking that MIDI playback is somehow not sync’d at high buffer settings, then you haven’t ever used high buffer settings). I’m talking about mixdown. I want to be able to put the nicest-sounding comps and eqs and channel strips on everything. At high buffer settings, we get to do that.

Is that a good enough ‘why’?

Don’t presume to know anything about the work that I do. I make my living in the recording studio. I don’t know how much more real-world it gets. :wink:

Robotpriest said "to David (ffg), I’m not syncing to anything. I just play in the straight 16th notes without trying to be on beat with Cubase’s metronome. If Cubase was operating correctly, I should hear the correct steady 16th notes regardless of what the internal Cubase tempo is. I hope I’m making sense here. "

Ahhh… I think I get you at last… must be the dementia setting in… you mean you hear the VSTi timing wobbling during record regardless of anything else playing back in Cubase… I thought you must be talking about timing wobbling with reference to other playback tracks.

I have no idea why that would happen… maybe Cubase is prioritising something other than MIDI monitor timing, whilst dealing with the extra cpu load during record?

I guess in the end, it doesn’t matter, because what you need is for the timing to be accurate on playback, which you say it is…