A person is often defined by how they cope with difficult times, whether they rise to the challenge or wither in the face of life’s many trials. Those were the concerns of Oregon musician Richard Swift as he worked on what would be his final album, The Hex.

The multi-instrumentalist, producer, and songwriter had just absorbed the blows of losing his mother and sister in short succession and was wrestling with the guilt of having spent so much time in the studio and on the road (he was a member of the Shins for five years, and a touring member of the Black Keys), which forced him to be away from his wife and three kids. And during the last years of his life, Swift dealt with both his alcoholism and the effects drinking had on his health. When he passed away in July, it was due to hepatitis and liver and kidney distress.

With all of that weighing him down, it’s a wonder we’re able to hear The Hex at all. According to Swift’s official Facebook page, the work took some time, accomplished sporadically between sessions with other artists and his touring demands. “In March we cleared the decks,” a recent post reads, “focusing on getting him clean and putting the final touches on his cathartic masterpiece.” Swift announced a release date for the record via Instagram this past May.

Listening to The Hex, it can be hard to connect the music with the despair its creator was feeling. Swift had returned to a comfort zone, where his adoration of the honeyed production style of Motown sat softly alongside the haze of modern psychedelic wizards like Dave Fridmann and the Gordian Knot arrangements of Serge Gainsbourg. It’s a fog of reverb, Mellotron, fuzz guitar, and overdriven vocals, gently obscuring the shivering hurt Swift concedes in each song.

The rumbling daze of “Nancy” gives him cover to address the bitter truth of losing his mother. “You know she’s never coming back,” Swift repeats in the chorus. He addresses his addictions on the bouncy, Harry Nilsson-like “Dirty Jim,” knotting up the fears (“I don’t know if I can make it through”) and recriminations (“Every one I’ve left alone/Sorry for the tears I gave to you”) in barrelhouse piano lines and falsetto harmonies.

Adding another strain of sadness to The Hex is the feeling that Swift lets hopeful rays of light shine through the murk. The album closes with “Sept20,” a buoyant tune where he sings, “Made a plan/Fixin’ myself/Trying not to drink/From a poison well” over a Brian Wilson-inspired piano melody. He was taking the first and most important step toward recovery: admitting to the world that he had a problem.

It was a journey Swift had been on for the past two years, according to his family, as he’d been in and out rehab. And all signs on his final album indicate that he was loosening the grip those dark clouds had on his life. That we’ll never hear what he could have achieved with his art once he was a truly free man only makes his death and The Hex that much sadder.