If you need to change positions on the neck and you want it to sound seamlessly smooth, there’s no reason you can’t shift while you’re on a note.
For example, say you’re in 3rd position, fretting a G on the D string with your 3rd finger (Fig. 1). Play that G, and then bring your 1st finger up
right behind your 3rd (Fig. 2). As soon as it’s in place, release your 3rd finger and nudge the 1st to the spot where the 3rd was (Fig. 3), all while
holding down the G. You’re now in 5th position, ready to fret the next note. (And I mean fret—this technique won’t really work on a fretless.) It
takes a little practice to do mid-note shifts quickly, with a consistent tone and no buzzing as the pressure on the string changes. As an exercise,
try playing steady eighth-notes on one string, moving up chromatically and shifting when necessary. (You’ll notice it gets much harder on the
higher frets.) You can also move down this way, but that’s more difficult as well. Regardless, it’s another option for moving around the neck without
breaking the smooth flow of a line.

Fig. 1

Fig. 2

Fig. 3