or do you apply some theory of which scale degree you want the melody to go to next?
the only theories that i consider valid are the ones that are based on the way the notes actually sound. although this may be an unpopular opinion