Melody derives from Greek:
Via Latin melodia → Old French melodie → Middle English melody.
Core meaning: A coherent succession of pitches perceived as a single musical line — the "horizontal" dimension of music (vs. harmony = vertical).