On their sixth album,

Shame, Shame

, the sunny Philadelphia pop-rock band Dr. Dog lets a little darkness in.

"We've always been obsessively devoted to the notion that the band is a purely positive thing," says guitarist Scott McMicken, who co-leads the band with bassist Toby Leaman.

The two have been making music together since they were eighth graders, growing up in West Grove, Chester County, and now Dr. Dog's national tour is bringing them home to the Electric Factory on Thursday.

"What I've come to realize over time," says McMicken, "is that there's nothing negative about a sad song."

Shame, Shame, the band's first album on the respected indie label Anti- - home to Tom Waits, as well as Philadelphians Man Man and Alec Ounsworth - is full of sad songs. Or so you'd think, perusing a lyric sheet to tunes with titles like "Unbearable Why" and "I Only Wear Blue."

"The good old days have passed, and the good times after that / And slowly I've become undone," the raspy-voiced Leaman, 30, sings on the opening "Stranger." "Yesterday's love defines you," the higher-pitched McMicken, 31, laments on "Jackie Wants a Black Eye." "But today that love is gone."

But even when McMicken and Leaman start with downcast raw material, it gets transformed by Dr. Dog's flair for melody and harmony. What might read as negative winds up sounding positive.

"There's so much you can do with a band when you arrange things and choose your instrumentation and dynamics," says McMicken, in his West Philadelphia apartment following a recent, packed radio-concert marathon for WXPN-FM (88.5) at World Cafe Live. After the broadcast, the band, including keyboard player Zach Miller, guitarist Frank McElroy, and new drummer Eric Slick, carried on with an 11-song encore.

"It always seems great to me how you can take a super-simple structure, like with 'Shadow People,' which has the same melody and chord progression over and over again in the verses," McMicken says, "and really make it feel like it begins somewhere and ends somewhere completely different."

McMicken smokes Camels as he sits in his kitchen, where the walls are hung with his own paintings. The sink and stove share space with a turntable and a few hundred LPs (lately he's been spinning a lot of Bob Dylan).

He points to "The Girl," from Dr. Dog's 2007 album We All Belong, as a song whose dreary mood was lifted by the buoyant music.

"When I wrote that, it was a dark broody thing," says the redheaded tunesmith, sporting a trademark Fedora but without the oversize sunglasses he wears onstage. "And then, sonically, in the instrumentation and the arrangement, we started to pull away from that as we started to dress it up.

"In a general philosophical way, that's super-important, because no matter how dark or depressive the subject matter of the song, it's not the be-all and end-all of how you're always going to feel. You need a way out of it."

When it came time to record Shame, Shame, band members felt as though they needed a way out of their normal routine, recording at the Kensington studio they affectionately call Meth Beach.

Working with the tiny indie label Park the Van, beginning with 2005's Easy Beat, Dr. Dog has been on a slow build to renown. Fate (2008) sold nearly 60,000 copies, twice those of its predecessor, We All Belong.

For its Anti- debut, the group decided to work with producer Rob Schnapf, who has worked with Elliot Smith and Beck at his Dreamland studio in upstate New York. "We'd kind of outgrown our own studio, and we just wanted to be a band on this record," says McMicken.

The experiment wasn't entirely successful. The band's DIY sensibility clashed at times with Schnapf's engineer Doug Boehm, and the pressure of "redefining yourselves and your future with a brand new label" was intense, at times, McMicken says. Plus, he says, "it was expensive as hell, and there was a finite amount of time."

Rather than finish Shame, Shame in a month, the band brought the tracks they recorded back to Meth Beach and completed them in Kensington. When they were done, they realized that the album they'd left town to record wound up being their most Philadelphian yet.

"Maybe it was being away so much," says McMicken, sussing out what gives Shame, Shame such a strong sense of place. All the Dr. Dog guys live in West Philly, except for Leaman, the sole married member of the band, who resides in Wilmington, and its sixth touring member, Dmitri Manos, who lives in Tucson, Ariz.

On "Station," when Leaman hits the road, he leaves behind a handful of tokens for his friends to use on the Baltimore Avenue trolley car. "Shadow People," which McMicken wrote with Dan Auerbach, takes a virtual tour of West Philly bohemia, from basement house parties to the Second Mile Center thrift shop.

With his new songs, McMicken has moved from an abstract to a more concrete approach to songwriting.

"The process for me used to be, how far could I reach out for an imaginary something," he says. Now, "the idea of what's in front of me, and where can I go from there, has become much more compelling. What is the obvious truth at exactly this moment? I try to start with that."

Contact music critic Dan DeLuca at 215-854-5628 or ddeluca@phillynews.com. Read his blog, "In the Mix," at www.philly.com/philly/blogs/inthemix.