thumb|A bar from Johann Sebastian Bach|J. S. Bach's [[Fugue No. 17 in A-flat, BWV 862, from The Well-Tempered Clavier (Part I), an example of counterpoint. The two voices (melodies) on each staff can be distinguished by the direction of the stems and beams.thumbthumb|Voice 1thumb|Voice 2thumb|Voice 3thumb|Voice 4]]
A melody is a sequence of individual musical notes that forms a recognizable tune, often distinguished from other simultaneous melodies (called voices) through techniques like different stem directions in written music. Melodies matter because they are fundamental building blocks of musical composition, allowing composers like Bach to create complex works where multiple melodies can be interwoven together in structured ways.
AI-generated from the Wikipedia summary — may contain errors.
thumb|A bar from Johann Sebastian Bach|J. S. Bach's [[Fugue No. 17 in A-flat, BWV 862, from The Well-Tempered Clavier (Part I), an example of counterpoint. The two voices (melodies) on each staff can be distinguished by the direction of the stems and beams.thumbthumb|Voice 1thumb|Voice 2thumb|Voice 3thumb|Voice 4]]
A melody (), 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.
Discovered by embedding cosine similarity (sentence-transformers MiniLM, 384-dim).