How to Name Notes in Music Correctly
In Western music, especially in English-speaking countries, notes are named in order of ascending pitch after the first seven letters of the alphabet: A B C D E F & G. Obviously, there are a lot more than seven notes at our disposal, so the letters just repeat indefinitely as we continue to ascend in pitch. This is most easily seen on a piano keyboard where the white notes are laid out as:
ABCDEFGABCDEFGABC etc., etc.—until we run out of piano keys. So, every piano key is named the same as the piano key eight letters lower (or higher), and we say that the relationship (or interval) between the two similarly named notes is one or more octaves (from octo meaning eight).
Having so many different pitches named after just seven letters isn't a problem as the pitch differences are clearly shown by the unique positions of the notes on the music staff. There is also a convention of adding a number after the note name, such as C4, for example, to indicate the octave that any particular note name belongs to. Unfortunately, not all instrument makers or music software producers agree. While most refer to middle C as C4, some, such as Yamaha and a few others, refer to it as C3.
The differences in pitch (intervals) between the original eight successive notes that spanned an octave aren't all equal. In fact there are two such intervals. The intervals between A & B, C & D, F & G and G & the next A are twice as large as the intervals between B & C and E & F. The larger interval is called a whole tone or simply a tone and the smaller interval is called a semitone. Many (if not most) Americans prefer to use the terms whole step and half step respectively for these intervals.
As music evolved, new notes were gradually introduced and inserted between those notes that were a whole tone apart. These notes correspond to the black keys on a piano.
Those new notes were named after their neighbours, with the addition of the word sharp (symbol: ♯) to indicate that the note is a semitone higher in pitch than its lower natural neighbour, or with the word flat (symbol: ♭) to indicate that it's a semitone lower in pitch than its upper natural neighbour. Notes such as A sharp and B flat or such as C sharp and D flat, etc. have exactly the same pitch as each other and are said to be enharmonically equivalent.
Sharps and Flats
Pitches can have more than one name. For example, the black key note that sits between the white key notes, A and B, can be called by either of two names. It can be called A sharp (A#) because it's a semitone higher in pitch than A (but not as high as B) or it can be called B flat (Bb) because it's a semitone lower in pitch than B (but not as low as A). If there's no musical context, then it doesn't matter whether we choose to call the note A sharp or B flat.
You can also see on the piano keyboard that there are no black keys between B & C and between E & F. This is because those pairs of notes are already only a semitone apart, and so it wasn't necessary to try to squeeze any new note between them. This applies to all pitched instruments, of course, not just the piano.
In fact, in music theory, any natural note can be made sharp or flat, and there are contexts in actual music or scales where you can see notes being called B sharp, E sharp, C flat and F flat. Of course, these are just special naming conventions derived from historical contexts; B sharp and E sharp now sound the same as the notes C and F, respectively, while C flat and F flat sound the same as B and E, respectively. There are even musical contexts that call for the use of double sharps or double flats.
Correct Note Naming in a Musical Context
As mentioned above, if there's no musical context, we can choose to call the 'in between' notes by either the flat or sharp name. However, if there is a musical context, then there are strict rules about the correct name to use in any situation.
Major and minor keys have major and minor scales. These scales show the notes that belong to the key of the same name. For example, the scale of F major is F G A Bb C D E F. The 4th note is Bb (B flat), which is exactly the same as A# (A sharp), BUT the correct name in this context is Bb, not A#. That's because adjacent scale notes must use the next letter. The 3rd note is A, so the next has to be named Bb; it can't be named A#. On the other hand, the natural minor scale, G# minor is G# A# B C# D# E F# G#. Now the second note must be called A# and not Bb so that every letter is used in succession. This is a strict rule in naming notes of major and minor keys and scales and there are no exceptions.
When it comes to naming sharp or flat notes that are foreign to the key, another convention is followed. For example, let's say you're writing a song in the key of C major and you have the note F followed by G at some place. You decide you want a note in between. Should you call it F# or Gb? The scale of C major doesn't help as it has neither of those notes. The general rule for naming these so-called chromatically inflected notes is that if they are rising, the in-between note should be called 'sharp' (F# in this example) but if falling, (like between G and F), it should be called 'flat'.
The 12 Pitches per Octave
If we lay out all the note names in music in order of pitch, we have the full musical alphabet representing the twelve notes that span an octave.