After 20 years, electronic dance music has made it big in the US. And big means big. With Las Vegas's Electric Daisy Carnival grossing $40m, and DJ Skrillex commanding rock-star fees, the scene is leaving its druggy underground roots behind and being reborn as bombastic super-spectacle

For anyone who lived through the 90s, the electronic dance music (EDM) explosion in America has an uncanny air of history-repeats about it. Massive gatherings of dancing youths dressed in garish freakadelic clothes? DJs treated like rock stars? Teenagers dropping dead from druggy excess? Didn't this all happen once already? But the phenomenon isn't so much deja vu as a rebranding coup. What were once called "raves" are now termed "festivals"; EDM is what we used to know by the name of techno. Even the drugs have been rebranded: "molly," the big new chemical craze, is just ecstasy in powder form (and reputedly purer and stronger) as opposed to pills.

The main difference between then and now is the sheer scale of the phenomenon. Earlier this summer Electric Daisy Carnival (EDC), the most famous of the new wave of whatever-you-do-don't-call-them-raves, drew 320,000 people to Las Vegas Motor Speedway over the course of three days. The crowds are lured to EDC and to similar dance-fests like Ultra, Electric Zoo, and IDentity not just by the headliner-piled-upon-headliner bills of superstar DJs but by the no-expense-spared spectacle of LED graphics, projection mapping and other cutting-edge visual technology.

Why did it take so long – 20 years – for techno-rave to conquer the American mainstream? Commentators sometimes compare the delay to the 15-year gap between Never Mind the Bollocks and Nevermind: 1991 as the Year Punk Broke America. But in both cases that's a simplistic view of history: the Clash were stars in America by 1980 along with other New Wave acts, and likewise electronic dance music made a series of incursions into the US pop charts over the last two decades, only to be returned each time to the underground.

In the early 90s, KLF and C&C Music Factory, Deelite and Crystal Waters took house into the Billboard Top 40, while raves both illegal and commercial sprouted on the east and west coasts – an escalation that climaxed with 1993's Rave America, which drew 17,000 to the Californian amusement park Knots Berry Farm. Then came a lull until the electronica buzz of 1997, when MTV threw its weight behind the Prodigy, the Chemical Brothers, and Underworld. In the immediate years that followed, Fatboy Slim and Moby achieved ubiquity in TV commercials and movie soundtracks, while trance music of the fluffy Paul van Dyk/Paul Oakenfold type spurred a resurgence of raves in southern California, which by the turn of the millennium reached the 20-40,000 range.

Once again, the momentum dissipated. Radio remained hostile to electronic dance music unless it had a conventional pop song structure and vocals (as with the Prodigy's punk-rave or Madonna's coopting of trance on Ray of Light ). Major labels couldn't work out how to develop electronic acts into albums-selling career artists. The next downturn for electronic music was drastic and for a while seemed terminal. Thanks to nu-metal and cool-hair bands like the Strokes and the White Stripes, rock was in the ascendant again; guitars once more sold more than turntables, a reversal of how things were trending in the 90s. In California, always America's rave stronghold, large-scale parties all but disappeared, while all across the country, clubs moved to smaller premises and weekly events went monthly. The period from 2004-5 was the nadir: some American DJs even emigrated to Berlin, where the work prospects were better.

Watch footage from Electric Daisy Carnival:

Reading on mobile? Click here to watch

How did the US electronic dance scene claw its way back? Basically, by doing its best to shed the word "rave" and all its associations: drugged-up kids slumped on dancefloors, hospitalisations, and the statistically rare but reputation-tarnishing deaths. Repeatedly through the 90s, governments at the state and city level enacted laws and policies designed to stamp out what concerned parents and alarmist newspapers typically called "drug supermarkets". In Chicago, people who threw a party for friends in their own loft apartment, with no paid admission and the DJing performed by the host, could find themselves ticketed for a $10,000 fine. In New Orleans, laws originally drafted to close down crack houses were used against raves and clubs where drug taking was taking place, regardless of whether the promoter or owner was involved in selling the substances.

