Functional Melodies: Finding Mathematical Relationships in Music