Program Printout: Beethoven

Beethoven: "Now that my music is on computer, am I called a 'modern musician'?"
Beethoven: "Now that my music is on computer, am I called a 'modern musician'?"

BEETHOVEN is a remarkable program which allows you to produce music from your T/S1000,ZX81. Stephane Crainic of Paris has linked hex values to the tones available from the speaker of your television set and has produced a table allowing you to convert the notes of the musical scale into those values.

When you have typed in the program, enter GOTO 110 so that you can read the instructions and the table of scales and hex codes. Then transpose your tune into hex. After reading the instructions and pressing keys to continue, the screen will show 0/9998.

Enter LIST 10, EDIT, and alter the A$ to the list of the hex values into which you have converted your tune. Increase the volume of your TV, enter GOTO 1 and your tune will be produced. The notes produced are all off-key but the quality is certainly acceptable when you consider how they are made. Lower-case letters in our listing signify inverse video (16K T/S1000,ZX81).

   1 REM 12345678901234567890123456789012345678901234544
2 REM .......................................................................................................................................................................................
10 LET A$="... "
20 LET A$=A$+"FFF"
25 LET O=16567
30 FOR I=1 TO LEN A$-1 STEP 2
40 POKE O,(CODE A$(I)-28)*16+CODE A$(I+1)-28
50 LET O=O+1
60 NEXT I
70 FAST
80 LET K=USR 16546
99 STOP
100 SAVE "BEETHOVEn"
110 PRINT "********************************************BEETHOVEN********************************************"
120 PRINT ,,"PROGRAMME CREATED BY S. CRAINIC FOR THE SINCLAIR ZX81 +16K"
130 PRINT ,,"EACH SOUND CORRESPONDS TO AN HE-XADECIMAL VALUE. IN ORDER TO OB-TAIN THE DESIRED MELODY,YOU MUSTENTER SUCCESSIVELY IN LINE 10 (LET A$=""... ..."") THE HEXADECI-MAL CODE OF EACH SOUND IN THEIR ORDER IN THE MELODY."
140 PRINT "THE SOUNDS HAVE EQUAL LENGTHS. A LONGER DURATION OF A GIVEN SOUND COULD BE OBTAINED BY ENTE-RING MANY TIMES SUCCESSIVELY THECODE CORRESPONDING.TO THE SAME SOUND. INTERVALS ARE OBTAINED BYENTERING THE ""00"" VALUE."
145 PRINT AT 21,0;"HIT A KEY TO CONT."
150 IF INKEY$="" THEN GOTO 150
155 CLS
160 PRINT " NOTE 1ST SCALE 2ND SCALE--------------------------------"
165 DIM B$(2,24)
170 LET B$(1)="F0E5D8CFC3B8ADA59C948B83"
175 LET B$(2)="7A736B67605A56514B484440"
180 LET C$="C C+;D-D D+;E-E F F+;G-G G+;A-A A+;B-B "
190 FOR I=1 TO 12
200 PRINT C$(I*5-4 TO I*5);TAB 11;B$(1,I*2-1 TO I*2);TAB 24;B$(2,I*2-1 TO I*2)
210 NEXT I
220 PRINT ,,"AS EXAMPLES, SOME MELODIES WERE CODED IN LINES 1000... IF YOU WANT TO ""PLAY"" ONE OF THEM, EN- TER run 1000, OR 1010... >make the tone of your tv set louder AND newline."
230 PRINT AT 21,0;" HIT A KEY TO CONT "
240 IF INKEY$="" THEN GOTO 240
245 CLS
247 PRINT "EXCUSE ME, I""M WORKING..."
248 FOR I=1 TO 30
249 NEXT I
250 FAST
255 RUN 9990
1000 REM happy birthday
1005 LET A$="B8B800B800A5A500B8B8008B8B00949494940000B8B800B800A5A500B8B8008B8B009494949400B8B800B800606060737373008B8B8B00949400A5A5A5006B6B006B737300949400838300949494"
1009 GOTO 20
1010 REM 40th symphony
1011 LET A$="B8C300C3C300B8C300C3C300B8C300C3C37A7A7A007A8394940094A5B8B800B8C3D8D800D8D8D800C3D800D8D8C3D800D8D800C3D800D8D88383830083949C9C009CB8C3C300C3D8F0F000F0F0007A830083836B6B9C9C83839494C3C3007A830083836B6B9C9C838394947A7A007A8394A5B8B8C3C3B8B8"
1019 GOTO 20
9989 STOP
9990 LET A$="7B3D20FDC906E05EAFBB280CDBFECD8240D3FFCD824018050E050D20FD10E8C921B740CD8740237EFEFF20F7C9"
9991 LET O=16514
9992 FOR I=1 TO LEN A$-1 STEP 2
9993 POKE O,(CODE A$(I)-28)*16+CODE A$(I+1)-28
9994 LET O=O+1
9996 NEXT I
9997 SLOW
9998 CLS

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.