1 'TOY PIANO by Glen Monnett 2 'October 2, 1984 Ver.2 3 'There are two variables in line 4 '15 which can be changed to suit 5 'your own taste. X is any whole 6 'number; the larger the number, the 7 'longer the sound after you press a 8 'key. Y is any number between 1 9 'and 5. Whole numbers for Y will 10 ' result in the actual pitches 11 ' indicated by the "piano" keyboard 12 ' on the screen. Rational numbers 13 ' for Y will put you in another key. 14 DIMS(13) 15 X=7:Y=2 20 FORI=1TO13:READS(I):NEXTI 30 FORI=1TO13:S(I)=INT(S(I)/Y):NEXTI 40 GOSUB300 100 S$=INKEY$ 110 IFS$="z"THENSOUNDS(1),X 120 IFS$="s"THENSOUNDS(2),X 130 IFS$="x"THENSOUNDS(3),X 140 IFS$="d"THENSOUNDS(4),X 150 IFS$="c"THENSOUNDS(5),X 160 IFS$="v"THENSOUNDS(6),X 170 IFS$="g"THENSOUNDS(7),X 180 IFS$="b"THENSOUNDS(8),X 190 IFS$="h"THENSOUNDS(9),X 200 IFS$="n"THENSOUNDS(10),X 210 IFS$="j"THENSOUNDS(11),X 220 IFS$="m"THENSOUNDS(12),X 230 IFS$=","THENSOUNDS(13),X 250 GOTO100 300 CLS:LINE(23,20)-(23,52):LINE(23,52)-(43,52):LINE(43,52)-(43,36):LINE(35,20)-(55,36),1,BF 310 LINE(47,36)-(47,52):LINE(47,52)-(67,52):LINE(67,52)-(67,36):LINE(59,20)-(79,36),1,BF 320 LINE(71,36)-(71,52):LINE(71,52)-(91,52):LINE(91,52)-(91,20) 330 LINE(95,20)-(95,52):LINE(95,52)-(115,52):LINE(115,52)-(115,36):LINE(107,20)-(127,36),1,BF 340 LINE(119,36)-(119,52):LINE(119,52)-(139,52):LINE(139,52)-(139,36):LINE(131,20)-(151,36),1,BF 350 LINE(143,36)-(143,52):LINE(143,52)-(163,52):LINE(163,52)-(163,36):LINE(155,20)-(175,36),1,BF 355 REM LINE TOY PIANO,(C)1984 BY GLEN MONNETT 2 360 LINE(167,36)-(167,52):LINE(167,52)-(187,52):LINE(187,52)-(187,20) 370 LINE(191,20)-(191,52):LINE(191,52)-(211,52):LINE(211,52)-(211,36):LINE(211,36)-(203,36):LINE(203,36)-(203,20) 390 PRINT@205,"z":PRINT@209,"x":PRINT@213,"c":PRINT@217,"v":PRINT@221,"b":PRINT@225,"n":PRINT@229,"m":PRINT@233,"," 395 PRINTCHR$(27);"p":PRINT@127,"s":PRINT@131,"d":PRINT@139,"g":PRINT@143,"h":PRINT@147,"j":PRINTCHR$(27);"q" 400 RETURN 2000 DATA9394,8866,8368,7900,7456,7032,6642,6269,5918,5586,5272,4976,4697