Pink, the pop singer otherwise known as Doylestown's Alecia Moore, will release her first album in four years, Beautiful Trauma, in October. But for one of the hardest working women in show business, she's got her publicity machine running at full force. Recently, Pink's been extra busy: She released the album's first single, "What About Us," last week. On Sunday night, she was the talk of MTV's Video Music Awards, performing a medley of her hits and giving a rousing, inspiring speech about daughter Willow Sage, 6, while accepting the Michael Jackson Video Vanguard Award.

"Once that ball starts rolling, there's no stopping," says Billy Mann, a longtime Pink collaborator and pal from South Philadelphia.

It was Mann, as well as his good friend and fellow Philadelphian Billy Jolly, who had  a hand in bringing Beautiful Trauma back home for Pink, helping her write and record an as-yet-titled gospel-tinged song from the forthcoming album in Delaware County.

Mann, who dropped his own solo albums in the 1990s ("My greatest success as an artist was failing as an artist") and who  produced and wrote songs for  Cher, John Legend, Daryl Hall, and Celine Dion, had a rough childhood, with "roots deeply embedded under those South Philly potholes." He credits Philly for its songwriting heritage ("the stories of Jim Croce, the harmonies of the O'Jays, the smart emotive lyrics of Linda Creed and the gospel of Patti Labelle"), and he was a natural to hook up with Pink.

Mann has collaborated with Pink since her 2003 hit "God Is a DJ" (from Try This). He worked with her on  seven singles from 2006's I'm Not Dead, including its title track, several tunes on 2008's Funhouse, including the sassy smash "Bad Influence," and the torrid, titular theme from 2012's The Truth About Love. "You know how it is when you're 'Philly' and one of our own starts popping? I was a fan," says Mann. Pink's management team, who happened to be fans of Mann's solo albums, introduced the two, and a friendship began immediately.

"I had the hook of 'God Is a DJ' in my head, which felt perfect for Alecia," Mann says of the single from their first album together. "We met at noon in L.A., and within 15 minutes, we were drinking whiskey, smoking, and it was all Philly.  We wrote 'God Is a DJ' together and it began. That was 15 years ago."

This time around, Mann worked with Pink on a cut from Beautiful Trauma that was recorded in Aston. The song brings together Pink, Mann's South Philly stylings, and another Philadelphian: keyboardist, producer, and Grover Washington Jr. acolyte Jolly. "Jolly is a diamond; we couldn't have made this song happen without him — but that's true of many things in my life," says Mann.

When it comes to their newest collaboration, Pink and Mann drew from their local childhoods, singing gospel in neighborhood choirs. The new up-tempo track started life in Los Angeles, before Pink was pregnant with her second child, Jameson, who was born in December. "She created a new human but never forgot that song," says Mann.

As she recorded Beautiful Trauma in Los Angeles, she booked a concert for Atlantic City in July, and decided she wanted to record that new Moore-Mann track in Philly with a local gospel choir. "I immediately phoned Bill," says Mann, not only because Jolly could book a studio discreetly — he chose Aston's Houser Audio — and get a 30-piece choir together skillfully and quickly, but because Jolly had done so for Mann in December 2016. "When my mom passed near Christmas, I wanted a gospel choir service and Bill made that happen. I'll never forget that."

While Mann and Jolly arranged the voices, the latter conducted the choir as he had done at gigs with Celine Dion and Michael Buble. "I found it best to create the choir from specific singers that I know with the best voices and better attitudes," says Jolly. "Pink? She was extremely cool and incredibly down to earth. She joyfully took pictures with every member of the choir and was one of the most real people I've ever met. She just happens to sing really well, too."

Along with Mann having daughters to whom Pink is "Aunt Alecia," the songwriter says the twosome "have gone through personal challenges and professional transitions together," and that much of that goes into their writing. "We talk about life, drink wine — she's a legit wine expert with a vineyard — and, along the way, we're inspired to write. Maybe she brings a book of her poems or I sit with a guitar or at the piano and start noodling, then humming, and words come."

Mann drops one hint about the still-secretly-titled song he produced when he adds, "there's the coda at the end of the track that's just Pink and the choir, which is very moving and immensely soulful." And totally Philly to boot. "You can take the girl out of Philly," says Mann, "you can't take Philly out of the girl."