Sound Experimenter is an interactive AY-3-8912 sound chip controller that lets users adjust all major synthesis parameters—tone fine and coarse registers for three channels, noise frequency, channel enable flags, envelope shape, and envelope delay—using keyboard input and a graphical on-screen display. The program uses PLOT and DRAW commands to render a visual interface with indicator lines that move as parameter values change, toggling them with OVER 1 XOR drawing to erase and redraw markers without clearing the screen. Six custom UDG characters (a through g) are defined at startup to represent envelope shapes such as ramps, sawtooth waves, and sustained tones. A secondary “Toy Piano” mode is accessible from the title menu, using SOUND commands with key-mapped frequency values across three channels simultaneously. The elaborate animated intro sequence uses SOUND to play a two-channel sweep and BEEP for a fanfare, while a spirograph-like PLOT/DRAW routine animates an expanding geometric figure.
Program Structure
The program is organized into several distinct sections. Execution begins at line 1000 via GO SUB 1000, which defines UDGs and dimensions arrays, then branches to a multi-part animated intro at line 3000. A menu at lines 5070–5170 lets the user choose between the main Sound Experimenter (returning to line 10) or the Toy Piano (lines 2000–2060). The main editor loop is centered around the key-dispatch block at lines 475–520, with each parameter editor in its own subroutine-like block reached by GO TO.
UDG Definitions
Lines 1000–1235 define six UDGs (a–g) using POKE USR with BIN literals. These represent envelope waveform icons displayed in the shape selector:
\a— open rectangle (hollow box), used as an off/unchecked marker in the enable grid\c— diagonal ramp rising left-to-right (sawtooth up)\d— diagonal ramp falling left-to-right (sawtooth down)\e— reverse-diagonal ramp (rising from right)\f— both-edge ramp (triangle wave up)\g— top-only horizontal bar (square top)
Note that UDG f is defined with the +0 row last (line 1195 sets row 0 after rows 1–7 are set in lines 1160–1190), which is a minor ordering anomaly but produces the correct bitmap since all rows are written before the character is displayed.
Parameter Editing and OVER 1 Technique
The graphical parameter indicators are drawn using PLOT/DRAW with OVER 1, which XORs pixels onto the screen. To move an indicator, the old position is drawn again (erasing it) then the new position is drawn. This avoids clearing the entire display and is used consistently in the volume (lines 665–670), coarse tone (lines 765–770), fine tone (lines 865–870), noise (lines 600–605), and delay (lines 955–960) editors.
Enable Register Calculation
The six enable bits (tone A/B/C and noise A/B/C) are stored in the array e(6). Line 470 computes the AY register 7 value using a compact expression:
enable = 63 - (1 AND e(1)=1) - (2 AND e(2)=1) - ... - (32 AND e(6)=1)
This exploits the fact that boolean expressions return −1 (true) or 0 (false) in Sinclair BASIC, so AND with a bitmask either subtracts that bit or subtracts nothing. Starting from 63 (all channels enabled) and subtracting active bits is an efficient way to build a bitmask without bitwise OR.
Envelope Shape Display
Lines 135–190 cycle through 10 envelope shapes (variable shp, wrapping from 10 back to 1). Each shape is displayed using a combination of UDG characters printed as a 7-character string at AT 3,22, and the corresponding AY envelope register value (0–15) is stored in shape. The SOUND command at line 525 passes shape to register 13.
SOUND Command Usage
Line 525 issues a single SOUND command that programs all 14 relevant AY registers in one statement:
- Registers 0–5: fine and coarse tone for channels A, B, C
- Register 6: noise frequency (
n) - Register 7: enable mask (
enable) - Registers 8–10: volume for each channel
- Registers 11–12: envelope period (fine/coarse, stored in
d(2)/d(1)) - Register 13: envelope shape
Sound is silenced at line 550 by writing register 7 to 63 (all disabled) and zeroing the volume registers.
Animated Intro Sequence
Lines 3000–4060 produce an animated graphical and audio intro. A loop from a=0 to 20 (line 3000) draws an expanding zigzag spiral using chained DRAW commands; a second loop (line 3030) slides the figure across the screen. Lines 4000–4050 play a two-channel frequency sweep on AY channels A and C using a FOR loop over register values, with BEEP adding a three-note fanfare when the title text appears on the second pass.
Toy Piano Mode
Lines 2000–2060 implement a simple keyboard piano. Lines 2001–2015 assign numeric values to letter variables (which shadow any previous use of those names). The pressed key is read via INKEY$; its numeric value via VAL i$ indexes a frequency formula. Three AY channels are driven simultaneously with offset frequencies (g, g+10) to create a detuned chord effect. Pressing Space returns to the main program at line 10.
Notable Anomalies
- Line 1240 dimensions
a(6)but the program only uses indicesa(1)–a(3)for fine tone; the upper three elements are unused. - The enable-change subroutine starting at line 340 uses a
FORloop (lines 350–465) that containsGO TO 395to jump into the middle of the volume-change block, bypassing theNEXT uon most iterations; only the final iteration (when neither “1” nor “0” is pressed and the loop completes naturally) would reachNEXT u, making the loop structure unconventional. - Line 275 contains
a(\{18}\{0}1), where\{18}\{0}are inline attribute-change escape bytes (INK 0) embedded in the numeric literal — this is effectivelya(1)with a color side-effect, an unusual construct. - Variables named
e,d,a, etc. are used as both array names and scalar variables in different sections of the program, which can cause conflicts; the Toy Piano section at line 2010 assigns scalard=24even thoughDIM d(2)was declared at line 1240.
Content
Source Code
10 GO SUB 1000:INK 6:PAPER 0:BORDER 0:CLS
11 PRINT AT 3,14;"THE"; AT 5,11;"S O U N D"; AT 7,4;"E X P E R I M E N T E R"
15 PRINT AT 21,5;"\* 1986 BY EVERETT PENCE"
16 FOR T=1 TO 700:NEXT T
17 CLS
19 POKE 23658,8
20 OVER 0
25 LET shp=0:LET SHAPE=0:LET enable=63
30 POKE 23658,8
35 PRINT AT 1,4;"Volume"
40 PRINT AT 17,5;"Coarse"
45 PRINT AT 14,5;"Noise"
50 PRINT AT 3,0;"ABC"
55 PRINT AT 16,3;"C"; AT 17,3;"B"; AT 18,3;"A"
60 PRINT AT 18,14;"Fine"
65 PRINT AT 3,11;"Enable"
70 PRINT AT 5,14;"A"; AT 5,16;"B"; AT 5,18;"C"
75 PRINT AT 6,9;"Tone"; AT 7,8;"Noise"
80 PRINT AT 6,14;"\a"; AT 6,16;"\a"; AT 6,18;"\a"
85 PRINT AT 7,14;"\a"; AT 7,16;"\a"; AT 7,18;"\a"
90 PRINT AT 2,23;"Shape"
95 PRINT AT 0,20;"Envelope"
100 PLOT 60,140:DRAW 100,0:DRAW 0,-35:DRAW -100,0:DRAW 0,35
105 PRINT AT 15,15;"\{20}\{1}ENTER\{20}\{0} to listen"
110 PRINT AT 16,15;"\{20}\{1}\{20}\{0}SPACE to change"
115 PRINT AT 10,13;"Delay"
120 PRINT AT 19,31;"A"; AT 20,31;"B"; AT 21,31;"C"
125 PRINT AT 11,31;"F"; AT 12,31;"C"
130 GO TO 200
135 LET shp=shp+1:IF shp>10 THEN LET shp=1
140 OVER 0
145 IF shp=1 THEN PRINT AT 3,22;"\d______":LET shape=0
150 IF shp=2 THEN PRINT AT 3,22;"\e______":LET shape=4
155 IF shp=3 THEN PRINT AT 3,22;"\f\f\f\f\f\f\f":LET shape=8
160 IF shp=4 THEN PRINT AT 3,22;"\d______":LET shape=9
165 IF shp=5 THEN PRINT AT 3,22;"\d\c\d\c\d\c\d":LET shape=10
170 IF shp=6 THEN PRINT AT 3,22;"\f\g\g\g\g\g\g":LET shape=11
175 IF shp=7 THEN PRINT AT 3,22;"\e\e\e\e\e\e\e":LET shape=12
180 IF shp=8 THEN PRINT AT 3,22;"\c\g\g\g\g\g\g":LET shape=13
185 IF shp=9 THEN PRINT AT 3,22;"\c\d\c\d\c\d\c":LET shape=14
190 IF shp=10 THEN PRINT AT 3,22;"\e______":LET shape=15
195 GO TO 475
200 PLOT 4,175:DRAW 0,-16
205 PLOT 12,175:DRAW 0,-16
210 PLOT 20,175:DRAW 0,-16
215 PLOT 0,28:DRAW 15,0
220 PLOT 0,36:DRAW 15,0
225 PLOT 0,44:DRAW 15,0
230 PLOT 0,60:DRAW 31,0
235 PLOT 0,76:DRAW 247,0
240 PLOT 0,84:DRAW 247,0
245 PLOT 0,4:DRAW 247,0
250 PLOT 0,12:DRAW 247,0
255 PLOT 0,20:DRAW 247,0
260 LET n=0
265 PRINT AT 0,29;"\{20}\{1}OF\{20}\{1}F\{20}\{0}"
270 OVER 1
275 PLOT a(\{18}\{0}1),2:DRAW 0,4
280 PLOT a(2),10:DRAW 0,4
285 PLOT a(3),18:DRAW 0,4
290 PLOT 2,175-v(1):DRAW 4,0
295 PLOT 10,175-v(2):DRAW 4,0
300 PLOT 18,175-v(3):DRAW 4,0
305 PLOT c(1),26:DRAW 0,4
310 PLOT c(2),34:DRAW 0,4
315 PLOT c(3),42:DRAW 0,4
320 PLOT n,58:DRAW 0,4
325 PLOT d(2),74:DRAW 0,4
330 PLOT d(1),82:DRAW 0,4
335 GO TO 475
340 REM \{20}\{1}change enable\{20}\{0}
345 RESTORE 460:OVER 0
350 FOR u=1 TO 6
355 READ x,y
360 PRINT AT x,y;">"
365 IF INKEY$="1" THEN LET e(u)=1:GO TO 395
370 IF INKEY$="0" THEN LET e(u)=0:GO TO 395
375 GO TO 365
380 REM \{20}\{1}change volume\{20}\{0}
385 FOR u=1 TO 3
390 LET old=v(u)
395 PRINT AT x,y;" "
400 IF e(1)=1 THEN PRINT AT 6,14;"\::";
405 IF e(1)=0 THEN PRINT AT 6,14;"\a";
410 IF e(2)=1 THEN PRINT AT 6,16;"\::";
415 IF e(2)=0 THEN PRINT AT 6,16;"\a";
420 IF e(3)=1 THEN PRINT AT 6,18;"\::";
425 IF e(3)=0 THEN PRINT AT 6,18;"\a";
430 IF e(4)=1 THEN PRINT AT 7,14;"\::";
435 IF e(4)=0 THEN PRINT AT 7,14;"\a";
440 IF e(5)=1 THEN PRINT AT 7,16;"\::";
445 IF e(5)=0 THEN PRINT AT 7,16;"\a";
450 IF e(6)=1 THEN PRINT AT 7,18;"\::";
455 IF e(6)=0 THEN PRINT AT 7,18;"\a";
460 DATA 6,13,6,15,6,17,7,13,7,15,7,17
465 NEXT u
470 LET enable=63-(1 AND e(1)=1)-(2 AND e(2)=1)-(4 AND e(3)=1)-(8 AND e(4)=1)-(16 AND e(5)=1)-(32 AND e(6)=1)
475 OVER 0
480 IF INKEY$="E" THEN GO TO 340
485 IF INKEY$="S" THEN GO TO 135
490 IF INKEY$="N" THEN GO TO 565
495 IF INKEY$= CHR$ 13 THEN GO TO 525
500 IF INKEY$="V" THEN GO TO 615
505 IF INKEY$="C" THEN GO TO 715
510 IF INKEY$="F" THEN GO TO 815
515 IF INKEY$="D" THEN GO TO 910
520 GO TO 475
525 SOUND 0,a(1);1,c(1);2,a(2);3,c(2);4,a(3);5,c(3);6,n;7,enable;8,v(1);9,v(2);10,v(3);11,d(2);12,d(1);13,shape
530 PRINT AT 15,15;"ENTER"; AT 16,15;"\{20}\{1}SPACE\{20}\{0}"
535 PAUSE 1000
540 IF INKEY$=" " THEN GO TO 550
545 GO TO 535
550 SOUND 7,63;8,0;9,0;10,0
555 PRINT AT 15,15;"\{20}\{1}ENTER\{20}\{0}"; AT 16,15;"SPACE"
560 GO TO 475
565 REM \{20}\{1}NOISE\{20}\{0}
570 PRINT FLASH 1; AT 14,4;"<":OVER 1
575 LET nold=n
580 IF INKEY$="" THEN GO TO 580
585 IF INKEY$="5" AND N>0 THEN LET N=N-1:GO TO 600
590 IF INKEY$="8" AND N<31 THEN LET N=N+1:GO TO 600
595 IF INKEY$=" " THEN PRINT OVER 0; AT 14,4;" ":GO TO 475
600 PLOT nold,58:DRAW 0,4
605 PLOT n,58:DRAW 0,4
610 GO TO 575
615 REM \{20}\{1}CHANGE VOLUME\{20}\{0}
620 LET U=1:GO SUB 700
625 LET old=v(u)
630 IF INKEY$="A" THEN LET U=1:GO SUB 700
635 IF INKEY$="B" THEN LET U=2:GO SUB 700
640 IF INKEY$="C" THEN LET U=3:GO SUB 700
645 IF INKEY$="6" AND v(u)<16 THEN LET v(u)=v(u)+1:GO TO 665
650 IF INKEY$="7" AND v(u)>0 THEN LET v(u)=v(u)-1:GO TO 665
655 IF INKEY$=" " THEN GO TO 680
660 GO TO 625
665 PLOT OVER 1;U*8-6,175-old:DRAW OVER 1;4,0
670 PLOT OVER 1;U*8-6,175-v(u):DRAW OVER 1;4,0
675 GO TO 625
680 PRINT AT 3,0;"ABC"
685 PRINT AT 0,29;"\{20}\{1}OF\{20}\{1}F\{20}\{0}"
690 IF v(1)=16 OR v(2)=16 OR v(3)=16 THEN PRINT AT 0,29;"\{20}\{1}ON\{20}\{0} "
695 GO TO 475
700 PRINT AT 3,0;("\{20}\{1}A\{20}\{0}BC" AND U=1);("A\{20}\{1}B\{20}\{0}C" AND U=2);("AB\{20}\{1}C\{20}\{0}" AND U=3)
705 LET old=v(u)
710 RETURN
715 REM \{20}\{1}Change coarse tones\{20}\{0}
720 LET u=1:GO SUB 790
725 LET old=c(u)
730 IF INKEY$="A" THEN LET u=1:GO SUB 790
735 IF INKEY$="B" THEN LET u=2:GO SUB 790
740 IF INKEY$="C" THEN LET u=3:GO SUB 790
745 IF INKEY$="8" AND c(u)<15 THEN LET c(u)=c(u)+1:GO TO 765
750 IF INKEY$="5" AND c(u)>0 THEN LET c(u)=c(u)-1:GO TO 765
755 IF INKEY$=" " THEN GO TO 780
760 GO TO 725
765 PLOT OVER 1;old,24+u*8-6:DRAW OVER 1;0,4
770 PLOT OVER 1;c(u),24+u*8-6:DRAW OVER 1;0,4
775 GO TO 725
780 PRINT AT 16,3;"C"; AT 17,3;"B"; AT 18,3;"A"
785 GO TO 475
790 PRINT AT 16,3;"C"; AT 16,3;("\{20}\{1}C\{20}\{0}" AND u=3)
795 PRINT AT 17,3;"B"; AT 17,3;("\{20}\{1}B\{20}\{0}" AND u=2)
800 PRINT AT 18,3;"A"; AT 18,3;("\{20}\{1}A\{20}\{0}" AND u=1)
805 LET old=c(u)
810 RETURN
815 REM \{20}\{1}Change fine tones\{20}\{0}
820 LET u=1:GO SUB 885
825 LET old=a(u)
830 IF INKEY$="A" THEN LET u=1:GO SUB 885
835 IF INKEY$="B" THEN LET u=2:GO SUB 885
840 IF INKEY$="C" THEN LET u=3:GO SUB 885
845 IF INKEY$="8" AND a(u)<247 THEN LET a(u)=a(u)+1:GO TO 865
850 IF INKEY$="5" AND a(u)>0 THEN LET a(u)=a(u)-1:GO TO 865
855 IF INKEY$=" " THEN GO TO 880
860 GO TO 825
865 PLOT OVER 1;old,u*8-6:DRAW OVER 1;0,4
870 PLOT OVER 1;a(u),u*8-6:DRAW OVER 1;0,4
875 GO TO 825
880 PRINT AT 19,31;"C"; AT 20,31;"B"; AT 21,31;"A":GO TO 475
885 PRINT AT 21,31;"A"; AT 21,31;("\{20}\{1}A\{20}\{0}" AND U=1)
890 PRINT AT 20,31;"B"; AT 20,31;("\{20}\{1}B\{20}\{0}" AND U=2)
895 PRINT AT 19,31;"C"; AT 19,31;("\{20}\{1}C\{20}\{0}" AND U=3)
900 LET old=a(u)
905 RETURN
910 REM \{20}\{1}Change delay\{20}\{0}
915 LET u=1:GO SUB 980
920 LET old=d(u)
925 IF INKEY$="C" THEN LET u=1:GO SUB 980
930 IF INKEY$="F" THEN LET u=2:GO SUB 980
935 IF INKEY$="5" AND d(u)>0 THEN LET d(u)=d(u)-1:GO TO 955
940 IF INKEY$="8" AND d(u)<247 THEN LET d(u)=d(u)+1:GO TO 955
945 IF INKEY$=" " THEN GO TO 970
950 GO TO 920
955 PLOT OVER 1;old,72+u*8-6:DRAW OVER 1;0,4
960 PLOT OVER 1;d(u),72+u*8-6:DRAW OVER 1;0,4
965 GO TO 920
970 PRINT AT 11,31;"F"; AT 12,31;"C"
975 GO TO 475
980 PRINT AT 11,31;"F"; AT 11,31;("\{20}\{1}F\{20}\{0}" AND u=2)
985 PRINT AT 12,31;"C"; AT 12,31;("\{20}\{1}C\{20}\{0}" AND u=1)
986 LET old=d(U)
990 RETURN
995 STOP
1000 POKE USR "a", BIN 11111111
1005 POKE USR "a"+1, BIN 10000001
1010 POKE USR "a"+2, BIN 10000001
1015 POKE USR "a"+3, BIN 10000001
1020 POKE USR "a"+4, BIN 10000001
1025 POKE USR "a"+5, BIN 10000001
1030 POKE USR "a"+6, BIN 10000001
1035 POKE USR "a"+7, BIN 11111111
1040 POKE USR "c", BIN 00000001
1045 POKE USR "c"+1, BIN 00000010
1050 POKE USR "c"+2, BIN 00000100
1055 POKE USR "c"+3, BIN 00001000
1060 POKE USR "c"+4, BIN 00010000
1065 POKE USR "c"+5, BIN 00100000
1070 POKE USR "c"+6, BIN 01000000
1075 POKE USR "c"+7, BIN 10000000
1080 POKE USR "d", BIN 10000000
1085 POKE USR "d"+1, BIN 01000000
1090 POKE USR "d"+2, BIN 00100000
1095 POKE USR "d"+3, BIN 00010000
1100 POKE USR "d"+4, BIN 00001000
1105 POKE USR "d"+5, BIN 00000100
1110 POKE USR "d"+6, BIN 00000010
1115 POKE USR "d"+7, BIN 00000001
1120 POKE USR "e", BIN 00000001
1125 POKE USR "e"+1, BIN 00000011
1130 POKE USR "e"+2, BIN 00000101
1135 POKE USR "e"+3, BIN 00001001
1140 POKE USR "e"+4, BIN 00010001
1145 POKE USR "e"+5, BIN 00100001
1150 POKE USR "e"+6, BIN 01000001
1155 POKE USR "e"+7, BIN 10000001
1160 POKE USR "f"+1, BIN 01000001
1165 POKE USR "f"+2, BIN 00100001
1170 POKE USR "f"+3, BIN 00010001
1175 POKE USR "f"+4, BIN 00001001
1180 POKE USR "f"+5, BIN 00000101
1185 POKE USR "f"+6, BIN 00000011
1190 POKE USR "f"+7, BIN 00000001
1195 POKE USR "f", BIN 10000001
1200 POKE USR "g", BIN 11111111
1205 POKE USR "g"+1, BIN 00000000
1210 POKE USR "g"+2, BIN 00000000
1215 POKE USR "g"+3, BIN 00000000
1220 POKE USR "g"+4, BIN 00000000
1225 POKE USR "g"+5, BIN 00000000
1230 POKE USR "g"+6, BIN 00000000
1235 POKE USR "g"+7, BIN 00000000
1240 DIM e(6):DIM v(3):DIM c(3):DIM a(6):DIM d(2)
1245 GO TO 3000
2000 GO SUB 2500
2001 LET q=11:LET w=12:LET e=13:LET r=14:LET t=15:LET y=16
2005 LET y=17:LET u=18:LET i=19:LET o=20:LET p=21
2010 LET a=22:LET s=23:LET d=24:LET f=25:LET g=26:LET h=27:LET j=28:LET k=29:LET l=30
2015 LET i$= INKEY$:IF i$="" THEN GO TO 2015
2016 IF i$=" " THEN GO TO 10
2020 LET z= VAL i$
2025 IF z=0 THEN LET z=10
2030 SOUND 7,56;8,16;9,16;10,16;12,20;13,1
2035 SOUND 0,40+(z+1)*5
2040 SOUND 2,30+(z+1)*5
2045 SOUND 4,20+(z+1)*5
2050 IF INKEY$ <>"" THEN RESTORE :GO TO 2015
2055 IF INKEY$="" THEN GO TO 2060
2060 GO TO 2015
2500 CLS :PRINT "TOY PIANO"
2510 PRINT ''"Play the piano by pressing any key in the top three rows exceptENTER"
2515 PRINT '''"To quit, press the space bar"
2520 RETURN
3000 FOR a=0 TO 20
3005 PAUSE 10
3010 CLS
3015 PLOT 255,120:DRAW 0,a:DRAW -a,0:DRAW -a,-a:DRAW 0,-a
3020 DRAW a,-a:DRAW -a,-a:DRAW 0,-a:DRAW a,-a:DRAW a,0:DRAW 0,a
3025 NEXT a
3030 FOR S=255 TO 40 STEP -10
3035 PAUSE 10:CLS
3040 PLOT S,120:DRAW 0,a:DRAW -a,0:DRAW -a,-a:DRAW 0,-a
3045 DRAW a,-a:DRAW -a,-a:DRAW 0,-a:DRAW a,-a:DRAW a,0:DRAW 0,a
3050 NEXT S
3055 PLOT 70,141:DRAW 0,-126:DRAW 60,0
3060 PLOT 155,141:DRAW 0,-126
3065 PLOT 155,141:DRAW 0,-70,-3.7\{20}\{1}\{20}\{1}\{20}\{0}\{20}\{0}\{20}\{0}
3070 PRINT AT 15,20;"Everett L."; AT 16,20;"Pence"; AT 17,20;"Presents..."
4000 SOUND 1,0;3,0;7,60;8,15;9,15
4005 FOR l=1 TO 2
4006 IF l=2 THEN PRINT AT 18,20;" THE"; AT 19,20;" SOUND"; AT 20,20;"EXPERIMENTER":BEEP .3,0:BEEP .3,20:BEEP .8,40
4010 FOR g=100 TO 150
4015 SOUND 0,g;2,g+10
4020 PAUSE 1
4025 NEXT g
4030 FOR g=149 TO 101 STEP -1
4035 SOUND 0,g;2,g+10:PAUSE 1:NEXT g
4040 NEXT l
4045 FOR g=100 TO 200 STEP 2:SOUND 0,g;2,g+10:PAUSE 1:NEXT g
4050 FOR g=0 TO 100:SOUND 0,g;1,1;2,g+10;3,1:PAUSE 1:NEXT g
4060 CLS :SOUND 7,63;8,0;9,0;10,0
5010 PRINT AT 17,14;"THE"
5020 PRINT AT 19,11;"S O U N D"
5030 PRINT AT 21,4;"E X P E R I M E N T E R"
5060 FOR t=1 TO 6:POKE 23692,2:PRINT :NEXT t
5070 POKE 23692,2:PRINT AT 21,11;"P R E S S"
5080 POKE 23692,2:PRINT :POKE 23692,2:PRINT
5090 POKE 23692,2:PRINT AT 21,5;"1) The Sound Experimenter"
5100 POKE 23692,2:PRINT :POKE 23692,2:PRINT
5110 POKE 23692,2:PRINT AT 21,5;"2) Toy Piano"
5120 FOR t=1 TO 6:POKE 23692,2:PRINT :NEXT t
5150 IF INKEY$="2" THEN GO TO 2000
5160 IF INKEY$="1" THEN RETURN
5170 GO TO 5150
9998 SAVE "SOUND" LINE 1
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.


