A melody also tune, voice, or line, is a linear
In mathematics, a linear map or function f is a function which satisfies the following two properties:* Additivity : f = f + f...

 succession of musical tones which is perceived as a single entity. In its most literal sense, a melody is a combination of pitch
Pitch (music)
Pitch is an auditory perceptual property that allows the ordering of sounds on a frequency-related scale.Pitches are compared as "higher" and "lower" in the sense associated with musical melodies,...

 and rhythm
Rhythm may be generally defined as a "movement marked by the regulated succession of strong and weak elements, or of opposite or different conditions." This general meaning of regular recurrence or pattern in time may be applied to a wide variety of cyclical natural phenomena having a periodicity or...

, while, more figuratively, the term has occasionally been extended to include successions of other musical elements such as tone color. It may be considered the foreground to the background accompaniment
In music, accompaniment is the art of playing along with an instrumental or vocal soloist or ensemble, often known as the lead, in a supporting manner...