So, I had this problem. Seemed to have no explanation. Finally solved it. If you have the problem for the same reason, this solution may work.
Problem:
For me, when I was controlling a keyboard sound with my 88 keys, I heard nothing on notes A7, and around B7 to F8. It occurred with every soft synth I inserted, and showed no midi activity on the midi channel for these notes. To confirm the keyboard wasn't faulty, I tried in Pro Tools with the same soft synths, and all the notes worked perfectly! Then I noticed that in the piano roll view, the notes that showed no midi activity still highlighted when I played them! This was the first evidence I saw that Sonar was indeed receiving midi information when I pressed those keys.
I'll discuss the steps I took, but feel free to simply skip to the solution below.
Troubleshooting: I felt certain that the problem was that Sonar was intercepting these keys for some controller function, so I checked in the Preferences-Midi-Control Surfaces tab, and indeed, some currently disconnected hardware was listed with the same midi port as the keyboard was using. So I deleted this surface, and fully expected that the problem was solved, and I'd have no further issue. But the problem was unchanged! So I deleted the remaining control surface, which had it's midi port listed as none, just in case. Still no change! So I looked through the Preferences-Customization-Keyboard Shortcuts Tab, selecting MIDI under Type of Keys, but could find no short cut associated with any key.
Turned out the problem did lay in the Control Surfaces tab, and highlights this as an area where Sonar needs improvement. The control surface implementation is in theory, incredible, allowing deep customization and automatic configuration of a new surface, but in practice I've found it often glitchy.
- Mapping some knobs seems impossible, as they work as absolute or relative controllers, and the program can't seem to figure them out. In the case of mapping my Samson 49, I resort to learning the control over and over, until, unexplainably, Sonar learns the knob in the correct way. In the case of mapping my AKAI APC Key 25, I just gave up.
- My true wish, that I've had for a long time with Sonar, is that they would adopt the protocols that Ableton live uses, perhaps as a selectable Ableton mode, so that I can use the incredible array of inexpensive and versatile controllers for that program. Instead, I can't even map these controllers as ACT controllers, because they communicate in such a different way.
- Of course another option would simply be to expand the list of choosable surfaces, but if I could just select an Ableton mode, then it would cover controllers not yet made, plus controllers too trivial to be worth adding to that list.
- I wish Sonar would present MCU controllers as ACT controllers so I don't have to try to map them like that. Because I want to get my hands on more than just the faders and pan. I want to tweak EQ (like the real MCU) and soft synths (which the real MCU doesn't do either). Compare it with Reason's implementation of an MCU emulation controller, like the Samson 49. Just selecting MCU allows direct control of every device, by a premapping to all the faders knobs and buttons in the MCU protocol! This is SO FUN! And I don't have to do any surgery, just select MCU as the controller.
Solution:
Go to Preferences-MIDI-Control Surfaces, and
Add a new control surface, choosing your keyboard's Midi Port (Actually here the problem immediately disappeared, and those keys worked again.)
Delete the control surface you just added, as the problem should hopefully be gone now.
That should do it!
Good luck!