I've seen the same note called different names for example the note F# can also be written as Gb. Why is this the case and are there times to use one name over another?
The reason there are multiple names for notes is that the same note may function differently in different contexts. If you just play a single note with no context, then it could have a multitude of different names. For example if you played the note in between F and G you could call it F# or Gb or more obscurely E## or Abbb. They are all valid names and are referred to as enharmonic equivalents, but if you gave more context like you were playing the G major scale or playing a Db minor chord certain note names would make more sense. Typically notes are named based on the scale, chord or interval they are in.
For this, we'll just look at examples in 12 tone Equal Temperament, where are 12 unique notes that repeat every octave. A majority of scales in music contain 7 notes. Each scale degree gets a letter from A to G based on the root of the scale and type of scale. The naming convention for the 12 notes makes the C major scale have no accidentals in it. Using the scale pattern for major the C Major scale has the notes
C,D,E,F,G,A,B,C and can be seen below.
The C major scale has only naturally named notes and the pattern is nice and simple. No accidentals and you see one of each letter name. If we were to start the major scale on D, we would have the notes
D,E,F#,G,A,B,C#,D as shown below.
Like C major you see one of each letter name, but now there are two accidentals F# and C#. Because of the major scale pattern these notes are named this way. Their enharmonic equivalent Gb and Db would not make sense in this context as if they were used we would have the notes
D,E,Gb,G,A,B,Db,D as shown below.
If the D major scale's notes were named this way there would never be an F or C and key signatures would be useless.
Intervals are named based on how far the letters are apart from each other and then by how far the notes are from each other. Because of this the name of the notes affect what the interval is. One example is the notes C to Eb make a minor 3rd which is a common interval seen below.
The notes are C and Eb are a 3rd apart and it can be seen from the skip from one line to another. The enharmonic equivalent of Eb (which is D#) is not a third away thus the interval of C to D# is an Augmented 2nd instead of a minor third.
They sound the same, but they function differently. These intervals are the building blocks of many chords and whether a note is a 3rd or 2nd away makes a difference.
Chords are a collection of 2 or more notes (usually at least 3) and typically they are built in 3rds. The intervals between each of the root note and the other notes is how the chord is named. For example a C minor chord has the notes C, Eb, and G in it. From the C to the Eb is a minor 3rd and the C to the G is a perfect 5th.
Because chords are defined by their intervals, typically there is only one enharmonic equivalent that is appropriate to spell the chord. If D# was used instead of Eb the chord would look like the this.
It is not easy to see that the D# is acting as the 3rd of the C minor chord because it looks like a second. If there are double flats or sharps in a score most likely it is to show what a certain note is functioning as in a chord. For example a C fully diminished chord is spelled C, Eb, Gb, Bbb and consists of a root, minor 3rd, diminished 5th, and diminished 7th.
Typically someone will write the enharmonic equivalent of Bbb (A) to avoid someone reading double flats.
The above is show within the context of Equal Temperament, but the idea is the same if not more important in other temperaments. The only difference is that in other temperaments is not all the harmonic equivalents used above are the same frequency so the distinction is much more important as writing for example an A♯ vs a B♭ will sound different.
Western music is mostly built around diatonic scales -- made up of 7 notes from the 12 notes you get by dividing an octave into 12 semitones.
The "standard" diatonic scale is the major scale, which is is defined as:
- root note
- up 2 semitones
- up 2 semitones
- up 1 semitone
- up 2 semitones
- up 2 semitones
- up 2 semitones
- up 1 semitones (reaches 1 octave from the root -- double the frequency)
(The minor scale is just as "standard", and just has a slightly different pattern)
If you start on C, and count up those semitones, you'll find that they all fall on notes that are neither sharps nor flats - C,D,E,F,G,A,B,C (it's easiest to do this at a piano keyboard).
If you start on another note, you'll find that you land on some sharps or flats.
For example D major: D, E, F♯, G, A, B, C♯, D
... or F major: F, G, A, B♭, C, D, E
One way to think about playing music, is to say "Right, I'm playing in F major, and so whenever I see a B, I'll play B♭."
That's the approach taken when writing music on a stave. The key signature signifies that all Bs are to be flattened. Then, unless marked with an accidental, everything written as a B should be played as a B♭.
So to your question, why sometimes call that note B♭ and other times A♯?
If you think of F major as F, G, A, A♯, C, D, E -- then it's a more complicated system to think about.
With B♭, it's a scale with all the notes, B flattened.
With A♯, it's a scale with all the notes except B; A is sometimes natural, sometimes sharpened. If you write a score using this system, you'd have very frequent accidental marks cluttering the score.
This is sometimes called "the alphabet rule" -- a scale has all the letters of the musical alphabet, A to G.
So, that's why, when playing in F major, we call the black note between A and B, "B♭".
But when would we call it A♯?
B major contains an A♯: B, C♯, D♯, E, F♯, G♯, A♯. A♯ and B♭ are the same piano key; the same fret on a guitar. But in the context of a F major scale it's easier to call it B♭ -- because there is an A natural in the scale. And in the context of a B major scale it's easier to call it A♯, because there is a B natural in the scale.
On a piano, where tunings are locked-in, A♯ and B♭ have exactly the same pitch. On instruments where the player has more control of the pitch, they'll often play the two notes differently. This is because the tuning of a piano is a compromise, with different notes being more or less in exact tune, depending on the key one is playing in. That compromise is necessary because the physics of vibrating strings isn't quite consistent with the practice of dividing an octave into 12 semitones. The details of this are probably beyond the scope of the question as asked.
The multiple names of the notes occur because of the Strict Alphabetic Rule, which states that:
Each of the 7 notes in a standard scale MUST have its own letter of the alphabet.
This rule is because the lines and spaces on the Music Clef do NOT represent notes, they only represent LETTERS of the ALPHABET.
For example on the bottom line of the Standard Treble Clef, the E line, you could write any of the following notes:
Ebb (E Double-flat), Eb, E (Natural), E#, or E X (E ## or E Double-sharp).
The notes above are all COMPLETELY different sounds. The only thing they have in common is that they are notated in terms of the letter E.
In simpler terms, of course, these are the notes D D# E F and F#, and that's exactly how those notes are played!
With this ancient and very clever system you can always get a scale note to have ITS OWN line or space on the Music Clef.
To get a quick grasp of what I mean, play these scales, which all have completely different sounds, but all use the same 7 alphabet letters in the same order:
(#=sharp, b=flat, bb=double-flat, X =## or doublesharp)
D Major: D E F# G A B C# D
D Harmonic Minor: D E F G A Bb C# D
D Melodic Minor : D E F G A B C# D
Db Major: Db Eb F Gb Ab Bb C D
Db Harmonic Minor: Db Eb Fb Gb Ab Bbb C Db
(Fb played as E, Bbb played as A)
Db Melodic Minor : Db Eb Fb Gb Ab Bb C Db
D# Major: D# E# FX G# A# B# CX D#
(E# sharp played as F,
FX or F## or F Double sharp played as G,
B# sharp played as C,
CX or C## or C Double sharp played as D)
D# Harmonic Minor: D# E# F# G# A# B CX D#
D# Melodic Minor : D# E# F# G# A# B# CX D#
Daft though this may seem to the beginner, these are the correct notations ("spellings") of these scales.
Major Scales are easiest learned in the order of Cycle of Fifth, Cycle of Fourths, and should be learned in tandem with both of thier relative minors.
If you want to start to be a superior muscian, you might want to get cracking on the first 7 in the cycle right away:
(H/M = Harmonic/Melodic)
Cycle of Vths---------------------Cycle of IVths
C Major, A H/M Minor -----C Major, A H/M Minor
G Major, E H/M Minor -----F Major, D H/M Minor
D Major, B H/M Minor -----Bb Major, G H/M Minor
A Major, F# H/M Minor -----Eb Major, C H/M Minor
E Major, C# H/M Minor -----Ab Major, F H/M Minor
B Major, G# H/M Minor -----Db Major, Bb H/M Minor
F# Major, D# H/M Minor -----Gb Major, Eb H/M Minor
C# Major, A# H/M Minor -----Cb Major, Ab H/M Minor
Your questions implies that F# and Gb are the same thing which is not exactly true, depending on the instrument you're playing.
Actually it is a fundamental question about why music is written with 7 notes.
Basically, since you were born, your ear is accustomed to hear harmonics that are produced naturally. When a tree is stricken, you hear a sound with a frequency, say a A with 220 vibrations per second, but you hear also double the frequency (440) which is an octave and also triple (660) which is the fifth above the octave.
So our ancestors decided that to define music alphabet we needed to have a reference where each note would also have its octave and fifth.
With these constraints they remarked you could build a scale of only 12 notes that would, almost, obey the rules :
F -> C -> G -> D -> A -> E -> B -> F# -> C# -> G# -> D# -> A# -> E# (~F)
Almost, because the maths don't really compute : when you take the fith inside the same octave basically you are multiplying the frequency by 3 (then dividing it by 2 if needed, to stay in the same octave).
By hoping to circle back to where you start (F), you are hoping that a multiple of 3 (fifth) will one day be a multiple of 2 (octave). That won't happen.
You still have a mismatch of 3^12/2^19 = 531441 / 524288 = 1,0136 or 1,36%
And this is where the trouble began. This little error, which is roughly one ninth of a tone, called a coma, can be heard and be played, and sung.
So, in their great wisdom, our ancestors, beginning with Pythagoras, born 580 BC, tried to respect the purity of the fifth. What this meant was that, depending where you started in the scale, (A,B,C,D,E,F, G), you had not exactly the same intervals, not exactly the same half-tones precisely.
This led, roughly in XVIIth century, to the introduction of the flat, abbreviation b (from bemol or soft B in italian ), who was built symmetrically to the sharp # but going downward.
B -> E -> A -> D -> G -> C -> F -> Bb -> Eb -> Ab -> Db -> Gb -> Cb (~B)
And they had not he same value. You had approximately 1/9 of a tone difference between the F# and the Gb. The reason why we needed both.
However, that made things horribly complicated when you wanted to have different instruments play together. For tuning, it was a nightmare.
The idea that we could cheat a little on the fifth in order to simplify all this mess finally took up, and gradually the "equal temperament" (every halftone equal) became more and more accepted, especially in multi-instrument concerts, and by writing the "well-tempered clavier" in 1720, Bach laid a milestone.
For centuries there was coexistence of the different tunings and musicians got used to differentiate flats and sharps because sometimes, it mattered.
And as a consequence they even got used to write scales even when it didn't matter, for example on the piano, where you can't play differently a flat and a sharp.
Gradually, instruments that could not differentiate between the two, keyboards, guitars, most horns, became the norm, the equal temperament the de facto standard and the idea that there was a difference between sharp and flat finally forgotten by most.
Fast, simple answer.
Each note name, i.e. the letter name, can only be used once in naming notes of the scale.
Everything refers to major scale, built: W-W-H-W-W-W-H
Use every letter A -> G only ONE time in naming scale. (start on letter of key, e.g. -> E for E major, etc.
D major. Following major scale formula you get: D E F# G A B C#
Why the sharps, instead of flats? Use each letter only once. So, you can't go D E Gb G because you are using the G twice.
Just lay out all the letters, starting with the key you are in, and then sharp or flat as necessary.
Bb for example: B C D E F G A -> becomes -> Bb C D Eb F G A Eb: E F G A B C D -> becomes -> Eb F G Ab Bb C D E: E F G A B C D -> becomes -> E F# G# A B C# D#
and so forth. Other posts get more technical and in depth, but this is the easy way to remember.