Along with nostalgia and joy, melancholy is an emotion that a lot of people might associate with classical music. Andreas Staier, the eminent harpsichord player, plumbed its depths at the Library of Congress on Wednesday night with a program devoted entirely to 17th-century melancholy — to be precise, the concept of vanitas, the contemplation of the idea that life is brief and death is long. It’s an emotion that is certainly furthered by spending the whole evening in contemplation of works by long-dead composers that still have the power to reach out gently — the quiet, thoughtful sound of the harpsichord is less like a grab at the heart than a stroke of the cheek.

Not that the program was all sad or gloomy. There were lively moments — a flowing courante by Louis Couperin, a fierce gigue by Louis-Nicolas Clérambault. But the evening was certainly drenched in a particular dark, wistful and dreamy ethos, from the opening suite by Johann Jakob Froberger (“Plainte faite à Londres pour passer la Mélancholie”) to the fantasy-like passacaglia by Georg Muffat that closed the program, with moments of almost space age-y departure landing as if from a distant future world within the music’s regular framework.

This music was not written to fill a concert hall but to fill a head: Its power is turned inward. Staier brought to the harpsichord — its color somewhere between teal and steel gray, highlighted with a line of gold — the kind of coaxing, understated approach that lets the sound blossom, a gentle and firm insistence, and an expert use of the instrument’s registrations, letting it sound like a soft guitar or take on a metallic edge verging on quiet stridency. His gentleness belied his own virtuosity but supported the powerful meditative aspect of an evening that brought the whole focus of a room to two or three single strands of music, like lines etched on the proverbial head of a pin, and returned it to the world with, at the end of the Muffat, a tranquil close.