sr = 44100
ksmps = 16
nchnls = 2
0dbfs = 0.9
; instrument that uses outvalue to send out control messages
instr 1
ioutval init p4
outvalue "chan1", ioutval
endin
; instrument that writes to a named channel, but only
; receives numeric pfields (channel name is static)
instr 2
; a 1 hrtz lfo, amplitude 1
klfo lfo 1, 1
kmult init p4
kout = kmult * klfo
chnset kout, "lfo1"
endin
; instrument that gets the channel name from p4
instr 3
S_chan strget p4
klfo lfo 1, 1
chnset klfo, S_chan
endin
f0 3600
i2 0 2 1
; the below is a mistake, but results in just NaN
i2 2 2 "foo" 1
; the below is correct
i3 4 2 "lfo1"
; this is incorrect (number for a string field)
; and segfaults, sometimes hanging, sometimes crashing
i3 6 2 1
e