Making the switch from writing rock songs to writing kids songs came easily to Dan Zanes once he reached this seemingly obvious conclusion: Failed romance and tales of boozing aren't necessarily the best subjects for children's music.

"I was just writing about old girlfriends and drinking," the 44-year-old musician says of his days with the Boston rock band the Del Fuegos and his solo career that followed. "I was running out of ideas. But if you take those two things away, everything opens up."

And so was born a second musical career for Zanes as troubadour to tots -- not to mention grateful parents looking for an antidote to a kiddie music world ruled by the Wiggles, Raffi, Barney and their often irksome ilk. Zanes is not unlike a number of other rockers such as They Might Be Giants who started out rocking for kids their own age and now find themselves coochie-cooing an entirely new demographic.

New Hampshire-native Zanes, who will play two sold-out shows with his band next Sunday at National Geographic's Grosvenor Auditorium, says his decision to make music for kids was almost an act of desperation. When his now 10-year-old daughter was just a toddler, finding contemporary music for her that he found stimulating or interesting was difficult.

"Everything I heard felt pretty corporate," he said from his home in New York. "The music for kids that I heard and imagined in my head, I wasn't able to find in stores."

Zanes embarked on a side project making kid's music he wanted to hear -- songs that borrowed from traditional folk and sea chanteys as well as quirky rock, bouncy jazz and blues, and reggae. He never intended it as more than a one-off recording, but making children's music turned out to be a brilliant career move.

Since releasing "Rocket Ship Beach" in 2001, Zanes has put out four more CDs for children (and their parents), as well as a book and "All Around the Kitchen," his new DVD of videos and concert footage.

"I like it to be a shared experience that sometimes veers more toward adults and sometimes more toward kids," he says. "It's really just 21st-century folk music for all ages."

And as for the Wiggles, well, you won't hear an unkind word from Zanes about them. "Hey, I don't hate anybody," he says. "They're probably having just as much fun as I do."

For John Flansburgh, singer and guitarist with the rock group They Might Be Giants, writing for children is not that different than writing for adults.

"We're not interested in becoming Raffi," he says. "We don't write namby-pamby songs for kids. We just write loud rock songs with full-blooded rhythm."

The group that he formed 22 years ago with John Linnell still plays shows for adult fans, but it is spending an increasing amount of time working on children's music, including writing the theme songs for "Malcolm in the Middle" and the Disney show "Higglytown Heroes." In 2002, TMBG released "No!" its first children's album, and followed that up with a book-and-CD set "Bed, Bed, Bed." Now the duo has just released "Here Come the ABCs." Not since the Jackson 5 has a group had as much fun with the alphabet. TMBG devote 22 songs (shouldn't it have been 26?) to friends like the "Rolling O" and "Flying V."

Though the writing process for children and adult songs is similar, Flansburgh does notice a difference when playing live shows. In that setting, he says, "you can't be surprised or confused if you lose the kids' attention." Laughing, he adds, "Our role is a lot closer to being a schoolteacher than being Elvis Presley. And we've only trained to be Elvis Presley."

A surprising number of young indie bands are also skewing way younger. Last month, the White Stripes debuted a video for its song "My Doorbell" -- not on MTV, but on Nickleodeon. Shot in black and white, it has the feel of a classic "Little Rascals" variety show.

In Washington, Pancake Mountain, a locally produced cable access television program that puts its best clips on the Web (, has tapped into the grown-up rock for kids movement as well, booking such hot indie bands as Fiery Furnaces, the Arcade Fire, Scissor Sisters and Ted Leo. The most unexpected video clip has former Fugazi front man Ian MacKaye blaring "Vowel Movement," with Amy Farina, his partner in his new band, the Evens. The post-punk-meets-Schoolhouse Rock song is edgy, engaging and educational. For parents raised on rock and punk, having more and more options for music for their kids that isn't sung by purple dinosaurs or four Australian men identifiable by the colors of their shirts is a giant relief.

"How many times can you listen to that crap?" asks Russell Davidson, 39, of Kensington. "It's just so wholesome and schmaltzy." The father of Eli, 7, and Zoe, 3, is much happier with Eli's new favorite song, "No Feeling." The band? The Sex Pistols.

Dan Zanes and Friends (top) and John Flansburgh and John Linnell of They Might Be Giants (above) want to please you and your young ones.