Hi, I am pretty new here. I noticed there was a stickied thread indicating some interest in tutorials about making music for games, and since I've been playing games and making music with computers for a pretty long time I thought I'd take a stab at it.
I have roughly three goals: to show you some good quality (free or inexpensive) tools for making game music, to give a brief step-by-step tour to the basics of using those tools, and to give you some tips on how to “work smart” while composing and arranging, to help you get better sounding results with less frustration.
In this tutorial I will be focusing on
Reaper, a powerful program that will handle almost any aspect of making/recording music. It also has the advantages of being relatively inexpensive ($60 for personal use), there are versions for both Windows and Mac, and you can download the full (no feature restrictions) version with a very generous evaluation policy.
Reaper is a big program with a lot of options, and this is a moderately long tutorial, but I will try to stay focused on “the good stuff” -- the features and tools that are directly useful for composing game music and sound design -- with just enough theory to help you work smarter and be more productive (and sound better) in the long run.
I also want to mention that this tutorial will be discussing the use of virtual instruments (in the form of VST (Virtual Studio Technology) plugins), also known as software synthesizers. This will allow you to make music without any special hardware. Reaper is also very capable of recording and working with traditional audio (vocals, guitars, etc.), but that is beyond the scope of this tutorial.
Let's go ahead and download and install Reaper with the default options. Start it up, configure your audio device if necessary, and you should see a blank Reaper project. Most of the top part of the screen is taken up by the timeline, and some blank space to the left of the timeline (the Track Control Panel) where we will be creating the tracks for our song. Below this is the transport bar, which has some CD player style controls (play, pause, stop, jump to beginning of project etc.) as well as showing song position, tempo (in beats per minute), etc. At the bottom of the screen is the mixer panel, which is somewhat redundant for the purposes of this tutorial (you can toggle display of the mixer section with Ctrl-M) but it does have a Master module in the lower left, which will show you (and allow you to adjust) the volume for the whole project.
Right click in the empty Track Control Panel (to the left of the timeline) and select “Insert virtual instrument on new track” from the popup menu. You can also add a virtual instrument (software synth) to a previously created regular track, but this way we'll save ourselves a couple of steps.
You should see a plugin selection window appear, with a menu on the left with a bunch of categories (JS, VST, VSTi, Instruments, etc.) Click on “Instruments”, and then double click “VSTi: ReaSynth (Cockos)” to create a track with the ReaSynth plugin. ReaSynth is a pretty simple little synthesizer that comes bundled with Reaper and is capable of some nice chiptune-type sounds.
(Side note: VST plugins come in two broad flavors -- instruments and effects. VST instruments (VSTi) create sound by themselves; VST effects process other sounds, such as adding echoes or distortion to an existing track. These two types can be combined; you can have many different effects on a single track, but only one instrument per track).
Along with our newly created track, a window appears titled “FX: Track 1 'ReaSynth'”, we will get back to this in a minute, go ahead and close it for now. You should now see the newly created control strip for our first track.
There's a fair number of buttons and controls here, but we can safely ignore most of them for the time being. Let's take a quick tour of the important stuff:
- Track Name: it probably says “ReaSynth” right now, you can double click the name to change it. Let's call it something like “ReaSynth Bassline”. NAMING STUFF IS IMPORTANT! You wouldn't (I hope!) design a game with a bunch of objects called “object 1”, “object 2”, etc. Working with audio is no different -- give your tracks and clips meaningful names right from the start and you will save yourself lots of time and frustration down the road, when you are looking at a project from six months ago with eight different tracks. Name things!
- To the right of the track name are several buttons, we can ignore all of them for now except for “fx”, “m” and “s”. The “fx” button toggles the FX bin window (the thing we just closed), which shows you the controls for the instrument and effects on the track. “m” allows you to mute an individual track and “s” lets you solo an individual track (that is, mute all tracks except this one).
- Below this are two horizontal sliders, for volume (large slider) and pan (small slider). Go ahead and lower the volume slider to somewhere around -12dB. This is so the track will have plenty of headroom -- plenty of room to get louder if need be. This is one of the most useful tips I will give you! Your tracks will sound better and be easier to work with when you leave yourself plenty of space to tweak the volume. I won't get TOO heavily into the art and science of mixing here, but as a rule of thumb it is better to turn something down than to turn something up -- there are plenty of ways to boost up the volume of a completed track. In the meantime, keep your levels moderately low and turn up your computer speakers if you need to compensate.
Beneath the sliders is a meter strip with a box that says something like “MIDI: All: All Channels”. You don't have to change anything here, but I want to take this opportunity to talk about the difference between MIDI and audio, because it seems to be a common point of confusion. MIDI -- “Musical Instrument Digital Interface” is a protocol that describes musical events, like “play a C# note in the 4th octave” or “change the volume of this note”. MIDI is a lot like sheet music or an old-timey piano roll, it does not contain any actual sonic information, it is only the instructions to make that sound. Usually when a MIDI file plays on your computer -- say you double click on CANYON.MID or play a game with MIDI background music, the computer is relying on a MIDI interpreter built into the sound card or operating system to translate the raw MIDI data into sound (in Windows it's usually called the “Microsoft GS Wavetable SW Synth”). The reason I mention all this is that because that while we are going to be working with MIDI data inside of Reaper, we will be using a different MIDI interpreter -- the VST ReaSynth plugin -- to turn that MIDI data into a .wav or .ogg file (not a .MID file) as the final result.
But enough theory, let's make some noise! Go to the Insert menu up top and insert a New MIDI Item. You should see a blank clip, one measure long, appear in the timeline for our track (note that the timeline ruler has two sets of numbers, the top numbers are measures + beats, the lower set of numbers is minutes + seconds). Since we want to give everything nice descriptive names, go ahead and right click on the clip and select “Item Properties...” (or just press F2) and label the clip (under “Take name”) as something like “bassline”.
Double-click on the clip and let's have a look at the MIDI Editor. On the left is a vertical piano keyboard, labeled by octaves (C4 is middle C) -- you can click on these keys to hear the notes; clicking on the right side of the key produces a louder note than the left side. To the right is the note grid, ruled into 32nd notes by default (you can change the grid size with the grid selector control). Beneath the note grid is the transport, with play/stop/loop controls, and beneath that is the velocity lane, which shows the volume of each note as you draw it in.
Since we're making a simple bassline with this clip, go ahead and set the grid selector to ¼ (a quarter note) -- the bassline is the foundation of the song, so something with a few long-ish notes will sound good. Also, turn on the loop button and press play on the transport so we'll be able to hear the clip take form as we draw in the notes.
If you double click somewhere in the note grid, it places a note or deletes an existing note (a single click previews the note -- you can also use the Insert and Delete keys to add and remove notes). Every time you place a note, it also adds a velocity stem in the velocity lane below, you can drag the tips of these stems up or down to make individual notes louder or softer. You can also fine tune the placement of notes by dragging them around or by dragging the left or right edge of a note -- this will be locked to the grid lines, but you can try choosing a smaller grid size (like 1/8 or 1/16) with the grid selector, or turn off the Snap to Grid button (it looks like a magnet) for finer adjustment (making it so that not every note is EXACTLY on beat can be a good way to “humanize” a track, to make it sound less rigid).
Play around with the MIDI editor a bit until you've got a little bassline loop you like. Mine is just a little 4 note riff based on an A minor chord, and I made the first and third notes (the downbeat) a little louder than the second and fourth notes (the upbeat).
Okay, so far so good, but what if we want to change the tone of the bassline, so it's a little more interesting than just some generic “boop” noises? ReaSynth is a fairly basic synthesizer, but is still capable of some different flavors of sound. Close the MIDI editor window for now and press the green “fx” button on the track control strip to look at the ReaSynth properties.
Most VST plugins have a custom designed interface (often made to look like the panel of an actual hardware device), but ReaSynth just has a number of basic sliders, which is fine for our purposes.
- Volume: This is just another way to adjust the volume of the plugin. There's reasons why it's useful having volume controls at multiple places in the signal chain (this is broadly known as “gain staging”) but that's beyond the scope of this tutorial.
- Tuning: Allows you to fine-tune the pitch of the synth in cents; there are 100 cents between each consecutive key on a piano (e.g. between C and C#) and therefore 1200 cents per octave (from C to C). This can be used for either utility tuning adjustments or special effects (for example, you can duplicate a ReaSynth track and detune one of the tracks by about 7 cents to get a rich “shimmery” sound. Try a bunch of other values!)
- Attack, Decay, Sustain, Release. These controls form what is called an “ADSR Envelope” to shape the volume of the sound. Envelopes are an important part of understanding synthesizers and sound design in general, so allow me to take a moment to explain. Imagine the sound of a piano key being struck. There is an immediate loud note as the key causes a hammer inside the piano to strike a string. That first, loudest part of the piano note is the ATTACK, which then quickly DECAYS a bit and SUSTAINS at a moderate volume, until the player RELEASES the key and the sound tapers to silence a couple of seconds later. Most real-world sounds are more complex than this, but the four stage ADSR envelope turns out to be a decent way to suggest most common types of sounds. A plucked guitar string or a snare drum hit have a very quick attack; a bowed cello or a race car engine revving up have a much slower attack. An organ has high sustain but short release (it will play at full volume as long as you hold down the key, but then silence almost immediately afterwards). A crash cymbal or gong has a long decay but no sustain (you can't hold a note like you can on other instruments). Spend a couple of minutes moving these four parameters around to get a sense for how they interact with one another.
- Waveshape controls: with its default settings, ReaSynth plays a pure sine wave tone (this is also the tone you hear on tv hospital dramas when somebody flatlines), which is a very harmonically “clean” sound but not very interesting. Fortunately we can mix in the sound of other waveforms to spice things up a bit. A square wave (named for the shape of the soundwaves in an oscilloscope) has a hollow sort of sound reminiscent of flutes and woodwinds (and the pulse width modifies the shape of the square wave in a way that's easiest to understand by experimentation). A sawtooth wave has a brighter/sharper tone similar to a trumpet or saxophone. A triangle wave is sort of halfway in between a sawtooth and a sine wave. And the “extra sine” controls allow us to add a second (seperately tuned) sine wave to the mix. Again, it's much easier to get a feel for how this all sounds through experimentation, but if you pursue an interest in synthesis (or sound programming in general), these basic square / sawtooth / triangle / sine waves will pop up time and time again. Anyway, fiddle with the controls until you've got something you like the sound of -- here's what mine looks like:
Okay, now we're getting somewhere. Let's add a simple melody track so we'll have something that we can call a tune. Close the FX window with the ReaSynth controls, then in the main timeline window, drag the right edge of the bassline clip so it's two bars long (so our melody track can be a little longer) -- see how Reaper automatically copies the data in the clip when you resize it so you don't have to copy & paste it multiple times? If you want to turn the two measure loop into one contiguous unit (like say, if you just wanted to change a note in the second bar), you can right click on it and select “Glue selected items”, and the clip changes from two one-bar “chunks” into a single two-bar chunk.
Create a new track by right clicking in the blank space beneath our bassline track and “Insert virtual instrument on new track”. Put another ReaSynth on this second track, rename the track “ReaSynth Melody”, and lower the volume on the second track to around -12dB.
You could Insert a new clip like you did for the first track, but there's another way to quickly add new clips. Click somewhere on an empty part of the screen (to make sure nothing is currently selected), then ctrl-drag in the empty lane of the second track -- you can draw in the clip this way, draw it to be two measures long, the same size as our doubled bassline clip.
Give the blank clip a name (F2 or right click -> Item properties), then double-click on the clip and use your MIDI editor skills to draw in a melody that sounds good with the bassline. You should make your melody an octave or two higher in pitch than the bassline, so that each part of the track sounds distinct. In my sample bassline I used an A minor chord (the notes A, C, E) so I know it's a safe bet that those notes will probably fit well in my melody. But be adventurous! Remember that you can change the grid size (or turn off Snap to Grid altogether), move notes around, change the volume of notes, have multiple notes playing at once (chords), etc. Get creative! Here's what I came up with:
(note that you can use the +/- controls in the lower right to zoom the MIDI editor scale in or out in either dimension)
Not bad, but it still sounds a little dry and uninteresting. I could go in and play with the ReaSynth controls as before, but this time I think I'm going to try adding some effects to the clip instead. Close the MIDI editor, click the “fx” button on the melody track, and right click in the effects bin on the left side (underneath where it says “VSTi: ReaSynth”). Select “Add FX”, choose “VST” from the left side menu, and insert a “VST: ReaDelay (Cockos)”. I won't go into all of the ReaDelay controls in detail, but here are some settings to try with the melody (also you can try some of the built-in ReaDelay presets -- and experiment!):
Whew, that's just a couple of bars of looped music, but I think it could be a nice start for a spooky cave or underwater background theme. Once you've got everything sounding the way you like -- now is a good time to tweak the volume levels of the individual tracks if necessary so that the different parts sound balanced with one another -- you can render the finished results as an audio file (.wav, .ogg, etc.) to load into another application. Just go to File->Render; the default options should be okay for most purposes -- you might consider lowering the Sample Rate from to 44100 to 22050 if you're more concerned with saving space than sound quality, and if you are exporting a .wav file you almost certainly want to make sure the Bit Depth is “16 Bit PCM”.
(here is my completed Reaper project file)That's it for now, I hope you have found this helpful and welcome any questions/comments/feedback/whatever. If you want to learn more about Reaper, the Reaper User Guide is worth a look and there are lots of friendly, helpful people on the official Reaper forum at reaper.fm.
Next time I plan on talking about 3rd party VST plugins (there are LOTS of them, including many good free plugins), percussion, and sound effects.