Music on the Pilot ACE Emulator.

Last updated: 15 July 2025

1. Contents

This document contains the following sections:

1. Contents.
2. Music on First Generation Computers.
3. Music on DEUCE.
4. Music on Pilot ACE.
5. Generating Individual Notes.
  5.1 Six minor cycle loop.
  5.2 Seven minor cycle loop.
  5.3 Eight minor cycle loop.
  5.4 Longer loops.
6. Structure of Program.
  6.1 Stage 1.
  6.2 Stage 2.
  6.3 Stage 3.
7. Operating Instructions.
8. Example: Good King Wenceslas.
9. Appendix 1.
10. References.

2. Music on First Generation Computers

Many early computers had built-in speakers. They were used to alert the operators when a program had failed or finished.

For example, the CSIRAC had a speaker (called the hooter), that was used to signal the progress of a program. CSIRAC was the first Australian computer to be built, and the fourth world-wide. "Programmers would place a sound at the end of their program so they knew it had ended (this was known as a blurt)", or they would place blurts in a program to indicate its progress.

The Manchester Mark II computer also had a loudspeaker and a special instruction that stimulated it to emit a short pulse of sound.

It was soon realised that stimulating these loudspeakers at suitable intervals would produce musical notes and that a program could string these notes together to play a tune.

There is some dispute over who first wrote such a program. One claim is that it was Christopher Strachey, in 1951 on the Manchester Mark2. Another is that it was the mathematician Geoff Hill using CSIRAC, also in 1951. I am not qualified to get into this argument but note ...

David Link quotes Martin Campbell-Kelly's report that "Strachey sent his programme [draughts] for punching beforehand. The day came and Strachey loaded his programme into the Mark I. After a couple of errors were fixed, the programme ran straight through and finished by playing God Save the King on the hooter (loudspeaker)." He also notes that "In a letter dated 15th May 1951, Strachey wrote to Turing: "I have completed my first effort at the Draughts" and he was obviously talking about the Manchester Mark I.". So the date of Strachey's first run must have been May or later.

"Hill programmed CSIRAC to play various popular tunes of the day, such as Colonel Bogey, Girl with Flaxen Hair and so on. The music was one of CSIRAC′s parlour tricks. Dick McGee remembers it playing music when he started at the CSIRO in April 1951". Unfortunately, music played by CSIRAC was not recorded at the time. "However, it has now been faithfully reconstructed and can be heard again." The tunes are Colonel Bogey, The Bonnie Banks o′ Loch Lomond and Auld Lang Syne. [10.3]

The earliest recording of computer music that survives is on a 12-inch single-sided acetate disc, cut during a BBC outside broadcast at the Manchester laboratories, also in 1951. It captured three melodies played by the Manchester Mark II, including the National Anthem and "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" [10.1]. One can listen to the tunes in the article.

Over time, music programs became widespread. I personally recall visiting an ICT (2nd generation) installation where the computer produced a convincing imitation of someone whistling Colonel Bogey. The installation was a large room full of cabinets and not all of it was visible at the same time. If you were looking for someone it was a local joke for the operators to tell you he or she was in the computer room, then turn on Colonel Bogey while you hunted around the room and peered behind cabinets looking for the whistler.

Yet another example is SILLIAC, the University of Sydney computer built in 1956. On 17th May 1968, at its closing ceremony, SILLIAC played the Funeral March by Chopin and Handel′s Dead March from Saul. It was then powered down for the last time.

3. Music on DEUCE

DEUCE had a built-in speaker, but it worked differently. It could be switched on using a program instruction (7-24 Alarm ON) but then stayed on until switched off either by using another program instruction (6-24 Alarm OFF) or by manually using a key on the facia. It was not suitable for producing music.

DEUCE could play music but to do so it required an external speaker. David Leigh remembers singing along as their DEUCE played Xmas carols on Christmas Eve [10.2]. Probably they were using John Denison's Melody Maker described below.

