home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1985 August
/
Ahoy_Magazine_85-08_1985_Double_L.d64
/
sound-a-rama
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
5KB
|
195 lines
30 print"[147]"spc(14)"sound-a-rama[146]"
40 print"if you're using the dos wedge, please disable it by entering"
50 printspc(18)"@q"
60 print"this will make the program run faster."
70 print"then enter":printspc(15)"run 110"
80 end
100 rem sound-a-rama by bruce bartlett oct. 1984
110 goto 1520
120 rem ***computer tape recorder--main loop***
130 getc$(n):ifc$(n)=""then 130
140 ifc$(n)="p"thenifn>unthenprint"[147]playing...":m=n:pokes+4,16:n=1:goto 180
150 ifc$(n)="m"thenrun110
160 pokes+f,xt:d(n-un)=ti:ti$="000000":pokes+f,se:pokes+un,tn*val(c$(n))
170 n=n+un:goto 130
180 pokes+f,se:pokes+un,tn*val(c$(n)):fort=untott*d(n):next:pokes+f,xt
190 n=n+un:ifn=mthenrun1860
200 goto 180
210 rem ***drum machine--main loop***
220 geta$
230 ifa$="m"thenpoke650,0:run110
240 onval(a$)goto 270, 300, 330, 360, 390, 420
250 goto 220
260 rem ***hi hat***
270 pokefu,tf:pokefl,tf:pokead,fv:pokesr,fv
280 pokew,wn:fort=untofy:next:pokew,we:goto 220
290 rem ***snare***
300 pokefu,sy:pokefl,.:pokead,.:pokesr,tv
310 pokew,wn:fort=untofy:next:pokew,we:goto 220
320 rem ***hi tom***
330 pokefu,et:pokefl,.:pokead,.:pokesr,tn:pokev,tl:pokev,ft
340 pokew,se:fort=untofy:next:pokew,xt:goto 220
350 rem ***low tom***
360 pokefu,sx:pokefl,.:pokead,.:pokesr,tn:pokev,tl:pokev,ft
370 pokew,se:fort=untofy:next:pokew,xt:goto 220
380 rem ***kick drum***
390 pokefu,te:pokefl,. :pokead,.:pokesr,tr:pokev,th:pokev,ft
400 pokew,se:fort=untofy:next:pokew,xt:goto 220
410 rem ***cymbal***
420 pokefu(2),tf:pokefl(2),tf:pokead(2),nn:pokesr(2),nn
430 pokew(2),wn:fort=untofy:next:pokew(2),we:goto 220
440 rem ***winding down record***
450 d=60
460 forn=1to1.75step.25:pokew,33:pokew,17:pokefu,30*n-.04*d:fort=1tod:next
470 d=d*1.05
480 ifd>700thenforf=16to0step-.08:pokefu,f:next:pokew,16:goto 1760
490 nextn
500 pokew,16:goto 460
510 rem ***pulverizer***
520 pokew,19
530 pokesu,32
540 forn=1to20
550 forf=255to1step-n:pokefu,f:nextf
560 nextn
570 pokew,18
580 goto1760
590 rem ***disintegrator***
600 pokesl,67:pokesu,12
610 pokew,21
620 forr=1to3:forn=1to40
630 forf=0to255stepn+5:pokefu,f:nextf
640 nextn,r
650 pokew,20:goto 1760
660 rem ***old washing machine***
670 forn=1to20
680 forf=1to64
690 pokew,17:pokefu,f:fort=1to15:next:pokew,32:fort=1to5:next
700 f=f*2:nextf,n:goto 1760
710 rem ***energy levels***
720 pokead,9:pokesr,64+12
730 pokesu,3:pokesl,220
740 pokefl,10
750 pokew,21
760 fort=1to2500:pokefu,t/100:next
770 pokew,20:goto 1760
780 rem ***nervous***
790 pokead,63:pokefu,4:pokefl,10:pokesu,10
800 pokew,21
810 forn=1to25
820 forf=0to255step20:pokesl,f:nextf
830 forf=255to0step-20:pokesl,f:nextf
840 nextn
850 pokew,20:goto 1760
860 rem ***sproing***
870 pokesr,15*16+9
880 pokew,33:pokefu,3:fort=1to150:next
890 pokefu,67:pokew,19
900 forn=1to50
910 forf=0to50stepn:pokesu,f:nextf,n
920 pokew,18:fort=1to500:next:goto 1760
930 rem ***force field***
940 pokead,13*16+15:pokesr,15*16+15
950 pokesu,3:pokesl,220
960 pokefu,23:pokefl,10:pokew,21
970 fort=1to5000:next:forl=15to1step-.05:pokev,l:next
980 pokew,0:fort=1to500:next:pokev,15:goto 1760
990 rem ***involution***
1000 pokev,15+32:pokes+23,239
1010 pokew,33
1020 forsp=10to255
1030 forf=255to0step-sp:pokefu,f:pokes+22,f:next
1040 nextsp
1050 pokew,32:pokes+23,0:goto 1760
1060 rem ***aviary***
1070 forloop=1to2:pokead,119:forn=1to15:pokew,17
1080 forf=int(rnd(.)*50)+50toint(rnd(.)*150)+50step2:pokefu,f:nextf:pokew,16
1090 nextn
1100 pokev,12:pokead,15
1110 pokew,17:forn=1toint(rnd(1)*10)+8:forf=50to200step20:pokefu,f
1120 nextf,n
1130 forn=1toint(rnd(1)*10)+8:forf=50to200step10:pokefu,f
1140 nextf,n
1150 pokew,16:pokev,15:nextloop:goto 1760
1160 rem ***ghost***
1170 forn=1to2
1180 forfs=100to0step-5:pokew,17
1190 forf=30to5step-2:pokefu,f+fs:next
1200 forf=5to30step2:pokefu,f+fs:next
1210 pokew,16:nextfs,n
1220 pokew,16:goto 1760
1230 rem ***song of saturn***
1240 pokead,16*11:pokesr,16*15+11:pokes+23,239:pokev,15+32
1250 forn=1to10:pokefu,int(rnd(1)*10)+1
1260 forsw=0toint(rnd(1)*200):pokew,129:pokes+22,sw:nextsw
1270 pokew,128:fort=1to400:next
1280 nextn
1290 fort=1to1500:next:pokes+23,0:pokev,15:goto 1760
1300 rem ***ketchup squirts***
1310 pokead,15:pokes+23,239:pokev,15+32
1320 forn=1to10
1330 pokew,33
1340 forsw=0to150stepint(rnd(1)*20)+3
1350 pokes+22,sw:pokefu,int(rnd(1)*10):next
1360 pokew,32:fort=1to400:next
1370 nextn
1380 pokes+23,0:pokev,15:goto 1760
1390 rem ***elf laugh***
1400 forl=1to3:f=l*10+50
1410 forn=1to10:pokew,33
1420 pokefu,f:fort=1to3:next:pokew,128:fort=1to60:next
1430 f=f-5
1440 nextn,l
1450 goto 1760
1460 rem ***throb***
1470 pokefu,1
1480 forf=255to180step-.06
1490 pokefl,f:pokew,33:pokew,17:next
1500 pokew,32:goto 1760
1510 rem ***initialization***
1520 print"[147]":poke53281,0:poke53280,10
1530 s=54272:forl=0to24:pokes+l,.:next
1540 v=s+24:w=s+4:fu=s+1:fl=s:ad=s+5:sr=s+6:sl=s+14:su=s+15:pokev,15
1550 w(2)=s+11:fu(2)=s+8:fl(2)=s+7:ad(2)=s+12:sr(2)=s+13
1560 printspc(10)"***[158]sound-a-rama[146]***[154]"
1570 print:print
1580 print"a[146] computer tape recorder
1590 [153]"bwait drum machine"
1600 [153]"cwait winding down record"
1610 [153]"dwait pulverizer"
1620 [153]"ewait disintegrator"
1630 [153]"fwait old washing machine"
1640 [153]"gwait energy levels"
1650 [153]"hwait nervous"
1660 [153]"iwait sproing"
1670 [153]"jwait force field"
1680 [153]"kwait involution"
1690 [153]"lwait aviary"
1700 [153]"mwait ghost"
1710 [153]"nwait song of saturn"
1720 [153]"owait ketchup squirts"
1730 [153]"pwait elf laugh"
1740 [153]"qwait throb"
1750 [153]"open type the letter of your choicecont"
1760 [151]fu,0:[151]fl,0:[151]ad,15:[151]sr,0
1770 [139]a[177]0[175]a[179]18[167][153]"":[129]n[178]1[164]a[170]3:[153]:[130]:[153]"cont"[199](a[170]64)"wait"
1780 [161]a$:[139]a$[178]""[167]1780
1790 a[178][198](a$)[171]64:[139]a[179]1[176]a[177]17[167] 1780
1800 [153]"":[129]n[178]1[164]a[170]3:[153]:[130]:[153]"sys"[199](a[170]64)"wait"
1810 [139]a[178]16[167] 1400
1820 [139]a[178]17[167] 1470
1830 [145]a[137]1860,1920,450,520,600,670,720,790,870,940,1000,1070,1170,1240,1310
1840 [137] 1780
1850 [143] ***computer tape recorder initialization***
1860 [134]c$(500),d(500):se[178]17:xt[178]16:un[178]1:f[178]4:tn[178]10:tt[178]13:n[178]1:s[178]54272:[151]s[170]5,9
1870 [151]53281,9:[151]53280,4:[153]"load"[166]8)"syscomputer tape recorderwait"
1880 [153]"openplay music on keys 1-9.":[153]"hit spacewait when done."
1890 [153]"hit 'p' to play the recording."
1900 [153]"hit 'm' to return to main menu.":[137] 130
1910 [143] ***drum machine initialization***
1920 tf[178]255:un[178]1:tw[178]2:nn[178]9:fv[178]5:fy[178]50:se[178]17:xt[178]16:wn[178]129:we[178]128
1930 sy[178]60:tv[178]245:et[178]8:tl[178]12:ft[178]15:sx[178]6:tn[178]249:tr[178]244:th[178]13:te[178]3:[151]650,128
1940 [151]53281,4:[151]53280,6:[153]"load"[166]13)"sysdrum machinewait"
1950 [153]"1=hi hat":[153]"2=snare":[153]"3=hi tom":[153]"4=low tom"
1960 [153]"5=kick drum":[153]"6=cymbal":[153]"m = main menu"
1970 [137] 220