Updated
Start from tunes you can sing: sing the first note, find it on the keyboard, then ask whether the melody goes up or down, by step or by leap. For songs, find the bass first, then the chord’s color (major or minor). For free, Pianamo trains your ear from lesson 1, with the daily melody (a tune to find in six tries), Hum a tune and lesson 71 on chords by ear. Finding a nursery rhyme comes within the first lessons; working out a song’s chords on your own is a level-5 skill in Pianamo’s table of levels, estimated at 400 to 600 hours of practice.
Try it on this page, no account: the start of Frère Jacques, to find by ear.
Playing by ear isn’t a gift: it’s a habit, which starts with very simple tunes and grows with short, frequent tries. Everything you need to get going exists for free.
Tip: The five steps in detail, with examples: how to play piano by ear. The four chords that come back everywhere: four chords, hundreds of songs.
No. Playing by ear means recognizing the distances between notes (relative pitch), which can be trained. Perfect pitch, naming a note heard on its own, isn’t needed.
Yes for melodies: on the on-screen keyboard, with a MIDI keyboard or through the microphone, which hears your piano one note at a time. Chords are checked on the on-screen keyboard or over MIDI, not through the microphone yet.
According to Pianamo’s table of levels (estimates, six days of practice a week): working out the chords of a song you hear comes at level 5, 400 to 600 hours in total, that is 2.5 to 4 years at 30 minutes a day, about 2 years at 45 minutes. The melody and its chords by ear, at level 6, take 800 hours and more.
Yes: the sound comes before the sign, which is the order of the Suzuki and Kodály approaches. Reading notes is still useful later, to check and to write down what you find.