home *** CD-ROM | disk | FTP | other *** search
- 0 rem:musicom 64:copyright 1985 by joe kaczynski
- 5 clr:s=54272:forl=stos+24:pokel,0:next
- 10 dimh%(2,1450),l%(2,1450),c%(2,1450),d(3),r(3),v(3),fq(11):z=0
- 15 fora=0to11:readfq(a):next:poke53281,0
- 20 poke53280,2:print"[147][154] [146]"
- 25 print" welcome to songfest [146]"
- 30 print"[154] [146]"
- 35 print"menu[146]"
- 40 print"r[154]= read [150]preprogrammed song from disk"
- 45 print"p= play song once"
- 50 print"c= continuous [150]play spacebar [150]to end[146]"
- 55 print"i= input notes of your own song"
- 60 print"a= add [150]notes to song"
- 65 print"m= modify [153]waveform, a/d, s/r"
- 70 print"s= sound [150]change during playback"
- 75 print"e= error correction [153]after input"
- 80 print"k= [153]keyboard synthesizer"
- 85 print"q= quit and exit program"
- 90 geta$:ifa$=""then90
- 95 gosub165
- 100 ifa$="r"thengosub525:ifva%=3then375:goto20
- 105 ifa$="p"then155
- 110 ifa$="c"then155
- 115 ifa$="i"then195
- 120 ifa$="a"thenz=2:i=im:d=im:goto240
- 125 ifa$="m"thenz=1:gosub195:goto20
- 130 ifa$="s"thengosub825:goto20
- 135 ifa$="e"thenz=3:goto645
- 140 ifa$=chr$(81)thenend
- 145 ifa$="k"thenprint"[147]":goto895
- 150 goto20
- 155 ifim<>0then375
- 160 goto20
- 165 ifa$<>"r"anda$<>"i"anda$<>"p"thenreturn
- 170 ifa$="p"andim=0thenreturn
- 175 print"[147][153]how many voices would you like?[146]"
- 180 input" (1,2,or 3)";va%
- 185 ifva%>3orva%<1thenprint"please reenter (1 2 or 3)[146]":goto175
- 190 vb%=va%-1:return
- 195 fork=0tovb%
- 200 print"[147]parameters for voice"k"are now:w/f-"v(k)", a/d-"d(k)",s/r-"r(k)
- 205 print"[153]enter new parameters for voice #"k":"
- 210 input"[153]w/f(17,33,65)";v(k)
- 215 ifv(k)=65theninput"hi pulse(0-15)";hp(k):input"lo pulse(0-255)";lp(k)
- 220 input"[150]a/d(0to255)";d(k)
- 225 input"s/r(0to255)";r(k)
- 230 ifz=1thennext:z=0:return
- 235 next
- 240 fork=0tovb%:ifz=2theni=d:goto250
- 245 i=0:d=0
- 250 print"[147]record measure #[160](closest to note,only)"
- 255 print"before going to next voice or for note error correction[146]"
- 260 print"[153]voice #"k" [150]enter notes"
- 265 print"[153]enter 0,0,0 to go to next voice"
- 270 ifz=3thenz=0:goto20
- 275 gosub710
- 280 ifk=2andi=imthend=im
- 285 ifnm=0andk<>0andi<>imthenprint"[147][150]error in entry. redo last series"
- 290 ifnm=0andk<>0andi<>imtheni=d:im=d:fort=1to2000:next:goto240
- 295 ifnm=0then365
- 300 b=i/16
- 305 wa=v(k):ifnm<0thennm=-nm:wa=1
- 310 dr%=nm/128:oc%=(nm-128*dr%)/16
- 315 nt=nm-128*dr%-16*oc%
- 320 fr=fq(nt)
- 325 if oc%=7then335
- 330 forj=6tooc%step-1:fr=fr/2:next
- 335 hf%=fr/256:lf%=fr-hf%*256
- 340 ifdr%=1thenh%(k,i)=hf%:l%(k,i)=lf%:c%(k,i)=wa:i=i+1:c=i/16
- 345 ifdr%=1thenprint"[145][153]meas."b"[153]to"c:goto270
- 350 forj=1todr%-1:h%(k,i)=hf%:l%(k,i)=lf%:c%(k,i)=wa:i=i+1:next
- 355 h%(k,i)=hf%:l%(k,i)=lf%:c%(k,i)=wa-1
- 360 i=i+1:c=i/16:print"[145][153]meas."b"[153]to"c:goto270
- 365 ifk=0thenim=i
- 370 next:z=0:goto20
- 375 rem song words
- 380 ifim<>0then390
- 385 goto395
- 390 print"[147][153] now playing ";ns$
- 395 pokes+18,0:pokes+4,0:pokes+11,0
- 400 onva%goto415,410,405
- 405 pokes+19,d(2):pokes+20,r(2):pokes+16,lp(2):pokes+17,hp(2)
- 410 pokes+12,d(1):pokes+13,r(1):pokes+9,lp(1):pokes+10,hp(1)
- 415 pokes+5,d(0):pokes+6,r(0):pokes+2,lp(0):pokes+3,hp(0)
- 420 pokes+24,15
- 425 a1$=""
- 430 fori=0toim
- 435 geta1$:ifa1$=" "thenpokes+24,0:goto20
- 440 onva%goto455,450,445
- 445 pokes+14,l%(2,i):pokes+15,h%(2,i):pokes+18,c%(2,i)
- 450 pokes+7,l%(1,i):pokes+8,h%(1,i):pokes+11,c%(1,i)
- 455 pokes,l%(0,i):pokes+1,h%(0,i):pokes+4,c%(0,i)
- 460 onva%goto465,470,475
- 465 forr=1to28:next
- 470 forr=1to28:next
- 475 next
- 480 ifa$="c"then155
- 485 pokes+24,0
- 490 print"[147][153]do you wish to write the song to disk? y/n "
- 495 geta$:ifa$=""then495
- 500 ifa$="y"thengosub585
- 505 goto20
- 510 data34334,36376,38539,40830
- 515 data43258,45830,48556,51443
- 520 data54502,57743,61176,64814
- 525 print"[147]":poke53280,4
- 530 print"[147] choose a song and enter the[153] name only [144] (without quotes)"
- 535 input"[153]name of song";ns$
- 540 x$=","
- 545 open2,8,2,"00:"+ns$+",s,r":ti$="000000"
- 550 print"[147][153] loading ";ns$:print"please wait[146]"
- 555 input#2,im:ifim=0then580
- 560 fork=0tovb%:input#2,v(k),d(k),r(k),lp(k),hp(k):next
- 565 fori=1toim:fork=0tovb%:input#2,h%(k,i),l%(k,i),c%(k,i):next
- 570 print"[158]";ti$:next
- 575 ifim<>0thenclose2:return
- 580 print"[147][150]file not found [146]":close2:goto535
- 585 print"[147]":print"[153]insert disk into drive":print"enter s to save"
- 590 print"[150]enter n if you change your mind"
- 595 geta3$:ifa3$=""then595
- 600 ifa3$="n"then20
- 605 ifa3$="s"then615
- 610 goto595
- 615 x$=",":input"[147]name of song";ns$
- 620 open2,8,2,"00:"+ns$+",s,w
- 625 [153]"saving song to diskwait":[152]2,im
- 630 [129]k[178]0[164]vb%:[152]2,v(k)x$d(k)x$r(k)x$lp(k)x$hp(k):[130]
- 635 [129]i[178]1[164]im:[129]k[178]0[164]vb%:[152]2,h%(k,i)x$l%(k,i)x$c%(k,i):[130]:[130]
- 640 [160]2:[142]
- 645 [143] change note and octave
- 650 [153]"loadprintenter voice(0,1,or 2)";:[133]k
- 655 [139]k[177]2[167][153]"load loadloadload":[137]650
- 660 [153]"loadprintenter measure # for note"
- 665 [153]"you wish to change"
- 670 [133]"printenter this numberwait";e1
- 675 e2[178][181](e1):e[178]e2:[139]e[179]0[167]e[178]0
- 680 f[178](e1[171]e2)[172]16
- 685 i[178]16[172]e[170]f
- 690 [153]"loadprintenter new note, octave, and duration# "
- 695 [153]"do not wait defchange the duration #."
- 700 [133]np$,no,nd
- 705 [141]715:[137]305
- 710 [133]"defn,printo,contd";np$,no,nd
- 715 [139]np$[178]"0"[167]nm[178]0:[142]
- 720 [139]np$[178]"s"[167]nm[178][171]128[172]nd:[142]
- 725 [139]np$[178]"c"[167]np[178]0
- 730 [139]np$[178]"c#"[167]np[178]1
- 735 [139]np$[178]"d&"[167]np[178]1
- 740 [139]np$[178]"d"[167]np[178]2
- 745 [139]np$[178]"d#"[167]np[178]3
- 750 [139]np$[178]"e&"[167]np[178]3
- 755 [139]np$[178]"e"[167]np[178]4
- 760 [139]np$[178]"f"[167]np[178]5
- 765 [139]np$[178]"f#"[167]np[178]6
- 770 [139]np$[178]"g&"[167]np[178]6
- 775 [139]np$[178]"g"[167]np[178]7
- 780 [139]np$[178]"g#"[167]np[178]8
- 785 [139]np$[178]"a&"[167]np[178]8
- 790 [139]np$[178]"a"[167]np[178]9
- 795 [139]np$[178]"a#"[167]np[178]10
- 800 [139]np$[178]"b&"[167]np[178]10
- 805 [139]np$[178]"b"[167]np[178]11
- 810 [139]np$[178]"c&"[167]np[178]11
- 815 nm[178]128[172]nd[170]16[172]no[170]np
- 820 [142]
- 825 [153]"load"
- 830 [153]"printpress f1..f3..f5..f7"
- 835 [153]"for unusual harmonics"
- 840 [161] b$:[139]b$[178]""[167]840
- 845 [151]s[170]24,15
- 850 [139] b$[178]"input"[167][151]s[170]5,9:[151]s[170]6,90:[151]s[170]12,8:[151]s[170]13,9
- 855 [139]b$[178]"input"[167][151]s[170]19,6:[151]s[170]20,69:[137]425
- 860 [139]b$[178]"dim"[167][151]s[170]5,63:[151]s[170]6,240:[151]s[170]12,113:[151]s[170]13,53
- 865 [139]b$[178]"dim"[167][151]s[170]19,119:[151]s[170]20,7:[137]425
- 870 [139]b$[178]"read"[167][151]s[170]5,36:[151]s[170]6,197:[151]s[170]12,53:[151]s[170]13,53:[151]s[170]10,6
- 875 [139]b$[178]"read"[167][151]s[170]19,119:[151]s[170]20,7:[137]425
- 880 [139]b$[178]"let"[167][151]s[170]5,15:[151]s[170]6,240:[151]s[170]12,10:[151]s[170]13,167:[151]s[170]10,0
- 885 [139]b$[178]"let"[167][151]s[170]19,119:[151]s[170]20,240:[137]425
- 890 [142]
- 895 [156]:[151]53280,11:[153]"loadkeyboard functionwait"
- 900 [153]"printf1..f3..f5..f7..select octaves"
- 905 [153]"contf2..f4..f6..select waveforms."
- 910 [153]"print#f8..maintains a note till next note"
- 915 [153]"is played"
- 920 [153]"printpressing spacebar selects solo or"
- 925 [153]"polyphonic sound."
- 930 [153]"fornotes and corresponding key chart"
- 935 [153]"printnote..c c# d d# e f f# g g# a a# b c"
- 940 [153] "key...q 2 w 3 e r 5 t 6 y 7 u i "
- 945 [153]"printnotes cont. c# d d# e f f# g g# a"
- 950 [153]"keys cont. 9 o 0 p @ - * \ ^"
- 955 [153]"press print z for main programwait"
- 960 s[178]54272:[134]x(26):[134]y(255):[129]i[178]0[164]28:[151]s[170]i,0:[130]
- 965 x1[178]7040:[129]i[178]1[164]26:x(27[171]i)[178]x1[172]5.8[170]30:x1[178]x1[173]2[174](1[173]12):[130]
- 970 y$[178]"q2w3er5t6y7ui9o0p@-*\^"
- 975 [129]i[178]1[164][195](y$):y([198]([202](y$,i)))[178]i:[130]
- 980 at[178]0:de[178]0:su[178]15:re[178]10:sr[178]su[172]16[170]re:ad[178]at[172]16[170]de:wv[178]16:w[178]0:m[178]1:oc[178]4:hb[178]256
- 985 z[178]0
- 990 [129]i[178]0[164]2:t[178]i[172]7:[151]s[170]5[170]t,ad:[151]s[170]6[170]t,sr
- 995 [151]s[170]2[170]t,4000[175]255:[151]s[170]3[170]t,4000[173]256:[130]:[151]s[170]24,15
- 1000 [161]d$:[139]d$[178]""[167]1000
- 1005 fr[178]y([198](d$)):[139]fr[178]z[167]1035
- 1010 fr[178]x(fr)[173]m:t[178]v[172]7:cr[178]s[170]t[170]4:[151]s[170]5[170]t,z:[151]s[170]6[170]t,z
- 1015 [151]cr,8:[151]cr,z:[151]s[170]t,fr[171]hb[172][181](fr[173]hb):[151]s[170]1[170]t,fr[173]hb
- 1020 [151]s[170]5[170]t,ad:[151]s[170]6[170]t,sr:[151]cr,wv[170]1:[129]i[178]1[164]50[172]at:[130]:[151]cr,wv
- 1025 [139]p[178]1[167]v[178]v[170]1:[139]v[178]3[167]v[178]0
- 1030 [137]1000
- 1035 [139]d$[178]"input"[167]m[178]1:oc[178]4:[137]1000
- 1040 [139]d$[178]"dim"[167]m[178]2:oc[178]3:[137]1000
- 1045 [139]d$[178]"read"[167]m[178]4:oc[178]2:[137]1000
- 1050 [139]d$[178]"let"[167]m[178]8:oc[178]1:[137]1000
- 1055 [139]d$[178]"goto"[167]w[178]0:wv[178]16:[137]1000
- 1060 [139]d$[178]"run"[167]w[178]1:wv[178]32:[137]1000
- 1065 [139]d$[178]"if"[167]w[178]2:wv[178]64:[137]1000
- 1070 [139]d$[178]"restore"[167]w[178]0:wv[178]17:[137]1000
- 1075 [139]d$[178]"z"[167][151]s[170]24,0:[138]5
- 1080 [139]d$[178]" "[167]p[178]1[171]p:[137]1000
- 1085 [137]1000
-