If C major is the right scale for a C chord (the I chord in the key of C), then why does the note F sound terrible over a CMaj7 chord?
Because while F is indeed part of a C major scale, we have to remember that not all notes of a scale are to be treated equally.
Let’s take a look at the C major scale, itself. It’s notes are:
C D E F G A B.
Since it’s a major scale, that means all of the intervals are major or perfect. Thus, in interval form, the major scale looks like this:
1 2 3 4 5 6 7.
That is, our root, major second, major third, perfect fourth, perfect fifth, major sixth, and major seventh.
That means C is the root, D is the major second, E is the major third, F is the perfect fourth, G is the perfect fifth, A is the major sixth, and B is the major seventh.
Each note in the major scale is also given names beyond this.
1 = Tonic
2 = Supertonic
3 = Mediant
4 = Subdominant
5 = Dominant
6 = Submediant
7 = Leading tone
Now, let’s harmonize the C major scale to get our chords.
By starting on the tonic, and playing a game of leap frog, we can create the chord the scale implies.
With the major scale, our first tier of harmony gives us a major triad, which is spelled in interval form as:
1 3 5.
That is, a root, major third, and perfect fifth.
By continuing up from the fifth, we get our next tier of harmony, the seventh chords. In the case of the major scale, this creates a maj7 chord, which is spelled in interval form as:
1 3 5 7.
Now, let’s add notes to this.
C = C E G.
Cmaj7 = C E G B.
We can already see that a Cmaj7 chord does not contain the F note in it.
The F clashes with the major third, E, which is a semitone away, and it clashes with the perfect fifth, G, because it’s a whole tone away.
Furthermore, the distance between F and B is a tritone, an interval known for its dissonance, and it’s no coincidence that that the V chord of C major, G7, contains F and B in it.
G7 contains these notes:
G B D F.
As we now know, the reason the G7 chord sounds so tense and unresolved in the key of C major, is because two notes of the chord have a strong tendency or pull towards the more consonant notes.
B has a strong tendency to resolve up to the root note C, and F, the perfect fourth, has a strong tendency to resolve down to the major third, E.
Thus, moving from G7 to Cmaj7 or G7 to C creates what’s known in music theory as a perfect cadence.
It’s when your dominant chord moves to the tonic chord, the first chord.
Dominant function chords are chords that contain the leading tone (7), and the supertonic (2) the two most dissonant notes in the major scale.
Now, there are C major chords that do contain an F in them, and they’re extensions. Treated as a chord extension, F can sound consonant, for example, in a Cmaj7(add11) chord.
In short, the reason F sounds quite bad over a Cmaj7 chord even though in the context of C major, F is technically in key, but over a Cmaj7 chord, F clashes with the E note in Cmaj7, and clashes with the G note in Cmaj7.
It does appear in the other diatonic chords of C major, for example the IV chord, Fmaj7, and the V chord, G7, but over Cmaj7 itself, it clashes.