To use a hardware keyboard synth, you need to set up two tracks in SONAR:
- A MIDI track with Input and Output both assigned to the ports presented by the keyboard (assuming USB MIDI connection) in Preferences > MIDI > Devices.
- An audio track with Input set to the the interface channel(s) receiving the keyboard audio, and Output to the Master bus and from there to your audio interface Main Outs.
Input echo needs to be enabled on both tracks so that live MIDI input will be echoed to the synth, and live audio output from the keyboard will be echoed to your interface output. And, as mentioned, you'll want to set Local Control Off on the keyboard so that it's only responding to MIDI echoed or played back from SONAR.
The MIDI track will echo automatically when it has focus if Always Echo Current MIDI Track is enabled in Preferences (the default) or you can force it on. The input echo on the audio track should be on all the time until you've recorded the audio from it.
Now you can record MIDI, hearing the keyboard synth while recording and on playback. Once you've captured and edited the performance you want, arm the audio track to record , and record the audio from the keyboard synth in real time as it's driven by your MIDI track. Once you've recorded the audio, you'll want to mute or archive the MIDI track, and disable input echo on the audio track so it's not adding any quiescent noise to the track.
The only open question then is whether your Creative X-Fi (?) interface can run a small enough ASIO buffer to give reasonable overall latency (MIDI round-trip delay plus keyboard response time plus audio round-trip latency) to be playable.
.