Emmy and Grammy-winning musician and songwriter Adam Schlesinger, known for his work with his band Fountains of Wayne and on the TV show "Crazy Ex-Girlfriend," died Wednesday after contracting the coronavirus.

Schlesinger died at a hospital in upstate New York, his longtime lawyer Josh Grier told The Associated Press. It is not clear where or how Schlesinger, a 52-year-old father of two daughters, contracted the virus. He had been sedated and on a ventilator for several days.

Schlesinger was nominated for 10 Emmys for writing comical songs across several television shows, winning three.

He was also nominated for an Academy Award for writing the title song for the 1997 movie "That Thing You Do," written and directed by Tom Hanks. The snappy pop ditty was the fictional one hit for a Beatles-esque band called the One-ders, later changed to the Wonders, on a label called Playtone, a name Hanks adopted for his production company.

"There would be no Playtone without Adam Schlesinger, without his `That Thing You Do!"' Hanks, who is himself recovering from the coronavirus, said on Twitter. "He was a One-der. Lost him to Covid-19. Terribly sad today."

Raised in New York and Montclair, New Jersey, Schlesinger formed Fountains of Wayne, named for a lawn ornament store in Wayne, New Jersey, in 1995 with his classmate from Williams College in Massachusetts, Chris Collingwood.

With Schlesinger playing bass and singing backup and Collingwood playing guitar and singing lead, and the two men co-writing songs, the band known for its sunny harmonies and synthesis of pop, rock punk and comedy would have hits in 1996 with "Radiation Vibe" and 2003 with "Stacy's Mom." The latter was nominated for a Grammy.

The band was more New Jersey than New York. While most rock bands live for the city, Fountains of Wayne and Schlesinger's writing embraced the suburbs with finely-etched tales of lives like a floor installer who's convinced his crush will come back looking for him and a commuter who's sure about his "Bright Future in Sales."

"That's a real Randy Newman thing," Schlesinger told the AP in 2003. "That's a trademark of his writing that I was always amazed by -- the sort of unaware narrator, where you learn more about him than he does himself inside of a few verses."

New Jersey Gov. Phil Murphy said on Twitter that Schlesinger's death is a "sad, sad loss for Jersey's music scene."

Stephen King, Fran Drescher and many others were also singing his praises on social media.

After Fountains of Wayne's main run was done, Schlesinger would then drop behind the scenes and go on to be known for his writing.

He won the 2009 Grammy for best comedy album for co-writing with David Javerbaum the songs on "A Colbert Christmas: The Greatest Gift of All!" a companion to a TV Christmas special with songs performed by Stephen Colbert and Elvis Costello.

Colbert said on Twitter Wednesday night he that he was "so saddened" to learn of the death of "a great (and patient) and talented artist with whom it was my good luck to work."

In recent years he was known along with the show's star Rachel Bloom as one of the songwriters behind "Crazy Ex-Girlfriend," the musical comedy series on the CW.

Last year, Schlesinger, Bloom and Jack Dolgen won an Emmy for the show's song, "Antidepressants Are So Not A Big Deal."

Bloom was in the hospital having a baby girl while Schlesinger was another hospital across the country with the virus. She said in an Instagram post Wednesday that she, her husband and her baby had returned home safely but it had been the most "emotionally intense" week of her life to be having her daughter while her "dear friend" was suffering 3,000 miles away.

"I have so much to say about Adam Schlesinger that I am at a complete loss for words," she tweeted Wednesday night. "He is irreplaceable."

Working again with Javerbaum, Schlesinger won a 2012 Emmy Award for writing the song "It's Not Just for Gays Anymore," performed by Neil Patrick Harris to open the Tony Awards telecast. They wrote another song for Harris that won them another Emmy the following year.