1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
<CsoundSynthesizer>
<CsOptions>
-odac
</CsOptions>
<CsInstruments>
pyinit
gkprint init 0
instr 1
;assign 4th p-field to local python variable "value"
pylassigni "value", p4
ktrig changed gkprint
; If gkprint has changed (i.e. instr 2 was triggered)
; print the value of the local python variable "value"
if (ktrig == 1) then
kvalue pyleval "value"
printk 0.5, kvalue
endif
endin
instr 2
gkprint init 1
endin
</CsInstruments>
<CsScore>
; p4
i 1 0 5 100
i 1 1 5 200
i 1 2 5 300
i 1 3 5 400
i 2 3 1
</CsScore>
</CsoundSynthesizer>
|