Audio frequency generator: Difference between revisions

no edit summary
m (typo fix)
No edit summary
Line 29:
Languages that provide no facilities for utilizing sound hardware of any kind should be omitted.
 
=={{header|Action!}}==
<lang Action!>byte
volu,dist,freq,key=764
 
proc INFO()
position(5,11)
printf("volume:%B freq:%B distortion:%B ",volu,freq,dist)
sound(0,freq,dist,volu)
key=255
return
 
proc INI()
freq=$46
volu=10
dist=10
INFO()
return
 
proc GENERATOR()
byte dmactls=559,cur=752,mar=82
card dlist=560
 
graphics(0) cur=1 mar=8
POKE(709,0) POKE(710,14)
POKEC(DLIST+8,0)
POKEC(DLIST+10,0)
POKEC(DLIST+19,0)
POKEC(DLIST+21,0)
POKEC(DLIST+26,0)
POKE (DLIST+28,0)
 
position(8,1)
printe("Action! sound generator")
printe("")
printe("")
printe("left/right - set volume")
printe("up/down - freq +/-")
printe("space - distorion")
printe("return - default (440 Hz)")
printe("esc - exit")
 
INI()
 
do
if key=28 then exit fi
if key=12 then INI() fi
if key=14 then freq==-1 INFO() fi
if key=15 then freq==+1 INFO() fi
if key=7 then volu==+1 if volu>14 then volu=15 fi INFO() fi
if key=6 then volu==-1 if volu=255 then volu=0 fi INFO() fi
if key=33 then dist==+2 if dist>15 then dist=0 fi INFO() fi
od
 
sndrst() mar=2 graphics(0)
return</lang>
=={{header|Axe}}==
{{untested|Axe}}
Anonymous user