Improv trainer
A loop to play over and a neck that keeps up with it: chord tones strong, the scale of the moment faint, the next chord's target ringed as it comes. Then the real work: copy a phrase, answer one, trade fours, and play with one hand tied behind your back.
Half of jazz, two bars on the I. The sevenths are the point. 4 bars, one chord each, in C Major.
The neck, right now
Why this scale
Dm7 is the key's chord on degree 2, so its scale is the key from its own root: D Dorian. Same notes as the key, a different home.
An avoid note is a scale note a half step above a chord tone (the 4th over a major chord): fine passing through, sour if you stop on it. The target is the next chord's 3rd, the note that says what kind of chord it is; reach it as the chord lands and the line sounds like it knew where it was going.
Practice
Rules
Limits are the fastest way to stop running patterns: with three notes you have to make rhythm; with one string you have to hear the neck instead of seeing boxes. The lit notes shrink to what the rules allow; the lead obeys them too.
Listen to yourself
Plug in or use the mic and the page says where each note you play lands against the chord of the moment. In Copy and Answer it listens during your bars.
Go deeper
The loop, key, tempo, mode and rules live in the link.