Creating Melodies: Understanding Rhythm and Pitch