On the go and no time to finish that story right now? Your News is the place for you to save content to read later from any device. Register with us and content you save will appear here so you can access them to read later.

In 2013, Lukasz Gottwald, aka uber-producer Dr. Luke, sat in the presence of a New Yorker reporter and, with one of the many young women he helps turn into recording stars, dissected the right way to make a new song go viral. Luke had quite the résumé, having worked with Pink, Avril Lavigne and Katy Perry, among many others. Making a hit, he contended, wasn't just a matter of putting verses, choruses and middle eights in the right places. It was a matter of letting a song posted to YouTube or Vevo gain an online life of its own. And, although the songs he worked on might be formulaic, there was no formula in publicizing a No. 1 hit.

"Did Katy [Perry] tweet it?" Luke asked Bonnie McKee, a singer-songwriter he was working with at the time.

This week, Luke has more on his mind when it comes to Kesha than how many people follow her on Twitter. The singer has accused the producer, with whom she started working at 17, of rape, and sued to get out of a contract with him. And although a judge ruled against her last week, Kesha has found many famous allies - including Taylor Swift, who gave the diva $250,000 for legal expenses.

On Monday, Luke took to Twitter to respond - at length - to allegations that he compared to Rolling Stone's discredited University of Virginia rape story.

"Until now I haven't commented on the lawsuits, which should be resolved in court not here on Twitter," he wrote in a series of tweets. "It's a shame that there's so much speculation out there basing itself on so little information. The only truly objective person who knows the facts is the judge. The judge did not rule in Kesha's favor on Friday."

"I understand why people without all the information are speaking out," he wrote. "I can appreciate their compassion. But lives can get ruined when there's a rush to judgment before all the facts come out. Look what happened at UVA, Duke etc. Of course any sane person is against rape and sexual assault but everybody who is commenting is doing so without knowledge or facts. They are getting behind an allegation only - motivated by money."

Then came the denial.

"I didn't rape Kesha and I have never had sex with her," Luke wrote. "Kesha and I were friends for many years and she was like my little sister."

I didn’t rape Kesha and I have never had sex with her. Kesha and I were friends for many years and she was like my little sister.

Such words struck a dissonant chord in Luke's heretofore unblemished rise to the top. Since he got his start DJing, playing guitar in the Saturday Night Live house band and remixing hip-hop artists, the marijuana dealer turned impresario has cranked out chart toppers devoted to love, love lost and partying through the night for mass consumption. His list of collaborators - Miley Cyrus, T.I., Rihanna, Britney Spears and Usher to name but a few - makes him look like a modern-day Phil Spector. One producer offered even higher praise.

"Nobody knew that Luke was going to become the Beatles of our generation, or whatever he is," producer David Baron told the New Yorker. "He wrote tracks that were pretty awesome, but they were a lot like other people's tracks. And then, when he had that first hit with Kelly Clarkson, it still sounded like Luke, but he had become a great songwriter."

Why is Luke so consistent? It's hard to say.

Lukasz Gottwald aka Dr. Luke. Photo / AP

"It's not just 'Do you want a hit?' " he told American Songwriter in 2011. "More importantly, it has to be something we - the artist and I - like. If you go in just wanting a hit song, it's not going to happen that way. You have to first be committed to making music you like."

Still, there is a set of best practices.

"For people that are making music, there are certain classic progressions," he said. "Find those standard chord progressions that a thousand songs have been written with and try to find great melodies to go over that. If you can name six hit songs that were written on those three chords then you know there's a hit song to be written there."

With such ammunition, Luke said, an artist cannot fail to hit the target. Or, if they do, it's their fault.

"Then there is no excuse," he said. "You have to write something stellar then."

Example No. 1: Luke and Kesha. According to the producer, he enjoyed a great working relationship with the singer in the days before they were at odds in New York's Supreme Court. Tik Tok, Kesha's ubiquitous 2009 anthem, just sort of bubbled out, all fizz and pep ready for the radio.

Although some may say the lyrical content is vapid - "Tick-tock on the clock/But the party don't stop, no" - the lyrics don't really matter. This isn't Wallace Stevens's The Emperor of Ice Cream - Luke's creations don't convey information, but create a mood, a vibe, a feeling. And Luke doesn't write the words anyway, having deemed lyric-writing "not fun."

"Well, we started with an idea, a kind of beat kind of thing," Luke said in 2010. "And Kesha came in and she just worked those verses in two seconds, not thinking about it. We might have changed a word here or there. Then we started doing choruses and coming up with different choruses. We worked the chorus about three or four different times, and changed the lyrics a little bit here and there. The bridge was the last thing we did and kept, as we were doing it. It happened pretty quickly, at least the initial genesis of it. I spent time afterward tweaking it and mixing it perfectly, adding little elements that probably no one else will ever hear. But the gist of it was certainly done pretty quickly."

What Luke spends more time on, the New Yorker revealed, is data analysis. Each song and artist brings a different set of numbers to be crunched. Twitter followers. YouTube streams. Sales. Views. Likes. Shares.

"I'm a bit of a numbers junkie," he said.

And, in different times, Kesha approved of the approach.

"No matter what kind of song he's doing, he will work his ass off and stop at nothing until it is the best," she said in 2010. "If it was a polka song, he'd made it the best ... polka song in the entire world. He never half-asses anything."

Pop star Kesha leaves Supreme court in New York, Friday. Photo / AP

Kesha's allegations are unlikely to challenge Luke's statistical dominance - an impressive haul of 37 top 10 hits on the Hot 100 chart by 2014, as Billboard noted that year. What's now in question is his personal legacy, and whether the artists his empire depends on will continue to seek him out now that he's under a cloud.

"I would like it if they left thinking, 'Man, he's a cool dude,' " he said in 2010. " 'He treats people right.' I'd like that."