“SAAM (Spanish American Art Museum),” an album featuring three new players, was written after the death of the pianist’s mother in 2020.When Marta Sánchez’s mother died unexpectedly in late 2020, the pianist was at a loss. But Sánchez knew, almost instinctively, where she could process her grief: at the piano, pen and paper in hand, sounding out new music for her quintet.In the decade since she moved to New York from Madrid, the quintet has been Sánchez’s main creative outlet. And since the release of its strong 2015 debut, “Partenika,” it has made itself known as one of the most consistently satisfying bands in contemporary jazz — largely thanks to the well-ordered complexity and openhearted energy of Sánchez’s tunes, which blur the divide between lead melody and accompaniment, steady pulse and unruly drift.The group’s personnel rotates often, but the format has never shifted: a pair of saxophones out front, often in high contrast with one another; a bassist; a drummer; and the tension-raising technique of Sánchez’s piano.As a composer, she culls a lot of her inspiration from life experience, and no matter how technical her music gets, it retains an unpretentious, poignant appeal. (On “Partenika” the deftly sculpted tunes often had prosaic names, like “Patella Dislocation” — yes, inspired by a knee injury Sánchez suffered — or simply “Yayyyy.”) So it’s no surprise that the quintet’s fourth album, “SAAM (Spanish American Art Museum),” is both musically complex and emotionally direct, managing to convey the raw, implacable pain of loss.The quintet’s lineup has almost completely changed since its latest release, “El Rayo De Luz,” from 2019. The saxophonist Román Filiú — a Sánchez collaborator since before she moved to New York — is the only remaining original member, and even he has moved from alto to tenor, making way for the rising alto saxophonist Alex LoRe. The rhythm section is now filled out by two of the most in-demand players on the New York scene: the bassist Rashaan Carter and the drummer Allan Mednard.Quintets are a standard format in jazz; having two saxophones up front, less so. Sánchez’s group has some things in common with Quintessence, a two-sax quintet that the pianist and composer Michele Rosewoman has led, off and on, since the 1980s: an off-kilter, often funky pulse; interwoven saxophone melodies; a dynamic role for the piano, which can either add melodic counterpoint to the saxophones or throw clots of harmony into the mix. But Sánchez — who studied classical piano and composition at a conservatory in Spain — seems ultimately more interested in the chamber-jazz lineage of Lennie Tristano, whose combo in the 1960s featured the saxophonists Lee Konitz and Warne Marsh out front.And there’s no getting around the living legacies of Carla Bley and Guillermo Klein, two pianist-composers who draw folk traditions together with jazz and pop formations, and whose influences loom over Sánchez’s writing. Klein, an Argentine-born big band leader famous for his interleaved, cyclical melodies, was a teacher and mentor to Sánchez in the 2000s, when he was living in Barcelona; she would travel from Madrid for lessons.Polyphonic group improvising was central to early New Orleans jazz, and the joy of hearing horn players trade and haggle over melodies has always been part of the tradition. In Sánchez’s group, it’s more often an element of the composition than of the improvisation — but the two aren’t always cleanly divided: A saxophone solo may give way to a finely stitched three-part melody, then open onto a rugged piano solo.Sánchez was already trending toward a darker, more occluded approach to harmony and melody (they’re often one and the same for her) before her mother passed away. And there’s evidence of that interest all over “SAAM,” not just on the tunes inspired by loss. It’s there on “December 11th,” named for the day she died, and on “The Eternal Stillness,” on which a tired yawn of lissome, high-pitched saxophone harmony leads to a restive, sparring exchange. But it’s also on “Dear Worthiness,” a plangent meditation on the many sources of self-doubt these days, and on “When Dreaming Is the Only,” the album’s fervid, charging final track, on which Sánchez ranges from low rumbles to high, tolling notes to screwy lines and chunky chords, feeding fuel into LoRe and Filiú’s tense saxophone interplay.As a listener, you may end up feeling both energized and overloaded by this music, caught between the desire to keep singing the crisp melodies swimming around your ears and the recognition that you really can’t do it alone.The exception is “Marivi,” the album’s centerpiece and the only track not to include the saxophonists. Instead it features the guitarist and vocalist Camila Meza, a longtime Sánchez collaborator, singing Sánchez’s plaintive melody and lyrics; the trumpeter Ambrose Akinmusire painting in light strokes behind her; and the synths artist Charlotte Greve adding faint textures.The words, in Spanish, are a bereaved soliloquy: One verse translates to “I had imagined that we would have many days/where you would tell me/the secrets of your past.” After Akinmusire takes a solo, Meza returns to the main theme, and he joins her in simple unison. This time, writing from inside a desire that will never be fulfilled, Sánchez has crafted a melody of great simplicity and beauty. When the album ends, it’s one thing you really can take with you.Marta Sánchez Quintet“SAAM (Spanish American Art Museum)”(Whirlwind Recordings) More