I viewed this "playing by ear" talent as something almost magical. It seemed that some people were born with the ability. Maybe some are. I've seen and heard plenty of piano players - my mother-in-law is one - who never took a lesson in their lives and do not know how to read music but can sit down and play many songs quite well. Certainly all the old blues guys never knew anything about diatonic scales or scale-line triads, and they did just fine. It was all about what sounded good.
When I went to college and majored in music the "magic" became clear and it wasn't magic at all. It all starts with the major diatonic scale and understanding the chords that can be constructed with the notes in the scale. Understanding what it means to play in a specific key is essential to the process too.
I have a student right now who is absolutely fascinated with music theory, so much so that he sometimes confuses similar concepts because they are approached differently in the many books he's purchased. This week we got to talking about playing by ear and he wanted to know just how I figure out songs by listening to them. Here is what I told him, more or less.
I start by picking out the melody "by ear." This is easier than it sounds if you have even fairly basic knowledge of the guitar and know the names of the notes in 1st position. Then I look at which notes are present in the melody. Are there any sharped or flatted notes? Knowing my diatonic scales, i.e., which notes are present in each major key is essential here. Although it's unlikely that every note in the key will be present in the melody I've picked out there are usually enough so I can make a good guess of what key I'm playing.
Then, by knowing the formula of scale-line triads in any key (Major, minor, minor, Major, Major, minor, diminished) I have a set of chords to work with. This is vitally important and it is where players who attempt figuring something out be ear often hit a brick wall. They try almost every chord they know, hoping one will sound right. Sometimes they get lucky and it does, but usually they give up in frustration. Knowing the notes in a key and then applying the above formula will almost always reveal most of the chords in a song.
One proviso here before I move on. If all songs used only the scale-line chords music would be pretty boring. In some genres the writers do stick to the scale line almost all the time, such as country music, most blues and virtually all folk music, including traditional British Isles tunes. So tunes from those genres tend to be fairly easy to figure out with a bit of experimentation. Not so in a lot of modern singer/songwriter music and almost never in jazz. In those forms the extended chords (tetrads and beyond) come into play, along with concepts like key changes in the middle of songs. But while those forms are certainly more interesting to listen to and play (to my ear, anyway) there are also patterns that are specific to particular writers and in jazz. James Taylor, for example, loves to use the I - bVII - IV progression in many of his songs, and in jazz the II - V - I is very common, as are songs using what are known at the "Rhythm Changes": the sequence found in the great standard "I've Got Rhythm." So intimidating though they are, it is not beyond the realm of possibility to figure out more complex tunes by ear.
But - where the heck do those chords GO?! At the risk of sounding like I'm copping out here, that is where experience comes into play. As you figure out more songs you will find some interesting similarities. The one I stress with students is the idea that each line of lyrics usually has an even number of measures and chord changes usually happen at the beginning of measures. Then it is a matter of going back to that melody you picked out by ear, looking at the note in the melody on which you think you hear a change and matching that note to the possible chords in the scale-line that include that note in their make up.
Is this a foolproof formula? Not by a long shot! Your ear can and will fool you at times, telling you to change chords where no change exists. In theory, every note in a melody has a corresponding chord but changing chords that often would sound very disjointed. This is why songwriters will stay with a chord through a measure or more when some if not all of those notes don't really "go" with the chord being played. Sometimes a change comes on a "leading tone" which is a note above or below the one that actually gives away the right chord. This adds tension or interest or a feeling of movement to the song. So if the note where you hear a change leads you to a chord or chords that just don't sound right, try the chords that include the next note in the melody and one of them will probably be correct.
I know there is a lot of information here and even an intermediate level player may not understand it all. Experience and time, as in most things, will make the process easier. So know your keys, know the scale-line triads, and keep in mind that what makes music so interesting is that great writers often break the rules! Have fun with the process and accept that you won't get it right all the time. But I'm sure when you do it will be hugely gratifying because you're cracked the musical magician's code!
Peace & good music,