Larry,
I'm using an older version of Sonar2 so I don't know if everything applies.
On the keyboard I selected: function/midi/keyboard & style/edit which opens the midi edit page.
Under the system tab all boxes are checked for Local Control.
I left the clock at default settings, which is Internal and under the transmit area it is set to Transmit Clock: Off
Everything else is left at default values as well.
I just recorded a short song segment and everything works fine.
In the program's Options area under MIDI Devices, I selected the Yamaha USB in-01 and Yamaha USB Out-01. However, you must deselect the MP-401 as well or there can be conflicts.
Hope this helps,
Gary
_________________________
PSR-S950, TC Helicon Harmony-M, Digitech VR, Samson Q7, Sennheiser E855, Custom Console, and lots of other silly stuff!
K+E=W (Knowledge Plus Experience = Wisdom.)