In the winter of 2014, David Mallett was in Machias talking to university students about songwriting when he got snowed in. With time on his hands and no place to go, he started writing what would become his next album, “Celebration.”

The song that came to Mallett in Machias was “Ring for You,” which he wrote for his son, Luke, who was getting married that August. He didn’t finish the song on that snowy day Down East, but that trip triggered a fertile period of composition. “That’s usually the way it works,” said the stalwart songwriter from Sebec, who is best known for his early-’70s folk song “Garden Song (Inch by Inch).” “I wait two or three years until I need a new batch of songs. Then the right situation comes along, and away it goes. All I’ll do is write songs for the next six months.”

Mallett, 65, will talk about song craft and the importance of place and family as a guest on MaineVoices Live at 7 p.m. Tuesday at One Longfellow Square. His sons, Luke and Will Mallett, will join him. Portland Press Herald/Maine Sunday Telegram music writer Aimsel Ponti will lead the conversation. Hosted by MaineToday Media, MaineVoice Live is a live conversation with notable Maine figures.

Luke and Will Mallett perform in the Mallett Brothers Band and often appear with their father on stage for his concerts. The three will perform a few songs together Tuesday night.

The song “Celebration” was the last song Mallett finished for the album. The family was all together in Sebec last summer, on the lawn. Mallett allowed himself a moment of joy that his kids were happy and in one place. He wandered off “back into my hole” to write a few lines while the inspiration was still present.

The record, released in the spring, includes love songs, political songs and social statements about the decline of rural America. Throughout the songwriting process, Mallett sent unfinished song sketches to his kids, including his daughter, Molly. He wanted their input and collaboration. They all share songwriting credits and perform on the album. “I love working with my kids,” Mallett said. “They’re all very musical, and they have a perspective that I don’t have, because they have all that energy and they listen to stuff all the time.”

Mallett has released 17 records since the 1970s and has been especially productive in the last decade, with three albums of mostly new songs and one collection of covers.

“I’m very proud of these tunes,” Mallett said. “The older I get, the more I have a handle on what I want to do. You can only get better as you get older.”