"The association of techno with ecstasy, we really had to overcome that stigma," says Gary Richards of the LA-based promotions company Hard Events. "If you approach a venue owner or local authority for permits and you use the word 'rave', your business model is doomed." Richards went further than most, actually banning from his Hard Festivals such rave-era "silly stuff" as glow-sticks, dummies, and cuddly toys.

The word "festival" itself represents an attempt by promoters to draw line between today's EDM and 90s rave. From bluegrass and folk to indie and heavy metal, music festivals take place all over the US. Some have their own problems with excessive drug/alcohol use and rowdy, mob-like behaviour (remember the arson and riots at Woodstock in 1999?). But festivals don't have the media stigma or face the punitive legislation and policing that raves do. Older and shrewder by the late 2000s, the early 90s pioneers involved in Hard Events and Insomniac (the company behind Electric Daisy Carnival) learned how to work with the system, going through the bureaucratic hoops required to get permits, and providing the level of intensive security, entrance searches and overall safety provisions that would give political cover to their local government enablers. In contrast with the 90s ethos of throwing raves in exotic and out-of-the-way places such as abandoned buildings, remote farms, and desert wilderness, promoters deliberately sought out in-plain-sight sites: ultra-mainstream venues like sports stadiums and motor sports courses.

The big breakthrough came with the 2010 Electric Daisy Carnival, for which Insomniac's Pasquale Rotella secured the LA Memorial Coliseum: an iconic football stadium that is home to the USC Trojans and also hosted the Olympics. Yet this moment of crossover triumph for the resurgent EDM movement almost turned to catastrophe: Insomniac's bid for respectability was dealt a near-fatal blow with the ecstasy-related death of a 15-year-old girl who somehow managed to bypass the Electric Daisy's age restrictions and get into the event. The outcry that ensued forced EDC out of Los Angeles altogether. Insomniac now stage the Carnival in Las Vegas, a much more congenial and permissive environment that has lately become the Ibiza of North America, a place where superstar deejays like Tiesto have residencies.

"I would never want our scene to grow out of something tragic," says Rotella. "But all that media attention was something that opened people's eyes to how big this scene was getting. It did, I believe, assist in the explosion. Because we were pulling 130,000 people and no one knew. " He points out that before the Coliseum, there were no other dance festivals in the US on anything like that scale. Now there's half a dozen.

Whether or not the 2010 Electric Daisy Carnival really proves there's no such thing as bad publicity, it's equally true that the event showed that the link between EDM and drugs still existed. Because it wasn't just one unlucky teenager. According to the LA Times, "about 120 [EDC] attendees were taken to hospitals, mostly for drug intoxication."

Madonna was recently lambasted for coming onstage at Ultra in Miami and asking the EDM horde: "how many people have seen Molly?" With casuistic adroitness she subsequently made out that she wasn't really referring to the popular powdered form of MDMA but to the dance track Have You Seen Molly? Except that tune is blatantly a drug-is-the-love song in the 90s rave tradition of Ebeneezer Goode, Let Me Be Your Fantasy and Sesame's Treet: it features a GPS-style robot-woman saying: "Please help me find Molly/She makes my life happier, more exciting/She makes me want to dance."

Reading on mobile? Click here to watch

"Molly is short for 'molecule'," explains Nathan Messer of DanceSafe, an organization that provides guidance and pill-testing at raves all across North America. "It's sold in sachets or baggies. Because pressed pills had gotten so diluted with adulterants, everybody wants the powder." Molly's reputation for purity and strength was deserved for a long while, but inevitably dealers have started to cut the powder with other substances.

However determined and stringent promoters might be in their attempts to prevent drugs getting into their events, supply tends to find a way to meet up with demand. According to Messer, the super-size festivals have their own special problems when it comes to drug safety. On the one hand, kids buy dubious substances from dealers they don't know and are unlikely to see again given the size of the venue. On the other, there are no pill-testing facilities: promoters won't have anything to do with outfits such as DanceSafe, because that would be a tacit admission that problems still exist, opening them to the risk of permits being denied or even having equipment confiscated.

"We provide Wonderland. You don't need drugs," insists Rotella. He talks up the "experience" aspect of Electric Daisy Carnival, from its dazzling barrage of state-of-the-art lighting to its dance troupes whose costumes are pitched midway between harlequin and hooker. "It's about giving people that fantasy; that storybook experience. I want to create celebrations. EDC is like New Year's Eve; like Mardi Gras." Rotella says he has got no interest in becoming a concert promoter, putting on events where big name performers are the main draw. "You can see the big DJs in clubs any time. We're doing 'destination festivals'." But he also stresses the role played by the audience: "I like to say our headliners are the fans. They get dressed up."

And how! At Electric Daisy Carnival and similar dance festivals, the look has evolved from the child-like "candy raver" of the 1990s, with their pigtails and cuddly toys and pacifiers (dummies), to a slick and sexified yet also kitschy-surreal image midway between Venice Beach and Cirque Du Soleil, Willy Wonka and a Gay Pride parade: girls in Daisy Dukes and bikini tops (or even bare breasts daubed in glittery body paint) but who also wear tutus, giant furry boots in turquoise and hot pink, and fairy wings.

What the EDC ravers most recall are the "nutbags" and "mentalists" who flocked to Gatecrasher, the Sheffield club that was the focus of the trance boom of the late 90s. Not only is the music they dance to similar (a rehash-mash of trance, house and electro) but the style is a similar mix of child-like, cyberdelic-futurist, and fancy dress.

Right from the early days, there's always been a carnivalesque side to rave culture, from the free party sound systems with names like Circus Warp to the commercial UK raves with their bouncy castles, gyroscope rides, and merry-go-rounds. Clubs, likewise, featured all sorts of eye-candy, from lasers and intelligent lighting to trip-tastic projections of cyber-kitsch graphics. The flicker and dazzle was conducive to hallucinatory drugs and the hi-tech fun 'n' frolics found the perfect interzone between futurism and regression to childhood. The new electronic dance festivals in America have taken this side of rave to the next level.

Daft Punk's set at the Coachella festival in 2006, where they performed inside a huge glowing pyramid, is often cited as a turning point. Soon performers like Deadmau5 were pouring as much effort and money into LED panels and beat-synchronised animated graphics as they did into their music.

What's different about this new breed of audio-visual entertainer is that what they offer are "custom-branded visuals predesigned to fit specific songs". So says Drew Best, a prime mover in the US dubstep scene with his Los Angeles club/label Smog, but also the motion-graphics designer behind the fledgling company Pattern & Noise. In the old days, Best explains, what a VJ (video jockey) or lighting director did was provide improvised accompaniment to the DJ's set. But nowadays Deadmau5 will get a designer such as Best, who worked on the former's recent tour, to create "Pacman-type ghosts" to go with the track Ghosts 'N' Stuff or a "Tron-style" factory with clanking pistons to accompany Professional Griefers. The leading performers on the EDM scene are engaged in fierce competition to out-dazzle each other. Skrillex's Skrill Cell combined projection mapping and motion capture. "Skrillex wore a suit and he had CG characters rigged to it, these 20 foot monsters on a giant wall behind him," explains Best. "The monsters would match Skrillex's every movement as he deejayed onstage."

Watch Deadmau5 live in the UK:

Reading on mobile? Click here to watch

This A/V glitz-blitz costs a lot, but then artists at the Deadmau5 level earn a lot: as much as $1m for a festival appearance, while hardest-gigging-man-in-EDM Skrillex is reportedly worth $15m. With day tickets selling at around $125 and well over 300,000 attending over three days, the Las Vegas EDC must have grossed in the region of $40m. The big money is attracting even bigger money: the mogul Robert FX Sillerman declared his intent to spend $1bn acquiring companies in the EDM field, while Live Nation, America's leading concert promotions company, recently purchased outright Hard Events.

