Jump to content

  • Log In with Google      Sign In   
  • Create Account

How to implement game music?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
11 replies to this topic

#1 MaskedEpsilon   Members   -  Reputation: 114

Like
0Likes
Like

Posted 09 July 2013 - 12:12 AM

Hey, I'm new and I have a question.

 

I've worked on a couple games but I'm fairly noobish. So far I've only been required to produce audio files in various formats. I was wondering if there are other ways music is commonly implemented in games other than just putting on a .wav file?


Edited by MaskedEpsilon, 09 July 2013 - 12:13 AM.


Sponsor:

#2 SimonForsman   Crossbones+   -  Reputation: 6121

Like
0Likes
Like

Posted 09 July 2013 - 12:53 AM

Hey, I'm new and I have a question.

 

I've worked on a couple games but I'm fairly noobish. So far I've only been required to produce audio files in various formats. I was wondering if there are other ways music is commonly implemented in games other than just putting on a .wav file?

 

for music .wav is a poor format choice due to its large size, you could consider using mp3, vorbis, midi(instrumental only and the exact sound will vary between soundboards but the files become incredibly small), .mod (for tracker music), etc.


I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#3 bschmidt1962   Crossbones+   -  Reputation: 1835

Like
1Likes
Like

Posted 09 July 2013 - 10:53 AM

Hi Masked!

Your question is quite broad to get a proper answer in a simple forum post.

 

Do a search for "interactive Music".  Also, download and try the game audio tools, FMod Studio (from www.fmod.org) and WWise (from audiokinetic.com).  They take wave files and let you morph them into formats that games can use to have your music change depending on what the game is doing.

 

In general your topic is something that people spend weeks teaching, so it's hard to do it justice in a forum response :).

At GameSoundCon, we spend several hours talking about exactly this :)

 

-Brian

.


Brian Schmidt

Executive Director, GameSoundCon:

GameSoundCon 2014:October 7-8, Los Angeles, CA

 

Founder, EarGames

Founder, Brian Schmidt Studios, LLC

Music Composition & Sound Design

Audio Technology Consultant


#4 MaskedEpsilon   Members   -  Reputation: 114

Like
0Likes
Like

Posted 11 July 2013 - 11:35 PM

 

Hey, I'm new and I have a question.

 

I've worked on a couple games but I'm fairly noobish. So far I've only been required to produce audio files in various formats. I was wondering if there are other ways music is commonly implemented in games other than just putting on a .wav file?

 

for music .wav is a poor format choice due to its large size, you could consider using mp3, vorbis, midi(instrumental only and the exact sound will vary between soundboards but the files become incredibly small), .mod (for tracker music), etc.

 

 

Thanks for the tip, Those file types are generally of lower quality though right? Is there a way the lower quality is dealt with?

 

Hi Masked!

Your question is quite broad to get a proper answer in a simple forum post.

 

Do a search for "interactive Music".  Also, download and try the game audio tools, FMod Studio (from www.fmod.org) and WWise (from audiokinetic.com).  They take wave files and let you morph them into formats that games can use to have your music change depending on what the game is doing.

 

In general your topic is something that people spend weeks teaching, so it's hard to do it justice in a forum response smile.png.

At GameSoundCon, we spend several hours talking about exactly this smile.png

 

-Brian

.

 

Thanks for the response! I will definitively look into those tools.



#5 Kylotan   Moderators   -  Reputation: 3338

Like
1Likes
Like

Posted 12 July 2013 - 09:53 AM

Usually the final game will use an mp3 or an ogg but you should still be creating a lossless format like a wav initially. If they ask for a different format, you can convert it to the format of their choosing. The loss in sound quality is usually negligible but that's the user's decision to make.



#6 nsmadsen   Moderators   -  Reputation: 4170

Like
0Likes
Like

Posted 12 July 2013 - 09:57 AM

It really depends on what device(s) the game audio will be running on. As Brian said, there are many tools and methods on how to best implement audio. Could you give us a bit more info on what kind(s) of games and device(s) they're being played on? This will help us give you more specific advice and tips.


Nathan Madsen
Composer-Sound Designer
Madsen Studios

#7 MaskedEpsilon   Members   -  Reputation: 114

Like
0Likes
Like

Posted 12 July 2013 - 08:01 PM

I've worked on an android/ios game and a pc/mac game.



#8 SimonForsman   Crossbones+   -  Reputation: 6121

Like
0Likes
Like

Posted 13 July 2013 - 02:59 AM

I've worked on an android/ios game and a pc/mac game.

 

a few things to help you decide:

 

MIDI and MOD(also XM/IT for some trackers) files are sample based (MOD/XM/IT files use your own samples, MIDI uses the samples provided by the devices MIDI implementation), they are both fairly easy to modify at runtime. You can for example change the speed at which the music or parts of the music (such as the drum track) plays without also changing the pitch or you can just change the pitch of a track or a note without the speed being affected. One set of music tends to consist of several tracks played in parallell (normally each instrument has its own track or set of tracks), MIDI is far smaller than MOD as it doesn't contain its own samples(They're provided by the MIDI implementation(the soundcard or soundcard driver provides them). the quality for both formats depend on the sample quality. For dynamic instrumental music these formats are pretty darn awesome (For vocals they kinda suck, unless you are sampling vocals)

 

