A melody is a string of notes that conveys musical meaning and is usually the leading voice. This is as opposed to harmony which is used to complement the melody by following the chord progressions.