# Video-Game Music Structure



## BenG (Jan 7, 2016)

So, I just got a small gig working on a independent video-game and had some questions regarding the structure of game music in general. They need about 20 different themes (Battle, Menu, Main, Hero's, etc.)

*-How does one go about writing a piece/track for a video-game?
-Are there any tips, tricks, requirements?*

From my limited research...

1) The tracks must be loop-able (similar starting and ending)
2) The track must build in layers (Adding more and more)

Any help is truly appreciated!


----------



## AllanH (Jan 10, 2016)

There is more to it than that. I'd suggest you start by looking at fmod, which is one of the most popular sound engines in games.

http://www.fmod.org/


----------



## AllanH (Jan 10, 2016)

You should also look at the most popular game engines. Two good ones include unity3d and unreal. Both allow you to download and develop with their platforms.

Edit: I should clarify, that there are other game engines, but these two are in wide use and lets you get started without having to purchase anything. They are both incredible impressive.


----------



## Jimmy Hellfire (Jan 10, 2016)

Didn't they tell you what they need?

There is no standard procedure. It totally depends on the type of gameplay, the pacing of the game, the kind of feeling and narrative they're trying to achieve etc.

Music only has to loop if it's continuously playing no matter what. It depends on how the game utilizes the music. I did a game where some things did loop and others didn't. The game would switch into a designated combat mode whenever the character got attacked, and from there on, the music obviously had to loop as long as the character was tagged "in combat" by the game engine. So I wrote the piece in a way where the last measure would tie into the first one seamlessly.

But as we obviously couldn't know _when_ the combat state would end - depends on how long it takes before either the player or the enemy dies - we also needed a way to stop the combat music at any point in time without it sounding jarring, or as if someone pulled the cord or something. I solved that by staying in the same key throughout the piece and making a little ending cue that could be punched in on several measures from start to finish. In FMOD I marked all the measures that could serve as transition points, so when the game engine changed the combat state to "off", the FMOD event would play the music up to the next marked measure and then seamlessly punch in the ending cue instead of proceeding normally. I just needed to make sure that the cue fits musically no matter where I punched it in, and that the audio is edited cleanly so that the transition doesn't sound crappy.

Ouside of combat, music was never looped. It wouldn't have made sense for that game, as the non-combat, exploration type passages were rather slow-paced, contemplative ... It would have felt silly to have a full on orchestra blast away, or some repetitive doodle loop all the time in a situation like that. Instead, we had very reduced, atmospheric underscore, sound-design stuff going on, and after some time, or any time the player entered a new location or did something important, the game crossfaded into through-composed, actual music pieces. Those simply played from beginning to the end and then faded back to the soundscape. That's just one way of doing it. Depends on the feel of the game. Games that are constantly fast-paced, or perhaps feel very arcade-y, or old-school, might need a continuously looping soundtrack.

And then of course there's the whole vertical-reorchestration-thing, which is quite popular. It can make sense, but doesn't always have to. Again, it really depends on what the producer and/or art director have in mind. IMO layering works better with stuff that has a fixed tempo, a clearly defined beat etc. It works well with electronic music, rock, hybrid score etc., where one can stack layers of music on top of each other. It's a pain in the ass if the music is more organically composed, more lyrical etc. ...

My approach would be not to concentrate only on the characters or the environments - the obvious stuff. The most impactful and most important "actor" in a game is the player! I would think about things like: how does it feel to play this game? What's this passage of the game about? What is the gameplay about - what is the key gameplay element? Is this about taking your time, discovering stuff? Finding hidden stuff and solving mysteries? Is it about attentiveness? Or is it about fast reaction and mashing buttons? Is it about doing stuff in time? Or about doing stuff as much as possible? As exactly as possible? Avoiding something for as long as possible? What is the player supposed to feel? What's the frequency of control input? Does the game have a rhythm to it?

Think about time and space in the game. What "kind" of time does the game constitute, what kind of time matters? A game like Tetris is all about actual, factual time. Blocks are falling down from the ceiling and it's all about reacting and arranging them before it's too late. A game like Skyrim is more about lyrical time, if you know what I mean. The idea of time is "in a far away land long ago..."

What's the space? Is it more a senso-motoric idea of immersion in space? Like in a racing game: the direction and boundaries of the race track constitute the space that matters to the player. The action within the space is immediate, and there is a direct translation of the player's eye-hand-coordination and bodily motion to their avatar in the game space. Moving a bit too slow, too fast, a bit too far left, or too far right, misestimating a distance within the action space - it all fundamentally matters.

