I noticed that when there's a new chord, the melody is usually one of the chord tones. Then the melody goes off on its own and usually then transitions to another chord tone when the harmony changes yet again.
I'm interested in different ways of achieving this transition, and other creative ways of weaving in melody with harmony. If so is there a name or keyword for this study.. for the way melody works. for example, harmonic or melody analysis or function, or whatever the scientific name is. I'd just like to research this topic further.