In October, Hersch started working intently on what he sees as his “most personal and probably most ambitious” effort: “the coma project.” As he conceives of it at this early stage, it will be a concert-length piece with words, music and perhaps multimedia elements, to be performed by a midsize ensemble of a configuration to be determined as the music takes shape. Hersch is developing the new work with Herschel Garfein, the librettist and sometime composer best known for his collaboration with the composer Robert Aldridge on the opera “Elmer Gantry.” “I was still alive for all that time I was unconscious, but the only life I had was in my dreams and nightmares, and they were incredibly strange and sometimes horrifying and sometimes beautiful,” Hersch said. “I was in a lot of physical pain and discomfort. I found out later that I had been restrained — I was strapped to the bed, and the dreams I had were unbelievably weird and mysterious. I’ve been trying to come to terms with what I went through, and the best way I know is to try to express it in music.”

What form will that music take? “It was an incredibly bizarre and sometimes terrifying experience,” Hersch said. “There are no words to describe it. I’m hoping music can.”

To many jazz fans, Fred Hersch is perhaps best known as a gay jazzman — or the gay jazzman, despite the fact that the jazz world, like every sphere of human endeavor in and out of the arts, has always had a homosexual population. Indeed, Hersch’s identity as a gay man — and one with AIDS — has shaped the way his music has been perceived by many people, including his own partner, Scott Morgan. On a cool Saturday morning last summer, Morgan relaxed on the deck of the nice vinyl-sided house he and Hersch have built on the side of a hill in the Pennsylvania woods, and he reflected on Hersch’s image as a gay artist. “One of the reasons that I was attracted to his music was not just his music but the fact that he was an out, gay musician early on — I had him on a pedestal as a musician and as a person,” said Morgan, who has studied both piano and voice and can play standards in the manner of a good rehearsal pianist.

“It impressed me that he was willing to go against the grain from a career perspective,” Morgan went on. “He’s got this incredible core of what he wants and who he is that is kind of amazing to me. I think Fred’s music has an expressiveness and a lyricism that is his own. People say that’s because he’s gay, and I see how people can read into that and say, ‘Well, I hear this sense of emotion, this depth, this lyricism’ — you hear some of that in some of his compositions. Clearly, we are gay, but our lives are not defined by the ‘gay community’ or by being gay.”

If anything has inhibited the ability of Hersch’s music to achieve the broader acceptance that, say, the work of the Marsalis brothers has achieved, it may be the subtlety and sheer loveliness of it — its warmth, its quality of melancholy, traits that Americans conditioned to equate “edginess” and “darkness” with gravity can be slow to take as seriously as music that hits the ears more assaultively. His openness as a gay man is no help here and has surely conspired to feed hoary stereotypes of Hersch and his music as light stuff. As the pianist Jason Moran points out: “Because Fred’s playing is so beautiful, some people don’t take it as seriously as they should. I think some people hear only flowers, but there’s deep soil there. They don’t really understand everything that’s going on. Maybe if he gyrated and groaned and squinted his eyes and made it look hard when he played, they would get it. But Fred doesn’t go for theatrics. Fred at the piano is like LeBron James on the basketball court. He’s perfection.”

Hersch, among the most sensitive of jazz pianists, is acutely sensitive to the proposition that his sensitivity makes his music “gay.” I took up the subject on a walk with him along the gravel path behind his country house. We heard hummingbirds in the beech trees and got to talking about nature and the conception of beauty as a value in gay culture. “I wouldn’t quite say that’s bull, but it’s a very dangerous idea,” Hersch said, slowing his gait. “The compliment I get the most often is, ‘My, you sounded really beautiful.’ I used to think, I want them to say something else, because I felt like that was a kind of, Oh, yeah, you’re gay — so of course you play lyrically and you’re one of the great ballad players. Of course. But now I just don’t care at all what people think. I think music should be beautiful. There’s nothing wrong with beauty. I’m attracted to beauty and lyricism, but I don’t play the way I do because I’m gay. I play the way I do because I’m Fred.”

If his music is sometimes mistaken for soft, its composer never is. Among musicians and other professionals in jazz circles, Hersch’s clarity of purpose and fierceness of will have contributed to his reputation as a fearsome taskmaster. Jo Lawry, the Pocket Orchestra vocalist, remembers as the “foundation stone” of her relationship with Hersch his phone call to her the day after he first saw her sing. Hersch told her that the way she swayed to the beat onstage was a distraction from the music and that she was “jumping all over the place” in her improvisations rather than fully developing her musical ideas.