A Point'n'Klick adventure probably has a more spatial-visual conception of space. The actual distances of things along the X/Y/Z-planes don't matter that much. Skill and efficiency of movement input, and reaction time aren't key elements of playing this type of game. Space here is probably more about the illusion of an environment. It's a narrative space. An old manor, an abandoned town, an enchanted forest, an underground lab, whatever. These are places where stories unfold, where things are to be observed, and it's a type of space that is meant to be conquered (progress throughout the game: a success at one point means traversing terrain and unlocking previously unseen locations).

Those are the key informations for musical structure, tempo, instrumentation ... try to not just put together some cues that play in the background. Try understanding the game and writing music that really connects to what it is about, that's when music in games really enhances the experience.


----------



## Rex282 (Jan 10, 2016)

AllanH said:


> There is more to it than that. I'd suggest you start by looking at fmod, which is one of the most popular sound engines in games.
> 
> http://www.fmod.org/



Thanks Allan can you succinctly outline what fmod does.There are a other apps at fmod which ones are needed?

Rex


----------



## Rex282 (Jan 10, 2016)

Jimmy Hellfire said:


> Didn't they tell you what they need?
> 
> There is no standard procedure. It totally depends on the type of gameplay, the pacing of the game, the kind of feeling and narrative they're trying to achieve etc.
> 
> ...



Thanks for the info Jimmy.


----------



## benatural (Jan 10, 2016)

To slightly expand on what J.H. said, you should ask the developer how they want the music to behave in game, since there's a good chance they already know. That will tell you how they are going to handle repetition (ie imediate loops, one shot with a cool down etc). Also, how interactive will playback of the music be? In other words, how reactive will the music be to player input and the game's states? Those things will help you figure out how to write the music.

