I'd like to add a bit. (Most of this is based on some of Steve Latham's comments on various boards over the years.) We start with the genera lead sheet for popular music (or what I learned to create to transcribe a song from the radio.) There is a melody on top of a bunch of chords. Diagrammatically:
I don't think this quite sufficient (the point of the post) but I need to digress a bit to explain my expansion of the idea (which is real simple and probably obvious by now.)
During the Renaissance (and other times) the idea of combining several independent lines (or voices) was popular (at least in "serious" compositions.) Four voices was the most popular configuration. (I always like to use a plural correctly with a singular verb.) Three and five voices were also popular.
The voices had to be independent but combine to produce "nice" harmony and the lowest voice acted like a bass line. It makes for great sounding music. Baroque (and later) fugues use this pattern.
Straight chords (like hymns) look like:
I've seen some popular transcriptions which use this concept. The bass is indicated by a slash and a separate chord is used for each melody note. Personally, I find this to lead to very complex chords (melismatic melodies over a walking bass) and obscure the structure of the composition. But expanding melody plus chords to "melody plus chords plus bass" simplifies things quite a bit. (The rhythm section, at least those with unpitched instruments like drums, guiros, cowbells, etc. sits independently but still has to combine well.) This leads to a structure like:
(Typography not the best, maybe:)
The point is to consider a song (or aria or symphony, anything with mostly homophonic texture) as a melody line, a bass line, and some chords (inner voices so to speak.) In sketching a piece of music, I like to write out the melody and bass separately then fill with chords later. A quick moving melody over a walking bass will show the movement of melody and bass but not need separate chords for each melody note. Melodies tend to move quickly compared to harmonic motion of chords, so does the bass. (Not always, but mostly.) I have found that thinking of pieces this way was pretty easy.
Note that the upper "melody" line need not be a single instrument and when music is written for a large ensemble, instruments may move into and out of the melody line. Similarly for the bass. This is mostly a matter of arrangement.
The melody and bass do really need to written in good two-part counterpoint (any species). This keeps the music moving. Because the bass and melody are "exposed" (usually both higher and lower than the accompaniment) errors in these two are easily heard. I find it useful to just play (or have the computer play) the bass and melody as two solos and check the sound. The "chord lines" are often played by a group of instruments, rhythm guitar, piano, groups of strings or winds, etc. so less strict counterpoint is needed.
Lately I end up with a structure like:
where the top line is either a flute or clarinet or trumpet or trombone (or voice when I have lyrics), the chord lines are mostly piano with a whatever instruments are not playing the melody and the bass being an acoustic bass. (My stuff puts lots of work on the bass player.) Of course, the bass may get to play a melody (as a duet with a another instrument now and then) and the piano takes over the bass for that section. The asterisks represent a bunch of drums (usually congas, bongos, timbales, cowbell, maracas, guiro, claves or a selection of these.)