The increasingly bread-head and circus-like aspects of EDM have provoked a backlash from those who feel dance culture is swapping underground intimacy in favour of soul-less bombast that stuns and stupefies audiences into slack-jawed submission. The Wall Street Journal, of all places, recently railed against "The Dumbing Down of Electronic Dance Music" . Long time west coast rave watcher Dennis Romero penned a caustic verdict for LA Weekly on this June's Vegas EDC: "A press-play parade of millionaires going through the motions." DanceSafe's Messer, a veteran of the idealistic PLUR (peace, love, unity, respect) oriented rave underground of the 90s, complains that the dance festivals offer a "packaged, containerised experience ... These events are all about raging hard, getting as fucked up as you can. Not necessarily even about dancing, just being a face in this giant extravaganza."

At the core of many of the complaints is the belief that these entertainment spectaculars are tyrannical in their inflexibility. "There's a lot of stuff that's preprogrammed," says Drew Best. "The tracks in a Deadmau5 set precisely trigger the visual and lighting systems. All the imagery is absolutely on beat, and that beat is 128 bpm. If you see Deadmau5 several times in a row, you might see the same show." Earlier this year Deadmau5 incited a furore with his candid admission that everybody at his level basically presses "play" and his assertion that the true artistry comes into play in the recording studio beforehand, not on the stage. In other words, he's a producer who chooses to publicly represent his sound in person, but not a DJ in the traditional sense: a selector who responds to the mood of the crowd. EDM today has come a long way from the early days of house and techno, when sound was privileged over vision, an ethos enshrined in the title of the 1992 Madhouse compilation A Basement, a Red Light, and a Feeling. In those murky, atmospheric clubs, the deejay booth was often tucked away in a corner rather than placed up on a stage: dancers weren't meant to all be looking in one direction, they were meant to get lost in music, and in the collective intimacy of the dancefloor .

While festivals like Electric Daisy Carnival have amplified the fantasy and fancy dress side of 90s rave, other sectors in the resurgent scene have gone in the opposite direction, concentrating on the music. Hard Festival's Richards wanted to lose the "goofy fashion" side of rave that EDC revels in. "Why do we have to dress up like idiots to listen to this music? All those girls in the furry boots, they look like Clydesdale horses!" As "hard" suggests, Richards presents electronic music as modern rock: an old spirit encased in new digital flesh.

It's a strategy he pursued through the record industry for years. First he worked at Rick Rubin's American label, at a time circa 1992 when the Def Jam co-founder was briefly convinced that techno was the new punk, or the new hip hop: a revolution waiting to take the country by storm. Then Richards ran his own major label imprint 1500 Records. But just like with his stint at American, he struggled to find a way to sell electronic music through the conventional rock channels. By 2005, that was becoming irrelevant, as the industry was struggling to sell records in any genre. So with perfect timing, Richards formed Hard, a live promotions company, catching the rising tide of live performances and festivals. And it's through the live experience – something that can't be shared or bookmarked for later listening, that you have to be present for in real-time – that EDM has really achieved lift-off. Even artists who sell a goodly number of MP3s and make an impression on the Billboard Top 40, such as Skrillex, make the bulk of their income from live shows.

As much as EDM's spread owes a huge deal to the internet and the circulation of DJ mixes and YouTubed tracks via social media and message boards, what's striking about the rise of the leading artists is how much it depends on the old-fashioned rock biz grind of touring. Blood Company, the management team behind Skrillex, specialise in hardcore metal bands such as Atreyu and Revoker. "They used the same strategy with Skrillex, which is putting the band on a bus and going to every town in America," says Drew Best. Last autumn, Skrillex's two-month Mothership tour played 55 dates across the US. "He took my partner at Smog, the DJ and producer 12th Planet, with him and they were stopping at middle-American cities and college towns that aren't even on the radar of your electronic booking agents, whose typical approach is to fly artists such as the Chemical Brothers in to the major cities plus a couple of pre-existing festivals."

In some ways it's odd that no one thought to try this kind of grass-roots, hard-slog approach to breaking electronic artists before. "Performers such as Skrillex are incredibly efficient touring operations compared to rock bands, " says Matt Adell of Beatport, the online music retailer that's something like the deejay's equivalent to iTunes. "It's less expensive than a rock group because there's just one performer, there's much less gear and it's easier to set up because there's no live microphones. So the support team required is so much smaller." Hoping to retrace the path to success taken by Skrillex, Blood Company now have several other electronic acts on their roster, including American dubstep artists the Juggernaut and J Rabbit.

