Key signatures are one of the most useful tools in Western music theory. This foundational aspect of composition gives a piece of music a tonal center within the 12-note chromatic scale while doing away with a lot of troublesome accidentals. Learning the basic ins and outs of key signatures will make your song easier to read and perform.
Instructions
1. Figure out what key (or keys) you're going to use. The best way to do this is to sit down at a piano (or other chromatic chord-playing instrument, like a guitar) and try it out in a few different keys by starting the song on different notes. Observe how the character and tone color of the piece sounds in different keys, and consider how easy it is for you to sing in different ranges (assuming you'll be singing the song--if someone else is going to be singing, consider whether their singing voice is pitched higher or lower than yours). If you're having trouble figuring out which pitch in your song is the first scale degree of the key, the last note of the song will give you your key.
2. Familiarize yourself with the basics of key signature theory. The key of C major is the most basic signature, since it contains no sharps or flats. The other key signatures work by adding one sharp or flat at a time (these are called "accidentals"). The order that these accidentals get added is consistent and goes like this: B, E, A, D, G, C and F for flats, and F, C, G, D, A, E and B for sharps. The key is determined by looking at the name of the second to last flat in the key signature--for example, the key signature with the flats B, E and A is the key of Eb (E flat)--or by looking at the note half a step up from the last sharp in a sharp key signature, as in the key of G major, which has just an F sharp in the signature.
3. Choose a key signature for a minor key, if necessary. For minor keys, write the key signature of the relative major key; this is the key located a minor third (four half steps) above the first scale degree of your minor key. For example, if you want to write a song in A minor, the key signature will be the same as that of C major: no sharps or flats.
4. Write the key signatures correctly on your staff paper. On the beginning of each line of music (on the left-hand side), write (in this order) the clef sign, the key signature, then the time signature before writing the line of music itself. The key signature should be notated with sharp or flat symbols on the staff lines and spaces in the order listed in Step 2, with all symbols written in the middle octave of the staff.
5. Modify your key signature with the correct use of accidentals. During the course of your song, if you wish to write any pitches that fall outside of the key signature, be sure to notate them with the correct accidentals. When writing in a flat key, this generally means using flats to notate the changed pitch (i.e., writing "Eb" instead of "D#"). Also, use natural signs to raise a flat written in the key signature or lower a sharp.