home *** CD-ROM | disk | FTP | other *** search
- 100 rem *** aleatory composer ***
- 110 rem *** compatible with ***
- 120 rem *** sid sequencer ***
- 130 rem *** by v.h.berry c.1989 ***
- 140 gosub 50010:rem initialisation
- 150 gosub 35010:rem main menu
- 160 print"[147]aleatory composer"
- 170 print"by v.h.berry"
- 180 print"c.1989"
- 190 end
- 1000 rem composer
- 1010 gosub 2505:rem print screen
- 1020 gosub 2006:rem random note generator
- 1040 if rf=1 then au=au+1:gosub 2420:rem auto store on
- 1050 if rf=1 and au=ac then rf=-1:goto 1020
- 1055 if rf=1 then 1020
- 1060 get x$:if x$="" then 1060
- 1065 if x$=chr$(13) then gosub 2420:rem store note
- 1070 if x$=chr$(136) then return:rem f7=exit
- 1072 if x$=chr$(135) then gosub 7355:rem f5=seq on/off
- 1074 if x$=chr$(134) then gosub 2810:rem f3=help
- 1076 if x$=chr$(133) then rf=-rf:au=0:rem f1=auto off
- 1080 if x$="" then gosub 3210:rem reset note counters
- 1082 if x$="[147]" then gosub 3010:rem clear all channels
- 1084 if x$="s" then gosub 30510:rem set store counter
- 1086 if x$="f" then gosub 30010:goto 1010:rem change filename
- 1088 if x$="[144]" then os=1:gosub 3060:rem clear channel 1
- 1090 if x$="" then os=2:gosub 3060:rem clear channel 2
- 1092 if x$="" then os=3:gosub 3060:rem clear channel 3
- 1094 goto 1020
- 2000 rem random note generator
- 2005 rem select channel
- 2006 print"calculating note data "
- 2007 ifcs(1)+cs(2)+cs(3)<>100then print" channel probability: not equal to 100% [146]"
- 2010 x=int(rnd(0)*100)
- 2020 if x<=cs(1) then os=1:goto 2110
- 2030 if x<=cs(1)+cs(2) then os=2:goto 2110
- 2040 os=3
- 2100 rem select note number
- 2110 ct=int(rnd(0)*n(os))
- 2120 rem table select
- 2130 a=peek(pt+ct+(os-1)*256)
- 2200 rem select octave
- 2210 oc=0:vl=0:x=rnd(0)*100
- 2215 if oc>7 and vl<>100 then 2390
- 2220 vl=vl+peek(po+a*8+oc)
- 2230 if x>vl then oc=oc+1:goto 2215
- 2300 rem select note
- 2310 nn=0:vl=0:x=rnd(0)*100
- 2320 vl=vl+peek(pn+a*16+nn)
- 2330 if x>vl then nn=nn+1:goto 2320
- 2350 if nn=12 then nn=128:oc=0
- 2360 vl=nn+oc*16:ns=vl
- 2365 gosub 2605:rem print values
- 2370 return
- 2380 rem octave probability error
- 2390 print" octave probability : not equal to 100% [146]"
- 2392 rf=-1
- 2394 return
- 2400 rem store note
- 2420 poke ch+256*(os-1)+ct,ns
- 2430 return
- 2500 rem probability run screen
- 2505 poke 53280,0:poke 53281,0:print"[147]";
- 2510 print"file :"
- 2511 print"[176][192][192][192][192][192][192][192][192][192][192][192][192][174][176][192][192][192][192][192][192]";
- 2512 print"{$60}{$60}{$60}{$60}{$60}{$60}[174]"
- 2513 print"[221][221][221]store: [146][221]"
- 2514 print"[171]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[179]{$7d} f1 [146]{$7d}"
- 2515 print"{$7d}{$7d}[173]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[189]"
- 2516 print"[173]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[189][176]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[174]"
- 2517 print"{$7d} help [146]{$7d}"
- 2518 print"[176]{$60}{$60}{$60}[178]{$60}{$60}{$60}[174]{$7d} f3 [146]{$7d}"
- 2519 print"[221]new[221]old[221][173][192][192][192][192][192][192][192][192][192][192][192][192][189]"
- 2520 print"[176]{$60}{$60}{$60}{$60}{$7b}{$60}{$60}{$60}{$7b}{$60}{$60}{$60}[179][176]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[174]"
- 2521 print"{$7d}note{$7d}{$7d}{$7d}{$7d}seq. on/off [146]{$7d}"
- 2522 print"[173]{$60}{$60}{$60}{$60}[177]{$60}{$60}{$60}[177]{$60}{$60}{$60}[189]{$7d} f5 [146]{$7d}"
- 2523 print"[173]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[189]"
- 2524 print"[176]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[174]"
- 2525 print"{$7d} exit [146]{$7d}"
- 2526 print"{$7d} f7 [146]{$7d}"
- 2527 print"[173]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[189]"
- 2530 return
- 2600 rem print random note data
- 2605 print"";n$
- 2606 print"";tab(29);str$(ac);" [146]"
- 2610 gosub 7585:rem colour subroutine
- 2620 print"[145][145]channel ";os
- 2630 print"note# [157][157][157][157]";ct+1
- 2640 print"";
- 2650 gosub 2720:rem read note
- 2660 print"[146]";
- 2665 vl=peek(ch+(os-1)*256+ct)
- 2670 gosub 2720:rem read note
- 2680 if rf=-1 then print" press [return] to store data [146]"
- 2685 if rf=1 then print" store [157]";au+1;"[157] [146]"
- 2690 return
- 2700 rem note read
- 2720 if vl=128 then nl$="r ":goto 2780:rem rest
- 2740 ov=int(vl/16):rem octave
- 2750 o$=str$(ov):o$=right$(o$,1)
- 2760 nl$=l$(vl-ov*16):rem note letter name
- 2770 nl$=nl$+o$:if len(nl$)=2 then nl$=nl$+" "
- 2780 print nl$;
- 2790 return
- 2800 rem help screen
- 2810 poke 53280,5:poke 53281,5:print"[147]";
- 2811 print" press [f7] to exit : [176]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}";
- 2812 print"{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[174]{$7d}{$7d}{$7d}[f][146][144]changefilenam";
- 2813 print"e{$7d}{$7d}{$7d}{$7d}[s][146][144]se";
- 2814 print"tnumberofnotesstored{$7d}{$7d}";
- 2815 print"{$7d}{$7d}[home][146][144]resetnotecounters{$7d}{$7d}";
- 2816 print"{$7d}{$7d}[clr][146][144]clearallchannels{$7d}{$7d}";
- 2817 print"{$7d}{$7d}[ctrl] & [1][146][144]clearchannel1{$7d}{$7d}";
- 2818 print"{$7d}{$7d}[ctrl] & [2][146][144]clearchannel2";
- 2819 print"{$7d}{$7d}{$7d}{$7d}[ctrl] & [3][146][144]clear";
- 2820 print"channel3{$7d}{$7d}{$7d}[173]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}";
- 2821 print"{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[189]"
- 2830 get x$:if x$<>chr$(136) then 2830
- 2840 gosub 2505:rem composer screen
- 2850 return
- 3000 rem clear all channels
- 3010 for os=1 to 3
- 3020 gosub 3060:rem clear channel
- 3030 next os
- 3035 os=1
- 3040 return
- 3050 rem clear channel
- 3060 for i=0 to n(os)-1
- 3070 poke ch+(os-1)*256+i,128
- 3080 next i
- 3090 poke ch+(os-1)*256+n(os),255
- 3100 return
- 3200 rem reset note counters
- 3210 for i=0 to 2
- 3220 poke fsid+i*7,0
- 3230 next i
- 3240 return
- 4000 rem edit probability tables
- 4010 gosub 20010:rem print edit table screen
- 4020 get x$:if x$=chr$(136) then return
- 4030 if x$=chr$(133) then sc=sc+1:gosub 20035:rem f1=next probability table
- 4035 if x$=chr$(137) then sc=sc-1:gosub 20035:rem f2=previous probability table
- 4040 if x$=chr$(134) then gosub 21010:rem f3 help
- 4050 if x$=chr$(135) then gosub 7355:rem f5=seq.on/off
- 4070 if x$="[219]" then vl=peek(po+sc*8+cy)+pe:gosub 5410:rem + octave probability
- 4080 if x$="[221]" then vl=peek(po+sc*8+cy)-pe:gosub 5410:rem - octave probability
- 4090 if x$="+" then vl=peek(pn+sc*16+cx)+pe:gosub 5210:rem + note probability
- 4100 if x$="-" then vl=peek(pn+sc*16+cx)-pe:gosub 5210:rem - note probability
- 4110 if x$="" then gosub 4510:cy=cy+1:gosub 5110:rem octave crsr +
- 4120 if x$="[145]" then gosub 4510:cy=cy-1:gosub 5110:rem octave crsr -
- 4130 if x$="" then gosub 4510:cx=cx+1:gosub 4660:rem note crsr +
- 4140 if x$="[157]" then gosub 4510:cx=cx-1:gosub 4660:rem note crsr -
- 4180 if x$="f" then gosub 30010:gosub 20010:rem change filename
- 4185 if x$="p" then gosub 30610:gosub 20010:rem change probability increment
- 4190 goto 4020
- 4500 rem move note & octave cursor
- 4510 if x$="" or x$="[157]" then gosub 4910:rem position note cursor
- 4520 if x$="" or x$="[145]" then gosub 5010:rem position octave cursor
- 4570 gosub 4810:rem read screen
- 4630 print"[157][157][157][146]";y$
- 4640 return
- 4650 rem print note cursor
- 4660 if cx>11 then cx=0
- 4670 if cx<0 then cx=11
- 4680 gosub 4910:rem position cursor
- 4710 gosub 4810:rem read screen
- 4780 print"[157][157][157]";y$;"[146]"
- 4790 return
- 4800 rem read screen
- 4810 y$=""
- 4820 open 1,3
- 4830 for i=1 to 3
- 4840 get#1,x$
- 4850 y$=y$+x$
- 4860 next i
- 4870 close 1
- 4880 return
- 4900 rem position note cursor
- 4910 print"[155]";
- 4920 a=cx:if cx>5 then a=cx-6:print:print"";
- 4930 for i=0 to a
- 4940 print"";
- 4950 next i
- 4960 return
- 5000 rem position octave cursor
- 5010 print"[155]";
- 5020 for i=0 to cy
- 5030 print"";
- 5040 next i
- 5050 return
- 5100 rem print octave cursor
- 5110 if cy>7 then cy=0
- 5120 if cy<0 then cy=7
- 5130 gosub 5010:rem position cursor
- 5140 gosub 4810:rem read screen
- 5150 print"[157][157][157]";y$;"[146]"
- 5160 return
- 5200 rem change note probability
- 5210 if vl<0 or vl>100 then 5280
- 5220 if x$="+" then i=peek(pn+sc*16+12)-pe
- 5230 if x$="-" then i=peek(pn+sc*16+12)+pe
- 5235 if i<0 or i>100 then 5280
- 5240 poke pn+sc*16+cx,vl
- 5250 poke pn+sc*16+12,i
- 5270 gosub 20060:rem print probability data
- 5280 return
- 5400 rem change octave probability
- 5410 if vl<0 or vl>100 then 5450
- 5420 j=0:for i=0 to 7:j=j+peek(po+sc*8+i):next i
- 5422 if x$="[219]" then j=j+pe
- 5430 if j<=100 then poke po+sc*8+cy,vl
- 5440 gosub 20060:rem print probability data
- 5450 return
- 7000 rem sid editor controls
- 7005 gosub 7610:rem print sid screen
- 7010 get x$:if x$="" then 7010
- 7015 if x$="[174]" then bit=1:gosub 7155:rem sync mod on/off
- 7020 if x$="[178]" then bit=2:gosub 7155:rem ring mod on/off
- 7025 if x$="" then bit=3:gosub 7155:rem test on/off
- 7030 if x$=chr$(20) then bit=4:gosub 7155:rem triangle on/off
- 7035 if x$="" then bit=5:gosub 7155:rem sawtooth on/off
- 7040 if x$="" then bit=6:gosub 7155:rem pulse on/off
- 7045 if x$="" then bit=7:gosub 7155:rem noise on/off
- 7050 if x$="a" then i=1:reg=5:gosub 7195:rem attack +
- 7055 if x$="[193]" then i=-1:reg=5:gosub 7195:rem attack -
- 7060 if x$="d" then i=1:reg=5:gosub 7225:rem decay +
- 7065 if x$="[196]" then i=-1:reg=5:gosub 7225:rem decay -
- 7070 if x$="s" then i=1:reg=6:gosub 7195:rem sustain +
- 7075 if x$="[211]" then i=-1:reg=6:gosub 7195:rem sustain -
- 7080 if x$="r" then i=1:reg=6:gosub 7225:rem release +
- 7085 if x$="[210]" then i=-1:reg=6:gosub 7225:rem release -
- 7090 if x$="p" or x$="[208]" then gosub 7270:rem pulse width +/-
- 7095 if x$="+" then i=-1:gosub 7325:rem increase tempo
- 7100 if x$="-" then i=1:gosub 7325:rem decrease tempo
- 7110 if x$="w" then gosub 31010:rem pulse width increment
- 7115 if x$="f" then gosub 30010:gosub 7610:rem change filename
- 7125 if x$=chr$(133) then os=os+1:gosub 7535:rem f1 next edit channel
- 7130 if x$=chr$(134) then gosub 7770:rem f3 help screen
- 7135 if x$=chr$(135) then gosub 7355:rem f5 music on/off
- 7140 if x$=chr$(136) then return:rem f7 exit sid editor
- 7145 goto 7010
- 7150 rem change sid control register
- 7155 if bit>3 then poke fsid+4+7*(os-1),(peek(fsid+4+7*(os-1))and 15)
- 7160 vl=peek(fsid+4+(os-1)*7)
- 7165 ifvland(2^bit)=2^bitthenpokefsid+4+7*(os-1),peek(fsid+4+7*(os-1))and(255-(2^bit))
- 7170 if(vland(2^bit))<>2^bitthenpokefsid+4+7*(os-1),peek(fsid+4+7*(os-1))or(2^bit)
- 7175 ce=os
- 7180 gosub 7370:rem print fsid values
- 7185 return
- 7190 rem change envelope
- 7195 vl=int(peek(fsid+reg+7*(os-1))/16)
- 7200 vl=vl+i:if vl=16 then vl=0
- 7205 if vl=-1 then vl=15
- 7210 vl=vl*16
- 7215 vl=vl+(peek(fsid+reg+7*(os-1)) and 15)
- 7220 goto 7245
- 7225 vl=peek(fsid+reg+7*(os-1))and 15
- 7230 vl=vl+i:if vl=16 then vl=0
- 7235 if vl=-1 then vl=15
- 7240 vl=vl+(peek(fsid+reg+7*(os-1)) and 240)
- 7245 poke fsid+reg+7*(os-1),vl
- 7250 ce=os
- 7255 gosub 7370:rem print fsid values
- 7260 return
- 7265 rem pulse width +/-
- 7270 if pw<0 then pw=pw*-1
- 7275 if x$="[208]" then pw=pw*-1
- 7280 vl=peek(fsid+3+7*(os-1))*256+peek(fsid+2+7*(os-1))+pw
- 7285 if vl>4095 then vl=vl-4095
- 7290 if vl<0 then vl=vl+4095
- 7295 poke fsid+3+7*(os-1),int(vl/256)
- 7300 poke fsid+2+7*(os-1),vl-((int(vl/256))*256)
- 7305 ce=os
- 7310 gosub 7370:rem print fsid values
- 7315 return
- 7320 rem tempo change
- 7325 vl=peek(49275):vl=vl+i:if vl=256 then vl=1
- 7330 if vl=0 then vl=255
- 7335 poke 49275,vl:poke 49276,0
- 7340 gosub 7510:rem print tempo value
- 7345 return
- 7350 rem sequencer on/off
- 7355 if mf=0 then mf=1:sys 49235:return
- 7360 mf=0:sys 49209:return
- 7365 rem print fsid data
- 7370 print"";
- 7375 t1=ce*10-5:print tab(t1);
- 7380 if ce=1 then print"";
- 7385 if ce=2 then print"[158]";
- 7390 if ce=3 then print"";
- 7395 vl=peek(fsid+4+7*(ce-1))
- 7400 if (vl and 8)=8 then print"off ":goto 7425
- 7405 if (vl and 16)=16 then print"triangle"
- 7410 if (vl and 32)=32 then print"sawtooth"
- 7415 if (vl and 64)=64 then print"pulse "
- 7420 if (vl and 128)=128 then print"noise "
- 7425 print tab(t1);" [157][157][157][157]";
- 7430 if (vl and 4)=4 then print"ring";
- 7435 print
- 7440 print tab(t1);" [157][157][157][157]";
- 7445 if (vl and 2)=2 then print"sync";
- 7450 print
- 7455 print tab(t1);" [157][157][157][157][157][157]";
- 7460 vl=int(((peek(fsid+3+7*(ce-1))*256+peek(fsid+2+7*(ce-1)))/40.95)+.5)
- 7465 print vl;"%"
- 7470 vl=peek(fsid+5+7*(ce-1))
- 7475 print tab(t1);"";en$(0,int(vl/16))
- 7480 print tab(t1);"";en$(1,(vl and 15))
- 7485 vl=peek(fsid+6+7*(ce-1))
- 7490 print tab(t1);"";en$(2,int(vl/16))
- 7495 print tab(t1);"";en$(3,(vl and 15))
- 7500 return
- 7505 rem print file name & tempo
- 7510 print"";n$
- 7515 print" [157][157][157][157][157][157][157][157][157][157][157][157][157]";
- 7520 print (peek(49275)+1)/50;"seconds"
- 7525 return
- 7530 rem print edit channel
- 7535 if os>3 then os=1
- 7540 print"";tab(5);" ";tab(15);" ";tab(25);" ";
- 7550 print
- 7555 print tab(os*10-5);"[145]* edit *"
- 7560 return
- 7565 rem colour subroutine
- 7580 if os>3 then os=1
- 7585 if os=1 then print""
- 7590 if os=2 then print"[158]"
- 7595 if os=3 then print""
- 7600 return
- 7605 rem sid editor screen
- 7610 print"[147]file:"
- 7615 print"[176][192][192][192][192][192][192][192][192][192][178][192][192][192][192][192][192][192][192][192][178][192][192][192][192][192][192][192][192][192][174]"
- 7620 print"[221][221][221][221]"
- 7625 print"[221] chan 1 [146][221][158] chan 2 [146][221] chan 3 [146][221]"
- 7630 print"[221][221][221][221]"
- 7635 print"[171][192][192][192][192][192][192][192][192][192][219][192][192][192][192][192][192][192][192][192][219][192][192][192][192][192][192][192][192][192][179]"
- 7640 print"[221][221][221][221]"
- 7645 print"[221][221][221][221]"
- 7650 print"[221]mod osc 3[146][221][158]mod osc 1[146][221]mod osc 2[146][221]"
- 7655 print"[173][192][192][192][192][192][192][192][192][192][177][192][192][192][192][192][192][192][192][192][177][192][192][192][192][192][192][192][192][192][189]"
- 7660 print"pulsewidth"
- 7665 print"[176][192][192][192][192][192][192][192][192][192][178][192][192][192][192][192][192][192][192][192][178][192][192][192][192][192][192][192][192][192][174]"
- 7670 print"{$7d}{$7d}{$7d}{$7d}"
- 7675 print"[173][192][192][192][192][192][192][192][192][192][177][192][192][192][192][192][192][192][192][192][177][192][192][192][192][192][192][192][192][192][189]"
- 7680 print"envelope"
- 7685 print"[176][192][192][192][192][192][192][192][192][192][178][192][192][192][192][192][192][192][192][192][178][192][192][192][192][192][192][192][192][192][174]"
- 7690 print"[221]a:[146][221][158]a:[146][221]a:[146][221]"
- 7695 print"[221]d:[146][221][158]d:[146][221]d:[146][221]"
- 7700 print"[221]s:[146][221][158]s:[146][221]s:[146][221]"
- 7705 print"[221]r:[146][221][158]r:[146][221]r:[146][221]"
- 7710 print"[173]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[177]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[177]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[189]"
- 7715 print"tempo:"
- 7720 print" edit chan [146] help [146] seq on/off [146] exit [146]"
- 7725 print" f1 [146] f3 [146] f5 [146] f7 [146]"
- 7730 gosub 7510:rem print file name & tempo
- 7735 print"";
- 7740 gosub 7540:rem display edit channel
- 7745 for ce=1 to 3
- 7750 gosub 7370:rem print sid data
- 7755 next
- 7760 return
- 7765 rem help screens
- 7770 poke 53280,5:poke 53281,5:print"[147]";
- 7775 print" [f3] next screen : [f7] exit [146]";
- 7780 print"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]";
- 7785 print"{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[174]{$7d}{$7d}{$7d}[146][144]sidsequencercont";
- 7790 print"rols[221][221][146][144][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][221][146]";
- 7795 print"[221]";
- 7800 print"{$7d}{$7d}[f][146][144]changefilename{$7d}{$7d}";
- 7805 print"[221]";
- 7810 print"[221][221][221][146][144]sequencerspeed";
- 7815 print"{$7d}{$7d}[146][144]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$7d}{$7d}[+][146][144]incre";
- 7820 print"asetempo{$7d}{$7d}{$7d}{$7d}";
- 7825 print"[-][146][144]decreasetempo[221][221]";
- 7830 print"[221]";
- 7835 print"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189][146]";
- 7840 get x$:if x$=chr$(136) then x$="":poke 53280,0:poke 53281,0:goto 7610
- 7845 if x$<>chr$(134) then 7840
- 7850 print"[147]";
- 7855 print" [f3] next screen : [f7] exit [146]";
- 7860 print"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]";
- 7865 print"{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[174]{$7d}{$7d}{$7d}[146][144]editchannelcontr";
- 7870 print"ols{$7d}{$7d}[146][144]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$7d}{$7d}[ctr";
- 7875 print"l] & [o][146][144]voiceon/off{$7d}{$7d}";
- 7880 print"{$7d}{$7d}[146][144]selectwaveform{$7d}{$7d}[146][144]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}";
- 7885 print"{$60}{$60}{$7d}{$7d}[146][144]hold[ctrl][146][144]&press:{$7d}{$7d}";
- 7890 print"{$7d}{$7d}[t][146][144]trianglewave";
- 7895 print"{$7d}{$7d}[s][146][144]sawtoothwave{$7d}{$7d}[p][146][144]pulse";
- 7900 print"wave{$7d}{$7d}[n][146][144]noise{$7d}{$7d}";
- 7905 print"{$7d}{$7d}[146][144]pulsewidth";
- 7910 print"{$7d}{$7d}[146][144]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$7d}{$7d}[shift] & [p][146][144]";
- 7915 print"decreasewidth{$7d}{$7d}[p][146][144]increasewidth{$7d}{$7d}";
- 7920 print"[w][146][144]setwidthincrement{$7d}{$7d}";
- 7925 print"{$7d}[173]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[189]"
- 7930 get x$:if x$=chr$(136) then x$="":poke 53280,0:poke 53281,0:goto 7610
- 7935 if x$<>chr$(134) then 7930
- 7940 print"[147]";
- 7945 print" [f3] next screen : [f7] exit [146]";
- 7950 print"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]";
- 7955 print"{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[174]{$7d}{$7d}{$7d}[146][144]editchannelcontr";
- 7960 print"ols{$7d}{$7d}[146][144]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$7d}{$7d}[146][144]se";
- 7965 print"lectenvelope{$7d}{$7d}";
- 7970 print"{$7d}{$7d}[146][144]increaseordecreaseaparameter:{$7d}{$7d}";
- 7975 print"{$7d}{$7d}[a] or [shift] & [a][146][144]attack{$7d}{$7d}[d] or [";
- 7980 print"shift] & [d][146][144]decay{$7d}{$7d}[s] or [shift] & [s][146][144]sustain";
- 7985 print"{$7d}{$7d}[r] or [shift] & [r][146][144]release{$7d}{$7d}";
- 7990 print"{$7d}{$7d}[146][144]modulation{$7d}{$7d}[146][144]{$60}{$60}{$60}{$60}{$60}{$60}";
- 7995 print"{$60}{$60}{$60}{$60}{$7d}{$7d}[commodore] & [r][146][144]ringmodon/off";
- 8000 print"{$7d}{$7d}[commodore] & [s][146][144]synchronizeon/off{$7d}{$7d}";
- 8005 print"{$7d}[173]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[189]"
- 8010 get x$:if x$=chr$(136) then x$="":poke 53280,0:poke 53281,0:goto 7610
- 8015 if x$<>chr$(134) then 8010
- 8020 goto 7770
- 9000 rem edit definitions
- 9010 gosub 10010:rem print screen
- 9020 rem ctrl section
- 9030 get x$:if x$=chr$(136) then return
- 9040 if x$=chr$(133) then os=os+1:gosub 10310:rem f1 next channel
- 9050 if x$=chr$(134) then gosub 11010:rem f3 help
- 9060 if x$=chr$(135) then gosub 7355:rem f5 seq.on/off
- 9070 if x$="+" then vl=peek(pt+ne+(os-1)*256)+1:gosub 10510:rem + table#
- 9080 if x$="-" then vl=peek(pt+ne+(os-1)*256)-1:gosub 10510:rem - table#
- 9090 if x$="n" then ne=ne+1:gosub 10180:rem + note#
- 9100 if x$="[206]" then ne=ne-1:gosub 10180:rem - note#
- 9110 if x$="o" then vl=pe:gosub 10410:rem + channel occurance
- 9120 if x$="[207]" then vl=-pe:gosub 10410:rem - channel occurance
- 9125 if x$="p" then gosub 30610:gosub 10010:rem probability increment
- 9130 if x$="f" then gosub 30010:gosub 10010:rem filename
- 9135 if x$="" then gosub 10610:rem note limits
- 9140 goto 9030
- 10000 rem edit definitions screen
- 10010 poke 53280,0:poke 53281,0:print"[147]";
- 10020 print"[176]{$60}{$60}{$60}{$60}{$60}{$60}{$60}[178]{$60}{$60}{$60}{$60}[178]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[178]{$60}{$60}{$60}{$60}[174]"
- 10030 print"{$7d}channel{$7d}help{$7d}seq.on/off{$7d}exit{$7d}"
- 10040 print"{$7d} f1 {$7d} f3 {$7d} f5 {$7d} f7 {$7d}"
- 10050 print"[173]{$60}{$60}{$60}{$60}{$60}{$60}{$60}[177]{$60}{$60}{$60}{$60}[177]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[177]{$60}{$60}{$60}{$60}[189]"
- 10060 print"file:"
- 10070 print"[176]{$60}{$60}{$60}{$60}{$60}{$60}[178]{$60}{$60}{$60}{$60}{$60}{$60}[178]{$60}{$60}{$60}{$60}{$60}{$60}[174]"
- 10080 print"[176]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[179]{$7d}{$7d}{$7d}"
- 10090 print"[221]channel[221]1[221][158]2[221]3[221]"
- 10100 print"[171]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$7b}{$60}{$60}{$60}{$60}{$60}{$60}{$7b}{$60}{$60}{$60}{$60}{$60}{$60}{$7b}{$60}{$60}{$60}{$60}{$60}{$60}[179]"
- 10110 print"{$7d}notelimit{$7d}{$7d}{$7d}{$7d}"
- 10120 print"[171][192][192][192][192][192][192][192][192][192][192][219][192][192][192][192][192][192][219][192][192][192][192][192][192][219][192][192][192][192][192][192][179]"
- 10122 print"[221]occurance%[221][221][221][221]"
- 10124 print"[171][192][192][192][192][192][192][192][192][192][192][219][192][192][192][192][192][192][177][192][192][192][192][192][192][177][192][192][192][192][192][192][179]"
- 10130 print"{$7d}note#:{$7d}tablenumber{$7d}"
- 10140 print"[173]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$7b}{$60}{$60}{$60}{$60}{$60}{$60}[178]{$60}{$60}{$60}{$60}{$60}{$60}[178]{$60}{$60}{$60}{$60}{$60}{$60}[179]"
- 10150 print"{$7d}{$7d}{$7d}{$7d}"
- 10160 print"[173]{$60}{$60}{$60}{$60}{$60}{$60}[177]{$60}{$60}{$60}{$60}{$60}{$60}[177]{$60}{$60}{$60}{$60}{$60}{$60}[189]"
- 10170 print"";n$
- 10180 ce=os
- 10182 if ne>255 then ne=255
- 10184 if ne<0 then ne=0
- 10190 for os=1 to 3
- 10200 gosub 7585:rem colour subroutine
- 10210 print"";tab(14+(os-1)*7);" [157][157][157][157]";n(os)
- 10220 print tab(14+(os-1)*7);" [157][157][157][157]";cs(os)
- 10230 print tab(14+(os-1)*7);" [157][157][157][157]";peek(pt+ne+(os-1)*256)+1
- 10240 next os
- 10300 rem print edit cursor
- 10305 os=ce
- 10310 print" [145]"
- 10315 if os>3 then os=1
- 10320 print tab(13+(os-1)*7);"*edit*"
- 10330 print tab(8);" [157][157][157][157]";ne+1
- 10340 return
- 10400 rem change channel occurance
- 10410 if vl+cs(1)+cs(2)+cs(3)>100 then 10440
- 10415 if cs(os)+vl<0 then 10440
- 10420 cs(os)=cs(os)+vl
- 10430 gosub 10180:rem print screen
- 10440 return
- 10500 rem change probability table
- 10510 if vl<0 or vl>15 then 10540
- 10520 poke pt+ne+(os-1)*256,vl
- 10530 gosub 10180:rem print values
- 10540 return
- 10600 rem change note limit
- 10610 poke 53280,5:poke 53281,5
- 10612 if mf=1 then gosub 7355:rem seq off
- 10613 gosub 3210:rem reset note counters
- 10614 poke ch+n(os)+(os-1)*256,128
- 10615 gosub 7585:rem colour subroutine
- 10620 print"[147] enter new note limit (0-255) [146]";
- 10630 print
- 10640 print"channel :";os
- 10650 print"note limit :";n(os)
- 10660 print"[144][176][192][192][192][192][192][192][192][192][192][192][178][192][192][192][192][192][192][178][192][192][192][192][192][192][178][192][192][192][192][192][192][174]"
- 10670 print"[221]channel[221]1[144][221][158]2[144][221]3[144][221]"
- 10680 print"[171][192][192][192][192][192][192][192][192][192][192][219][192][192][192][192][192][192][219][192][192][192][192][192][192][219][192][192][192][192][192][192][179]"
- 10690 print"[221]notelimit[221][221][221][221]"
- 10700 print"[173][192][192][192][192][192][192][192][192][192][192][177][192][192][192][192][192][192][177][192][192][192][192][192][192][177][192][192][192][192][192][192][189]"
- 10710 ce=os
- 10720 for os=1 to 3
- 10730 gosub 7585:rem colour subroutine
- 10740 print"";tab(14+(os-1)*7);" [157][157][157][157]";n(os)
- 10750 next os
- 10760 os=ce
- 10765 print""
- 10770 l=3:t1=14+(os-1)*7:rs=0:gosub 32040:rem input subroutine
- 10780 if a>0 then n(os)=val(y$):y$=""
- 10785 gosub 3060:rem clear channel
- 10790 gosub 10010:rem print screen
- 10800 return
- 11000 rem help screen
- 11010 poke 53280,5:poke 53281,5:print"[147]";
- 11011 print" press [f7] to exit : [176]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}";
- 11012 print"{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[174]{$7d}{$7d}{$7d}[f][146][144]changefilenam";
- 11013 print"e{$7d}{$7d}{$7d}{$7d}[p][146][144]ch";
- 11014 print"angeprobabilityincrement{$7d}{$7d}";
- 11015 print"{$7d}{$7d}[ctrl] & [l][146][144]changenotelimit{$7d}{$7d}";
- 11016 print"{$7d}{$7d}[+] or [-][146][144]+/-tablenumber{$7d}{$7d}";
- 11017 print"{$7d}{$7d}[o] or [shift] & [o][146][144]+/-channel%{$7d}{$7d}";
- 11018 print"{$7d}{$7d}[n] or [shift] & [n][146][144]+/-note";
- 11019 print"number{$7d}{$7d}{$7d}[173]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}";
- 11020 print"{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[189]"
- 11025 get x$:if x$<>chr$(136) then 11025
- 11030 gosub 10010:rem edit screen
- 11040 return
- 20000 rem print probability table
- 20010 poke 53280,0:poke 53281,0:print"[147]";
- 20011 print"[176][192][192][192][192][192][192][192][192][178][192][192][192][192][192][192][178][192][192][192][192][192][192][192][192][192][192][192][192][178][192][192][192][192][192][192][174]"
- 20012 print"[221] table# [146][221] help [146][221] seq.on/off [146][221] exit [146][221]"
- 20013 print"[221] f1/2 [146][221] f3 [146][221] f5 [146][221] f7 [146][221]"
- 20014 print"[173][192][192][192][192][192][192][192][192][177][192][192][192][192][192][192][177][192][192][192][192][192][192][192][192][192][192][192][192][177][192][192][192][192][192][192][189]"
- 20015 print"[155]probabilitytable:"
- 20016 print"file:"
- 20017 print"[176]{$60}{$60}{$60}[178]{$60}{$60}{$60}[178]{$60}{$60}{$60}[178]{$60}{$60}{$60}[178]{$60}{$60}{$60}[178]{$60}{$60}{$60}[178]{$60}{$60}{$60}[174]"
- 20018 print"[221][155]nts[221][155]c[221][155]c#[221][155]d[221][155]d#[221][155]e[221][155]f[221]"
- 20019 print"[171]{$60}{$60}{$60}{$7b}{$60}{$60}{$60}{$7b}{$60}{$60}{$60}{$7b}{$60}{$60}{$60}{$7b}{$60}{$60}{$60}{$7b}{$60}{$60}{$60}{$7b}{$60}{$60}{$60}[179][176]{$60}{$60}{$60}[174]"
- 20020 print"[221][155]%[221][221][221][221][221][221][221][221][155]rt%[221]"
- 20021 print"[171]{$60}{$60}{$60}{$7b}{$60}{$60}{$60}{$7b}{$60}{$60}{$60}{$7b}{$60}{$60}{$60}{$7b}{$60}{$60}{$60}{$7b}{$60}{$60}{$60}{$7b}{$60}{$60}{$60}[179][171]{$60}{$60}{$60}[179]"
- 20022 print"[221][155]nts[221][155]f#[221][155]g[221][155]g#[221][155]a[221][155]a#[221][155]b[221][221][221]"
- 20023 print"[171]{$60}{$60}{$60}{$7b}{$60}{$60}{$60}{$7b}{$60}{$60}{$60}{$7b}{$60}{$60}{$60}{$7b}{$60}{$60}{$60}{$7b}{$60}{$60}{$60}{$7b}{$60}{$60}{$60}[179][173]{$60}{$60}{$60}[189]"
- 20024 print"[221][155]%[221][221][221][221][221][221][221]"
- 20025 print"[173]{$60}{$60}{$60}[177]{$60}{$60}{$60}[177]{$60}{$60}{$60}[177]{$60}{$60}{$60}[177]{$60}{$60}{$60}[177]{$60}{$60}{$60}[177]{$60}{$60}{$60}[189]"
- 20026 print"[176][192][192][192][178][192][192][192][178][192][192][192][178][192][192][192][178][192][192][192][178][192][192][192][178][192][192][192][178][192][192][192][178][192][192][192][174]"
- 20027 print"[221][155]8ve[221][155]0[221][155]1[221][155]2[221][155]3[221][155]4[221][155]5[221][155]6[221][155]7[221]"
- 20028 print"[171][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][179]"
- 20029 print"[221][155]%[221][221][221][221][221][221][221][221][221]"
- 20030 print"[173][192][192][192][177][192][192][192][177][192][192][192][177][192][192][192][177][192][192][192][177][192][192][192][177][192][192][192][177][192][192][192][177][192][192][192][189]"
- 20035 if sc>15 then sc=0
- 20036 if sc<0 then sc=15
- 20040 print" [157][157][157]";sc+1
- 20050 print"";n$
- 20060 print"";
- 20070 for i=0 to 5
- 20075 if peek(pn+sc*16+i)=0 then x$=" 0":goto 20100
- 20080 x$=str$(peek(pn+sc*16+i))
- 20085 if len(x$)=4 then x$=right$(x$,3)
- 20090 if len(x$)<3 then x$=" "+x$:goto 20090
- 20100 print x$;"";
- 20110 next i
- 20115 print:print"";
- 20120 for i=6 to 11
- 20125 if peek(pn+sc*16+i)=0 then x$=" 0":goto 20150
- 20130 x$=str$(peek(pn+sc*16+i))
- 20135 if len(x$)=4 then x$=right$(x$,3)
- 20140 if len(x$)<3 then x$=" "+x$:goto 20140
- 20150 print x$;"";
- 20160 next i
- 20162 if peek(pn+sc*16+12)=0 then x$=" 0":goto 20170
- 20164 x$=str$(peek(pn+sc*16+12))
- 20166 if len(x$)=4 then x$=right$(x$,3)
- 20168 if len(x$)<3 then x$=" "+x$:goto 20168
- 20170 print"";x$
- 20172 print"";
- 20176 for i=0 to 7
- 20178 if peek(po+sc*8+i)=0 then x$=" 0":goto 20200
- 20180 x$=str$(peek(po+sc*8+i))
- 20185 if len(x$)=4 then x$=right$(x$,3)
- 20190 if len(x$)<3 then x$=" "+x$:goto 20190
- 20200 print x$;"";
- 20210 next i
- 20215 print
- 20220 gosub 4660:rem note cursor
- 20230 gosub 5110:rem octave cursor
- 20240 return
- 21000 rem help screen
- 21010 poke 53280,5:poke 53281,5:print"[147]";
- 21011 print" press [f7] to exit : [176]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}";
- 21012 print"{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}[174]{$7d}{$7d}{$7d}[f][146][144]changefilenam";
- 21013 print"e{$7d}{$7d}{$7d}{$7d}[p][146][144]ch";
- 21014 print"angeprobabilityincrement{$7d}{$7d}";
- 21015 print"{$7d}{$7d}[146][144]notecursor:{$7d}{$7d}[146][144]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}";
- 21016 print"{$7d}{$7d}[crsr left/right][146][144]movecursor{$7d}{$7d}";
- 21017 print"{$7d}{$7d}[+][146][144]+cursorvalue";
- 21018 print"{$7d}{$7d}{$7d}{$7d}[-][146][144]-cursor";
- 21019 print"value{$7d}{$7d}{$7d}{$7d}[146][144]octavecursor";
- 21020 print":{$7d}{$7d}[146][144]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$7d}{$7d}";
- 21021 print"[crsr up/down][146][144]movecursor{$7d}{$7d}";
- 21022 print"{$7d}{$7d}[shift] & [+][146][144]+cursorvalue{$7d}{$7d}";
- 21023 print"{$7d}{$7d}[shift] & [-][146][144]-cursorvalue{$7d}{$7d}";
- 21024 print"{$7d}[173]{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}{$60}";
- 21025 print"[192][189]"
- 21030 get x$:if x$<>chr$(136) then 21030
- 21040 gosub 20010:rem edit screen
- 21050 return
- 30000 rem input new filename
- 30010 poke 53280,5:poke 53281,5
- 30020 print"[147] enter new filename : press [return] [146]";
- 30030 print
- 30040 print"file : ";n$
- 30050 print""
- 30060 l=14:t1=5:rs=1:gosub 32040:rem input subroutine
- 30070 if a>0 then n$=y$:y$=""
- 30080 poke 53280,0:poke 53281,0
- 30090 return
- 30500 rem note store value
- 30510 poke 53280,5:poke 53281,5
- 30520 print"[147] enter note store# : press [return] [146]";
- 30530 print
- 30540 print"note storage value : ";ac;""
- 30550 l=3:t1=10:rs=0:gosub 32040:rem input subroutine
- 30560 if a>0 then ac=val(y$):y$=""
- 30580 gosub 2505:rem sid screen
- 30590 return
- 30600 rem probability increment value
- 30610 poke 53280,5:poke 53281,5
- 30620 print"[147] enter increment value : press [return] [146]";
- 30630 print
- 30640 print"probability increment : ";pe;""
- 30650 l=2:t1=10:rs=0:gosub 32040:rem input subroutine
- 30660 if a>0 then pe=val(y$):y$=""
- 30670 return
- 31000 rem pulse width increment
- 31010 poke 53280,5:poke 53281,5
- 31020 print"[147] enter % increment : press [return] [146]";
- 31030 print
- 31040 print"pulse width increment : ";int(pw/40.95+.5);"%"
- 31050 l=2:t1=10:rs=0:gosub 32040:rem input subroutine
- 31060 pw=val(y$)*40.95:y$=""
- 31070 poke 53280,0:poke 53281,0
- 31080 gosub 7610:rem sid screen
- 31090 return
- 32000 rem input restriction subroutine
- 32010 rem l=length of input
- 32020 rem t1=tabulation of routine
- 32030 rem rs=character restrictions
- 32040 a=0:y$="":sp=1
- 32050 print tab(t1+l+1):print"[145][174][157][189][145]";:for x=0 to l+1:print"[157][157] ";:next:print"[145][176][157][173][145][144][164][157]";
- 32060 get x$:if x$="" then 32060
- 32070 if x$=chr$(160) or x$=" " or x$=chr$(20) or x$=chr$(13) then 32130
- 32080 if rs=0 then if x$=>"0" and x$=<"9" then 32130
- 32090 if rs=1 and x$=>chr$(35) and x$=<chr$(93) then 32130
- 32100 goto 32060
- 32110 if a=l-1 then print"[157][157]";
- 32120 goto 32060
- 32130 if x$=chr$(20) and a=0 then 32060
- 32140 if x$=chr$(13) and right$(y$,1)=" " then y$=left$(y$,len(y$)-1):a=a-1
- 32150 if x$=chr$(13) then print:return
- 32160 a=a+1:if x$<>chr$(32) then sp=0
- 32170 if a>l and x$<>chr$(20) then x$="":a=a-1
- 32180 if a<1 then x$="":a=0
- 32190 if x$=chr$(20) then print tab(a)"[157][164] [157][157]";:a=a-2:y$=left$(y$,len(y$)-1):goto 32110
- 32200 if x$=chr$(32) and sp=1 then x$="":a=a-1
- 32210 if x$=chr$(32) then sp=sp+1
- 32220 y$=y$+x$:print x$;:if a<l then print"[164][157]";
- 32230 goto 32060
- 35000 rem main menu
- 35010 poke 53280,0:poke 53281,0
- 35015 print"[147] move cursor up & down:press [return] [146]"
- 35020 print"*** aleatory composer ***"
- 35030 print"v.h.berry c.1989"
- 35040 print" [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
- 35060 print" edit definitions"
- 35065 print" edit tables "
- 35070 print" edit sound "
- 35075 print" run composer "
- 35080 print" disk menu "
- 35090 print" exit program "
- 35100 print
- 35110 print" [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
- 35120 print"":t1=10:ll=5:gosub 39010:rem menu system routine
- 35130 y$="":if a=5 then return
- 35140 on a+1 gosub 9010,4010,7005,1010,37020
- 35150 goto 35010
- 37000 rem disk menu
- 37020 print"[147] move cursor up & down:press [return] [146]"
- 37030 print"*** disk menu ***"
- 37040 print"file : ";n$
- 37050 print" [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
- 37060 print" new filename "
- 37070 print" directory "
- 37080 print" disk change "
- 37090 print" load file "
- 37100 print" save file "
- 37110 print" scratch file "
- 37115 print" disk validate "
- 37120 print" exit menu "
- 37130 print
- 37140 print" [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
- 37150 print"":t1=10:t2=12:ln=13:ll=7:gosub 39010:rem menu system routine
- 37160 if a=7 then return
- 37165 if mf=1 then gosub 7355:rem turn off sequencer
- 37170 on a+1 gosub 30010,45010,44110,37210,37210,37210,44210
- 37175 y$=""
- 37180 goto 37020
- 37200 rem file menu
- 37210 print"[147] move cursor up & down:press [return] [146]"
- 37220 print"*** ";y$;" ***"
- 37230 print"file : ";n$
- 37235 print"select file type"
- 37240 print" [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
- 37250 print" music file "
- 37260 print" sound file "
- 37270 print" probability file"
- 37280 print" disk menu "
- 37285 print
- 37290 print" [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
- 37295 a$=mid$(y$,1,2)
- 37300 print"":t1=10:ll=3:gosub 39010:rem menu system routine
- 37310 if a=3 then return
- 37320 if a$="lo" then on a+1 gosub 40010,42010,43510
- 37322 if a$="sa" then on a+1 gosub 41010,43010,43805
- 37324 if a$="sc" then gosub 44310
- 37330 return
- 38500 rem directory menu
- 38505 if dy*12>fi then dy=0
- 38510 print"[147] move cursor up & down:press [return] [146]"
- 38520 print"***disk directory***"
- 38525 print"blocks free : ";bf
- 38530 print" [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
- 38540 print" ";n$;""
- 38550 for i=12*dy to 11+(12*dy)
- 38555 if i>fi then print:goto 38570
- 38560 print" ";fi$(i)
- 38570 next i
- 38575 print" next page"
- 38580 print" [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
- 38590 print"":t1=10:ll=13:gosub 39010:rem menu system routine
- 38592 if a=13 then dy=dy+1:goto 38505
- 38593 if a=0 then 38600
- 38594 if len(fi$((a-1)+12*dy))<3 then 38600
- 38595 n$=left$(fi$((a-1)+12*dy),len(fi$((a-1)+12*dy))-2)
- 38600 return
- 39000 rem menu system routine
- 39010 rem ll=lower limit of cursor travel
- 39020 rem ln=length of string returned(y$)
- 39030 rem t1=tabulation of ">" cursor
- 39040 rem t2=tabulation of start of string
- 39050 rem a=(option selected-1)
- 39060 a=0:print tab(t1);">"
- 39070 get x$:if x$="" then 39070
- 39080 if a=ll and x$=chr$(17) then a=a-1:print"[145][145]"
- 39090 if a=0 and x$=chr$(145) then a=a+1:print
- 39100 if x$=chr$(17) then a=a+1:print tab(t1);"[145] [157]>"
- 39110 if x$=chr$(145) then a=a-1:print tab(t1);"[145] [157][145]>"
- 39120 if x$=chr$(13) then print tab(t2);"[145]";:goto 39140
- 39130 goto 39070
- 39140 open 1,3:for x=1 to ln:get#1,x$:y$=y$+x$:next:close 1
- 39150 return
- 40000 rem load music file
- 40010 x$=".1":i=0
- 40020 n=0
- 40030 open 15,8,15
- 40040 open 2,8,2,n$+x$+",s,r"
- 40050 input#15,en,er$,tr,se
- 40060 if en<>0 then print"[147] load[146]";:goto 44010
- 40070 print" loading music file : [146]";
- 40080 input#2,a
- 40090 poke ch+i*256+n,a
- 40100 if a<>255 then n=n+1:goto 40080
- 40110 n(i+1)=n
- 40120 close 2
- 40130 close 15
- 40140 if i=0 then i=1:x$=".2":goto 40020
- 40150 if i=1 then i=2:x$=".3":goto 40020
- 40160 return
- 41000 rem save music file
- 41010 x$=".1":i=0
- 41020 n=0
- 41030 open 15,8,15
- 41040 open 2,8,2,n$+x$+",s,w"
- 41050 input#15,en,er$,tr,se
- 41060 if en<>0 then print"[147] save[146]";:goto 44010
- 41070 print" saving music file : [146]";
- 41080 a=peek(ch+i*256+n)
- 41090 print#2,a
- 41100 if a<>255 then n=n+1:goto 41080
- 41110 close 2
- 41120 close 15
- 41130 if i=0 then i=1:x$=".2":goto 41020
- 41140 if i=1 then i=2:x$=".3":goto 41020
- 41150 return
- 42000 rem load fsid registers
- 42010 open 15,8,15
- 42020 open 2,8,2,n$+".s,s,r"
- 42030 input#15,en,er$,tr,se
- 42040 if en<>0 then print"[147] load[146]";:goto 44010
- 42050 print" loading sound file : [146]";
- 42060 input#2,a
- 42070 poke 49275,a
- 42080 for ce=0 to 2
- 42090 for reg=0 to 6
- 42100 input#2,a
- 42110 poke fsid+reg+7*ce,a
- 42120 next reg,ce
- 42130 close 2
- 42140 close 15
- 42150 return
- 43000 rem save fsid registers
- 43010 open 15,8,15
- 43020 open 2,8,2,n$+".s,s,w"
- 43030 input#15,en,er$,tr,se
- 43040 if en<>0 then print"[147] save[146]";:goto 44010
- 43050 print" saving sound file : [146]";
- 43060 a=peek(49275)
- 43070 print#2,a
- 43080 for ce=0 to 2
- 43090 for reg=0 to 6
- 43100 a=peek(fsid+reg+ce*7)
- 43110 print#2,a
- 43120 next reg,ce
- 43130 close 2
- 43140 close 15
- 43150 return
- 43500 rem load probabilty tables
- 43510 open 15,8,15
- 43520 open 2,8,2,n$+".p,s,r"
- 43530 input#15,en,er$,tr,se
- 43540 if en<>0 then print"[147] load[146]";:goto 44010
- 43550 print" loading probability file : [146]";
- 43560 for ce=1 to 3
- 43565 poke ch+n(ce)+(ce-1)*256,128
- 43570 input#2,n(ce)
- 43575 poke ch+n(ce)+(ce-1)*256,255
- 43580 input#2,cs(ce)
- 43590 for i=0 to n(ce)-1
- 43600 input#2,a
- 43610 poke pt+i+(ce-1)*256,a
- 43620 next i,ce
- 43630 for i=0 to 15
- 43632 vl=0
- 43635 for j=0 to 11
- 43640 input#2,a
- 43650 poke pn+j+i*16,a
- 43655 vl=vl+a
- 43660 next j
- 43670 poke pn+12+i*16,100-vl
- 43680 for j=0 to 7
- 43690 input#2,a
- 43700 poke po+j+i*8,a
- 43710 next j,i
- 43720 close 2
- 43730 close 15
- 43735 gosub 3210:gosub 3010:rem reset sid counter & clear all channels
- 43740 return
- 43800 rem save probability file
- 43805 open 15,8,15
- 43810 open 2,8,2,n$+".p,s,w"
- 43815 input#15,en,er$,tr,se
- 43820 if en<>0 then print"[147] save[146]";:goto 44010
- 43825 print" saving probability file : [146]";
- 43830 for ce=1 to 3
- 43835 print#2,n(ce)
- 43840 print#2,cs(ce)
- 43845 for i=0 to n(ce)-1
- 43850 print#2,peek(pt+i+(ce-1)*256)
- 43855 next i,ce
- 43860 for i=0 to 15
- 43865 for j=0 to 11
- 43870 print#2,peek(pn+j+i*16)
- 43875 next j
- 43880 for j=0 to 7
- 43885 print#2,peek(po+j+i*8)
- 43890 next j,i
- 43900 close 2
- 43905 close 15
- 43910 return
- 44000 rem file error routine
- 44010 close 2:close 15
- 44020 print" error : press [return] [146]";:print
- 44030 print"file : ";n$
- 44040 print"error # : ";en:print"";er$:print"tr = ";tr;" : se = ";se
- 44050 get x$:if x$<>chr$(13) then 44050
- 44060 return
- 44100 rem initialise disk
- 44110 open 15,8,15,"i"
- 44120 print" initialise disk : [146]";
- 44130 close 15
- 44140 return
- 44200 rem validate disk
- 44210 open 15,8,15,"v"
- 44220 print" validate disk : [146]";
- 44230 close 15
- 44240 return
- 44300 rem scratch file
- 44310 open 15,8,15
- 44320 print" scratch file : [146]";
- 44330 if a=1 then print#15,"s:"+n$+".s":goto 44380
- 44340 if a=2 then print#15,"s:"+n$+".p":goto 44380
- 44350 print#15,"s:"+n$+".1"
- 44360 print#15,"s:"+n$+".2"
- 44370 print#15,"s:"+n$+".3"
- 44380 close 15
- 44390 return
- 45000 rem disk directory read
- 45010 i=0:fi$(i)=""
- 45020 open 1,8,0,"$0"
- 45030 get#1,x$,x$
- 45040 get#1,x$,x$
- 45050 get#1,x$,a$
- 45060 vl=0
- 45070 if x$<>"" then vl=asc(x$)
- 45080 if a$<>"" then vl=vl+asc(a$)*256
- 45090 bf=vl
- 45100 get#1,x$:if st<>0 then 45210
- 45110 if x$<>chr$(34) then 45100
- 45120 get#1,x$:if x$<>chr$(34) then fi$(i)=fi$(i)+x$:goto 45120
- 45130 get#1,x$:if x$=chr$(32) then 45130
- 45140 if right$(fi$(i),2)=".1" then fi$(i)=left$(fi$(i),len(fi$(i))-1)+"m":i=i+1
- 45150 if right$(fi$(i),2)=".s" then i=i+1
- 45155 if right$(fi$(i),2)=".p" then i=i+1
- 45160 if i=37 then 45210
- 45170 a$="":fi$(i)=""
- 45180 a$=a$+x$:get#1,x$:if x$<>"" then 45180
- 45190 if st=0 then 45040
- 45200 close 1
- 45210 fi=i:dy=0
- 45220 close 1
- 45230 goto 38505
- 50000 rem initialisation
- 50010 if peek(51712)=1 then 50110:rem machine code present
- 50020 rem load machine code
- 50030 poke 53280,5:poke 53281,5
- 50040 print"[147][176][174]"
- 50050 print"aleatory composer"
- 50060 print"v.h.berryc.1989"
- 50070 print"[173][189]"
- 50080 print"loadingmachinecode"
- 50090 i=i+1:if i=1 then load"sequencer mc",8,1
- 50095 if i=2 then load"data table mc",8,1
- 50100 if i=3 then load "note table mc",8,1
- 50110 dim en$(3,15):rem envelope data
- 50112 dim fi$(36)
- 50114 dim l$(11):rem note letter names
- 50115 dim cs(3),n(3):rem occurance% & notes#
- 50116 pn=49664:rem note probability table address
- 50117 po=49920:rem octave probability table address
- 50118 pt=50176:rem probability table index address
- 50120 ch=51968:rem music data address
- 50130 sid=54272:rem sid address
- 50140 fsid=49175:rem false sid data address
- 50150 nh=51712:rem note table high byte
- 50160 nl=51840:rem note table low byte
- 50170 mf=0:rf=-1:rem music & record flag
- 50190 ac=100:rem default auto store counter
- 50200 pw=409:rem pulse width increment=10%
- 50205 pe=5:rem probability increment
- 50210 n$="music file"
- 50220 rem read envelope data
- 50230 for i=0 to 3
- 50250 for j=0 to 15
- 50260 read x$
- 50270 en$(i,j)=x$
- 50280 next j,i
- 50282 rem read note letter names
- 50284 for i=0 to 11
- 50286 read x$
- 50288 l$(i)=x$
- 50289 next
- 50500 rem set default limits
- 50510 n(1)=40:n(2)=24:n(3)=64:rem number of notes in each channel
- 50520 gosub 3010:rem clear all channels
- 50525 gosub 3210:rem reset sid counter
- 50530 os=1:rem edit voice 1
- 50550 poke 53280,0:poke 53281,0
- 50560 return
- 60000 rem attack data
- 60010 data " 2 ms"," 8 ms"," 16 ms"," 24 ms"
- 60020 data " 38 ms"," 56 ms"," 68 ms"," 80 ms"
- 60030 data "100 ms","250 ms","500 ms","800 ms"
- 60040 data "1 s ","3 s ","5 s ","8 s "
- 60050 rem decay data
- 60060 data " 6 ms"," 24 ms"," 48 ms"," 72 ms"
- 60070 data "114 ms","168 ms","204 ms","240 ms"
- 60080 data "300 ms","750 ms","1.5 s ","2.4 s "
- 60090 data "3 s ","9 s ","15 s ","24 s "
- 60100 rem sustain data
- 60110 data " 0 %"," 7 %"," 13 %"," 20 %"
- 60120 data " 27 %"," 33 %"," 40 %"," 47 %"
- 60130 data " 53 %"," 60 %"," 67 %"," 73 %"
- 60140 data " 80 %"," 87 %"," 93 %","100 %"
- 60150 rem release data
- 60160 data " 6 ms"," 24 ms"," 48 ms"," 72 ms"
- 60170 data "114 ms","168 ms","204 ms","240 ms"
- 60180 data "300 ms","750 ms","1.5 s ","2.4 s "
- 60190 data "3 s ","9 s ","15 s ","24 s "
- 60200 rem note letter name data
- 60210 data "c","c#","d","d#"
- 60220 data "e","f","f#","g"
- 60230 data "g#","a","a#","b"
-