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.