In 1958 John Denison circulated a program called Melody Maker to play music on DEUCE. All that survives of the program is the first sheet of his write-up. There are no flow charts, coding sheets or cards. Even this introduction is probably missing a second page. Melody Maker allowed the computer to become a sort of juke box, with coded tunes stored on the drum and available to be played on request.

Flow Chart for 7 minor cycle note

Melody Maker covered nine octaves, 108 notes from C0 to B8, far exceeding the range of an 88-key piano (A0 to C8). It is possible that there were caveats limiting the range, on a page now lost, but DEUCE could have produced all of the notes under certain circumstances.

It might seem that the delay line structure of the DEUCE memory would prevent the production of high notes (a minimum of 32 minor cycles required to repeat a loop of code) but this is not so. There were ways to avoid this limitation on DEUCE, and also on Pilot ACE.

There does not seem to have been a "standard" place to attach a loudspeaker on DEUCE. It is likely the connection required for Melody Maker was specified in a missing page of the operating instructions. David Leigh recalls that at his DEUCE installation it was managed by stimulating the card punch trigger, sampling the waveform that came out, and amplifying as necessary. "This produced a square wave, of course, but we didn't exactly expect Mantovani. 10-24 to turn the punch on, 9-24 to turn it off. (10-24 and 9-24 are appropriate instructions.)" [10.2]. However, Robin Vowels notes that on UTECOM (the DEUCE in Sydney) "Our Christmas carols program didn't activate the reader or punch ... the speaker was attached to one of the instruction staticisers.".

4. Music on Pilot ACE

I can find no mention in surviving Pilot ACE documents that Pilot ACE played tunes. And John Parks, who helped maintain the Pilot ACE back in the day, told me he had no recollection of hearing it play music. However, it undoubtedly could have done, using an external speaker.

Pilot ACE had a built-in speaker (the buzzer). It could be switched on using a program instruction (destination 29) but had to be switched off manually using a key on the facia. It was not suitable for producing music.

Donald Davies, in "Very early computer music", recalled that "The Ace Pilot Model [was] capable of composing music and playing it on a little speaker built into the control desk. I say "composing" because no human had any intentional part in choosing the notes. The music was very interesting, though atonal, and began by playing rising arpeggios: these gradually became more complex and faster [until they] dissolved into coloured noise as the complexity went beyond human understanding."

"The origin of this phenomenon was a set of diagnostic devices put into the machine by myself and David Clayden .. A cardinal feature of the machines .. was "optimum programming" .. designed to make the utmost use of the (problematic) access to data and instructions coming from the long delay .. So a measure of programming quality would be the proportion of time that transfers were going on. I thought that this could be measured very easily by smoothing a trigger called Transtim. I had to remove the AC component from the signal to stop the needle flickering too much, and it seemed logical to put this AC part into a speaker just to hear what it sounded like."

"When the Ace Pilot model was due to move to a new location and become a service, we thought that the crude old control panel should be replaced by a nice new one. As soon as this new facility was working David characteristically began to experiment with misusing it, and this is when the music came forth."

He adds "The small meter on the control panel was a very crude measure but the sound source naturally led to amateur compositions and the customary transcripts of JS Bach." But he doesn't say when.

Duplicating John Denison's Melody Maker would serve no useful purpose now but implementing music on the Pilot ACE is an interesting problem. The following program shows one way in which it could have been done. Good King Wenceslas" would have sounded something like this:

The code presented here limits tunes to the seven octaves from C1 to B7. It simply reads in the code for a single tune (pitch and duration of the successive notes) and then plays it.

As mentioned earlier, Denison's sole remaining page of instructions doesn't mention where the speaker should be attached. There are a several places where a speaker could have been safely attached on Pilot ACE. For example ...

5. Generating Individual Notes.

Appendix 1 contains a full table comparing the range of notes offered in Melody Maker with those available on a piano and with the seven octaves provided in this Pilot ACE program. The highest octave in this Pilot ACE music program is shown in the Table below. (By "ping" I mean the act of stimulating the loudspeaker; mc is minor cycles).