Paralleling the rocktronica approach of Gary Richards, the rise of dubstep in America represents a countervailing force of hardness and darkness at odds with the escapist fantasy side of EDM developed by the mega-festivals. Best points to a September 2006 Radio One show by Mary Ann Hobbs as a critical moment in dubstep's dissemination through North America. "Dubstep Warz was this session where she had all the key DJs on the scene playing tracks, but more importantly talking about the music and the culture. It really painted a picture of what dubstep meant. That show was traded throughout the Internet, to the point where it's almost a cliche to say that it influenced you. Hobbs also talked about Dubstepforum in that broadcast. At that point it had a few hundred users. But subsequently it just grew and grew until it now has a million."

The internet helped to obliterate the time-lag that always used to hamper the US outposts of UK-based scenes like jungle. Because of the dubplate system, whereby the leading British drum & bass DJs played the latest sounds months before their official release, by the time American deejays got hold of the tracks as expensive imports, the UK scene was already six months into the future. But dubstep, as the first fully networked dance scene, is globally synchronized: sound-files are traded more freely and new tracks gets edited out of DJ mixes on pirate radio and posted as YouTube by fans.

By 2007, not only was dubstep accessible in a way that jungle, UK garage and grime had never been, but the music itself was getting more accessible: increasingly in your face, full-on, and hard-riffing. In its formative years, dubstep had been a connoisseur's sound: deep and dark, moody and meditational, appealing to an audience largely composed of former junglists and 90s-rave veterans. Gradually the sound gathered new, younger recruits, proving particularly popular with students. DJs such as Skream and Plastician found themselves playing bigger halls and, consciously or unconsciously, started gearing both their sets and their own productions to what would make a big crowd go nuts. Some observers say the ban on smoking in clubs played its role: with a sly, discreet spliff no longer an option, punters switched to pills and energy levels accordingly rose. Whatever the case, dubstep transformed into a big-room, peak hour sound: proper rave music.

