Great music sometimes sounds bad, and not only to untrained ears. In fact, the more deeply listeners are steeped in the values of a particular kind of music, the greater the odds that they’ll hear work that defies those values as misguided, deficient, incompetent, or otherwise wrong—in short, bad. This long-standing truth about the way innovation works has been on my mind for the past several weeks, as I’ve dug into the profoundly original and important body of music by the guitarist and composer Mary Halvorson, who released her 22nd album as a leader, Code Girl, this spring.

I’ve been following Halvorson closely for several years; I’ve seen her perform half a dozen times in a variety of settings, including in prominent runs as a headliner at the Village Vanguard and the Jazz Standard; and I’ve included her albums on my list of the 10 best for two consecutive years: Meltframe in 2015 and Away With You in 2016. I find her music exhilarating, unapologetically smart but unspoiled by phoniness or pretense—a blood-pumping challenge and pleasure. Still, I’ve found myself arguing about her with sophisticated people who just don’t like what she does.

Near the end of one of Halvorson’s performances last summer, I congratulated the club manager who booked her on his taste, and he said, “Don’t congratulate me—I can’t stand her music.” I asked him why, and he said, “She sounds like somebody who doesn’t know how to play her instrument.”

It’s a charge of a kind that had been thrown around—or thrown at experimental musicians—for years before Halvorson recorded her first album, the unconventionally pastoral Prairies, at age 25 in 2005. Roy Eldridge, the swing trumpeter, heard Ornette Coleman’s early innovations in free jazz and said, “I think he’s jiving, baby.” Miles Davis, whose own devotion to innovation might have taught him better, sneered at the late virtuoso of tonal freedom, Cecil Taylor, grousing, “Who’s that motherfucker? He can’t play shit!”

We can skip over the matter of the value in not knowing how to play your instrument, since that’s not relevant here. Halvorson, much like Taylor, is an exacting craftsperson as well as a vitally kinetic improviser. She simply thinks and hears differently than musicians and listeners whose minds and ears are frozen in the realms of linear melody and chromatic harmony. She knows perfectly well how to play her instrument, the electric guitar, and the way she chooses to play it is to tease out all the beauty and life in sounds that more conventional artists would dismiss as imperfections.

All her albums until Code Girl have been instrumental showpieces for her freethinking, barrier-crashing guitar work, and they have comprised mostly her own compositions (and some collaborations with her bandmates and duo or trio partners, such as the guitarist Weasel Walter and the trumpeter Peter Evans). Her harmonic conception is defiant; she pokes in and out of conventional harmony to slash an out-of-key chord here, pick a run of dissonant single notes there. And her melodic sense is, often, indifferent to time signatures and bar lines. Her guitar lines blurt out at unexpected times, like calls from another room that interrupt a conversation and prod it in a new and smarter direction.

With Code Girl, Halvorson has created her first project to include songs with words and music, all written by her. Presented as two sets of selections, each with seven titles, Code Girl has 10 songs with lyrics and four instrumentals. The band is a collective of gifted artists who crisscross and blend genres and styles: vocalist Amirtha Kidambi, a singer with a background in both Western classical music and Carnatic music, known in avant-garde circles for leading the ironically named Elder Ones; Ambrose Akinmusire, who is probably the most celebrated jazz trumpeter of the emerging generation; Halvorson on guitar; and the synchronistically unpredictable rhythm section of bassist Michael Formanek and drummer Tomas Fujiwara.

The songs with words that anchor Code Girl are impressionistic and ambiguous, with cryptic lyrics touching on the themes of isolation, loss, and death. The most moving piece, for me, is an 11:30-minute rumination on death by drowning while laughing underwater, “The Unexpected Natural Phenomenon.” The music seems to waft like a body bobbing and sinking, while Kidambi sings the simple, eerie words—”when you die, at least it’s from a laugh”—with a cool, stinging affect of affectlessness.

A couple of the selections, “Accurate Hit” and “And,” are unexpectedly lyrical pieces in the vein of ballads, though they couldn’t fairly be called ballads, because nothing quite fits any classification in Halvorson’s work. One piece, “Pretty Mountain,” is nearly almost a pop tune; it’s like a song broken apart and put back together with its segments out of order—some bits left out and others crunched or stretched to distortion. Others are joyfully serious pieces that fall in no category but float somewhere above a nonexistent place where new music, metal, and Americana intersect. The feeling, overall, is one of experimentation not for the sake of experimentation itself, but to express a sensibility that nothing of any established tradition could accommodate.

While more than a few indisputably brilliant guitarists have contributed to jazz significantly (Django Reinhardt, Charlie Christian, Wes Montgomery, Mary Osborne, and Jim Hall, among others), none of the music’s most important trailblazers (Louis Armstrong, Duke Ellington, Charlie Parker, John Coltrane, and the rest of the Great Men of 20th-century jazz iconography) played the guitar. With Mary Halvorson here now, 22 albums strong in only 13 years, the 21st century already looks radically different, and a guitarist has established herself as a Great Woman for new iconography.