The story
From Middle English. First attested circa second half of 14th century, from the similarity between the sizzling sound of food cooking in a frying pan and that of musical pipes, from Canterbury Tales http://www.gutenberg.org/etext/2383 by Geoffrey Chaucer: :: "He singeth brokking¹ as a nightingale. / He sent her piment, mead, and spiced ale, / And wafers² piping hot out of the glede³: / And, for she was of town, he proffer'd meed." :: ¹ quavering, ² cakes, ³ coals
Etymology from Wiktionary, CC BY-SA 4.0.