New populist heroes such as Caspa and Rusko emerged, amping up the aggression levels and intensifying the wobble basslines that drove dancers crazy. In the early dubstep, the bass drop was a tectonic quake of sub-low frequencies. But now it shifted into the mid-range, with intricately edited, brutally baroque basslines that contorted and backfired like the solo of a lobotomized guitarist. Multiple bass-patterns and bass-timbres were layered to form a churning slurry, like a chainsaw shearing through sewage. Track titles and artist names played up the expulsive and repulsive aspect of the new style (Stenchman's discography includes Puking Over and The Taste of Vomit) and fans enthused about "filthstep". These abject-yet-inorganic basslines largely stemmed from a single music-making program, Massive. Made by Native Instruments, it's a synthesizer plug-in that sits in a producer's laptop or digital audio workstation and allows him or her to slather different synth-textures together to make the sickest, slimiest bassline.

Listen to The Taste of Vomit by Stenchman:

Reading on mobile? Click here to listen

The Massive sound basically made dubstep massive in the US. A key moment was another widely circulated mix, this time created by the Vancouver-based deejay Excision for the 2008 Shambalaya festival. "Excision isolated the most aggressive, industrial sounding tracks around," says Best. "Nothing but the hardest dubstep. People here ate that up."

Meanwhile, many original dubstep believers were recoiling from the rowdy, macho atmosphere that had descended on the scene. "Brostep" was the derisive term coined to discourage the masculinist tendency, mock it out of existence. According to Best, "bro" brings to mind steroid-stacked frat boys and truck-driving dudes into Monster Energy drinks. But the term began to be embraced as a positive identity. "I've actually been sent demo tracks by people who say: 'I make brostep.'"

Ultimately dubstep's drift towards harder-and-crazier sounds proved unstoppable. In the UK, many of the scene's guardians refused to go along with it and dispersed into the milder, semi-experimental or house-ified realms of "post-dubstep". But in America, outfits like Smog embraced the new direction. For Best, dubstep was moving in to claim the space abandoned by rock, through its retreat during the 2000s into either antiquarian retro irrelevance or the non-visceral gentility of indie, all wordsmith craft and over-embellished arrangements. That space was the perennial demand for a tough, aggressive but forward-looking sound for the release of pent-up frustration.

Choosing venues for their increasingly frequent and well-attended dubstep events, Smog deliberately gravitated to Los Angeles's rock'n'roll venues. "Before I'd done drum'n'bass nights and whenever we'd booked into anywhere polished, it always ended in flames. Bathrooms got trashed, mirrors had tags etched into them. When we started doing Smog, it was same kind of aggressive crowd, so we avoided fancy nights with a dress code and bottle service and went for dark, gritty basement bars. Then a punk rock club called the Echo hooked up with us. Next thing you know at our Smog nights, there's kids moshing and deejays stage-diving."

Nu-skool dubstep has become a locus for generational identity in America, says Best. "The mid-range bass sound just captured the attention of young people. It's like the high-pitched, aggravating sound of a guitar solo in the 70s. Something your parents are going to hate." A video on YouTube, Elders React to Dubstep, plays on this idea: various old folk, exposed to a barrage of bass-screech, offer comments such as "incomprehensible", "like Jackass in a bottle", and, revealingly, "it make me feel like the future is now". They also suggest genre names for the music, one of which is even better than brostep: metalla-purge.

Watch Elders React to Dubstep:

Reading on mobile? Click here to watch

Although not a dubstep artist per se, Skrillex incorporates elements from the genre into his own eclectic brand of high-energy electro-dance. (The name Skrillex could almost be onomatopoeia for brostep's shredded, twisting bass lines.) According to Best, Skrillex attended some of the early Smog nights and noticed the rock-of-the-future vibe, which resonated with his own background as the singer in the screamo band From First to Last.

"In America now, Skrillex is the biggest thing since Nirvana," says Best. "You're witnessing a whole new cultural revolution happening." He thinks the rocktronica tendency is set to intensify with the emergence of artists like Knife Party (two former members of Pendulum, the Australian outfit who turned drum'n'bass into a new form of arena rock) and Mosquito ("Daft Punk meets Prodigy meets Skrillex"). Then there's a figure like Bassnectar, who can play the big carnival-style festivals but also takes his gnarly-but-trippy version of dubstep to events like Electric Forest, where he'll play on the same bill as jam bands like String Cheese Incident. Descendants of the Deadhead culture that was left in the lurch when the Grateful Dead expired, jam band fans have turned onto dubstep in a huge way.

Right now the EDM scene is an uneasy coalition between the slamming rocktronica of Skrillex and Bassnectar and the fluffy feel-good trance-house of DJs like Avicii, Kaskade, Swedish House Mafia, and Steve Aoki. On one side, there's Hard's Gary Richards who wants to push electronic music even further away from rave's disreputable and daft past. On the other, there's Electric Daisy Carnival, which has preserved not just rave's hands-in-the-air euphoria but some of its subcultural ritual aspects too.

Rituals like "tutting", which evolved out of the glove-dances performed by American ravers in the 90s but which now enhances the intricate hand-movements with glowing and flickering LED fingertips. Tutting is both a competitive form of creative expression (breakdancing for hands) and a practice inextricably entwined with drug culture (it's kids putting on mini-lightshows for their tripped-out companions). Hard's Gary Richards can't stand the glove-dance phenomenon: "I'm like, 'look at the stage, not your friend's fingers". But by suppressing this element from his events, he's effectively reducing the participatory aspects of rave that gave it so much of its charm and distinctiveness as a subculture.

"Without the people, it's nothing," says Pasquale Rotella. "The day it's turns into just a concert, I'm not going to be inspired anymore." What the success of Electric Daisy Carnival shows is that if you provide people with a forum in which they can experience a sense of collectivity and occasion along with sheer sensory overload, they don't really care whether it's "underground" or not. Rotella says his dream and long-term plan is to build "an adult Disneyland."

• Simon Reynolds is the author of books including Energy Flash: A Journey Through Rave Music and Dance Culture and Retromania: Pop Culture's Addiction to Its Own Past