WAV and FLAC are lossless formats and their quality primarily depends on the samplerate and size. (FLAC is compressed so for actually deploying the music it is preferable over WAV)

a CD quality wav file (2 channels, 44.1Khz, 16bit) eats up 10MB / minute) , FLAC slightly less, these formats basically store a digital version of the soundwaves sampled at a fixed rate(1hz-4.3Ghz for Wav, 1Hz-655Khz for FLAC) which makes them extremely hard to modify in a sane way at runtime.

 

Mp3, Vorbis(ogg/oga), etc are similar to wav files but have been filtered and compressed using a lossy filter/compression, those formats give you a pretty good tradeoff between sound quality and filesize.


I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#9 nsmadsen   Moderators   -  Reputation: 4170

Like
0Likes
Like

Posted 13 July 2013 - 10:06 AM


I've worked on an android/ios game and a pc/mac game.

 

For mobile you almost always have to use MP3 or OGG (or similar) for streaming music. For loading/off loading one hit sounds like short SFX wav can work but you'll probably need to use a lower spec like 22k. It really depends on what your clients are using to run their audio. For example Unity is great and can take hi-res assets and then export them out for whatever kind of platform the game is launching on. It can even do multiple versions - all from hi-res assets. 

 

But if your client(s) are making their own audio engine, it's really up to what they support. 

 

Things get a bit less restricted when it comes to PC/Mac but it's still a common (and best) practice to stream your music as a lower res file type (MP3, OGG, etc) because otherwise it could really drive down performance. If you're learning FMOD or other forms of middleware be sure to set long files (music) to stream and short files (SFX) as loading into RAM. If you try and load a 2 minute WAV file into memory while running the game, things could get messy! 


Edited by nsmadsen, 13 July 2013 - 10:08 AM.

Nathan Madsen
Composer-Sound Designer
Madsen Studios

#10 MaskedEpsilon   Members   -  Reputation: 114

Like
0Likes
Like

Posted 13 July 2013 - 12:31 PM

Thanks for the responses!

 

 


...

 

...If you're learning FMOD or other forms of middleware be sure to set long files (music) to stream and short files (SFX) as loading into RAM. If you try and load a 2 minute WAV file into memory while running the game, things could get messy! 

 

 

I've never heard the term middleware before, is the term common? Is that a type of tool that a developer might expect me to be familiar with?


Edited by MaskedEpsilon, 13 July 2013 - 12:32 PM.


#11 SimonForsman   Crossbones+   -  Reputation: 6121

Like
0Likes
Like

Posted 13 July 2013 - 12:45 PM

Thanks for the responses!

 

 


...

 

...If you're learning FMOD or other forms of middleware be sure to set long files (music) to stream and short files (SFX) as loading into RAM. If you try and load a 2 minute WAV file into memory while running the game, things could get messy! 

 

 

I've never heard the term middleware before, is the term common? Is that a type of tool that a developer might expect me to be familiar with?

 

Middleware is a common term for non system libraries, engines, frameworks, etc.

 

Basically anything that isn't part of the OS yet provides you with functionality you can plug into your application is middleware.


Edited by SimonForsman, 13 July 2013 - 12:47 PM.

I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#12 bschmidt1962   Crossbones+   -  Reputation: 1835

Like
0Likes
Like

Posted 14 July 2013 - 07:05 PM

I've never heard the term middleware before, is the term common? Is that a type of tool that a developer might expect me to be familiar with?

 

 

In the context of audio, Middleware usually refers to a pair of things.  The first piece is a tool that you, the audio developer, use to create interactive audio content.  It probably has a fancy GUI, and lets you work at a high, conceptual level to create things like interactive sound effects and music.   With this tool, you take your wave fiels, etc and specify how they should be played in response to changes in the game.  The tool outputs a number of files that you then hand off to the programmer.  The second piece is a piece of code (software) the game developer includes with their game.  That code knows how take the files created with the tool and play them back on the system (console, PC, phone, etc.).

 

For audio, "Middleware" usually means it's from a 3rd party-- but sometimes a game developer or game platform will have their own "middleware" tool for you to use.

 

If you're working with a medium/large developer, then they will probably expect you to know how to use the more common tools (FMod, WWise, etc.), or at least be familiar with how they work conceptually.

 

 

Btw, the tool part is almost always free-- the company that makes it makes their money by charging the game developer a license fee to use it.

 

if you're working on a small/indy game, it's less likely you'll be using one of these tools, since they generally cost $ to license for commercial uses.

 

Check out "FMod Studio", from FMod.org  and WWise  (from audiokinetic.com).


Brian Schmidt

Executive Director, GameSoundCon:

GameSoundCon 2014:October 7-8, Los Angeles, CA

 

Founder, EarGames

Founder, Brian Schmidt Studios, LLC

Music Composition & Sound Design

Audio Technology Consultant





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS