Find part two of this article here
WARNING: This is a long post. But if you can get through it, you will know a lot of important basics about music theory and production.
As some of you know, I’ve been having a blast with my foray into gamedev. I had never programmed a day in my life before October, and now I’m up to making an iPhone Pong clone so I’m pretty excited about that! More to come in future blog posts. Anyways, I’ve been careening through Beginner Gamedev articles like crazy and I feel it’s time to pay it forward to the gamedev community by providing some music lessons.
While obviously I’d prefer every game developer out there to come to me for music, I think some people want to make their own game soundtracks, and would if they only knew how. Just like any field of study, music can’t be taught in a day, but I wanted to lay down some basics to get people started. Here’s what I’m going to cover in this post:
- Scales, and why you need to understand them
- Chords, and how to form them
- Chord progressions, and how to make them
- Melodies, and how to write them
- Extra effects and plugins that fill out your sound
I’m going to be using GarageBand in this post, so feel free to follow along. If you don’t have a Mac, the theory aspects are still relevant, and the software-related stuff can be easily transferred to another DAW (Digital Audio Workstation).
Scales, and why you need to understand them
Most beginners really hate scales because they’re boring and don’t seem to do anything. The truth is, scales are the backbone of (almost) every single piece of music. There are two main types of scales (and hundreds of less common ones, but I’m not getting into that): major and minor. Besides the type of scale, there are also keys. There are 12 keys in all, one for each note. Every single concept in this post can be applied to every single key, but to keep things from getting too complicated, I’m only going to talk about ‘C’ major today. The key is ‘C’; the scale type is ‘major’.
Here is what ‘C’ major looks like in musical notation (up and down):
Here is what a one-octave ‘C’ major scale looks like on a piano keyboard (notes in red):
Here is what a ‘C’ major scale sounds like:
Now that I’ve shown you the ‘C’ major scale, let’s dissect it. While I am tempted to use musical notation, I will try to avoid it as much as possible because most beginners don’t know how to read it yet. Instead, I will use the piano keyboard. Pro Tip: in GarageBand, if you go to Window->Keyboard, a virtual keyboard will pop up, allowing you to follow along. Or, you can go to Window->Musical Typing instead, which converts your computer keyboard into a piano keyboard. Pretty cool!
Every note in a scale has what is called a scale degree. A scale degree is just a number associated with the note. Here is the scale again, this time with numbers attached:
As you can see, the system is extremely simple. The scale starts at 1 and continues through 8. The last note can be called 8 because it’s the eighth note in the scale, but it’s actually easier to just call it 1 because it’s the same note (just higher). So let’s change it to this:
Before you move on, make sure to soak up the basics of scales. Everything else that follows will build upon this knowledge.
Chords, and how to form them
The most basic type of chord is called a triad. This term is easy to remember because of the “tri” prefix. It is literally a chord with three notes. Chords are formed off of scale degrees. When a chord is formed off a ‘C,’ for example, it is called a “1 chord.” A ‘D’ chord would be called a “2 chord,” and so on. To form a triad on a note, you just skip every other note. Here is a ‘C’ major chord in picture form (the green dots):
As you can see, the first note is ‘C’, we skip the ‘D’, next note is ‘E’, skip the ‘F’, and the last note is ‘G’. To solidify this concept, here are two more triads (F major [blue] and G major [purple]):
If you are in the key of ‘C’, you can form a triad off of any of the 7 different notes in the scale. Whatever note you form the triad off of is called the root. For example, ‘D’ is the root of a ‘D’ minor chord and ‘A’ is the root of an ‘A’ minor chord (pretty simple, eh?).
Remember how we said a chord is named after the scale degree it is formed on? Well, it would get confusing if you called the note ‘C’ “1″ and the chord ‘C’ “1″. Thus, we use roman numerals for chords. Also, just like there are major and minor scales, there are major and minor chords. Another benefit of using roman numerals is that by using upper and lower case numerals, we can discern between major and minor chords (major chords are upper case, minor chords are lower case:
As you can see in the picture, here are the chords based on the roots in the C scale:
- I – C major
- ii – D minor
- iii – E minor
- IV – F major
- V – G major
- vi – A minor
- (vii° – B diminished)
For now, just ignore the vii° chord. It’s a more complex concept and it’s also not used nearly as often as the rest. I promise you it won’t be missed. For the rest of this post, I’m just going to pretend that chord doesn’t exist to make things simpler.
Here is what each of the chords – ‘C’ major through ‘A’ minor – sound like:
There are reasons that some of the chords are major and some are minor, but for now you should just memorize the pattern (major, minor, minor, major, major, minor).
Chord progressions, and how to make them
While some songs only have one chord in them, most have at least three. The great thing about understanding scales and chords is that once you know which chords fit within a scale, it just works. For example, I’m going to shuffle up the order of the chords in ‘C’ major. Here’s a randomized list:
- E minor
- F major
- D minor
- C major
- G major
- A minor
Here is what this progression sounds like (with four beats per chord):
As you can see, even with a randomized list it sounds pretty awesome! Having said that though, putting a little thought into the progression can really make it pop. Here are some common rules and tips that help make a song sound good (like any rule, these are made to be broken, but if you are new to music, you should try to stick to them):
- It’s generally good to start and end on either a “I” or a “vi” chord (in this case, either C major or A minor)
- The “I” “IV” and “V” chords are extremely common
- The “I” chord leads well to the “IV” chord
- The “IV” chord leads well to the “I” or the “V” chord
- The “V” chord leads very well to the “I” chord
It’s really hard to think of some core rules for chord progressions, because they are actually very complex in nature if you really analyze them. This list probably isn’t as good as it could be, but it should get you started.
Side note: the super-famous totally-overused but always awesome-sounding 4-chord progression (there are a few NSFW words in that video). The progression is “I V vi IV” and it’s used in thousands of songs – Journey’s “Don’t Stop Believing,” The Beatles’ “Let It Be,” and Jason Mraz’s “I’m Yours” to name three awesome ones. In ‘C’, the progression would be: ‘C’, ‘G’, ‘Am’, ‘F’. By the way, here’s a short-hand way to write major and minor chords – for major chords, just write the letter (e.g. ‘G’) and for minor chords, write the letter plus a lower case “m” (e.g. ‘Em’).
Here’s a chord progression that I just wrote using some of the rules and tips I mentioned, and then just throwing some other chords in there:
I – (C)
ii – (Dm)
IV – (F)
I – (C)
vi – (Am)
V – (G)
I – (C)
I – (C)
And here is what the progression sounds like:
Here’s a picture of the progression in GarageBand’s MIDI editor window:
Here’s the exact same progression after moving some of the MIDI notes around, adding some doubled notes, and changing the rhythms so the triads aren’t so blocky:
Here’re the MIDI notes after the edits:
Melodies, and how to write them
While melodies are not a necessity in music, they often help tie everything together and keep it from getting boring. To write a simple melody in ‘C’, all you have to do is use the notes in the scale! There are certainly notes that don’t sound as good as others, but for the most part, any note in the ‘C’ scale will fit with any chord in the ‘C’ scale.
Here are some tips for making a good melody:
- Using notes that are also in the current chord usually sounds great. For example, an ‘A minor’ chord includes three notes: A, C, and E. If the melody includes any of those notes while the A minor chord is sounding, it will probably work well.
- Keep the melody within the beat of the song. Rhythm can be pretty complex, and I’m not going to talk about it much here. If you stick to the gridlines of the MIDI window, GarageBand keep the beat steady.
- Use repetition. Sometimes a stupid little ditty can sound great if you just play it twice. Repeating melodic phrases also helps the listener remember it.
- Use variation. While repetition is important, variation is as well. The best is to combine the two by repeating melodic phrases but varying them slightly every time.
- The great thing about MIDI is that if you don’t like the melody you write or play, it’s EXTREMELY easy to change.
Here is a melody on top of the chord progression from the previous section (every single note in the melody is part of the ‘C’ scale):
Extra effects and plugins that fill out your sound
The final thing I want to talk about is how to make your song go from a simple chord progression and melody to something that sounds a bit more professional. Here are three things you absolutely need to be aware of:
Okay I cheated a bit. Automation isn’t an effect, but it’s a way to have complete control over your sound. Let’s start with reverb though. Reverb just makes the song sound like it’s in an actual space with reflective walls. The bigger the virtual space, the more the reverb. In GarageBand, click the “i” in the bottom right, then go to the “edit” tab. There, you can add effects. Here’s a picture of the effects pane:
After adding some reverb onto the instruments, this is what we have:
Before we move on, I need to change one other thing that’s been bugging me about this song. Since I added all the notes in by hand on the computer, there is no velocity information (how hard I hit the notes). It sounds very robotic because every single note is at the exact same loudness. To change the velocity of notes, double click a MIDI region (or select a region and click the scissors/edit button in the bottom left). In that section on the left is a velocity slider. Just click a note then drag the slider:
Here it is after some velocity changes. Sounds a little more human:
Next, let’s add some delay. Delay is basically just echo. In fact, in GarageBand they just call it echo. It’s feeding back the original sound and replaying it as many times as you like. Here it is after some echo is added to the melody line:
Finally, we come to automation. Automation gives you a way to, well, automate things. You can automate pretty much anything. A very common thing to automate is volume. Instead of having to drag the volume slider to fade out a song, you can just set the automation line to do it for you. To get to the automation of a track, click the arrow/triangle button at the beginning of the track:
When the automation section pops up, you first want to select what you are automating. By default you can select either volume or pan, but if you click “Add Automation…” you can automate any effects or plugins you add to the track (if you want to slowly fade in reverb, for example). Once you select what you’re automating, you can click anywhere on the automation line to add a dot. This is what a fade-in looks like:
One cool thing you can do with automation is to automate the tempo of the song. I recorded this song at a steady beat but if I open up the Master Track by going to Track->Show Master Track and select the “Master Tempo” to automate, I can control it however I want (the Master Track is the one that affects everything else). Here is the song with an automated ritard (short for ritardando – “gradually slower”) at the end (unfortunately the audio got a little distorted when I slowed down the tempo):
This is a ton of music theory in one post. It covers a lot so don’t feel overwhelmed if some of it is hard to grasp. However, this is just barely scratching the surface of the tip of the iceberg that is music theory. There are so many little details, rules, and aspects of it. But that’s why I love it. I hope that this gives some people the motivation to learn more on their own. Feel free to ask me anything as well. To finish this epically long post, and to reward those of you who are still reading (if any), I have added some extra instrumentation and effects to our little tutorial song: