En melodi är en följd av toner som bildar ett harmoniskt mönster. Melodier används inom de flesta typer av musik.