start tok64 d64-uLu1Ke 1 REM music driver 2 REM a set of programs to use c64 sound via the interrupt vector 3 x0=40-7:x0=x0/2 4 REM for public domain use only 1983 by vince sorensen 5 READa$:IFa$="the end"THENPRINTTAB(x0)a$:RESTORE:a$="@" 10 IFa$="*"THENPRINT"{clear}":GOTO5 11 IFa$="@"THENGOSUB1000:GOTO5 12 k=40-LEN(a$) 14 PRINTTAB(k/2)a$ 15 POKE53280,11:POKE53281,0 16 FORi=1TO(50-k)*2:NEXT:GOTO5 100 DATA *,"{light green}music driver","{white}{cm t*12} 110 DATA ,"a set of programs","using the interrupt vector 120 DATA"in order to play music on the c64. 130 DATA ,,"for public domain use only." 140 DATA,,1983 by vince sorensen 150 DATA,,,"i can be reached through the following","people:" 151 DATA"1) public domain inc., 5025 s. rangeline" 152 DATA"{up}rd., w. milton, ohio, usa 45535 " 153 DATA"2) tpug, box 100, station 's', toronto, " 154 DATA"{up}ontario, canada m5m 4l6{space*9}" 160 DATA@ 170 DATA"3) commercial data systems, 730 eastview" 180 DATA"{up}{space*3}ave., regina, sask., canada{space*2}s4s 0a2 190 DATA"4) telegames, box 152, hampton, ontario," 200 DATA"{up}canada lob 1j0{space*18}" 220 DATA"{green}",,"{light green}general description 230 DATA"{white}{cm t*19} 240 DATA,"these programs will allow you to 250 DATA,"play music while anything else 260 DATA,"is going on. 'music driver p1' 270 DATA,"is the main machine language 280 DATA,"program, with a song included. 290 DATA,"(the song included is from the game 300 DATA"'panic city', see #3 and 4 above) 310 DATA@ 320 DATA,"'music driver p2' allows you to 330 DATA,"change the notes in the song. 340 DATA,"there must be exactly 256 notes 350 DATA,"in the song, no more, no less. 360 DATA,"this is perfect, however for 370 DATA,"songs in 4/4 time, since 256 380 DATA,"is 4 x 4 x 4 x 4 (4^4). 390 DATA@ 400 DATA,"'music driver p3' is a short program 410 DATA,"to remind the user of exactly how to 420 DATA,"load 'p4'.{space*2}'music driver p4' is the 430 DATA,"same as 'p1', except a different 440 DATA,"song is played. 450 DATA,"finally, '3voice music' is a third 460 DATA,"program like 'p1', except that all 470 DATA,"three voices are used to provide a 480 DATA,"beat and instrument demonstration. 490 DATA@ 500 DATA,"{light green}music driver p1" 510 DATA"{white}{cm t*15}" 520 DATA,"to turn on the sound, type sys2400. 530 DATA,"to turn it off, hit run stop/restore 540 DATA,"{space*16}or type sys2130.{space*4}" 550 DATA,"when used in a program, the follwing 560 DATA,"should be noted: 570 DATA,"sys2130 is the only practical way to 580 DATA,"turn off the sound. when the music 590 DATA,"when an sys2400 is done, the screen 600 DATA@,,"clears, a start-up/status message 610 DATA,"is displayed,{space*2}and the start of basic 620 DATA,"is moved to $1{0*3}, 4096 decimal, 630 DATA,"which is the start of basic in the 640 DATA,"unexpanded vic. 650 DATA,"this is so that your program does not 660 DATA,"disturb the music driver's work. 670 DATA@ 680 DATA,,"this is will in any way affect your" 690 DATA,"program run, except that sound can 700 DATA,"only be turned on when you want 710 DATA,"the screen cleared. 720 DATA"{light green}",,"{light green}music driver p2" 730 DATA"{white}{cm t*15}" 740 DATA,"when run, you will be asked for 256 750 DATA,"notes. the notes should be given like 760 DATA,"the following examples{.*3} 770 DATA,"{yellow}a1 c#2 b3 g#1 e2 f2 d#1{white}",@,,,, 771 DATA"in order to use this program, you must" 772 DATA"first load a main driver program 773 DATA"(i.e.: 'p1', 'p3', or '3voice'). 774 DATA"run it (sys2400), and then load 'p2'. 775 DATA"after changing the notes, type 'new'. 776 DATA"in order to save your new song, you 777 DATA"just have to change the start of basic 778 DATA"back to it's usual spot. (when you 779 DATA"type 'new', end of basic is reset to 780 DATA"to $1{0*3}, so no need to change this) 781 DATA"type{space*4}poke44,8:clr [return]" 782 DATA"then save. afterwards, sys2400 to 783 DATA"start of basic back to $1{0*3}.",@ 800 DATA,"{light green}memory use" 810 DATA"{white}{cm t*10}" 820 DATA," $0800-$0815 basic: 'sys2400'{space*7}" 830 DATA," $0815-$08ff ml for set-up of driver" 840 DATA," $0900-$09ff main driving ml{space*8}" 850 DATA," $0b00-$0bff high bytes for notes{space*3}" 860 DATA," $0c00-$0{f*3} not used in 'p1', 'p3'," 870 DATA"{space*13}used for data and ml in" 880 DATA"{space*13}'3voice music' program." 900 DATA"{yellow}",,, 990 : 1000 PRINT"{home}{down*23}{right*3}hit any key to continue{.*3}" 1010 GETr$:IFr$<>""THEN1010 1020 GETr$:IFr$=""THEN1020 1030 PRINT"{clear}":RETURN 1040 DATAthe end 1050 END 1060 the addresses: 1100 : public domain inc. 1110 : 5025 s. rangeline road 1120 : west milTOn, ohio, usa 45535 1130 : 1140 : TOrONTO pet users group inc. 1150 : box 100, statiON "s" 1160 : TOrONTO, ONtario 1170 : canada m5m 4l6 1180 : 1190 : commercial DATA systems 1200 : 730 eastview avenue 1210 : regina, saskatchewan 1220 : canada s4s 0a2 1230 : 1240 : telegames 1250 : box 152 1260 : hampTOn, ONtario 1270 : canada l0b 1j0 1280 : 1290 : fantasy universal software 1300 : 3615 mccallum avenue 1310 : regina, saskatchewan 1320 : canada s4s 0s6 1330 : 1340 : 1350 : 1360 :::::::::END of addresses:::::::::: 2000 : 2010 : 2020 : 2030 >>>>music driver<<<< 2040 a series of programs 2050 uSINg INTerrupts AND 2060 sound ON the c64. 2070 : 2080 (c) 1983 vince sORensen 2090 : 2100 this program is FOR 2110 public domain use ONly. 2120 : 2130 : 2140 : 2150 ....................... stop tok64 (bastext 1.0)