The shenanigans Zach Galifianakas and crew get up to in "The Hangover" are nothing compared to the protagonist in director Todd Phillips' debut. The maniacal star of 1994's "Hated" slashed himself with razor blades, crapped on nightclub stages and verbally sparred with Geraldo. And that guy -- late punk legend G.G. Allin -- was a real person.

Considering Phillips' deep roots in punk rock, heavy metal and other subcultural genres, defining musical moments like The Cramps and Danzig songs in "The Hangover" or the Metallica and Black Flag jams in "Old School" make a lot of sense. Skate-punk hero Mike Vallely, whose band Revolution Mother was invited by Philips to write a track specifically for the movie, cameos as the tuxedo rental guy who hands "The Hangover" crew their clothes on the freeway.

A couple of the musical moments in "The Hangover" -- like Mike Tyson singing and air-drumming to a Phil Collins song and Ed Helms piano ballad about snoozing tigers -- were created virtually on the spot and yet quickly became some of the most memorable moments in a flick already being quoted on Twitter accounts the world over.

"Music is literally one of the greatest tools you have as a director to set tone, to set mood," Phillips enthusiastically explained during a recent interview with MTV. "It's pretty much, outside of photography, your biggest brush you have to paint with. My favorite directors end up being the ones who understand the power of a good f--king song in a movie."

Case in point: Danzig's "Thirteen," which appears early on in "The Hangover." The former Misfits/Samhain singer doesn't get much play on the radio, but those in the know would recognize his "Evil Elvis" croon anywhere.

"I love Danzig's voice. I've always been a huge fan of his," Phillips said. "And that song in particular, that version is actually a pretty rare version. The movie is about bad decisions and Las Vegas is about luck. And this song is about being unlucky. Before the Danzig song, we have that El Vez song ['It's Now Or Never']. It's a typical title sequence that you'd see in a Garry Marshall movie. Like, 'Oh, I see, it's going to be a wedding movie? When does J-Lo show up?' And then cue Danzig and everything changes. I wanted to be like, 'No, f--k you, this is not one of those Vegas movies.' There's no easier way. You can spend five pages of dialog doing what you can do with one Danzig song."

Growing up in New York City, Todd's first punk show was The Cramps and Murphy's Law at the Roxy. "I was like 14 and it changed my whole life. It informed everything afterwards for me musically." No surprise then that The Cramps shows up on "The Hangover" soundtrack as well.

"It's about using music that you like, but more importantly it's about setting a tone for the whole movie. What I don't like about what's happening in movies is this kind of indie-rock vibe of these very sentimental indie-rock songs. 'The Hangover' seems to people that know me like I put my iPod on shuffle. It wasn't about showing how cool you are in your taste. Some of it is very obvious and fun."

The scene where Mike Tyson plays air drums to "In the Air Tonight" by Phil Collins is definitely fun. "That wasn't even in the script, him singing or anything like that. But when I shot the first day with him, I realized he was really playful. I was like, 'We should have him doing something crazy and memorable.' I wanted to think of a song that was probably playing in all of the gyms when he was working out at his peak. Something that was on the radio, something you could see him training to. A song like 'Eye of the Tiger' but four years later [laughs]. It all happened in a day."

The song that will probably come to define "The Hangover" even more in repeat viewings was created similarly off-the-cuff. "Tom Green sang this song in 'Road Trip,' 'The Salmon Song,' and there are thousands of kids on YouTube doing their own versions. I told Ed [Helms] that was going to happen to the tiger song. I searched the other day on YouTube and there are already kids doing it -- acoustic versions, guys teaching you how to play it on piano. Ed was blown away!"

"Ed is a really good piano player and he would do these jokey Elton John type songs all the time when we'd be on break, because there was a piano there," Phillips said of the originally unscripted scene. "I said, 'We should do a song in the movie.' And he goes, 'Where would it go?' And I said, 'It's perfect after we drug the tiger because we have to wait for the drugs to settle in. It should be about tigers and 'what do tigers dream of?' He wrote the song in basically twenty minutes [laughs]. And we shot it in like a half hour and it was done."

The single most defining musical moment in "Old School" almost didn't make the movie. For starters, Metallica are very choosy when it comes to licensing their music. They had been a band for well over a decade before they allowed anyone to touch one of their songs for a flick and even then, that was a documentary, "Paradise Lost," about a group of kids many people believe were wrongly convicted of murder simply for liking heavy metal.

A longtime fan, Phillips was bound and determined to get "Master of Puppets" into "Old School," for the scene where Will Ferrell, Vince Vaughn and Luke Wilson speed through campus in a sketchy van kidnapping pledges for their new fraternity.

"Metallica was everything to me when I was younger. Getting Metallica into 'Old School' was everything," he says simply. "They didn't know me. I had only done 'Road Trip' which they probably weren't too impressed with. [laughs] We sent them the sequence and we got a call back saying they'd do it. It was the most we had to pay for any song in 'Old School.' I had to convince Dreamworks. But it was just, to me, so f--king key. Sometimes you get hung up on a song and it becomes the fight of the movie."

A similar situation went down with "The Hangover" and Warner Bros. "I really had to fight for the Phil Collins song. It was beyond our music budget. I was just like, 'This is the only one. It has to be. You've got to pick your battles as a director and mine are usually over music. Ultimately, they got it. And they went for it. I actually told them this would be for 'The Hangover' what Metallica was in 'Old School.' They are moments that define a spirit of a movie. What you remember about a movie is the spirit of the film."