The notes that can be used are given in the key signature. In written music, you can find the key signature on the left of each line.

The key signature consists of one or more sharps or flats, or none at all. For example, if you see the following bit of music:

This means the scale for this piece has two flat tones (black keys) and five regular tones (white keys). Specifically, B should be played as Bb and E should be played as Eb. This is either the key of Bb major or G minor.

Likewise for a key signature with sharps:

Now we have three sharpened tones — F#, C# and G# — making this either the key of A major or F# minor.

Note: The key signature is not only important for written music. If you play by ear, you’ll still have to work with keys and so you’ll still have to know which notes are sharps and which are flats.

Here is a handy table that lists all major and minor keys with their scales and key signatures:

Major key

Minor key

Signature

Scale tones

C

A min

C D E F G A B

F

D min

F G A Bb C D E

Bb

G min

Bb C D Eb F G A

Eb

C min

Eb F G Ab Bb C D

Ab

F min

Ab Bb C Db Eb F G

Db

Bb min

Db Eb F Gb Ab Bb C

Gb

Eb min

Gb Ab Bb Cb Db Eb F

Cb

Ab min

Cb Db Eb Fb Gb Ab Bb

C#

A# min

C# D# E# F# G# A# B#

F#

D# min

F# G# A# B C# D# E#

B

G# min

B C# D# E F# G# A#

E

C# min

E F# G# A B C# D#

A

F# min

A B C# D E F# G#

D

B min

D E F# G A B C#

G

E min

G A B C D E F#

Of course, melody and chords will from time to time use tones that are not in the key signature. Such tones are called “accidentals”. More about them later.