• SONAR
  • Midi "latency" test? Help! (p.2)
2018/03/08 17:08:26
Cactus Music
FYI.. out of curiosity I plugged a mike in and performed the key click test, I had to zoom waaayyy in to see it was a little late I think it computes to around 2 ms. This was using a Roland A 41 USB. 
 
The amount of delay the OP is getting I'll put my money on a plug in.
I think normally with no plug ins involve the Midi latency of most systems is between 2-5ms. And I do believe this is 100% to do with the midi diver and the controller itself.
If you notice, some controllers come with Factory USB midi drivers, and some just use a generic driver. I am convinced midi USB drivers are just as important in the same way Audio USB drivers are to a systems performance. Then there is the internal workings of the controller itself. Not all are created equally just like audio interfaces. 
Manufactures never post this information. 
 
I know for sure my Roland keyboard is more responsive than my Akai Synth Station or my Yamaha drums.   And for sure my Yamaha Drums the latency is very noticeable as a digital delay if you monitor the VST and the brain. So I only monitor the brain while tracking. I don't have that option with my keyboard controllers as they have no internal sound. I really don't "feel" any latency while tracking with headphones with either keyboard and generally my notes land within a 1/64 of where they belong. 
This is not the case with the Yamaha drums as the timing is always out.  I will test my other 2 controllers  to see how they stack up. I even have an old Korg poly 8000 midi keyboard I could try.  
2018/03/08 18:00:38
kzmaier
I wish Cakewalk had a calibration capability which could synchronize (or report) audio, midi, and virtual instruments as needed.  I can live with vst effects latency's as I do all my tracking before adding effects.
 
Just a thought...
2018/03/08 18:31:23
Cactus Music
It's not a problem as long as your aware of the limitations  which is complicated  by all the things involved. 
 
Above was mentioned the audio loopback test which I think everyone should try and especially if your using a so so audio interface. I ran a thread a few years ago and a bunch of folks tried it using different interfaces. The conclusion was almost all name brand audio interfaces using ASIO report properly to Sonar so your timing offset will not need manual adjustment. But using any other audio mode will always result in late overdubs. Some ever reported audio arriving early. 
 

 
For those who have never done this it's easy. In the above example
I took a midi drum  track (Track 1)  and froze the synth ( track 2). 
This gives you an audio track with a nice easy to see transient spike. 
Patch your audio interface output back to an input using a sort patch cable.
Insert an audio track ( track 3)  and set its input to the input you patched as the source and arm it for recording. 
Make sure INPUT ECHO IS OFF. 
play the song and set your levels. 
Record the new tack.
Now zoom in and see if it lines up with the original audio. 
Try the test using different audio interfaces ( track 4) and in different modes. ( track 5 and 6 ) 
You can clearly see why we don't want to use anything but ASIO mode. 
 
Later I tried this test using WASAPI. WASAPI Exclusive was about the same as using WDM mode The WASAPI Shared was worse. And I also tried ASIO4ALL and it performed very close to the same as ASIO mode. (Sorry my screenshot was held hostage by Photobucket) ,  So I use ASIO4all when I don't have a proper interface.  If your not overdubbing new audio it doesn't matter. SO those who work with pure midi could use WASAPI or WDM if their on board sound card supports it. Of course if you have an interface always use the latest ASIO driver.  
2018/03/08 22:01:24
brundlefly
Cactus Music
The conclusion was almost all name brand audio interfaces using ASIO report properly to Sonar so your timing offset will not need manual adjustment.



I've never seen a driver that reported sample-accurate input/record latency. All have some 'hidden' firmware/hardware latency that is not included, or they add a fudge factor and over-report. Most will be within 1ms, but if you want sample-accurate record compensation, you'll almost certainly need a Manual Offset. For ASIO, using the free CEntrance latency tester mentioned earlier is a lot quicker than re-recording and counting samples as you nudge the audio.
2018/03/08 23:35:21
Cactus Music
 This is true but generally ASIO is so close as to not matter to anyone but someone with obsessive compulsive disorder :) 
I'm trying to remember the calculations. OK found it. 
Samples divided by the sample rate= MS
 
So in my case my loop back was out by 22 samples so divided by 44.1 = .49 ms. 
So as I said we need to be aware of this but in most cases is not worth fretting over as most musical performances involve timing variation way beyond that. But a good engineer does need to be aware of those little details. 
 
And yes I keep forgetting about the Centrance utility. Does it work on W 10? 
I have it here on my W7 machine. 
2018/03/09 03:53:07
dougalex
I hope it was clear
I was NOT using any VST soft synth
I was ONLY recording a midi note (WITHOUT ANY PLUGINS)
I recorded simultaneously:
a) Audio track recording a mic placed closely to capture the thump of me hitting the key on the keyboard,
b) Midi track recording the midi note of the SAME key press (no soft synth loaded at all)
 
I then zoom in to see if they are simultaneous and to my surprise (instead of the audio track being late) THE MIDI NOTE (the midi note "blob") IS LATE by 20 ms
 
