Historical treasures concealed in ‘waste’ reveal origins of written music