A tune learned by ear is available everywhere — a kitchen, a session, a car park — because it lives in your head rather than on a page. The skill is not perfect pitch. It is hearing a phrase as a shape, remembering where it starts and where it lands, and owning enough finger vocabulary to reproduce it. Most pipers can build that faster than they expect, as long as they work in the right order.
Strip the tune back to its skeleton
Every pipe tune has a bare melody underneath the doublings and gracenotes. Learn that melody first, on its own, with no ornamentation at all: a march on the four main beats, a reel on its strong pulses. If you can play the skeleton at a steady tempo and stop anywhere, adding gracenotes later is decoration. If you learn the ornaments and the melody at the same time, you will not know which part you actually got wrong.
Sing it before you touch the chanter
Humming a phrase gives you something to compare your fingers against, and it exposes the parts you have not really heard — the phrase that fades out in your memory is the phrase you will guess at. Sing in whatever syllables come naturally, or use canntaireachd, the piping mouth-music system of vowel and consonant sounds that maps onto finger movements. Either way the test is simple: if you cannot hum it, you cannot play it reliably yet.
Use a reference pitch you trust
Pick one recording and treat it as the version for now, rather than blending three settings from three different bands. Slow it down without changing the pitch so each phrase is audible. Then loop a single two-bar phrase, play it back, and copy it. Short loops beat listening to the whole tune, because they let you hear the exact interval you keep missing.
Learn one phrase deeper, not five phrases wider
It is tempting to keep going once the first part makes sense. Resist that for a week. Take the phrase you find hardest and play it from memory, then from the phrase before it, then with the phrase after it, until you can enter it from any direction. Tunes fall apart at the joins, not in the middle of the phrases you practised.
Check yourself against the dots, then put them away
Sheet music is a good auditor and a bad first teacher. Once a tune is roughly in your ear, read through the notation to catch what you misheard: a repeated note, a missing bar, a different ending for the second part. Then close the book and play it again from memory. If the printed version keeps overriding what you hear, you have not finished learning the tune.
Playing by ear is a practice habit rather than a talent. Twenty minutes a week of slow, phrase-sized copying will do more for it than an afternoon of listening to recordings while doing something else.