“You know, I had the idealistic notion, when I was 20, that I was going into the theater,” Stephen Sondheim once said. “I wasn’t; I was going into show business, and I was a fool to think otherwise.”It was a remark characteristic of Sondheim, the titan of musical theater whose decades’ worth of credits as a composer and lyricist included “West Side Story,” “Company” and “Into the Woods.” Here he was as many had seen him in interviews over the years: unsentimental and a bit flip, self-effacing to the point of selling himself short.Because among musical theater artists of his generation, Sondheim, who died in 2021 at 91, was arguably the most artistic — challenging, unusual, incapable of superficiality in a medium often dismissed as superficial. He was, perhaps to his disappointment, not the best businessman, with shows that rarely lasted long on Broadway. And his work was better for it.Sondheim has always had a dedicated fan base, but right now his musicals are true hot tickets with substantial real estate on New York stages. Recently, it was possible to take in four Sondheim shows in a single weekend: “Merrily We Roll Along” and “Sweeney Todd” on Broadway, “The Frogs” in a starry concert presentation by MasterVoices, and “Here We Are,” his unfinished final work, completed and in its premiere run at the Shed.From left, Lindsay Mendez, Jonathan Groff and Daniel Radcliffe in “Merrily We Roll Along” on Broadway.Sara Krulwich/The New York TimesTogether, they form a portrait that helps in considering Sondheim’s place among American composers. I say American because Broadway, alongside jazz, is the most homegrown of this country’s music, and his work constantly pushed the art form further. Where so many of his colleagues have operated within standard structures, he, even in writing a 32-bar song, seemed to always ask, “What else is possible?”It’s also important to consider Sondheim as a distinctly American composer because his writing reflects a creative mind repeatedly fixated on the idea of his homeland, with an ambivalence by turns affectionate and acerbic. It’s there in his lyric contribution to “Gypsy,” arguably the Great American Musical, which the musicologist Raymond Knapp has described as “a version of the American dream that leads, as if inevitably, to striptease.” And it continues, with an unconventional patriotism in “Assassins” and a revealing journey across state lines and years in “Road Show.”In that sense, Sondheim is not only one of the finest American composers, but also one of the most essential.“He and Lenny are at the top of that list,” Paul Gemignani, Sondheim’s longtime music director, said, referring also to Leonard Bernstein. “Most Broadway composers are writing pop tunes. Steve never wrote a pop tune. ‘Send in the Clowns’ got lucky.”Sondheim seemed fated to create musical theater at a higher level than his colleagues. Like Bernstein, he was pedigreed: His mentor, for lyric writing, was Oscar Hammerstein II, of Rodgers and Hammerstein; for composition, the modernist Milton Babbitt. Yet he emulated neither.In an interview with the Sondheim Review, Sondheim said that he was trained by Hammerstein “to think of songs as one-act plays, to move a song from point A to point B dramatically.” But he thought of them in more classical terms: “sonata form — statement, development and recapitulation.”And while Sondheim composed with the spirit of an avant-gardist, he was more of a postmodernist than Babbitt, though he described Babbitt as a closet songwriter who admired Kern and Arlen as much as Mozart and Schoenberg.“The first hour of each of our weekly sessions would be devoted to analyzing a song like ‘All the Things That You Are,’” Sondheim recalled, “the next three to the ‘Jupiter’ Symphony, always concentrating on the tautness of the structures, the leanness and frugality of the musical ideas.” Genre didn’t matter; craft did, which is why one of their most influential lessons entailed how a Bach fugue built, as Babbitt put it, an entire cathedral from a four-note theme. Sondheim would later do the same in the score of “Anyone Can Whistle.”As a university student, Sondheim wrote some juvenilia as a lyricist-composer — most intriguingly, fragments of a “Mary Poppins” musical that predates the Disney movie by over a decade. But, after a false start, his first professional credit was as the lyricist on “West Side Story.” “Gypsy” followed, with music by Jule Styne, but it wasn’t until “A Funny Thing Happened on the Way to the Forum” that Broadway saw its first show with both music and lyrics by Sondheim.He was often asked which came first, the music or the lyrics. The most accurate answer is probably sometimes one, sometimes the other, sometimes both, but with a deference to clarity of text. Like Wagner, who wrote the librettos of his operas, Sondheim wanted his lyrics to be heard and understood; his vocal lines resemble those of Janacek and Debussy, whose dramas unfurl with the rhythm of speech.Hal Prince, left, and Sondheim in 1988.Kyle Ericksen/Getty ImagesSondheim’s most prolific, and ambitious, period began with the concept musical “Company” (1970) and his collaborations with the eminent producer and director Hal Prince. Gemignani said that, together, they “never compromised on bringing their ideas to life.” It was during this period that Sondheim emerged as a postmodernist in the vein of John Adams, with a deep well of references presented with a wink or sincerity, but above all with dramaturgical purpose.That might be why “Follies,” from 1971, has been called a “post-musical musical.” Its score abounds in pastiche — what is “Losing My Mind” if not a Gershwin tune from an alternate universe? — and artful irony, such as dissonances that betray the darker truth of “The Road You Didn’t Take.”For “Pacific Overtures” (1976), Sondheim took a similar approach to Puccini in “Turandot,” by putting authentic sounds — in this case, Kabuki music — through his own idiomatic prism. But, like Puccini, he suggests rather than represents, unable to escape a Western perspective while purportedly telling a story from a Japanese point of view. It’s a contradiction that doesn’t serve the musical as well as the more globalist style of “Someone in a Tree,” a song that brought a simplistic American Minimalism to Broadway.Inspired by the spareness of Japanese visual art, Sondheim composed an analogue in a song that does little more than develop a single chord, over and over. As Philip Glass and Steve Reich were applying a world-music sensibility to the classical sphere, Sondheim wrote his own kind of repetitive phase music. “It’s not insignificant that when I met Steve Reich,” Sondheim later wrote, “he told me how much he loved this show.”He was on culturally surer ground with “A Little Night Music” (1973), in which the idea of variation is applied to waltz-like melodies in three. He wrote that his favorite form was the theme and variations, and that he respected Rachmaninoff’s “Rhapsody on a Theme of Paganini.” This musical came closer to that piece than anything else Sondheim wrote, with a hint of Sibelius.“The Frogs,” presented by MasterVoices, at the Rose Theater at Jazz at Lincoln Center in November.Erin Baiano for The New York TimesSondheim’s sound, like that of any good postmodernist, was both consistent and chameleonic, never more so than in “Sweeney,” which displays his genius and misguided musical beliefs in equal measure.Aside from “Passion” (1994), it is Sondheim’s most operatic work in sensibility and craft, yet he bristled at the idea of “Sweeney” being called an opera or an operetta and once wrote that “when ‘Porgy and Bess’ was performed on Broadway, it was a musical; when it was performed at Glyndebourne and Covent Garden, it was an opera.” (That’s not true. It was always an opera, and played on Broadway at a time when many operas did.)All told, “Sweeney” is a hybrid of music theater, one that brings in yet another medium: cinema. Sondheim believed that, with all due respect, “John Williams is responsible for “Jaws,” not Steven Spielberg.” His score for “Sweeney” is similarly rich with edge-of-your-seat underscoring, while the lyrics are both ingenious and inherently melodic. Sondheim was proud of the opening line of “The Ballad of Sweeney Todd,” and rightfully so: “Attend the tale of Sweeney Todd” sets a mood of theatrical artifice and anachronism, with a piercing consonance in the T’s as unsettling as Nabokov’s “tip of the tongue taking a trip of three steps down the palate to tap, at three, on the teeth” in “Lolita.”Josh Groban, left, and Annaleigh Ashford in “Sweeney Todd” on Broadway.Sara Krulwich/The New York TimesHere, it must be said, that the sound of Sondheim would not be such without a crucial collaborator: Jonathan Tunick, his orchestrator to this day. (The scores of all four shows I recently attended were arranged by him.) Sondheim composed at his piano, then sang through while accompanying himself; from there, Tunick teased out the textures of his playing into entire instrumental ensembles.In an interview, Tunick said that you can’t overthink the process. “I was able to tell a great deal, not only from the actual notes but from the way he played them,” he added, “the way he phrased, the way he attacked a chord.” He described the transformation as, more than anything, “Dionysian.” At its fullest, the arrangement on Broadway now, the “Sweeney” score abounds in colorful flourishes and bone-rattling horror, the fluttering in the winds in one song as delicate as the low brasses are chilling at the start of “Epiphany.”If “Sweeney” reflects a worldview, a pretty dismal one, that speaks to America only allegorically, a more direct view of the country emerges in later works. “Merrily” comments obliquely on the period of history it covers, with the space-age promise of Sputnik giving way to cynical neoliberalism. And American themes are even more overt in the shows that brought Sondheim back together with John Weidman, the book writer of “Pacific Overtures”: “Assassins” (1990) and “Road Show,” a troubled musical that went through multiple revisions and titles before premiering in its final form in 2008. Both shows are flawed — “Road Show” structurally, and “Assassins” for its disturbing pageant of mental illness — but reflect the promise and tragedy of the American dream.“Assassins” goes so far as to propose “Another National Anthem,” which reads as a litany of disenfranchisement from a cast of characters who all feel let down by a system that was supposed to work for them; it’s not far from the complaints that fueled distrust of government today and the rise of Donald J. Trump.Micaela Diamond, left, and fellow cast members in the premiere run of “Here We Are” at the Shed.Sara Krulwich/The New York TimesMore barbed yet is “Here We Are,” in its sendup of elitism and the privilege of both apathy and revolt. For better and worse, the score has a valedictory spirit, recalling earlier work without quoting it exactly, and the lyrics contain satirical observations that wouldn’t be out of place in “Company.”My generation of theater fans came of age loving “Into the Woods,” which, because of its enduring popularity as theater for children, will remain onstage far into the future. But the Sondheim works most likely to last, from a purely musical perspective, are those that least readily show their age, and happen to be classical-leaning and postmodern: “Follies” is timelessly Broadway; “A Little Night Music,” universally elegant; “Sweeney,” perennially effective.Gemignani called “Sweeney” Sondheim’s “Porgy and Bess.” Like that show, it has played in Broadway theaters and opera houses alike. And like that show, it’s the masterpiece of a great American composer. More