OK, If the AKAI MPD32 is connected and the midi box is cheeked under Preferences > Midi > Devices > Inputs, do following
Go to Insert > Softsynth > choose a softsynth, preferably a keyboard if possible.
You will now see the Option Dialogue Box
Select the following 3 items when the option dialogue box appears:
1. Simple instrument track.
2. Synth Property Page
3. Synth View rack
OK
When the instrument track appears in Sonar and the instrument GUI appears, select a Keyboard tone that you want to hear for the piano. Now click on the track number in which the keyboard is on and press the MPD32 buttons, you should now hear the keyboard.
When working with Drums its the same thing basically.