Hey - here is another thought. With ANY keyboard containing on-board (local) sounds, that I hook into my computer, via either USB or an old-school midi connector, I go into the Edit parameters for that keyboard, and turn OFF a midi parameter called Local.
What that Local parameter controls is whether or not pressing a key on that keyboard will have the keyboard react to that to trigger a note. With Local Off, it is like separating the pressing of keys from actually generating a sound.
Now, on the surface, that would seem rather silly, but because you have the keyboard connected into your computer (and as a midi input device and a midi output device in Sonar Preferences), even though the keyboard won't generate a sound directly from the pressing of a key, it WILL still generate a sound, because that midi data is sent into Sonar, and back again through the midi connection to the keyboard, which will THEN cause that key's associated sound to play.
There are 2 reasons the above will help:
1) It will almost always result in sounds from other tracks and sounds from the keyboard lining up properly, with it all essentially being processed in the same manner from within Sonar.
2) With Local set to 'Off', you prevent a second note playing the sound for a second time. If you DIDN'T turn your keyboard's midi Local parameter to 'Off'. then what usually happens is that you would get TWO notes sounding every time you played a single key on that keyboard. The first note would sound from the keyboard reacting to the pressing of a key, and the midi data going into Sonar and back into the keyboard again would then trigger a SECOND sound for that same key, with a slight latency making it sound like an echo. (for sounds that are mono, or for synths where there are limited voices, you could also either goof up the sound heard or actually end up with sounds dropping off, because of the keyboard processing each key pressed a second time - if Local was left 'On').
SO - the general guideline would be that for keyboards with on-board sounds, versus midi controllers that do not have their own sounds, you would always go into the Edit functions on that keyboard and set midi parameter 'Local' to 'Off'.
Using the above approach, you may well never need to mess with manual setting of the Automatic Delay Compensation that Sonar defaults to doing for you.
Here is a link that explains Auto Delay Compensation:
http://homerecording.com/bbs/general-discussions/newbies/what-exactly-automatic-delay-compensation-314029/ I hope the above helps you with your situation.
Bob Bone