Effective Game Music

  • 18 favourites

Index

Stats

2,804 visits, 7,578 views

Translations

This tutorial hasn't been translated.

Tools

The Right Filetype

When dealing with sound assets, it's a whole new world from graphics or most other document formats. Here's a little primer on how sound files work.

Definitions

File-Type: A file extension (e.g. .mp3, .wav, .wma, etc.) is what type of file you are dealing with.

Codec: The specific description of the way the audio is stored and played (e.g. .ogg is a container or File-Type; Vorbis is the codec; .mp3 is the file-type, LAME is the codec).

Sample Rate: The rate at which samples are saved. Generally either 44.1kHz or 48kHz. This is measured in Hz (Hertz) or kHz (thousands of Hertz), a measure of frequency (quantity per a set amount of time, in this case, 1 second). 44.1kHz is the sample rate used on standard CDs.

Bit Depth: Generally 16- or 24-bits. Sometimes 32-bit, but that is not very usual. This number is generally irrelevant for most audio uses. However, some professional composers and many professional film scoring gigs request audio in 24-bit. This is because 24-bit is slightly cleaner than the standard 16-bit. 16-bit is used on standard CDs.

Bitrate: A number expressed in kbps (kilobits per second). This is how much data there is per every second of audio. A higher bitrate, the better fidelity. Low bitrate files have poor fidelity compared to higher bitrate files.

Lossless: Filetypes that are lossless (versus lossy) do not use compression. WAV, AIFF and FLAC are the main types for this.

Filetypes You Might Find in Games

Most game-making programs and languages support using a variety of audio file-types and codecs. The standard ones you will probably see are listed below, with a basic description of their general attributes. Construct supports a variety of filetypes, but officially recommends using .WAV files using the PCM format. This is because Construct converts audio files into the appropriate formats on export. However, this handy list here will help you if you step outside Construct at any point, or have another choice.

.mp3- One of the major forms of audio anywhere is the mp3, or MPEG Layer III Audio file. MP3 files are generally small and can be played in almost any modern playback program.

.wav- WAVE files (along with their less accepted cousin FLAC and Apple-based brother AIFF) are the uncompressed "Bitmaps" of the digital music world. Large and unwieldy, .wav files are only used for short sounds such as sound effects in packaged games.

.aac/.m4a- AAC or Advanced Audio Coding is a slightly better alternative to .mp3. However, it is much less popular (mostly found in iOS and some professional scenarios, as well as with video encoding). AAC bears the same issue as .mp3 explained below.

.ogg- Ogg Vorbis is a newer alternative lossy format to .mp3 and .acc. It has better quality and cleaner compression than .mp3 and .acc, but is less supported. Ogg Vorbis is popular in a number of modern games.

.mid- General MIDI files contain the raw audio information- pitches, times, and instruments. It does NOT contain the actual sounds. This leads to an extremely small size (generally under 1 KB). Only some game engines will support using MIDI files and a playback method must be provided, such as through a Soundfont or the sound card of the user. Construct does NOT have MIDI support (as far as I know).

An alternative to MIDI files are Tracker files, which come in a variety of formats, but must be made in a tracker program. Trackers are more popular with electronic music than orchestral in general. Unlike MIDI, they allow the composer to attach their own samples embedded with the note data to make playback much better controlled as well as other options.

.mp3- Just Don't Use It...

Because .mp3 does not have a standard set for defining what the encoding gap at the start of the file is and also contains metadata at the start, there is a short latency gap (0.005 to 0.01 seconds) at the start of all .mp3 files among other types. Although this is not noticeable when the track is played straight, a track that would otherwise seamlessly loop would have the issue of a tiny blip at the start unless played in a program that can "fix" that (such as iTunes). This means if you use audio intended to loop seamlessly in a game engine, do everything in your power to not use .mp3 for that track. It's just plain annoying.

If possible, consider using .ogg. It's a nice format and compresses better than .mp3 anyway. AAC files are also slightly superior to .mp3. As mentioned above, Construct best works when the raw .WAV files are imported so it can do the conversion work for you. Note that Flash Professional also has this ability.

  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!