Ruckman65
OK. I have tried that. When playing the Casio into the SC and AD, there is a delay of perhaps 5ms. When I record on both tracks, both clips are aligned. On playback, the delay stretches to something closer to 15ms.
MIDI is processed a bit different when played live vs recorded. Recorded playback is the subject of Sonar internal delay compensations for recorded material and for playback.
For a good reason (too long for this post), we should distinguish between delays with order of your Round Trip Time (Effective latency), so delays 2*20ms ~ 40ms, and bigger delays, like 100ms and more. The first kind is expected, the second is an indication that something is wrong.
Ruckman65
I just measured the playback latency. When recording an SC track simultaneously with an AD track, when I hit the keyboard note, the two tracks sound pretty much at the same time. On playback, there is a difference between the two tracks of almost 100ms.
If I understand both messages right, if you just hear the output of 2 MIDI tracks going to SC and AD, the delay is ~15ms. If you RECORD SC output (as audio), then when you play that recorded track with MIDI->AD track (directly/freeze/recorded), the delay is ~100ms. Right?
If so (and useful in general) is to check that Sonar has correct information about delays in your NI. Some interfaces/drivers report it correctly, some report it a bit wrong, some return complete nonsense. There are "loop back" tests to check that reported values as seen in Sonar (so, your 18ms) are real. I normally use the following method (turn off/disconnect completely any monitors/headphones attached to the interface):
* put some file on another player (phone) and connect one channel from it to the first interface input
* loop the first interface output to the second interface input
* create one mono track with input set to the first interface input and output set to the first interface output, enable echo
* create another stereo track with input set to both interface inputs, disable echo on this track
* arm second track and record external player, so one channel will record the signal directly and another will record the same signal looped throw the interface and Sonar.
* check time shift between channels (amplitude obviously does not matter). Since Sonar apply whatever compensation it currently think to BOTH channels (Sonar has no idea that once channel is physically looped), the difference is absolute and real.
* compare that number with reported in Sonar, if it is wrong by more then ~1ms, there is a setting in Sonar to compensate.
In addition to nudging, there is another method to "correct" timing: "Cakewalk Channel Tools" FX plug-in. It has "Delay" section. So you can put it on AD2 instrument track and set delay to 100ms. While working well for 1-2ms, with bigger values this method prevents low latency recording while listening current material. But if you first record everything with SC and then add VSTi(s), that can be a reasonable workaround.