Just learning music theory.

The Star-Spangled Banner, https://www.musicallthetime.com/printable-pdf/star-spangled/star-spangled-banner-for-recorder-alto.pdf

This piece is written in Key of F with one accidental - Bb.

However, every B in the piece is natural and there are no accidentals so why wouldn't this be said to be in Key of C?

  • 8
    Some 'expert' once told me it was in F Lydian, due to those B naturals!
    – Tim
    May 6, 2021 at 15:30
  • 8
    This is a great example of the difference between key and scale. It's perhaps also worth noting that the raised fourth degree is a nineteenth century modification of the tune.
    – phoog
    May 6, 2021 at 23:00
  • 2
    @phoog that's a really great point about the original. May 7, 2021 at 17:39
  • 1
    Every B in the piece is not natural. Check the last four bars of the piece. Feb 1, 2022 at 17:12
  • @BrianTHOMAS Yep. "And the rockets red glare, the bombs bursting in air", et cetera. There are plenty of B flats in the melody alone!
    – user45266
    Feb 1, 2022 at 21:17

7 Answers 7


The first section is all tonic (F) and dominant (C) chords in the key of F. Many of the dominants are approached by a secondary dominant (G). It's slightly unusual to bring in secondary dominants so early in a tune I suppose. Nothing worth calling a modulation happens, it's all firmly in the key of F.

There's plenty of B flats later on. The one B♮ at the end of the middle section is more conventional - a typical journey to the dominant before the tonic restatement of the final section. The final section has nothing that would make you question the tonality as anything but F major.

  • I agree this is not worth calling a modulation. So what is the correct term. I used first "extension". May 6, 2021 at 17:36
  • 2
    @AlbrechtHügli, tonicization is the term in English. May 6, 2021 at 17:47
  • Indeed, and this offers a kind of anthemic quality. For example, O Canada in C borrows the F# from D to approach G mid-verse. May 7, 2021 at 14:08
  • Yeah, I guess. A secondary dominant is a very common harmonic device in almost all styles of music.
    – Laurence
    May 7, 2021 at 14:25
  • @LaurencePayne Indeed, but the O Canada one is also very early -- might be interesting to do a quick survey of anthems and see how common that move is... Aug 26, 2021 at 12:32

Every B isn't natural actually. What about this one:

enter image description here

Also if you look at the first F, that's an important note in the song. "Oh say can you see". It's a good candidate for a tonic!

  • Thank you for pointing out the Bb. Had I not overlooked it, I would have been able to answer this myself, though not as completely as most of the excellent answers here.
    – Steve H
    May 7, 2021 at 5:18
  • 5
    The existence of a Bb somewhere is irrelevant. It doesn't affect the key of this song at all. If you change all the Bb notes to, say, D or G and so make the B flats disappear, it has zero effect on what the key is. When figuring out what the key is, your main tool is listening. May 7, 2021 at 7:44
  • @piiperiReinstateMonica - One has to admit that the continuous use of a key signature different from what you'd expect the tonic to come with does introduce some doubt, though. The British folk song "Seventeen Come Sunday" starting on F, for example, can both be interpreted as being in F Dorian and can be safely argued to be in F minor with a strong modulation to C minor midway due to its use of D natural along with A flat, B flat, and E flat.
    – Dekkadeci
    May 7, 2021 at 12:27
  • @Dekkadeci I didn't mean that notes don't matter, just that in this song the few Bb notes don't have weight in setting the tonic, because of where and how they are used. There is enough "in F" in here that the tonic stays put even without the Bb notes. Additionally, what all other instruments do, is very important in setting a tonic, even so that it can override a melody. May 7, 2021 at 12:45
  • I think, you make the best answer now available to see. At the very end it clearly very strongly resolves. There by cementing the key very clearly. May 7, 2021 at 16:04

It is said to be in F major, because F is the tonic note, home note, and the harmony around it is major, meaning that the third above F is a major third, A, and not a minor third Ab. Playing an F major chord sounds like the harmony is at that song's basic center position, resting state. The presence or absence of any particular note in the melody is irrelevant as such, if it does not affect the sense of tonic. B or Bb or neither of them, it doesn't matter.

Try it. Play a cadence with the chords F - C7 - F. Did you arrive at the harmonic center position of the song? Then play a cadence C - G7 - C. Did you arrive at the harmonic center position of the melody?

Or try it the other way around. Tell someone who can sing (but who doesn't have absolute pitch and doesn't remember the pitch), "sing Star-Spangled Banner for me, I'll play an intro for you". Then play the chords C - G7 - C as an intro. What pitches does the person start to sing? Is it G E C E G C? Or is it C A F A C F?

  • 1
    Interestingly, if you ask them to start singing in the middle of a phrase using that intro, there's a chance they'll end up starting in F because the secondary dominant idea occurs a lot in the song ("early light", "flag was still there", etc.). Nice answer.
    – user45266
    May 6, 2021 at 20:14
  • It's possible for an opening to have ambiguous tonality, while the key of the overall piece is perfectly clear.
    – Laurence
    May 12, 2021 at 15:46

However, every B in the piece is natural and there are no accidentals so why wouldn't this be said to be in Key of C?

This isn't true. There are several Bb flats in the second part. The piece is in F but it is modulating to the dominant C in measure 4, that's why there are some B natural. (Many songs have a similar chord progression to the dominant like this song.)

The melody begins with the triad of the tonic CAF ACF. The whole second section is in F major.


In traditional harmony phrases end with cadences.

When we have only a melody, like your PDF, the cadences are implied, implied because there isn't full harmony to make them explicit.

