A computer scientist and a composer have restored an ancient recording of the first ever computer-generated music. Jack Copeland and Jason Long remastered a recording of three melodies, including "God Save the Queen," made by the BBC in the labs of computer pioneer Alan Turing in 1951.

The snippets of music were made on Turing's prototype Mark II computer, using the machine's extremely basic loudspeaker known to Turing as "the hooter." You can listen to the recordings below to hear exactly how it got that name:

On a blog post written for the British Library, Copeland and Long explain that Turing worked out how to get the hooter to play approximated notes by repeating short bursts of sound at high speeds. However, Turing wasn't much interested in this innovation beyond the technical theory, and after publishing his notes on the matter in a computer manual (actually the first of his kind) he left the hooter alone. It fell to an amateur pianist and soon-to-be programmer named Christopher Strachey to turn Turing's directions into melodies, with the young schoolteacher persuading Turing to give him access to the Mark II overnight.

Here's Copeland and Long on what happened next:

'I sat in front of this enormous machine', Strachey said, 'with four or five rows of twenty switches and things, in a room that felt like the control room of a battle-ship.' It was the first of a lifetime of all-night programming sessions. In the morning, to onlookers' astonishment the computer raucously hooted out the National Anthem. Turing, his usual monosyllabic self, said enthusiastically 'Good show'. Strachey could hardly have thought of a better way to get attention: a few weeks later he received a letter offering him a job at the computing lab. The BBC recording, made some time later the same year, included not only the National Anthem but also an endearing, if rather brash, rendition of the nursery rhyme 'Baa Baa Black Sheep' as well as a reedy and wooden performance of Glenn Miller’s famous hit 'In the Mood'. There are unsettled questions about the authorship of the three routines that played these recorded melodies. In the wake of Strachey's tour de force a number of people in the lab started writing music programs: even the routine that played the National Anthem in the recording may have been a retouched version of Strachey's original.

The original 12-inch disc the melodies were recorded on in 1951 has been known about for a while, but when Copeland (a professor) and Long (a composer) listened to it, they found the audio was not accurate. By comparing the music with what they knew of the technical limitations of the Mark II they found that the frequencies had shifted during recording. By working out exactly what notes Turing's computer was able to play, they were able to restore their melodies to their original voice. Turing's description of the Mark II's hooter, though, is still as relevant as ever.

The top image shows Turing (far right) and the console of the Mark II computer. Via the British Library and the University of Manchester School of Computer Science.