Hi,
It seems that a combobox with type string will not initialize the string channel contents.
This one:
combobox channel(“partitionlength”), bounds(20, 50, 70, 20), items(“256”, “512”, “1024”, “2048”, “4096”), channeltype(“string”), value(4)
… even if it displays the 4th item, it does not init the string channel with that item.
Full csd:
<Cabbage>
form size(300, 200), caption("LiveConvolver3"), pluginID("lic3")
label text("p_length"), bounds(20, 20, 70, 13)
combobox channel("partitionlength"), bounds(20, 50, 70, 20), items("256", "512", "1024", "2048", "4096"), channeltype("string"), value(4)
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d
</CsOptions>
<CsInstruments>
gkpartitionlen init 2048
instr 1
Spartitionlen chnget "partitionlength"
k1 changed Spartitionlen
if (strlenk(Spartitionlen)>0) && (k1>0) then
gkpartitionlen strtodk Spartitionlen
endif
printk2 gkpartitionlen
endin
instr 2
chnset "1234567", "partitionlength"
endin
</CsInstruments>
<CsScore>
;i2 0 .1 ; we can enable this to initialize the string, would hope not to need to do that
i1 0.1 10
f0 60
e
</CsScore>
</CsoundSynthesizer>