home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1985 December
/
1985-12.d64
/
soundpix
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
2KB
|
59 lines
10 dimw(84),x(84):poke53280,12:poke53281,0:print"[147]"
20 x1=170:x2=250:y1=105:y2=y1+21:y3=y2+21:y4=y3+21:q=12288:q1=12801:v=53248:c=2
30 e=54299:f=54300:d=32:a=.5:o=1:i=2:s=3:t=0:e$=" "
40 fort=54272to54295:poket,0:next:poke54296,143:fort=qto12798:poket,0:next
50 fort=2040to2047:poket,t-1848:next
60 pokev,x1:pokev+1,y1:pokev+2,x1:pokev+3,y2:pokev+4,x1:pokev+5,y3:pokev+6,x1
70 pokev+7,y4:pokev+8,x2:pokev+9,y1:pokev+10,x2:pokev+11,y2:pokev+12,x2
80 pokev+13,y3:pokev+14,x2:pokev+15,y4
90 fort=39to42:pokev+t,3:next:fort=43to46:pokev+t,7:next
100 pokev+23,0:pokev+29,255
110 poke54273,10:poke54287,6
120 a$="":poke214,c+1:print:poke211,2:input"waveform";a$:gosub560:ifu=0then120
130 w=val(a$):ifw=0orw>255then120
140 ifw=65thengosub530
150 a$="":poke214,c+2:print:poke211,2:input"att/dec";a$:gosub560:ifu=0then150
160 ad=val(a$):ifad=0orad>255then150
170 a$="":poke214,c+3:print:poke211,2:input"sus/rel";a$:gosub560:ifu=0then170
180 sr=val(a$):ifsr=0orsr>255then170
190 a$="":poke214,c+4:print:poke211,2:input"sus time";a$:gosub560:ifu=0then190
200 s1=val(a$):ifs1=0ors1>84then190
210 a$="":poke214,c+5:print:poke211,2:input"rel time";a$:gosub560:ifu=0then210
220 s2=val(a$):ifs2=0ors2>84then210
230 s3=s1+s2:ifs3>84then190
240 poke54277,ad:poke54278,sr:poke54291,ad:poke54292,sr
250 poke54275,pw:poke54289,pw:poke54276,w:poke54290,w:pokev+21,255
260 fort=0tos1:w(t)=peek(e):x(t)=peek(f):next:poke54276,0:poke54290,0
270 fort=s1tos3:w(t)=peek(e):x(t)=peek(f):next
280 fort=s3to84:w(t)=0:x(t)=0:next
290 poke214,3:print:poke211,19:print"wave adsr
300 [151]214,4:[153]:[151]211,19:[153]"1 2 3 1 2 3
310 poke214,5:print:poke211,19:print"[163][163][163][163][163] [163][163][163][163][163]
320 [129]t[178]0[164]20:[141]510:[130]:q[178]q[170]1
330 [129]t[178]21[164]41:[141]510:[130]:q[178]q[170]1
340 [129]t[178]42[164]62:[141]510:[130]:q[178]q[170]1
350 [129]t[178]63[164]83:[141]510:[130]:q[178]q[170]1
360 [129]t[178]0[164]20:[141]520:[130]:q[178]q[170]1
370 [129]t[178]21[164]41:[141]520:[130]:q[178]q[170]1
380 [129]t[178]42[164]62:[141]520:[130]:q[178]q[170]1
390 [129]t[178]63[164]83:[141]520:[130]
400 [139]q[179][177]q1[167][151]214,18:[153]:[151]211,22:[153]"erase (e)"
410 [139]q[179][177]q1[167][151]214,19:[153]:[151]211,22:[153]"quit (q)"
420 [139]q[179][177]q1[167][151]214,20:[153]:[151]211,22:[153]"compare (c)"
430 [139]q[178]q1[167][151]214,18:[153]:[151]211,22:[153]"erase (e)"
440 [139]q[178]q1[167][151]214,19:[153]:[151]211,22:[153]"quit (q)"
450 [161]a$:[139]a$[179][177]"e"[167][139]a$[179][177]"c"[167][139]a$[179][177]"q"[167]450
460 [139]a$[178]"e"[167][138]
470 [139]a$[178]"c"[167][139]q[178]q1[167][138]
480 [139]a$[178]"c"[167]q[178]q[171]510:c[178]c[170]6:[151]214,18:[153]
490 [139]a$[178]"c"[167][129]t[178]1[164]3:[151]211,22:[153]e$:[130]:[137]120
500 [153][199](147)[199](154):[151]v[170]21,0:[151]54296,0:[151]53280,14:[151]53281,6:[128]
510 [151]q,(i[174][181](w(t)[173]d[170]a))[171]o[176]o:q[178]q[170]3:[142]
520 [151]q,(i[174][181](x(t)[173]d[170]a))[171]o[176]o:q[178]q[170]3:[142]
530 [151]214,c[170]1:[153]:[151]211,2:[133]"pulse width";a$:[141]560:[139]u[178]0[167]530
540 pw[178][197](a$):[139]pw[178]0[176]pw[177]255[167]530
550 [142]
560 [139]a$[178]""[167][142]
570 [129]n[178]1[164][195](a$):u[178][198]([202](a$,n,1)):[139]u[179]47[176]u[177]57[167]u[178]0:[142]
580 [130]:[142]