Highest Octave in the Pilot ACE Music Program

ScientificFrequency bits/ping mc/ping mc/ping
name (Hz)roundedrounded
C_72093.00547814.9315
C♯_72217.46145114.0914
D_7 2349.31842613.3013
D♯_7 2489.01640212.5613
E_7 2637.02037911.8512
F_7 2793.82635811.1911
F♯_7 2959.95533810.5611
G_7 3135.963319  9.9710
G♯_7 3322.438301  9.41  9
A_7 3520.000284  8.88  9
A♯_7 3729.310268  8.38  8
B_7 3951.066253  7.91  8

The clock speed of Pilot ACE (1 micro-second) and the frequencies of the notes, from Wikipedia, imply the wave lengths shown (expressed in bits and in minor cycles).

A problem is evident here. Rounding off the wave length to the nearest integer number of minor cycles results in some notes being indistinguishable. Thus D_7 and D♯_7 both have wave length 13mc, F_7 and F♯_7 have wave length 11mc, G♯_7 and A_7 have wave length 9mc, and A♯_7 and B_7 have wave length 8mc.

To get more precision one would have to position a bit in a particular, varying place within the instruction used to trigger the loudspeaker. This would be a difficult programming problem beyond the resources available in the Pilot ACE. It is a shame John Denison's code is lost. It would be good to know how he tackled the problem on DEUCE (if, indeed, he did). It was even worse for him as he included an octave of even higher notes in Melody Maker (in which C_8, C♯_8 and D_8 approximate to 7mc.; D♯_8, E_8 and F_8 approximate to 6mc.; F♯_8 G_8 and G♯_8 approximate to 5mc.; and A_8, A♯_8 and B_8 approximate to 4mc.)

It is not practical to hold the notes table (Appendix 1) in the computer.

The following table summarises the minor cycle delays the computer code must allow between pings to generate the required notes.

mc/ping for Pilot ACE program
Note Octave:    1    2    3    4     5    6    7
C 956478239 119  60  30   15
C♯ /D♭ 902451225 113  56  28   14
D 851426213 106  53  27   13
D♯ /E♭ 804402201 100  50  25   13
E 758379190  95  47  24   12
F 716358179  89  45  22   11
F♯ /G♭ 676338169  84  42  21   11
G 638319159  80  40  20   10
G♯ /A♭ 602301150  75  38  19    9
A 568284142  71  36  18    9
A♯ /B♭ 536268134  67  34  17    8
B 506253127  63  32  16    8

With the limited memory of Pilot ACE (352 words for program and data) this requires too much storage. However, the wave length of each octave is half that of the next higher octave, as can be seen in the Table. So we can generate any note using just the value in the Octave 1 column, divided by 2 a suitable number of times to get the required octave. Left shifts achieve this division economically but truncate the data. This gives the following table.

mc/ping for Pilot ACE program
Note Octave:    1    2    3    4     5    6    7
C 956478239 119  59  29  14
C♯ /D♭ 902451225 112  56  28  14
D 851425212 106  53  26  13
D♯ /E♭ 804402201 100  50  25  12
E 758379189  94  47  23  11
F 716358179  89  44  22  11
F♯ /G♭ 676338169  84  42  21  10
G 638319159  79  39  19    9
G♯ /A♭ 602301150  75  37  18    9
A 568284142  71  35  17    8
A♯ /B♭ 536268134  67  33  16    8
B 506253126  63  31  15    7

Comparing these two tables it is clear that the following corrections are needed.

mc/ping for Pilot ACE program
Note Octave:    1  2  3  4   5  6  7
C 956  0  0  0  1  1  1
C♯ /D♭ 902  0  0  1  0  0  0
D 851  1  1  0  0  1  0
D♯ /E♭ 804  0  0  0  0  0  1
E 758  0  1  1  0  1  1
F 716  0  0  0  1  0  0
F♯ /G♭ 676  0  0  0  0  0  1
G 638  0  0  1  1  1  1
G♯ /A♭ 602  0  0  0  1  1  0
A 568  0  0  0  1  1  1
A♯ /B♭ 536  0  0  0  1  1  0
B 506  0  1  0  1  1  1