Still do not understand why the midi note blob would appear later than the wave blob of the mic that is recording the thump of me hitting the key.
 
 
2018/03/09 04:09:05
bvideo
Be aware that Sonar may shift the audio track earlier to compensate for the latency reported by the driver. Wrong report from the driver, wrong audio shift.
 
An experiment to try is to play a recorded MIDI track to your synth and record the audio, then see how the audio lines up with the MIDI.
 
FYI other audio shifts may be done whenever audio plugins anywhere in the project report themselves to produce latency.
 
2018/03/09 04:18:07
dougalex
I just tried the same test again tonight
 
Same project, BUT NOW it is behaving as I expected it to: The "spike of the recorded thump of the key strike" and the "recorded midi blob" are essentially simultaneous.
 
I think azslow3 above mentioned reboot had remedied a similar situation where the midi was delayed.
 
So right now I am thinking my original weird results was a situation where I needed a reboot.
 
I will have to test again periodically to confirm.
 
THANK YOU FOR THE REPLIES! 
2018/03/09 11:08:09
Steev
What generation is your Oxygen 61? I believe they are up to Gen 3 now.
 
Do you have the latest drivers and firmware updates installed?
 
Is the Oxygen 61 plugged directly into it's own dedicated USB "2" port? Don't use a USB 3 port.
 
"ONLY USE MANUFACTURER'S ASIO DRIVERS FOR YOUR AUDIO INTERFACE THAT SUPPORT YOUR OS!"
 
Always record at 24 bit, and the faster the frequency, the lower the latency.
44.100 k/Hz highest latency
48 k/Hz typically around 2x lower latency and safe and stable for most computer systems
96 k/Hz typically 2x lower than 48 k/Hz, but can cause problems with a mid grade machine, you need a robust i7 grade computer with plenty of processing power to stay safe and stable.
 
Using hacked drivers to run an outdated 1st gen MIDI keyboard controller with Win 10 may make it work but can really slow it down.
 So can a cheap or old USB cable or unpowered USB hub sharing other devices. You can't always tell if a USB cable is faulty by looking at it, and cheap USB cables aren't always suited well to transmit MIDI data.
 
Have you tried running the Oxy 61 MIDI output directly through a standard MIDI 5 pin cable to a separate MIDI input on a separate interface? Make sure to choose/route the interface's MIDI out port as input for the MIDI track routed to the synth you're testing with. 
 Go into SONAR's control surface properties, Uncheck the Oxy 61 than hit Apply to disable it.
 This bypasses the Oxy 61 drivers entirely but still routes MIDI input for the keyboard and uses USB only for power.
 
You can easily test for any of these problems simply by disconnecting the Oxy 61 by unplugging it from the computer, rebooting Windows and testing with a different MIDI keyboard or virtual keyboard controller.
 
 If you get the same latency problems, plug the Oxy 61 back in, disconnect all other USB devices you absolutely don't need, reboot and test again.
 If that works, than something else is hogging and slowing down your motherboard's USB root hub that's not even related to MIDI or SONAR.. ??????
 
Good luck bro..
 
 
2018/03/09 14:33:40
Billy86
Cactus Music
FYI.. out of curiosity I plugged a mike in and performed the key click test, I had to zoom waaayyy in to see it was a little late I think it computes to around 2 ms. This was using a Roland A 41 USB. 
 
The amount of delay the OP is getting I'll put my money on a plug in.
I think normally with no plug ins involve the Midi latency of most systems is between 2-5ms. And I do believe this is 100% to do with the midi diver and the controller itself.
If you notice, some controllers come with Factory USB midi drivers, and some just use a generic driver. I am convinced midi USB drivers are just as important in the same way Audio USB drivers are to a systems performance. Then there is the internal workings of the controller itself. Not all are created equally just like audio interfaces. 
Manufactures never post this information. 
 
I know for sure my Roland keyboard is more responsive than my Akai Synth Station or my Yamaha drums.   And for sure my Yamaha Drums the latency is very noticeable as a digital delay if you monitor the VST and the brain. So I only monitor the brain while tracking. I don't have that option with my keyboard controllers as they have no internal sound. I really don't "feel" any latency while tracking with headphones with either keyboard and generally my notes land within a 1/64 of where they belong. 
This is not the case with the Yamaha drums as the timing is always out.  I will test my other 2 controllers  to see how they stack up. I even have an old Korg poly 8000 midi keyboard I could try.  


I have a Roland TDK11 kit. Curious to know how you are able to monitor your Yamaha’s brain while tracking. Are you recording Yamaha output (audio? Midi?) along with other tracks in Sonar? How do you listen to both Sonar output AND direct monitor your Yamaha at the same time? I’m midi-triggering Addictive Drums 2 via a Focusrite 2i4.
© 2025 APG vNext Commercial Version 5.1

Use My Existing Forum Account

Use My Social Media Account