On line with passion since 2007

Commodore 128

Cari Amici,
Il programma che segue utilizza il C64 come un generatore di note...sfrutta le enormi potenzialità del SID (il suo integrato sonoro). E' interamente scritto in basic 2.0 ed è suddiviso in due funzionalità. All'inizio un menù permette di accedere o ad un piano elettronico oppure ad un editor di suoni. Per mezzo dell'editor di suoni si possono inserire note (fino a 1000) che verranno poi suonate in sequenza...

 

Listato Generatore di suoni

10 poke775,191:clr:print chr$(147):poke53280,3:poke53281,3:a1$="Programma by Pastore Carlo"
20 a2$="(c) 1990":a3$="Premi un tasto":aa=len(a1$):bb=len(a2$):cc=len(a3$)
30 print"qqq]]] in reverse": for i=1 to aa:for j=1 to 50:next j:print mid$(a1$,i,1);:next
40 print"q in reverse":for i = 1 to bb : for j = 1 to 50 : next j : print mid$ (a,i,1):next 45 fori=1to600:next
50 print"q in reverse":fori=1tocc:forj=1to50:nextj:print mid$(a3$,i,1);:next
60 poke198,0:wait198,1:print chr$(147):poke646,1:poke53280,0:poke53281,0:poke198,0
70 print"5 q in reverse 5 ]Menù :":print"3 q in reverse 8 ]1- Music editor"
80 print"2 q in reverse 8 ]2- Piano elettronico" 90 get d$="": if d$="" then
90 100 if d$="1" then 1000 110 if d$="2" then 10000 120 if d$<>"1" or d$<>"2" then 90
1000 print chr$(147):poke 646,1
1010 input"3 q in reverse Quante note vuoi inserire (1-1000)";z
1020 if z<1 or z>1000 then 1000 1030 dim x(z),y(z):n=0
1040 if n=z then 1150
1041 n=n+1
1050 input"cuore in reverse Qual'è la nota";x$
1060 if x$="do" then x(n)=33:y(n)=135:goto 1040
1070 if x$="re" then x(n)=37:y(n)=162:goto 1040
1080 if x$="mi" then x(n)=42:y(n)=62:goto 1040
1090 if x$="fa" then x(n)=44:y(n)=193:goto 1040
1100 if x$="sol" then x(n)=50:y(n)=60:goto 1040
1110 if x$="la" then x(n)=56:y(n)=99:goto 1040
1120 if x$="si" then x(n)=63:y(n)=75:goto 1040
1121 if x$="hd" then x(n)=67:y(n)=15:goto 1040
1130 if x$<>"do" or x$<>"re" or x$<>"mi" or x$<>"fa" or x$<>"sol" then 1040
1140 if x$<>"la" or x$<>"si" or x$<>"hd" then 1040
1150 poke646,7:print chr$(147):print"suono il motivo (s/n) ?"
1160 get r$:if r$="" then 1160
1170 if r$="s" then 1190
1180 clr:print chr$(147):goto 70
1190 sid=54272:fori=0to24:pokesid+i,0:next 1191 print chr$(147):input"Volume (0-15)";v
1192 if v<0 or v>15 then v=15
1193 input "2 q in reverse Forma d'onda (17-33-65-129)";q
1200 print chr$(147):pokesid+24,v:pokesid+5,31:pokesid+6,31:pokesid+4,q
1210 fori=1ton:pokesid+1,x(i):pokesid,y(i):pokesid+4,q:forh=1to180:nexth
1220 pokesid+4,q-1:forj=1to20:nextj:nexti:pokesid+24,0:pokesid+4,q-1
1230 print chr$(147):input"Ancora";s$ 1240 if s$="si" then 1200
1250 clr:print chr$(147):poke646,1:goto 70
10000 w1$="Piano elettronico":w2$="Programma by Pastore Carlo (c) 1990"
10001 xx=len(w1$):yy=len(w2$):print"2 q in reverse";chr$(147)
10002 fori=1toxx:forj=1to50:nextj:print mid$(w1$,i,1);:next
10003 print"q in reverse":for i=1toyy:forj=1to50:nextj:print mid$(w2$,i,1);:next
10010 print"s in reverse 6 q in reverse Q = do - W = re - E = mi - R = fa"
10020 print"q in reverse T = sol - Y = la - U = si - I = do (alto)"
10021 print"q in reverse A = do# - S = re# - D = fa# - F = sol#"
10022 print"q in reverse G = la#":poke198,0
10030 sid=54272:fori=0to24:pokesid+i,0:next:pokesid+24,15:pokesid+4,17
10031 pokesid+5,10:pokesid+6,10
10040 get z$:if z$="" then 10040
10050 if z$="q" then pokesid+4,17:goto 12000
10060 if z$="w" then pokesid+4,17:goto 12010
10070 if z$="e" then pokesid+4,17:goto 12020
10080 if z$="r" then pokesid+4,17:goto 12030
10090 if z$="t" then pokesid+4,17:goto 12040
10100 if z$="y" then pokesid+4,17:goto 12050
10110 if z$="u" then pokesid+4,17:goto 12060
10120 if z$="i" then pokesid+4,17:goto 12070
10130 if z$="a" then pokesid+4,17:goto 12080
10140 if z$="s" then pokesid+4,17:goto 12090
10150 if z$="d" then pokesid+4,17:goto 12100
10160 if z$="f" then pokesid+4,17:goto 12110
10170 if z$="g" then pokesid+4,17:goto 12120
10171 if z$="1" then print chr$(147):clr:end
10180 if z$<>"q" or z$<>"w" or z$<>"e" or z$<>"r" or z$<>"t" then 10040
10190 if z$<>"y" or z$<>"u" or z$<>"i" or z$<>"a" or z$<>"s" then 10040
10200 if z$<>"d" or z$<>"f" or z$<>"g" or z$<>"1" then 10040
12000 pokesid+1,33:pokesid,135:fori=1to180:next:pokesid+4,16:goto 10040
12010 pokesid+1,37:pokesid,162:fori=1to180:next:pokesid+4,16:goto 10040
12020 pokesid+1,42:pokesid,62:fori=1to180:next:pokesid+4,16:goto 10040
12030 pokesid+1,44:pokesid,193:fori=1to180:next:pokesid+4,16:goto 10040
12040 pokesid+1,50:pokesid,60:fori=1to180:next:pokesid+4,16:goto 10040
12050 pokesid+1,56:pokesid,99:fori=1to180:next:pokesid+4,16:goto 10040
12060 pokesid+1,63:pokesid,75:fori=1to180:next:pokesid+4,16:goto 10040
12070 pokesid+1,67:pokesid,15:fori=1to180:next:pokesid+4,16:goto 10040
12080 pokesid+1,35:pokesid,134:fori=1to180:next:pokesid+4,16:goto 10040
12090 pokesid+1,39:pokesid,223:fori=1to180:next:pokesid+4,16:goto 10040
12100 pokesid+1,47:pokesid,107:fori=1to180:next:pokesid+4,16:goto 10040
12110 pokesid+1,53:pokesid,57:fori=1to180:next:pokesid+4,16:goto 10040
12120 pokesid+1,59:pokesid,190:fori=1to180:next:pokesid+4,16:goto 10040