Instructions
Go to Lake Hyrule as young Link. Stop just before the mouth of the lake and you'll see a scarecrow sitting in a grassless patch. Walk up to the scarecrow and take your ocarina out. The scarecrow will comment on your ocarina; if he does not, position yourself closer. After the scarecrow says a few words, you have the opportunity to create an eight-note song with the "C" and "A" buttons. After you create the song, the scarecrow will dance around.
Return to Lake Hyrule as an adult and visit the scarecrow again. Equip your ocarina. The scarecrow will remember the ocarina and ask you to play a song.
Play the song you created when you were young Link. Upon doing so, the scarecrow will inform you he never forgot that song and tells you to play that song anytime you want to see his friend Pierre the scarecrow.