I'm new to music theory and am self teaching so I apologise if this has already been asked but I'd be extremely grateful if you could point me in the right direction.
I'm trying to learn the best way to memorise songs so I don't need to rely on reading chords while playing.
I've read that, instead of memorising the chords of the song, it's best to know the key and pitch sequence. Source: https://www.musical-u.com/learn/how-do-guitarists-memorize-songs-to-play-is-this-part-of-ear-training/.
I had written down the chords to The Beatles' song Anna which is in key of D. So I now have this pitch sequence:
I) D, ii) Em, iii) F#m, IV) G, V) A, vi) Bm, vii°) C#dim
Instead of writing "D Bm D Bm" for the first 4 bars of the intro, I'm referring to the sequence and am now writing "I vi I vi".
I was doing this for rest of the song until I hit a problem in the chorus. In bars 11 and 12 of the chorus, there is a transition from G to Gm. G is the IV pitch but Gm is not in the key of D so I'm now confused hence my question.
I've written Gm because a highly rated transcribed tab suggests that is the correct chord. Source: https://tabs.ultimate-guitar.com/tab/the_beatles/anna_chords_1089331.
Is the tab wrong even though it's highly rated? Is it not Gm but instead one of the pitches in the key of D? Can a song contain pitches outside of its intended key? If so, aren't those pitches out of key so they will always sound bad in relation to the pitches inside the key?
Many thanks in advance for any help you can provide.