The magic of dance music can transform feelings of isolation into a sense of belonging, and the trick works just about anywhere — even in the Virginia Tidewater area where Marissa Benecke and Rae Kim met on the campus of William & Mary in 2012. The college classmates bonded over music, Benecke taught Kim how to DJ, and the duo eventually started spinning techno records on “thirsty Thursdays” at a nearby student bar. “This was small-town Colonial Williamsburg,” Benecke says. “So we were definitely trying to bring electronic music there.”

Things got a little easier once they relocated to Northern Virginia after graduation. Having named themselves TonalTheory, Benecke and Kim soon found their place in the greater-D.C. dance-music community and began producing tracks.

The music itself begins in an unlikely place, too. Instead of building off a beat, a TonalTheory cut often starts with whatever piano melody forms beneath Benecke’s fingertips. “It definitely helps us see everything in a musical sense,” Kim says. “Marissa will lay down some chords and all the technical details. Then I’ll try to bring in more big-picture, macro stuff.”

The standout track on TonalTheory’s new “Distorted Mind” EP, “Alone In December,” illustrates the process, with pastel melody surging and receding through brittle rhythmic cracks. Benecke says the song is seasonal, designed with the listener’s well-being in mind. “We come from an Asian background where [the discussion surrounding] mental health has a stigma,” Benecke says. “In my situation, I felt like I couldn’t really ask for help, so this was my way of expressing it.”

That should make “Alone in December” feel especially resonant over a nightclub sound system. A song about escaping loneliness fills a space where people gather to do exactly that.

Shows: Dec. 6 at 10 p.m. at L8 Lounge, 727 15th St. NW. l8dc.com. $5 advance, $10 at the door. Dec. 13 at 8 p.m. at Flash, 645 Florida Ave. NW. flashdc.com. $8-$15. Dec. 31 at 10 p.m. at ROAM. Address will be announced to ticket buyers after purchase. Tickets available at residentadvisor.net. $15-$20.

TonalTheory will also DJ on Eaton Radio on Dec. 7 from 1 to 3 p.m. Listen at eatonworkshop.com/radio.