• SONAR
  • Midi "latency" test? Help!
2018/03/05 22:11:12
dougalex
Could someone perform this test for comparison:
Only 2 tracks in Sonar, one audio track with mic input, one midi track with controller (I use Oxygen 61) selected as input
Put mic very close  to keyboard (1 inch away) 
Record both tracks, making single key presses, hitting key hard enough to make a noise when the key pressed
Switch the time ruler to milliseconds so you can easily compare the timing difference in milliseconds. 
 
My midi is 20 milliseconds later than the recorded sound of the key press noise
What is your results?
(I thought the midi track would, if anything, be slightly ahead, or at least equal to the timing of the recorded audio BUT RECORDED MIDI NOTES WAS 20 MILLISECONDS AFTER THE RECORDED AUDIO. I do not understand how this is happening. I have newer pcAudioLabs computer and tested with keyboard controller plugged directly into computer with 6 foot midi cable)
 
 
 
 
 
 
 
 
2018/03/05 22:38:37
chuckebaby
You should probably establish some base specs before anything.
What OS are you using ? What kind of soundcard are you using ? Which version of Sonar ?
This sounds like the tell tale signs of latency to me.
Even midi needs a good soundcard no matter how new the PC.
 
Latency is Latency. If its windows 10, if its Sonar platinum (updated within the past year) Try using WASAPI mode.
If you have no soundcard (using onboard) try ASIO4ALL or I would suggest getting a budget soundcard.
Anyone doing any serious (or even amateur) recording now a day has a break away box with a soundcard.
Its not just for multiple inputs. Its the drivers for the unit which prevent latency.
2018/03/05 22:51:32
brundlefly
Hmmm... this reply was showing a couple minutes ago, but I think making too many small edits after the fact got it whacked; so I'll re-post:
 
Assuming your audio record latency compensation is dialed in, MIDI transmission delays will usually result in recorded MIDI being 3-4ms behind audio. The very old MOTU USB interface I'm using right now is the worst of any interface I've ever had at about 5ms. The best I've ever seen was about 1.5ms for the MIDI ports on an E-MU 1820m PCI.
 
If anything, record latency compensation will usually be a little less than required, so an error there will actually tend to reduce the time difference between simultaneous recording of audio and MIDI like that, but if you're over-compensating audio latency for some reason, that could make MIDI appear to be late. Otherwise, that much MIDI delay would point to some sort of driver/hardware issue.
 
The first thing to do is ensure both Manual Offset in Audio preferences, and Timing Offset under Sync and Caching
are zero, and then calculate and set the correct Manual Offset for record latency. The easiest way to do that is to use the free CEntrance ASIO latency tester to measure actual round-trip latency, and then then set Centrance Measured - SONAR Reported as the Manual Offset; usually not more than 40-50 samples or about 1ms.
2018/03/05 22:54:47
dougalex
I just want to clarify
You did understand the MIDI is late, not the audio, right?
 
Edit: After reading again, I guess you did.
 
FYI
Audio interface: Behringer X32 Rack USB Card
No midi interface, USB connected direct to computer
 
Thx
 
2018/03/06 13:45:13
chuckebaby
Comment removed.
 
 
 
 
 
2018/03/07 18:43:46
Steev
Not a MIDI problem. You need a low latency audio interface.
2018/03/07 19:36:27
Cactus Music
And of course you are probably aware that having certain plug ins active cause midi to be late. 
If I hear midi latency I always by pass certain effects like the LP Multi band for one. 
2018/03/07 22:02:18
azslow3
dougalex
My midi is 20 milliseconds later than the recorded sound of the key press noise
What is your results?

Discussed many times, but since you ask explicitly I answer explicitly
 
Here is my setup and all relevant settings (check what you have there, if you still have the question, let us know these settings):
* Sonar Platinum 2017.10, running on Win10 64bit
* RME Babyface pro as the audio interface
* MPK Mini as the MIDI controller
 
Settings in Sonar:
* audio:
- Driver Mode: ASIO
- ASIO buffer size: 256
- ASIO reported latency: Input 6.3, Output 6.7, Round trip 13 (575 samples)
- Sync and caching (Record Latency Adjustment): Manual offset 0, Use ASIO reported latency 575 set.
- Project clock source: audio
* MIDI:
Audio / Sync and Caching / Full Chase Lock, Timing offset : 0
 
Project:
- one audio track, input from Mic
- one MIDI track, input from MIDI Omni
(NO FXes, NO SoftSynth)
 
After recording both tracks in parallel: recorded MIDI notes are at the loud part of the recorded click (~2-4ms after the beginning of the signal, depending from how "fast" I was pressing keys).
 
--------------------
 
INDEPENDENT from real latency/delays, Sonar RECORD Audio and MIDI with compensation by what it think the latency was. The idea: you play/sing along already recorded material, so you play/sing "late" in absolute time. Sonar compensate that by putting recorded material in the time line BEFORE the time it really receive the signal.
 
--------------------
 
So, if you have problems:
* check all mentioned settings, may be you will see something unusual
* do audio loopback tests. Described at many places. Simple one with special program, to check that reported latency is correct. If you have only 2 inputs, record mono source and in parallel the loop throw Sonar. If you have more then 2 inputs, the best approach is to record "stereo" input with the same signal on both channels, one channel directly and another "looped" throw Sonar back to the third input. Check that Sonar aligns recorded audio properly (independent how big the latency is). If something is not right with automatic settings, you can adjust manually (Manual offset)
* finally, you can manually put MIDI where you want it with Timing offset option.
 
--------------------
Note, that several times I had real MIDI delay from my DP and e-drums (at the same time, my Keystation and MPK Mini was working without that delay). Rebooting the computer was solving that problem. I still wonder how that is possible.
 
2018/03/08 01:16:38
BRainbow
I don't play live much and I have limited enough chops that my own timing is usually worse than reasonable latency-related offset.  But when I get latency problems with recording audio or MIDI, and I can't cure it with buffer tweaking, I fix it after the fact.  These are all pretty obvious fixes but they work for me.
 
1.  I have accepted that MIDI-driven audio from an external source (and sometimes internal) will always be a bit delayed.  I just drag the recorded audio clip back a few point to line it up.
 
2.  If the MIDI notes played on the keyboard/controller are late arriving and/or being recorded by SONAR, I do the same thing with the recorded MIDI clip, just drag it back to line it up with the measures.
 
3.  If I suspect a soft synth is delayed when playing recorded MIDI notes which themselves are properly timed, I freeze or bounce to an audio track and do the same thing.
 
Another obvious trick if a soft synth is lagging when you are trying to record with a MIDI keyboard is to record while listening to the keyboard's own internal sound that matches your desired soft synth, instead of to the soft synth itself.  The attack and response will be fast and you won't be thrown off by any latency delay.
2018/03/08 01:37:54
57Gregy
Also, if you know what the difference is, you can set one of your 'nudges' to that value and easily fix the late (or early) clip.
© 2025 APG vNext Commercial Version 5.1

Use My Existing Forum Account

Use My Social Media Account