There, the visceral, body-shaking impact of deep bass, the hypnotic repetitiveness of the beat, the pealing purity or larger-than-life roughness of the electronic sounds, the lyrics about joy and letting go and feeling love, the dazzling and dizzying lights and the communal energy of a dance floor are all mechanisms for fully experiencing the here and now, kinetically and immediately. Mechanisms evolve — technology has given them a lot more flash and firepower in the digital era — but the aspiration they satisfy may well be hard-wired into our bodies. With or without MDMA, electronic dance music makes for joyful, sociable crowds pumping up the endorphins.

Even though it was cut short, Electric Zoo still offered nearly 100 sets over its first two days, a sweeping survey of dance music. A small, generally underattended tent held die-hards of deep house and techno — John Digweed, Justin Martin vs. Eats Everything, Claude VonStroke, Cassy, Green Velvet, Scuba — playing seamless, incrementally evolving, mesmerizing sets. On the big stages, it brought back many regulars who headline festivals worldwide: Avicii, David Guetta, Tiesto, Benny Benassi, Above & Beyond, Hardwell.

They play the house and trance music whose bouncing, marching beats now also pulsate in Top 10 pop. And because they are now in demand as remixers of pop hits, they can largely string together their own efforts, nearly all moving at the same beats per minute. Hardwell made his set seesaw between earnest vocals and stark, stomping beats; Tiesto modulated smoothly, playing what sounded like one long anthem with a parade of different vocalists. Other house D.J.’s, less eager for singalongs, built different kinds of sets: Sander van Doorn with one dramatic, intensifying, minor-key instrumental wavelet after another, and Madeon with dozens of quick segues from hook to hook, often merely seconds long.

The dominance of house and trance as “big-room” dance music has lately been challenged by dubstep: originally an arty, murky British style that Americans have turned into a swerving, lurching assault, switching from full speed to half speed or unleashing a blast of distortion without warning. Over the last year, dubstep’s most brazen effect — the skidding, shuddering, deep-diving trick called the drop — has made its way into TV commercials and movie trailers; trance and house D.J.’s have also learned it, and more than a few sets at Electric Zoo interrupted the cheerful, steady, head-bobbing momentum of house with a stretch of dubstep.

But the dubstep D.J.’s, some of whom also had main-stage spots this year, strove to stay ahead of formula. Flux Pavilion, Datsik, Dog Blood, UZ and Bassnectar reached toward dubstep’s reggae underpinnings, drew on hip-hop, grabbed some of punk-rock’s momentum and aimed for the unexpected; Bassnectar even tried a remix of Nina Simone’s “Feelin’ Good.” Dubstep is also dealing with an upstart challenge: trap music, emerging out of hip-hop over the last decade. Dubstep is dense and bass loving; trap is hollow, with sparse bass lines, nasal synthesizer riffs and spatters of snare drum.