Check out this exercise and learn how to play better scales and melodies.
This classical guitar exercise aims to help your right hand i and m alternation. Using opposing resistance, it both strengthens and trains the hand to deliver more “snap” when alternating fingers. This helps in both scale passages and arpeggios, and increases speed and preparation time for the individual right hand fingers.
You can use the rhythm below, or make up your own.