harmonix.mp3

When you play a video game, you’re generally on a mission. As you battle your way through various terrain, slaughtering aliens, beheading zombies and reloading your ammo, one key element is with you the entire time: the soundtrack.

You make it to the next level, lost in the rhythm of the game. You zone out, and the music fades into the background. But all the while, it moves the narrative forward. And what might seem computerized to you actually takes a lot of human ingenuity.

"The person needs to be able to hear these songs over and over again and not get annoyed, not let it overpower the game play," said Jason Margaca, a video game composer for Cambridge-based Owlchemy Labs, based outside of Boston. He says the music has to be catchy — but not too catchy.

To be able to do that, you need to have a strong knowledge of music and the technical aspects of mixing and producing music.

Margaca says needs he to be well-versed across all genres of music.

"Classical, jazz, hip-hop, electronic," he said. "Because if I’m going to make a space game, it needs to be techno-y, a horror game needs horror music."

He has all that musical training but also needs the technical expertise to use the right sound effects and filters. So I, with very limited technical know-how, put Margaca to work on creating a theme song for my own video game … not yet on the market. To makes things more complicated, I didn’t have any visuals to guide Margaca, but he was a good sport about it.

"This is a nice test!" he said. "I’ve never done this before, where someone’s like ‘You’re going to make this right now! Just do it!’ Ok, so this is a slow cave where there’s danger lurking around every corner … "

"I think it needs to go like, dah-dahhh-DAHHH," I told him. As I played backseat composer, Margaca tried out various instruments on his keyboard, testing different effects on his computer. Some might argue that what I just did — composing music on a hard drive — cheapens what we value as 'creative' But how does this all play out when music is the prime focus of the video game? I went to the creators of one of the most influential games of the last decade.

"Our goal with Rock Band and Guitar Hero before that was to make this plastic guitar with a few buttons on it, to make that feel as much like a real guitar as possible," said Harmonix Music Systems co-founder Eran Egozy.

Cambridge-based Harmonix did that by hiring legit musicians and composers who know how program the notes of classic, recognizable rock songs into a video game, and make it feel real.

When you’re channeling your inner Jimi Hendrix on your fake plastic guitar, you’re rocking out to a sophisticated computer program that wouldn’t have been possible without expert musicians — or expert programmers. Bad boy rockers may seem like a far cry from desk bound code crunchers, but Egozy says creating music and writing code are more simpatico than you’d think.

"A lot of music is divided into powers of two, and so that notion of you know, one quarter note, 2 eighth notes, four 16th notes, eight 32nd notes, right? And then you look at binary code, which is all powers of two, so it’s two to the first, two to the second,  2, 4, 8, 16, 32. So, it’s basically the same thing expressed into two different medium."

Put that way, it sounds like video games are like math problems, and as it turns out, many scientists say playing video games work our brains’ creative and technical processing.

"It causes the hemispheres to talk to one another and to coordinate their inputs," said Kara Federmeier, professor of psychology at the University of Illinois. She says these kinds of games are a great brain workout – you need to flex many mental muscles to keep track off everything going on in the game.

"You’re doing visual processing, you’re doing problem solving, you’re interacting with other uses in some of the online games," she said. "As we make those environments really rich, then we’re really pushing the brain and getting the most benefit out of it."

So, the two worlds aren’t so separate after all. In fact, put together, they’re a perfect marriage of math, music and a story — one that will last and likely get stuck in our heads.