As John Coltrane was dying of liver cancer, he made it known that he wanted a relatively spare funeral. The service was held on July 21, 1967, at St. Peter’s Lutheran Church, on Lexington Avenue and Fifty-fourth Street, and was presided over by the “minister for the jazz community,” John Garcia Gensel. The funerals of African-American notables have a tendency to stretch out—the astonishing service, in Charleston, for the Reverend Clementa Pinckney went more than four hours; the service for Rosa Parks, in 2005, went nearly seven—but not this one. At Coltrane’s request, Ornette Coleman—backed by two bassists, Charlie Haden and David Izenzon, and the drummer Charles Moffett—closed the ceremony by playing one number, a raging version of “Holiday for a Graveyard.” Later that evening, at the Village Vanguard, Coleman played one of Coltrane’s most haunting ballads, “Naima.”

On Saturday morning, nearly a half-century later, at Riverside Church, John Coltrane’s son, Ravi, played a haunting improvisation on soprano saxophone, accompanied by Geri Allen on piano, over the casket of Ornette Coleman. The song was Ornette’s composition called “Peace,” from his audacious 1959 album “The Shape of Jazz to Come.”

Unlike Coltrane, who was forty when he died, Ornette Coleman lived a long life. He died on June 11th; he was eighty-five. Denardo Coleman, his son and longtime drummer, made sure that his father’s farewell would be rich not only with speeches but with music. For some three hours, many of the graying lions of the jazz world—Pharoah Sanders, Cecil Taylor, Henry Threadgill, Jack DeJohnette, Joe Lovano, and David Murray among them—took to the cathedral’s improvised bandstand to make a righteous noise before the remains of their inspiration and friend.

The ceremony began with a processional led by Bachir Attar and musicians from Morocco whom Coleman first encountered when he visited the country’s mountain villages forty years ago. Michael Livingston, the executive minister at Riverside, noted Coleman’s “revolutionary presence.” And this revolutionary spirit in music, along with his personality—soft-spoken, kind, gentle, elusive, elliptical—was the theme of the day. “Ornette didn’t play free jazz, what he did was he freed_ _jazz,” said Howard Mandel, a critic and one of the speakers. Indeed, Coleman freed it of its reliance on familiar chord changes and harmonic structures. He moved beyond the American songbook, in which even the most brilliant players, like Charlie Parker, often found their source material. Coleman’s sound and approach was so shocking when it first appeared on the scene in the fifties that it led Miles Davis to say, “If you’re talking psychologically, the man is all screwed up inside.”

Perhaps the greatest musician in the pews, Sonny Rollins, did not play. But at some point he must have been thinking about the one time in his career when he and the man being celebrated encountered each other on stage.

Five years ago, at the Beacon Theatre, a flock of brilliant musicians gathered to celebrate Rollins on his eightieth birthday. The highlight came when Rollins was joined by Christian McBride on bass and Roy Haynes, six years older than Sonny and dressed sharp as a tack in a slick white suit, on drums. After playing the Ellington standard “Solitude,” the trio took up a twelve-bar blues by Rollins called “Sonnymoon for Two.”

After a while, the trio settled into an uncertain vamp, with Rollins glancing repeatedly into the dark over his shoulder.

“Ladies and Gentlemen,” he said, leaning into the mic, “somebody told me that there’s somebody in the house that is going to say ‘Happy Birthday’ to me and he’s someplace backstage and he’s got a horn and I wish he’d come out now. He’s here!”

Who’s here? Who? While sitting in the tenth row, I’d heard all sorts of rumors about who might show up. Now, as Haynes impatiently flicked his stick at the snare, snatching looks into the wings, and Rollins soloed huffily in a way that suggested impatience more than flight, you had to wonder if it would be a ghost or no one at all.

After a few more minutes of vamping, out came the unlikely guest: Ornette Coleman, sad-eyed, slouchy, small in his suit, his hat at a sharp angle. The twenty-minute-plus tune was an odd collaboration, a potential disaster. Rollins and Coleman clearly respected one another, but they were radically different in their approaches: Matisse and Picasso trying to agree on a line, an image. But that’s what made it so interesting, as Rollins pushed himself into Coleman’s realm of greater wildness. Even as old men, both were up for the challenge, the unknown, and their pleasure radiated on their faces.

Ornette Coleman’s funeral was full of this sense of artistic limitlessness and spacey experiment, not least when Cecil Taylor—eighty-six, delicate, gnomic—read a poem and then sat down at the piano and played an improvised several minutes that was bursting with ideas. Pharoah Sanders, on tenor, played a solo incantation that invoked the tone of his old bandmate Coltrane. And Jack DeJohnette, on drums, played a dueling call-and-response machine-gun duet with the forty-one year-old tap-dance master Savion Glover.

Maybe the most expectable, yet thrilling, moment came when a quintet led by two tenor players, Joe Lovano and David Murray, played Coleman’s most famous tune, “Lonely Woman.” Coleman used to tell a story about how, before he was able to make a living as a professional musician, he worked in a department store. As he told the literary critic and philosopher Jacques Derrida, “One day, during my lunch break, I came across a gallery where someone had painted a very rich white woman who had absolutely everything that you could desire in life, and she had the most solitary expression in the world. I had never been confronted with such solitude, and when I got back home, I wrote a piece that I called ‘Lonely Woman.’ ”

“Lonely Woman” was released in 1959. With every album, Coleman pushed his music further beyond most of his jazz contemporaries and masters. He wrote and played in a way that seemed intuitive, but which was grounded in his deep knowledge of all the rules of classical harmony and the blues (and his roadhouse days in Texas). To him, each key on the piano was a distinct “color.” He used to talk about the “grammar” of his particular music, freed from a tonal center. He gave his theory of things the name “harmolodics”—a concept that most of his listeners and even many of his collaborators could only vaguely describe or apprehend. “Intuitive logic” was the phrase that one of the speakers at the funeral, the composer Karl Berger, used to describe the approach, though Coleman was hardly without discipline.

Once, on the bandstand, a young sideman asked Ornette, “What should I play?”

“Play what you feel,” Coleman replied.

And that is what the sideman did—until Coleman cut him off.

“That’s not what you feel,” he said.

There is no end to the artists who have been influenced by Ornette Coleman. One of the speakers at Riverside was Yoko Ono. Wearing her customary hat and sunglasses, she came to the microphone and stayed but a minute or so. She paid tribute to her relationship with Ornette over “fifty short years”—including a musical collaboration that bears listening to. And, before she finished, Ono put a heap of what looked like white wool on the lectern.

“I started to knit this scarf for him,” she said, “but I haven’t finished it. I’d like to leave this to his family.”

Denardo Coleman, Ornette’s son, is fifty-nine and looks like a slightly bulkier version of his father. His first appearance on one of his father’s records as a drummer was in 1967, with “The Empty Foxhole,” recorded in September, 1966, when Denardo was ten. Denardo had lost so much with his father’s death, but he seemed immensely proud of the revolutionary spirit that had inspired so many of the artists in the cathedral. “It’s not that he thought outside the box,” Denardo said of Ornette Coleman. “He didn’t accept that there were any boxes.”