What I usually do is work something out on guitar, synth, whatever and get my foot tapping to it.
I then record four bars of one note/chord per beat, with the metronome off and leaving Sonar set at the default 120 bpm. I then use the loop editor functions to tell me what the tempo I recorded at was or if it's MIDI check the number of milliseconds between notes and calculate the bpm. I'll then set up a bare-bones kick and snare/hats track and use that as the click rather than the metronome. I find the typical "ping click click click" of most metronomes doesn't work for me because I nearly always end up playing against "click click click ping". Too many years of playing and listening to music that relies on a strong backbeat I guess.
If I start with a sequence then I'll take a guess at the kind of tempo that'll work, set up the sequence in the DAW or hardware then adjust the tempo till it feels right.
Sometimes a very small change in tempo, e.g. 90 to 92 or 130 to 135 can make a huge difference in "feel'. Sometimes a slight tempo change is all that's needed to make a part that was hard to keep in time all of a sudden just work. As can shifting e.g. some of the hi-hat timings so they're a few milliseconds early or late and pull or push the groove.
The danger with functions like your Yamaha keyboard had is that if you come to rely on them you never learn to play in time....