| All the advice you've gotten so far is good. Transcribing helped (helps) me out alot, especially if I take licks I don't get and break them apart to figure out how they work.
Obviously one needs a handle on scales and a healthy dose of listening, at the very least, to be able to improvise with confidence.
Let me make a suggestion. I haven't tried this with anybody, I assume it's a common type of exercise, but maybe you'll find it useful.
Do this exercise -- take a blank sheet of staff paper, and on the first system, make room for three bars of music. Write a ii7-V7-I sequence, one per bar, for this example G-7 | C7 | Fmaj7.
Without attaching stems, write noteheads where the quarter notes go using chord tones under each chord. For example, in the first bar, maybe D F D Bb, second bar, Bb E C G. Try and keep the intervals within a fourth of one another for this attempt. Keep the last bar simple.
Now fill in between the notes with other notes from the scale for each chord. If the notes are a third apart, like the E->C in the second bar above, you might use a D as a leading tone. These notes can either be chord tones or nonchordal scale tones, for the purposes of this exercise.
You don't have to fill in ALL the notes to make a line, you could just fill in half, it's up to you. If you're leaving quarter notes in, stem them; for the rest, beam them into eighth notes.
Now play it and listen to what it sounds like.
This is basically what's going on using a purely diatonic approach to playing over chord changes. The reason this (probably) sounds more "right" to you than what you're used to playing off the top of your head is that you're stressing chord tones on the beat, reinforcing the underlying harmony.
This is NOT precisely what most players do -- most good players incorporate some anticipation or delay of resolution, chromatic (non-chordal) guide tones, altered extensions to the chords, etc. Also, proficient improvisors have alot of different rhythmic combinations internalized that they can pull out of a hat to make their solos interesting. This comes with focused listening, memorizing, and/or transcribing.
I guess my point is, there's more to it than the above exercise. But I think it's useful in demonstrating what sounds "good" to your ear.
Try it again with different "between" notes, rhythms, etc. Create triplets if you want to spice things up, or leave a beat or two of rest on the downbeats. See what comes up that sounds interesting to you. |