There are various cadence types, but for this question we only need to talk about half cadences which pause on the dominant and perfect cadences on the tonic. Normally those would be dominant and tonic chords, but with only the melody we can focus on the dominant and tonic tones, scale degrees.

A common structural plan is to end one or more phrases on half cadences, which have a feeling of only partial ending and the music continues, before playing a phrase with a conclusive perfect cadence.

A half cadence can be made more emphatic by approaching the dominant from a half step below, from the dominant's leading tone. This is what happens in measure 4 when the B natural is used instead of the B flat of the key signature. That is considered just a temporary chromatic change to make the half cadence more emphatic.

...every B in the piece is natural

Toward the end of the melody - should be measure 27 of your PDF - the harmony shifts to the subdominant chord, the B flat or G minor chords in F major, and then the B flat of the key signature is used, because it's an essential tone of the subdominant... actually it is the subdominant.

All that happens in interior of the tune. The starting and ending are clearly on the F major chord.

It starts and ends on F major, a raised fourth scale degree is used for the half cadences, it highlights the subdominant just before the end. This is a very common tonal structure for music in the key of F major.

The chromatic variation of the B isn't abnormal. It can happen with other tones too. Conventionally the start and especially the end harmonies determine the key. Chromatically shifting around on the interior can be called tonicization or modulation depending on the extent of the change, but those shifts don't change the key of the whole piece. Again, this is a convention, a norm. You could have a piece that deliberate works against that convention and then the key might be an ambiguous/debatable point.

  • Your answer mentions the end, to my ear it clearly resolves strongly. It is complete no question. And typically only the major I does that, everything else is to some extent weaker, except for minor maybe but then its clearly a different resolve, also Phrygian is pretty strong, Dorian, too, bit they are various spectrums of minor resolve. Not the fullest home that for sure. I think this matters, cause analytically there is not always a natural choice of the tonal center, but perhaps just listening we can intuitive decide that nope it made sense in some way and X was the key. May 7, 2021 at 16:15
  • Yeah i guess we naturally know when to forget what else were heard on a resolved ending. May 7, 2021 at 16:16
  • Why are you bringing in phrygian, dorian, modal stuff? The song style is the major/minor system. The OP just needed to know about half cadences and secondary dominants. May 7, 2021 at 17:42
  • Eh, i almost consider that a valid point, but it's really not the point of my comment at all, which was the sing clearly resolves and completes, so that there is no question of key. That was my point. Modal stuff is a tangent, also I know some people get into a modal vs strict major/interval flame war. I'm not gonna do that. Cadence and secondary dominant is fine. May 8, 2021 at 4:58
  • @marshalcraft - the mention of any mode is pointless - there is no modal stuff in this piece at all.
    – Tim
    May 11, 2021 at 19:44

Listen, IF your FIRST 3 notes are G,E,C, then you are in the Key of C Major. If your First 3 notes are F,D,Bb, then you are in the key of Bb major. If your first 3 notes are C,A,F, then you are in the key of F Major. It's just that simple. At Ballgames, they play the song in Bb major so the bottom note is Bb2 & the high note is F4 ( which is a 4rth above middle C).


In the days before modern practices, pieces could use a pattern of whole steps and half steps which was consistent with starting on any note of the major scale. These patterns were called "modes", and there were seven of them, which would often be referred to using the following names:

  1. Ionian
  2. Dorian
  3. Phrygian
  4. Lydian
  5. Mixolydian
  6. Aeolian
  7. Locrian

The Ionian, Lydian, and Mixolydian modes sound "major", while the Dorian, Phrygian, and Aeolian modes sound "minor". The Locrian just sounds "wrong".

Common practice is to notate the major modes using the key signature that would apply to Ionian mode, and minor modes with the key signature that would apply to Aeolian mode. Thus, when notating "The Star Spangled Banner" or "The Little Drummer Boy" with a tonic note of G, one would use one sharp in the key signature even though The Star Spangled Banner is melodically mostly in Lydian (meaning most of the C's would be sharped) and The Little Drummer Boy is melodically in Mixolydian mode (meaning most of the F's would be natural).

  • 1
    When modes were actually in use in the old days, there were only four of them. And in the 18th century, when this tune was written, the fourth scale degree wasn't raised. The raising is due to 19th-century (tonal) chromaticism, not to modal considerations.
    – phoog
    May 6, 2021 at 23:09
  • 1
    All very interesting, but not in the slightest relevant to this piece of music!
    – Laurence
    May 7, 2021 at 13:17
  • @LaurencePayne: My my reading, the original poster's confusion about the key signature stems from the fact that the piece, as performed today, functions melodically as though it's in the Lydian mode, which would seem to have one less flat or one more sharp than the notated key. Whether the pieces was originally written with that intention, the point remains that pieces which function melodically as though they're in the major modes are noted as though they're in the Iodian mode even if this would mean that the fourth degree is always raised by an accidental or the seventh is always lowered.
    – supercat
    May 7, 2021 at 14:38
  • 1
    But SSB doesn't function as Lydian. It just has a lot of secondary dominants.
    – Laurence
    May 11, 2021 at 11:50
  • @LaurencePayne: The Lydian mode has two leading tones--from the seventh to the octave, and from the fourth to the fifth. I would regard the melody of the SSB's "A" section as having a very strong leading tone between the fourth and fifth scale degrees, which is a trait I associate with the Lydian mode. One could dismiss "early light" and "perilous fight" as mere chromatic embelishment, but to my ear the piece feels as though it has set up a pattern of raising the fourth until it gets to "rocket's red glare", making the fact that the fourth isn't raised there stands out.
    – supercat
    May 11, 2021 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.