Also, don't just learn FMOD for its own sake, find out how they're planning to implement the music. Using FMOD will do you no good if they plan on hard coding music triggers. (Not saying learning FMOD isn't valuable, just that it might not be a necessary skill for this particular gig).


----------



## Penthagram (Jan 10, 2016)

I think maybe the indie developer, maybe don´t thought about how to implement the music in the game. Or if they do, they should have told you. If the case is they don´t. I suggest you, that ask them to tell you how is the game. As the best way to implement the music is looking at how is designed the game.

When you have all the information about the game and if they still doesn´t have a plan for music, you can think on the best way of implementing music for the game they are creating : 

For example : " we will have this exploration tune that will crossfade onto this tension tune, that will transition onto this other one" or " i will create layers, that you should add or remove based on this parameters"

The thing is how much you want to get involved in the project and this can be based in a lot of things to assess, how much time do you have, how much money they pay, if you like or not the project, etc etc.

Maybe it´s interesting to you to know which engine are they using : Unity, Unreal, or a propietary one, to know the best options to implement the music over, using middleware solutions or not. All to be decided by the kind of game they are developing..


But maybe another option is just to do the music and don´t care about how it´s implemented. But this is risky, and is a good point to know how your music behaves in a game, as you can get surprised in a very bad way if a good music is badly implemented


----------



## afterlight82 (Jan 10, 2016)

If they have an audio lead or an audio person, leave the implementation mostly up to them, or discuss how it is going to be implemented, but your job is to give them the material. I think knowledge of fmod etc. is great but game implementation can change very quickly during development, and what's applicable one day musically might not be the next. Way better to know how to write it and let someone else worry about the how, than have a crappy transition because you were more focussed on a cool implementation or because they had to change something that broke your clever implementation and the piece won't work any other way.

Ask them what needs to loop, ask them what will go where and what will need to transition into what and how much time, tell them to keep you posted if that changes*, and then write accordingly. The art of writing video game music is making it sound like it _wasn't_ constrained by its inevitable constraints. Give them demos to put in and then go over there and play it. Interact. Discuss. It's a team game.

* i.e. if a piece needs to loop, it needs to not feel like a loop. If there's a transition, it wants (usually) to sound like there wasn't but it progressed naturally. There's exceptions to that rule, obviously, but...there you have it. Sounds easy. Isn't.


----------



## afterlight82 (Jan 10, 2016)

ps a good loop is one that you can hear several times and not think "ooh...how annoying". You can mark your work based on the irritation it causes and how quickly 

There's some looped pieces where I've played a game and it's been the fifth time round and I've barely noticed. Sometimes, you notice the second time around. q.e.d...


----------



## geoffreyvernon (Jan 10, 2016)

Honestly, every game is different and the things you need will be different! There's really no "go-to" answer for this type of things. just like film. what would work is if you spent time studying game audio, scores, game engines. learn them inside and out. study sound pallets.

then i would talk to the developer and ask them what they're looking for. if they want looped tracks. full tracks with beginning and ends. stuff like that. see if you can get them to record game play somehow and score to video. it works a lot easier that way sometimes!

hope this helps!


----------



## BenG (Jan 10, 2016)

Wow, lots to digest!  Thanks to everyone for all of the help!!!

Obviously, I have a lot to learn but definitely have some great stepping stones here. I think the key, as Kimmy mentions, is to really understand the game's intentions similar to a film. Objective, Narrative, Characters, Feel, and so forth. 

I should also say that I was not given much information to go on and perhaps this is where the confusion lies (coupled with my lack fo experience). I was asked to compose many orchestral tracks (2-3 minutes long) in a medieval style for various themes, characters, scenes, etc. 

I will without a doubt and ask more questions to really determine how he sees the music fitting within his game.


----------



## BenG (Jan 10, 2016)

Also, I was wondering if anyone had any online resources that I would be able to use/learn from? Anything is appreciated!


----------



## benatural (Jan 10, 2016)

What are you trying to learn specifically? There are plenty of resources just depends on what you're after. Also, do you play games? Just curious.

Something else you should find out is if thry can give you a build of the game so you can play it yourself. If they aren't sure what the game needs, playing the game yourself might help you understand what to do.


----------



## BenG (Jan 11, 2016)

benatural said:


> What are you trying to learn specifically? There are plenty of resources just depends on what you're after. Also, do you play games? Just curious.
> 
> Something else you should find out is if thry can give you a build of the game so you can play it yourself. If they aren't sure what the game needs, playing the game yourself might help you understand what to do.



In answer to your question, I do not really play games often but am definitely trying to start. Not to say I now absolutely nothing, just not nearly as much as the rest of my generation (Millennials).

I guess I would love to learn more about the basics of writing music for games. (How music should be placed, written, structured, anything introductory)


----------



## Farkle (Jan 11, 2016)

Here are two excellent books (you can get kindle versions of them) written by industry pros:





Winifred Phillips is an industry luminary (God of War, Little Big Planet), and Michael Sweet is a "wise old man" from when game music started in the 80's. Well worth the money.

Mike


----------



## benatural (Jan 11, 2016)

BenG said:


> In answer to your question, I do not really play games often but am definitely trying to start. Not to say I now absolutely nothing, just not nearly as much as the rest of my generation (Millennials).
> 
> I guess I would love to learn more about the basics of writing music for games. (How music should be placed, written, structured, anything introductory)



I recommend playing some games that are in a similar genre as the on your working on. Ask the developer if there are any games they're using as inspiration and play those and listen to how the music is implemented and how it reacts to the actions of the player. I think that will be pretty insightful.


----------



## BenG (Jan 11, 2016)

Yes, was thinking about playing a similar game to get atleast a basic level of how things fit/work. 

*Side note: Would I need to buy a system (PS4, Xbox) or would watching some walkthroughs/gameplay online be sufficient?* 

Also, concerning the books...
Which would be best for a more simplified understanding of creating music within the genre? (Less nitty-gritty, history, etc.?


----------



## Jimmy Hellfire (Jan 11, 2016)

It would perhaps be a bit overkill to go out and buy video games if you're not really into that kind of stuff and don't plan on spending time with it anyway. But perhaps you know someone who's into it? Watching gameplay videos is useful of course, but unlike film, books etc., gaming is an interactive medium. Seeing it just one side of the equation. I guess you could compare it a bit to fighting: watching a martial arts fight on TV is one thing, it's cool and insightful and all ... but only when you step in there yourself, you start to realize what it really is. I'd definitely ask someone who has a console or a collection of PC games to do a few chill sessions - and don't forget put a few beers in the fridge and stuff like that


----------



## Mundano (Jan 11, 2016)

http://www.gamesoundcon.com/


----------



## benatural (Jan 11, 2016)

Jimmy Hellfire said:


> It would perhaps be a bit overkill to go out and buy video games if you're not really into that kind of stuff and don't plan on spending time with it anyway. But perhaps you know someone who's into it? Watching gameplay videos is useful of course, but unlike film, books etc., gaming is an interactive medium. Seeing it just one side of the equation. I guess you could compare it a bit to fighting: watching a martial arts fight on TV is one thing, it's cool and insightful and all ... but only when you step in there yourself, you start to realize what it really is. I'd definitely ask someone who has a console or a collection of PC games to do a few chill sessions - and don't forget put a few beers in the fridge and stuff like that



Depends on what platform the game you're working on is for. If it's for PC (or mac to lesser degree) or mobile, you've probably already got the game hardware you need. But I do recommend playing games to get a basic understanding of how they work. It'd be like writing music for a film having never seen films!


----------

