-odac -B2048 -b1024 -d
sr=44100
ksmps=100
nchnls=2
gkb1 chnexport "B1", 1
gkb2 chnexport "B2", 1
gkb3 chnexport "B3", 1
gkb4 chnexport "B4", 1
gkb5 chnexport "B5", 1
gkb6 chnexport "B6", 1
gkb7 chnexport "B7", 1
gkb8 chnexport "B8", 1
instr 1
k1 init 1
k2 init 1
k3 init 1
k4 init 1
k5 init 1
k6 init 1
k7 init 1
k8 init 1
if gkb1 == 1 then
if k1 == 1 then
event "i", 11.1, 0, -1, 1
k1=0
endif
else
if k1 == 0 then
event "i", -11.1, 0, -1,1
k1=1
endif
endif
if gkb2 == 1 then
if k2 == 1 then
event "i", 11.2, 0, -1, 2
k2=0
endif
else
if k2 == 0 then
event "i", -11.2, 0, -1, 2
k2=1
endif
endif
if gkb3 == 1 then
if k3 == 1 then
event "i", 11.3, 0, -1, 3
k3=0
endif
else
if k3 == 0 then
event "i", -11.3, 0, -1, 3
k3=1
endif
endif
if gkb4 == 1 then
if k4 == 1 then
event "i", 11.4, 0, -1, 4
k4=0
endif
else
if k4 == 0 then
event "i", -11.4, 0, -1, 4
k4=1
endif
endif
if gkb5 == 1 then
if k5 == 1 then
event "i", 11.5, 0, -1, 5
k5=0
endif
else
if k5 == 0 then
event "i", -11.5, 0, -1, 5
k5=1
endif
endif
if gkb6 == 1 then
if k6 == 1 then
event "i", 11.6, 0, -1, 6
k6=0
endif
else
if k6 == 0 then
event "i", -11.6, 0, -1, 6
k6=1
endif
endif
if gkb7 == 1 then
if k7 == 1 then
event "i", 11.7, 0, -1, 7
k7=0
endif
else
if k7 == 0 then
event "i", -11.7, 0, -1, 7
k7=1
endif
endif
if gkb8 == 1 then
if k8 == 1 then
event "i", 11.8, 0, -1, 8
k8=0
endif
else
if k8 == 0 then
event "i", -11.8, 0, -1, 8
k8=1
endif
endif
endin
instr 11
S1 sprintf "S%d", p4
k1 chnget S1
k2 chnget "main_volume"
kv tonek k2/10, 10
ka linenr 2000*kv, 0.1, 0.1, 0.05
a1 oscili ka, k1, 1
outs a1,a1
endin
f1 0 1024 10 1 0.5 0.3 0.25 0.2 0.18 0.15 0.13 0.11 0.1 0.09
i1 0 3600