Linear succession of tones in the foreground of a musical work
A melody (from Greek μελῳδία (melōidía) 'singing, chanting'), also tune, voice, or line, is a linear succession of musical tones that the listener perceives as a single entity. In its most literal sense, a melody is a combination of pitch and rhythm, while more figuratively, the term can include other musical elements such as tonal color. It is the foreground to the background accompaniment. A line or part need not be a foreground melody. Melodies often consist of one or more musical phrases or motifs, and are usually repeated throughout a composition in various forms.
https://en.wikipedia.org/wiki/Melody