In the 21st century, the proliferation of internet-equipped consumer electronics enabled a new generation of gender nonconformists to communicate across any distance. Trans kids no longer had to move to New York or San Francisco to speak with others like them; they could use Facebook, Twitter, Tumblr and YouTube to find community. Communication didn’t depend on the presence of the physical body, and even the voice was no longer necessary to speak instantaneously to another person in a different town or a different continent, which was useful if you were trans and still literally finding a voice that felt right in your throat.

Against this cultural backdrop, an increasing number of musicians have begun to make work that unstitches the gendered body from its usual schematic of meaning. In 2010, the Seattle songwriter Mike Hadreas released his debut LP under the name Perfume Genius. He wrote Learning, a raw collection written on piano, while living with his parents and in recovery from drug addiction. The album was quietly popular and Hadreas soon had to figure out how to tour his new songs. He enlisted help from Alan Wyffels, a friend who had taken Hadreas to AA meetings in the early days of his recovery. They proved an excellent musical match, and while playing Hadreas’s songs together, they also fell in love.

In 2014, Perfume Genius released the full-band pop single Queen, a song that would expose Hadreas’s music to an increasing number of listeners. Catchy and assertive, Queen grapples with the uneasy position of living visibly queer in a world that’s not always eager to accept deviations from the heterosexual norm. It’s not exactly a pride song; in celebrating himself as a gender nonconforming sexual other, Hadreas explicitly names the straight world’s fears. “Don’t you know your queen? / Cracked / Peeling / Riddled with disease,” he taunts. “No family is safe when I sashay.” The rock instrumentation nods to a vision of normative masculinity, but Hadreas’s voice undoes it. He is the nuclear family’s worst nightmare, a sick gay artist parading himself through the straight world unashamed.

After releasing his third album, Too Bright, in 2014, Perfume Genius appeared on The Late Show with David Letterman to perform Queen. It was the group’s network TV debut. Hadreas wore a white power suit over a black leather harness. His lips were painted red, and he bent over the microphone while he sang, as if spitting the words up one by one. He danced, haltingly at first and then more fluidly. It did not seem easy for Hadreas to perform before these cameras, but it did seem necessary. At a time when queer culture’s acceptance in the mainstream felt like it depended on queer people’s docility, Hadreas refused to comply. He would not make it easy. He would stand out, a vision of complicated gender and open nervousness, daring straight viewers to subsume him into their bland, restrictive vision of what gay people could be. After decades of conciliatory LGBTQ activists trying to convince the straights that their rights posed no threat to their nuclear households, Hadreas went on live TV and sang: “No family is safe when I sashay.”

Perfume Genius: Queen (live on David Letterman) – video

A week after Perfume Genius’s TV debut, a 25-year-old electronic producer named Arca released the album Xen. Arca had been in the producer’s room during the sessions for rapper Kanye West’s abrasive 2013 album Yeezus, and she would go on to work with Björk on the albums Vulnicura and Utopia. In 2014, she was known mostly for the mixes she uploaded to SoundCloud, which liquefied hip-hop, dancehall, and reggaeton beats into a gleaming stew.

Xen was Arca’s debut LP, and she named it after the feminine alter ego she had cultivated since childhood. “I have this image in my head when I listen to a song of mine that I really love or that I feel happy with. First of all, I feel like I haven’t made it, and second of all, I don’t bop my head, I move really slowly in a very effeminate way,” said Arca in a 2014 interview. “Lastly, I close my eyes and I see this naked being who exists in front of an audience. Everyone is simultaneously attracted to it and repulsed – it looks like it went through suffering but it’s beautiful … This being is actually aware of its sex as a weapon and as a threat. Xen is an ‘it.’ I lean towards calling Xen ‘her’ in response to the fact that society historically leans towards men having more power. Me calling Xen ‘her’ is an equalisation of that.”

Xen appears on the cover of the album bearing her name. Rendered by Arca’s frequent collaborator Jesse Kanda, she’s a vision of distended femininity, with hips that jut out from her small waist. Her long arms are covered in ripples of loose skin. Her upper body is pale white, but her legs are deep red, as if she’s slowly filling up with blood. Certain streaming services pixelate parts of the album’s cover as if it were pornographic. The music lived up to the cover’s promise of corrupted sensuality, offering alien sounds that draw upon recognisable genres without replicating them. The fluidity of the music’s structures echoes the fluidity of Xen’s physicality. Arca explicitly closed the conceptual gap between trans bodies and trans sounds, articulating the queer embodiment that had run through the synthesiser’s history ever since Wendy Carlos powered up her Moog.

In 2013, an English producer known only as Sophie began putting out a series of idiosyncratic electronic pop singles marked by tactile, plasticised synthesiser sounds and tightly processed, hyper-feminine vocals. Songs such as Bipp and Lemonade seized on the breathless tone of women gushing about consumer products in advertisements, pairing that overstated artificiality with indelibly catchy melodies. Hard, the B-side to Lemonade, embellished Sophie’s clanging percussion and rubbery squeaks with lyrics that hinted at a BDSM encounter. At the time, critics assumed that because Sophie was an electronic producer residing in semi-anonymity, she must have been a man. It wasn’t until 2017, when she released the single It’s Okay to Cry, that she began using she/her pronouns in public.

