Kraftwerk - “Tour de France”
What plays the melody?
Synthesizers and drum machines play all of the sounds in this track (except the vocal parts), and the primary melody is a synthetic string-like sound.
How is this melody put together?
The main melody in this track is very long, but you can break it down into four smaller pieces (or phrases) that are simple variations of each other.
The first and second phrases are identical, with the exception of the final note. In the first phrase, the last two notes descend from B♭ to A♭, while in the second phrase, they ascend from B♭ to C. You can hear this as a sort of "question and answer" relationship; the first phrase sounds somehow incomplete, while the second phrase sounds like it serves to resolve the first.
The third and fourth phrases also work as a pair. The third is identical to the first, except that it has been transposed up to start on G instead of F. Finally, the fourth phrase "answers" the third, with another small variation at the end of the phrase.
Experiment with your own melodies that use some of the techniques from the original: repeated phrases with variations, "question and answer" relationships, alternation between ascent and descent in the variations.
Side note: the first few notes of the melody are borrowed from a much older piece of music: Paul Hindemith's Sonata for Flute and Piano (1936).