"Like the rest of the world I woke up to the news that morning and was horrified and sad and scared," says Tranter, 36, who has raised money and awareness for LGBT causes since coming out at age 14.
"Hands" arrives tonight on iTunes. Proceeds will be distributed by Equality Florida Pulse Victims Fund, the GLBT Community Center of Central Florida and GLAAD.
The idea for the all-star project came together one day after the shooting.
L.A.-based Tranter and songwriting partner Julia Michaels had been on the road with Gomez writing songs aboard her tour bus in Miami the weekend of June 11 when news of the bloodshed prompted Tranter to switch course. That afternoon he signed on as a volunteer at The Center Orlando, the region's chief LGBT community center.
"I called them and said, 'If I fly up is there something for me to help with?'" he tells Billboard. "They say, 'We need as many hands as we can possibly get.'"
"Hands" took hold the next day when Tranter met GLAAD CEO Sarah Kate Ellis who had arrived at the center from New York.
Beyond their immediate efforts -- distributing food and water and GLAAD's work with media -- both were looking to make contributions that would have ongoing benefits. They point out that the massacre was also a profound attack on people of color, as that Saturday evening had been a popular "Latin Night" at Pulse. Most of the victims were of Latin heritage and Ellis says she does not want that point forgotten.
Justin Bieber Projects Names of Pulse Victims & Christina Grimmie During Orlando Tour Stop
"When you hear the song it talks about hate being the driver here," she says, "and that's important because we have to be able to identify what's driving these cruel acts in order to stop them. Artists using their platforms to accelerate acceptance is very powerful."
Aligning with Interscope for the release, Tranter, GLAAD and Interscope president of A&R Aaron Bay-Schuck put the word out that a fundraiser was in the works. Within days artists from all spheres of the business had lined up -- also among them Halsey, Ty Herndon, Dan Reynolds of Imagine Dragons, Adam Lambert, The Trans Chorus of Los Angeles, MNEK, Alex Newell, Mary Lambert, Prince Royce, Jussie Smollett, Nate Ruess and RuPaul -- all recording separately from their homes, local studios, touring locations or wherever they happened to be at that moment.
"We assigned everybody what we thought would be the best part for their voice," Tranter says, "and we asked them all to sing an additional part, just in case. But everybody got it done in time so we ended up with extra vocals."
In Los Angeles "Interscope let us use their studio," he notes. "Mary J. Blige recorded in New Orleans. Britney Spears in Thousand Oaks, I think. Pink in Santa Barbara. MNEK recorded at home in London. Selena recorded in her studio bus. Dan Reynolds recorded in his home. Adam Lambert was in Luxembourg. Ty Herndon the country star was in Spain. Kacey Musgraves, Nashville. Everyone just got it done."
Another goal of the record, according to GLAAD, is to fund educational programs.
"This was an American guy who was born in Queens," Ellis says of the gunman, Omar Mateen, 29, who was killed by police after a three hour stand-off. "He learned that hate here in America. This happened on American soil, against a particular community."
Lin-Manuel Miranda, Jennifer Lopez Collaborate on Song to Benefit Orlando Victims
While politicians and lobbyists have focused in recent weeks on Islamic terror and familiar narratives about gun ownership, Ellis, Tranter and others in the LGBT community want people to remember that this was a hate crime.
"I'm not educated enough to speak on the political details," Tranter says. I'm a songwriter, not a politician. It could have been a million things but clearly, 100 percent, this was an attack on the LGBT community and people of color."
"Hands" grew out of an unfinished piece that Tranter, Michaels and co-writer and producer BloodPop (formerly known as Blood Diamonds) had been working on and then shelved.
"The song didn't ever finish itself and it didn't ever feel right," Tranter says of their initial efforts. "Now we know why."
'Sorry' Songwriter Justin Tranter Owns His Sexuality and the Pop Charts
Mark Ronson also co-produced, while vocal engineer Benjamin Rice finessed the disparate tracks: "He helped us find the structure and make sense of it all."
Warner/Chappell publishing executive Katie Vinten brought in numerous artists, among them P!nk, whom Tranter calls "a lifesaver," adding, "Her vocal on the chorus is like from heaven directly."
Spears opens the song with the plaintive line, "Can hold a gun or a hold a heart." RuPaul is heard quietly toward the end, saying "take my hand baby."
The songwriters had no specific plan as they entered the studio -- only that they didn't want the piece "to ever sound dated."
"We didn't want to have any trendy electronic elements," Tranter notes. "We wanted it to sound classic, timeless and human. We want this anthem of positivity to be played for years to come."