Sophie: Lemonade – video

Sophie’s 2018 debut album, Oil of Every Pearl’s Un-Insides, softens the plastic sheen that coated her early singles. Certain songs hit harder than Hard, but by track four, Is It Cold in the Water?, Sophie applies her deft grasp of software synths to deep, glistening progressions. The dense knot of her music opens up and starts searching. “Is it cold in the water?” vocalist Cecile Believe asks, stretching out the word “cold” at the top of her range, as if wondering if she should jump into the icy depths below. Tracks bleed into each other, now liquid instead of crystalline. It’s not hard to read the album’s middle section as a transition narrative: Is it cold in the water? Should I jump? Should I unmake myself, not knowing what I’ll be on the other side?

Un-Insides solidifies again with Immaterial, a snappy pop anthem seemingly dedicated to legions of “immaterial girls” and “immaterial boys”. Sophie nods to pop icon Madonna’s Material Girl while gently undermining the restraints of material reality, outlining a vision of consciousness unburdened by the body’s narrow social connotations. “I can be anything I want,” declares Believe. “Without my legs or my hair / Without my genes or my blood / With no name and no type of story / Where do I live? Tell me, where do I exist?” Here, in this indeterminate sphere, matter follows the mind, not the other way around. A body is not a prison; it does not close off possibility. It is not a story completed at birth. A body is a prologue, and its story can be written at will.

Throughout the second decade of the 21st century, queer, gender-confounding music bloomed in the underground and the mainstream (and in the blurry overlap between the two), giving new voice to ancient defections from cis gender categories. One of the decade’s biggest emotional gut-punches arrived in the form of Blonde, the 2016 album from Frank Ocean, who came out as queer in 2012. The album is something of an ode to former selves, a sequence of memories tied together by Ocean’s charismatic and often pitch-shifted voice. He remembers being young and homeless. He remembers awkward first dates with other men.

On highlight Nights, his technologically augmented voice rises up the octave as his delivery becomes more tender, more vulnerable, as if breaking away from his masculine-sounding range were a way to soften himself, as if his memories and the way he feels about them could not quite fit within the parameters of acceptable male expression. It’s subtle, but Nights contains one of the most emotionally disarming instances of pitch-shifting, providing Ocean with an opportunity to say the things a lower, more historically fraught voice cannot say. “Staying with you when I didn’t have an address / Fucking on you when I didn’t own a mattress,” he sings gently, remembering his own youthful vulnerability and the moments of intimacy it brought.

‘An emissary of what’s to come’ ... Frank Ocean. Photograph: Publicity image

As Ocean grounds himself in the past, he also situates himself as an emissary of what’s to come. “We’ll let you guys prophesy / We gon’ see the future first,” he sings on Nikes. They’re the first lines sung in Ocean’s natural pitch; for the first part of the song, his voice is artificially raised, cartoonish and young in timbre. When his voice drops, a layer of Auto-Tune clings to it, lending it a sparkle.

In the dreamlike video for Nikes, which takes place at a party that seems to drift in and out of the real world and a better one, Ocean wears perfectly winged eyeliner, glitter, and a balaclava over his face, a shimmering vision of queer revolution. He stares directly into the camera, and then he goes up in literal flames that shoot up his clothing, later extinguished by crew members on site. He lets the viewer enjoy the illusion of his immolation, and then he reassures us it’s just that – an illusion. No harm comes to him. When he starts to sing about prophecy, he appears on an otherwise empty stage in a pearled Balmain jumpsuit, light glancing off his glitter-spangled face as if it were made to touch him. In this moment, he is not a target of oppression within the wider, ugly world. In his own world, he is beautiful, bedazzled, and sublime.

“I am not a big fan of my body and would like to leave it,” Perfume Genius’s Mike Hadreas has said. “Not die, but retain all my thoughts and be free of my body. I have Crohn’s disease, which has caused me to not trust my insides. I feel betrayed by it. I am getting older, and that feels like a betrayal on the outside as well. I do not feel strongly connected to being a man or a woman, which was and still can be confusing. It also doesn’t feel attractive. I feel like it would be more attractive or at least easier to comprehend if I picked a side.” From this confusion, he wrote Wreath, from his fourth album, No Shape. The song builds; its instrumentation snowballs, growing louder and prompting Hadreas to sing more boldly. By the end, it sounds as though his voice could lift off and leave the troublesome fact of embodiment behind.

But the voice rises from a person’s physical form, just like the desire to leave the body behind originates in the body itself. The difficulty of picking a side, too, weighs on the body. Trans people, by transitioning, don’t force one body into a second shape. They let the only body they have grow into itself until it’s whole. Transition isn’t a corruption of gender. It’s a fulfilment.

In this music, I hear a refusal to force the body against its true shape. I hear instead the willingness to let the body choose itself, to let the voice surge up and away from the expectations that would box it in. In their slippery, confounding, and transcendent music, these artists – and the hundreds of others that join them on this path – cast off the claustrophobic moulds that would keep them from themselves. Their music twists into new shapes without names, shapes that open a way into a world that lets in the light.

• This is an excerpt from Glitter Up the Dark, by Sasha Geffen. Used with permission from the University of Texas Press.