Early in a career that began with a self-titled album in 1970, Loudon Wainwright III discovered two inexhaustible subjects: himself and his family.

The now-71-year-old troubadour and actor is the paterfamilias of a musical brood that includes son Rufus and daughter Martha from his marriage to  songwriter Kate McGarrigle (now deceased), as well as Lucy, his daughter with singer Suzzy Roche. For 23 albums, the prolific LWIII has written painfully funny, frequently tender songs that over-share personal details as he grapples with five decades of hangups and anxieties.

Family affairs have been rich grist, and lately, Wainwright has expanded into new media. For the last few years, he's been doing a one-man stage play called Surviving Twin, which he calls "a game of creative catch" with his late father, Life magazine columnist Loudon Wainwright Jr.

Wainwright did two weeks of Surviving Twin at the People's Light Theater in Malvern last winter, and pals Christopher Guest and Judd Apatow – who cast Wainwright in The 40-Year-Old Virgin and Knocked Up – plan to turn the play into a film.

Blue Rider

And the tale of two Loudons led to a Wainwright book, whose full title is Liner Notes: On Parents & Children, Exes and Excess, Death & Decay, & a Few of My Other Favorite Things (Blue Rider, $27). The witty and brutally honest memoir will bring the author to the Free Library in Philadelphia on Tuesday.

Liner Notes came to be when Penguin editor Peter Gethers saw Surviving Twin in New York in 2014 and convinced the singer he had a book in him, which, as Wainwright writes, "felt a bit like an unwanted medical diagnosis."

"I've been writing these songs since 1968," he says, talking from a tour stop in Washington, D.C., a day after Liner Notes was released on his 71st birthday. "I've never really taken a crack at stringing prose sentences together. Although I had written liner notes, for myself and other people."

Liner Notes' dedication reads, "For the family, and all we put us through." It details Wainwright's upper-middle-class youth in Westchester County, N.Y., with summers in Watch Hill, R.I. In a memorable Los Angeles interlude, Liza Minnelli was a childhood chum, and her mother Judy Garland, whom Rufus Wainwright would later perform as in drag, doted on young Loudon.

There are perceptive and unflinching essays about the women in Wainwright's life, be they the mothers of his children (he also has a late-in-life daughter, Lexie, who is the subject of the achingly tender 1995 song "A Year"); his Georgia-born mother, Martha, whose death in 1997 sent him spiraling into depression; or sister Teddy, featured in "The Picture," one of her brother's most moving songs, on his masterful 1992 album History.

Self-analysis lends context to such tunes as "The Swimming Song," "Unhappy Anniversary," and "Dead Skunk," the 1972 novelty that was a top-40 hit, and song lyrics crystallize the prose. Added bonus: For the audio version, Wainwright re-recorded songs quoted in the book.

The relationship at the book's core is between Wainwright and his father, who died in 1988. "We had a difficult, contentious relationship," he says. But as time passes, "As I say in the show, we're getting along better now than we ever did."

The book includes several The View From Here columns the elder Wainwright wrote, many of which are read aloud in Surviving Twin.

One, "Disguising the Man," is about buying a bespoke suit in London in 1965. Disturbingly, it contains the sentence, "Looking for the first time at my new suit, I felt much the same horror I'd felt at the first sight of my eldest son." In the play, Wainwright dons the suit, "so I can almost inhabit him."

Liner Notes also includes a heartbreaking and funny tale written in 1971 about putting down John Henry, the family dog. Wainwright calls his father's prose "elegant. I think he's a great writer. The personal stuff is the best stuff. When I read that dog column in the show, it's the biggest laugh of the evening."

Wainwright's father drank heavily and carried on affairs before eventually leaving his mother, and was miserable as he struggled to write books he never completed toward the end of his life.

His son, though, enjoyed writing Liner Notes. "I kind of liked it," says the singer, who lives with longtime girlfriend Susan Morrison. "It's a different discipline. Normally, unless somebody asks me to write something specific on a deadline, I just kind of meander through and write a song when I feel like it."

(Wainwright regularly wrote songs on demand for National Public Radio, a practice that helped produce albums such as the 1998 set Social Studies, which includes the terrific "Tonya's Twirls," about the Tonya Harding-Nancy Kerrigan figure skating scandal.)

Liner Notes tells of taking lots of acid in San Francisco during the Summer of Love, after Wainwright dropped out of acting school at Carnegie Tech in Pittsburgh.

Drugs were never Wainwright's problem, though. "Primarily, I drank too much," he says. Also, like his father, he was a frequent philanderer. He wrote about his preference for going it alone in such songs as "One Man Guy," which was covered by Rufus, and "I'd Rather Be Lonely," which was written about living with daughter Martha.

"My proclivity to … 'play the field,' that was another compulsion of mine, which thankfully is no longer at play," he says. "Though that may have something to do with being 71 years old."

He still has "the urge to flee," admits the touring musician, who will play the World Cafe Live on Nov. 29. "Life is tough, life is scary. And you want to run away and not face yourself. … That's too hard, so you get into trouble."

Wainwright has gotten into trouble with his own children. Martha paid him back by writing a song about him whose title starts with the word "Bloody" and contains two others unprintable in a family newspaper.

"I've fought with my kids privately and publicly, and it's been quite a ride," says the singer, now grandfather of three. "But I think it's getting better as time goes on. … We're working at forgiving each other."

The clan performed on recent Wainwright Family adventure cruises in Alaska and the Caribbean, for which he wrote a song called "Meet the Wainwrights" that mocks his offspring and, of course, himself. As of yet, no one has jumped overboard to escape.

"On stage, in a performing context, we get along," the musical patriarch says. "It's when we're together at the Thanksgiving dinner table that the problems begin."