home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er 1991 August
/
64er_Magazin_91-08_1991_Markt__Technik_de_Side_A.d64
/
frequenzgenerat.
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
1KB
|
21 lines
1 print"[147] frequenzgenerator v2.0 von e.hammes":print"frequenz:":print""
2 fori=0to3:print"<";i*2+1"[157][157][157]f> : +"10^i"hz ( +shift: -"10^i"hz )":nexti
3 print"andere stimmen:":print"<w> : veraendert wellenform":y=1
4 s=54272:fori=1to3:pokes+2,0:pokes+3,255:s=s+7:f(i)=440:w(i)=0:nexti:s=s-21:f=440
5 print"<d> : frequenzdirekteingabe":print"<s> : andere stimme":t=1:l=10
6 w$(0)="dreieck ":w$(1)="saegezahn":w$(2)="rechteck ":w$(3)="rauschen "
7 print""tab(17)" ":i=1:i2=2:ift=1ort=2theni=2:i2=3:ift=2theni=1:i2=3
8 print""tab(17)i":"f(i)i2":"f(i2):poke650,128:poke54296,l:poke5+s,25:pokes+6,68:goto18
9 iff<1orf>3460thenq=f:f=1:ifq>3460thenf=3460
10 p=int(f*17.03199):hb=int(p/256):lb=p-hb*256:poke1+s,hb:pokes,lb:poke54296,l
11 print""tab(10)f"[157] hz vol:"l"[157] "
12 geta$:on-(a$="")goto12:a=asc(a$):on-(a=68)goto19:on-(a=87)goto17:ifa=83thens=s+7:goto20
13 on-(a=17)or-(a=145)goto15:on-(a<133)or-(a>140)goto12:a=a-133:ifa>3thena=a-4:y=-1
14 f=f+(10^a)*y:y=1:f=int(f+.5):goto 9
15 l=l-1:on-(a$="[145]")goto16:l=l+2:goto16
16 on-(l>-1)and-(l<16)goto9:ifl<0orl>15thenx=l:l=0:on-(x<16)goto9:ifx>15thenl=15:goto9
17 w=w+1:ifw>3thenw=0
18 ww=(16*(2^w))+1:pokes+4,ww:print"wellenf:"w$(w)" stimme:"t:goto9
19 poke19,64:print"";:inputf$:f=val(f$):poke19,0:goto9
20 f(t)=f:w(t)=w:t=t+1:f=f(t):w=w(t):on-(t<4)goto7:ift>3thent=0:s=s-21:goto20