This information can be packed comfortably into 12 words. Then the calculation [using F5 as an example] is: select the value for the note [716], adjust it for the required octave n by dividing by 2(n-1) using left shift [ 716/24 = 44], and add the adjustment [ 44+1 = 45]

5.1 Six minor cycle loop.

The highest note implemented in this Pilot ACE program, B_7, requires the loudspeaker to be pinged (receive a square wave) once every 8 minor cycles. In fact a minimum of 6 mc. can be achieved using the following code.

Flow Chart for 6 minor cycle note

This loop repeats at 6 minor cycle intervals, working its way up and down delay lines 5, 6 and 7, as shown by the arrows, until the duration of the note is reached.

5.2 Seven minor cycle loop.

An odd number of minor cycles is slightly more complicated and requires an extra delay line, as shown below.

Flow Chart for 7 minor cycle note

5.3 Eight minor cycle loop.

The loop above works for note B_7, which has a wave length of 8mc., if we place {5 27-18 s 0 2} into delay line 6.

However, a nicer way to create note B_7 is to use the facility to implement an instruction using destination 0. [To recap, when an instruction uses D0, the next instruction to be obeyed is the word that is sent to D0 in the last minor cycle of that transfer]. Any one of TS15, TS16, TS20, TS26 or TS27 could be used, or even DS12 or DS14. For example:

Flow Chart for 8 minor cycle note

This loop requires simple changes to produce notes up to D♯_4.

5.4 Longer loops.

For D_4 (106mc loop) the changes could be:

  70{6 17-22s 030}ping at mc2
  60{0 20- 0 030}
  Q0{5 27-18s 030}
  50{7 16-24 0 8}
  710{6 17-22s 030}ping at mc12
     etc

For notes beyond B_3 this code would become messy. However, for D_4 and all longer notes, it is possible to set up a time-wasting loop in a fixed location (delay line 3 is used here). The minimum requirement is three major cycles and 8 minor cycles. The following example is the first circuit through the loop for D_4 (106 mc = 3 Mc + 10 mc).

Flow Chart for D4 note

Notes:

(1) The housekeeping code for creating the loop for each note is in delay lines 1 to 3. Delay lines 4-7 and 11 are part of each loop:

Delay lines for 107 minor cycle

(2) On entry, TS27={P25,..,P29} and {15-15} is a waste instruction.

(3) This loop can be used for all notes: for notes from B_7 to D♯_4 enter with
  {7 16-24   1  0} in DS 140 and
  {6 16-24   1  0} in DS 141

For notes from D_4 to C1 enter with
  {0 16-15   1  0} in DS 140 and
  {0 16-15   1  0} in DS 141

(4) Expressing the pitch as (32M + m)mc. (eg. for D_4, M=3 and m=10). If m<8 then use M-1 and m+32.

(5) For most minor cycles, T, it requires one major cycle to get to the loop from T and to return from the loop to T, and one major cycle for housekeeping. But provision must be made (the code from 36 to 317) for a small number of values T which take two major cycles to get to the loop and return to T. Thus, in the example above, getting from 011 to 30 uses 21mc. and getting back from DL3 to 611 uses 11mc., one major cycle in all. But if T=31, it takes 33mc to get to 30 and 31mc to get back: two major cycles. Similar remarks apply if T=0 or T=1.

6. Structure of Program.

The program proceeds in two stages:

  1. read in the data for the tune and store a processed version of it in delay lines 8, 9, and 10.
  2. read each note in turn, create a subroutine for the note and then call the subroutine to play that note

6.1 Stage 1.

Read data from cards in the form:

and save it in delay lines 8, 9 and 10 in the form:

Processing each note must take less than 15 Major cycles so that data from the card reader is not lost.

Flow Chart for 7 minor cycle note

As an example, the following is the data to play all seven octaves included in this program:

Flow Chart for 7 minor cycle note

Flow Chart for 7 minor cycle note

Flow Chart for 7 minor cycle note

Flow Chart for 7 minor cycle note

The results in DLs 8-10 contain the correct sounds.

Flow Chart for 7 minor cycle note

Flow Chart for 7 minor cycle note

Flow Chart for 7 minor cycle note

6.2 Stage 2.

Play the tune. For each note, generate the suitable subroutine, as outlined in Section 5, and then enter it, sending pings to the loudspeaker at the appropriate intervals.

Stage 2 Flow Chart

And the coding sheets:

Stage 2 Flow Chart        Stage 2 Flow Chart

6.3 Stage 3.

While stage 2 would have produced a sound on Pilot ACE, it will not do so in the emulator. Perhaps in the early days of the IBM PC, under DOS, it would have been possible for the emulator to trigger the built-in loudspeaker directly. These days, with multiple processors and with Windows running the show, it does not appear to be possible to get the timing right, or even to access the speaker in a timely fashion.

An extra step is needed to demonstrate that the code works and to hear approximately how it might have sounded. As a temporary measure I included extra code in the emulator to do the following:

7. Operating Instructions

Denison's instructions, modified and extended for this Pilot ACE program, are as follows:

Card order

  1. Program cards for stage 1.
  2. Data cards for the tune
  3. Program cards for stage 2.

Punching tune

  1. Punch the notes (one note per row) on consecutive rows of each data card.
  2. A blank row will end the input.
  3. Tunes are limited to 96 notes (and rests).
  4. Notes are punched as follows:

    Notes C C♯ D E♭ E F F♯ G A♭ A B♭ B
    P123456789101112
    Octaves1234567
    P 14 15 16 17 18 19 20
    Duration
    (Major cycles)  32  641282565121024204840968192
    P  23   24   25   26   27   28   29   30   31
  5. Dotted notes. A dot increases the duration of the note by half of its value. Any note value can be dotted, as can rests of any value. To code, just enter one in the duration fields for both notes.
    For example : punch 1 in P27 and P28

  6. To indicate a rest, set the note and octave to zero and enter just the duration.

8. Example: Good King Wenceslas.

Flow Chart for 7 minor cycle note

Following the procedure outlined in Section 6 results in this rendition of Good King Wenceslas:

9. Appendix 1

The Nine Octaves of Denison's Melody Maker Program

