Elegant melancholia isn’t enough for the National anymore. On its seventh album, “Sleep Well Beast,” its new songs have more rhythmic ferment and melodic crosscurrents; they translate emotional complexity into musical counterpoint.

Until now, the National’s trajectory was fairly linear. From its self-titled 2001 debut album onward, the National was a band growing consistently more polished, resourceful and secure. “Sleep Well Beast” gives the band’s sound a jolt.

The National appeared during the early-2000s New York City rock resurgence, alongside post-punk revisionists like the Strokes and the Yeah Yeah Yeahs. It, too, harked back to the guitar-driven bands of the late 1970s and early 1990s. But like its peers, the National already had its own ethos. Even its earliest songs found a somber sweet spot amid loss, self-doubt, disillusionment and fading but obsessive romance. Its music flaunted an appreciation for the steady-state post-punk of New Order along with, perhaps, echoes of Lou Reed, Leonard Cohen and Bryan Ferry to match Matt Berninger’s glum baritone lead vocals.

Image “Sleep Well Beast” is the National’s seventh album.

On “Sleep Well Beast,” Mr. Berninger and his wife, Carin Besser, write the lyrics and melodies while Bryce and Aaron Dessner, twin brothers who play guitars and keyboards, compose the rest of the music. The bass-and-drums rhythm section is another pair of brothers, Scott and Bryan Devendorf. The Dessner brothers hold on to pop structures; verses, choruses and bridges are distinct. But what goes on within those forms is both musicianly and psychologically acute.