Here is a famous piece called "Here the deities approve" from a composition by Purcell called "Welcome to all the Pleasures". The work's purpose is to instil a pleasing sense of delight and satisfaction in the listener.
Though you might not notice when you first listen, the bass line is made up of a 3-bar pattern that is repeated throughout the piece, heard clearly in the basso continuo. This "grounds" everything like an anchor on a ship; though the vessel may move around, it is also held in a specific place, providing a sense of constancy. This type of structural device was used a lot by Purcell and other Baroque composers and is called a ground bass.
The music includes a section sung by a countertenor with the following lyrics:
Here the deities approve
The god of music, and of love
All the talents they have lent you,
All the blessings they have sent you
Pleas'd to see what they bestow
Live and thrive, so well below.
A section played by strings is heard from 2'15. Though this is quite different from the preceding sung section, the ground bass continues regardless.
The ground bass is notated below a semitone higher than it sounds. It "travels" from E through a whole host of notes (some chromatic) with a variety of melodic intervals. The final note is a B which returns us to the starting note of E in a very agreeable manner, just like the bass line of a perfect cadence.
Purcell's Music for a While also includes a ground bass which is very similar in manner to Here the Deities Approve. Again, it is notated below a semitone higher than it sounds. Starting on A it has a distinctly upwards trajectory as well as being very disjunct. It ends on two E's an octave apart which brings the listener back to A in a similarly satisfying way.
Music for a While digresses a little from the exact ground bass in a middle section but this doesn't take away from its sense of coherence. At 1'21 (bar 14) - with the word "and" - the music modulates, altering the bass line slightly. The original pattern and key is returned to at 2'47 (bar 29).
When the music modulates in Music for a While it presents a contrasting B section. A sense of wholeness is achieved by the fact that the original A section is returned to, allowing the song to be described as ternary form.
A section - bar 1-15 (0-1'30).
Music for a while
Shall all your cares beguile
Wond-ring how your pains were eas'd
And disdaining to be pleas'd
B section - bar 16-28 (1'30-2'47).
Till Alecto free the dead
From their eternal bands
Till the snakes drop from her head
And the whip from out her hands
A section - bar 29 - end (2'47 - end).
Music for a while
Shall all your cares beguile