Scientific name  Frequency.    bits/ping.    mc/ping.    mc/ping.   
(Hz)roundedrounded
C_016.352611561911.131911 Melody Maker (Denison)
C♯_0 /D♭_0 17.324577241803.871804
D_0 18.354544841702.621703
D♯_0 /E♭_0 19.445514261607.061607
E_0 20.602485401516.861517
F_0 21.827458151431.731432
F♯_0 /G♭_0 23.125432441351.371351
G_0 24.500408171275.531276
G♯_0 /A♭_0 25.957385261203.941204
A_0 27.500363641136.361136 88 key piano
A♯_0 /B♭_0 29.135343231072.581073
B_0 30.868323961012.381012
C_1 32.70330578955.56956 Pilot ACE program
C♯_1 /D♭_1 34.64828862901.93902
D_1 36.70827242851.31851
D♯_1 /E♭_1 38.89125713803.53804
E_1 41.20324270758.43758
F_1 43.65422908715.86716
F♯_1 /G♭_1 46.24921622675.69676
G_1 48.99920408637.76638
G♯_1 /A♭_1 51.91319263601.97602
A_1 55.00018182568.18568
A♯_1 /B♭_1 58.27017161536.29536
B_1 61.73516198506.19506
C_2 65.40615289477.78478
C♯_2 /D♭_2 69.29614431450.97451
D_2 73.41613621425.66426
D♯_2 /E♭_2 77.78212856401.77402
E_2 82.40712135379.22379
F_2 87.30711454357.93358
F♯_2 /G♭_2 92.49910811337.84338
G_2 97.99910204318.88319
G♯_2 /A♭_2 103.8269631300.98301
A_2 110.0009091284.09284
A♯_2 /B♭_2 116.5418581268.15268
B_2 123.4718099253.10253
C_3130.8137645238.89239
C♯_3 /D♭_3 138.5917215225.48225
D_3 146.8326810212.83213
D♯_3 /E♭_3 155.5646428200.88201
E_3 164.8146067189.61190
F_3 174.6145727178.97179
F♯_3 /G♭_3 184.9975405168.92169
G_3 195.9985102159.44159
G♯_3 /A♭_3 207.6524816150.49150
A_3 220.0004545142.05142
A♯_3 /B♭_3 233.0824290134.07134
B_3 246.9424050126.55127
C_4261.6263822119.45119 middle-C
C♯_4 /D♭_4 277.1833608112.74113
D_4 293.6653405106.41106
D♯_4 /E♭_4 311.1273214100.44100
E_4 329.628303494.8095
F_4 349.228286389.4889
F♯_4 /G♭_4 369.994270384.4684
G_4 391.995255179.7280
G♯_4 /A♭_4 415.305240875.2575
A_4440.000227371.0271
A♯_4 /B♭_4 466.164214567.0467
B_4 493.883202563.2763
C_5523.251191159.7260
C♯_5 /D♭_5 554.365180456.3756
D_5 587.330170353.2153
D♯_5 /E♭_5 622.254160750.2250
E_5 659.255151747.4047
F_5 698.457143244.7445
F♯_5 /G♭_5 739.989135142.2342
G_5 783.991127639.8640
G♯_5 /A♭_5 830.609120437.6238
A_5 880.000113635.5136
A♯_5 /B♭_5 932.328107333.5234
B_5 987.767101231.6432
C_6 1046.50295629.8630
C♯_6 /D♭_6 1108.73190228.1928
D_6 1174.65985126.6027
D♯_6 /E♭_6 1244.50880425.1125
E_6 1318.51075823.7024
F_6 1396.91371622.3722
F♯_6 /G♭_6 1479.97867621.1221
G_6 1567.98263819.9320
G♯_6 /A♭_6 1661.21960218.8119
A_6 1760.00056817.7618
A♯_6 /B♭_6 1864.65553616.7617
B_6 1975.53350615.8216
C_72093.00547814.9315
C♯_7 /D♭_7 2217.46145114.0914
D_7 2349.31842613.3013
D♯_7 /E♭_7 2489.01640212.5613
E_7 2637.02037911.8512
F_7 2793.82635811.1911
F♯_7 /G♭_7 2959.95533810.5611
G_7 3135.9633199.9710
G♯_7 /A♭_7 3322.4383019.419
A_7 3520.0002848.889
A♯_7 /B♭_7 3729.3102688.388
B_7 3951.0662537.918 Pilot ACE program
C_8 4186.0092397.477 88 key piano
C♯_8 /D♭_8 4434.9222257.057
D_8 4698.6362136.657
D♯_8 /E♭_8 4978.0322016.286
E_8 5274.0411905.936
F_8 5587.6521795.596
F♯_8 /G♭_8 5919.9111695.285
G_8 6271.9271594.985
G♯_8 /A♭_8 6644.8751504.705
A_8 7040.0001424.444
A♯_8 /B♭_8 7458.6201344.194
B_8 7902.1331273.954 Melody Maker (Denison)

10. References.

10.1 http://blogs.bl.uk/sound-and-vision/2016/09/restoring-the-first-recording-of-computer-music.html

10.2 David Leigh, private communication.

10.3 Paul Doornbusch, Australian Geographic Magazine 27 June 2016

10.4 David Link, "God Save the King. An Early Musical Program on the Ferranti Mark 1", Resurrection Winter 2016/17.

10.5 "Very early computer music", Donald Davies, RESURRECTION: The Bulletin of the Computer Conservation Society; Number 10; Summer 1994.

©2025 David Green. All rights reserved.
dgreen@uraone.com