[Csnd] chngetk
Date | 2020-02-16 19:15 |
From | James Hearon |
Subject | [Csnd] chngetk |
Hi,
Trying vers. 6.14 and new array based channel opcodes. Thank you for those.
For chngetk, I was thinking I could have a named channel with a number of kvalues associated with it, but seems like kval[] chngetk Sname[]
array dimensions must match.
I tried a workaround by setting the extraneous channel names to null, 0, or just empty. The string array happily fills and prints, but fails on chngetk
with "invalid channel name 'empty'".
Perhaps it needs discrete, unique names?
Regards,
Jim
<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
-odac ;;;realtime audio out
;-iadc ;;;uncomment -iadc if realtime audio input is needed too
; For Non-realtime ouput leave only the line below:
; -o chnget.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>
sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1
instr 1
SChan[] init 10
SChan[0] = "kChan1"
printf " SChan 0 = '%s' \n", 1, SChan[0]
kcounter = 1
until (kcounter == 10) do
SChan[kcounter] = " "
printf " SChan %d = '%s'\n", kcounter+1, kcounter, SChan[kcounter]
kcounter += 1
od
kVals[] chngetk SChan
turnoff
endin
</CsInstruments>
<CsScore>
i1 1 .1
</CsScore>
</CsoundSynthesizer> |
Date | 2020-02-16 19:52 |
From | Rory Walsh |
Subject | Re: [Csnd] chngetk |
Empty channel names are not permitted. Is the
"invalid channel name 'empty'" a perf error or warning? We could make it a warning so it doesn't stop a performance. But surely empty channel names should be avoided? On Sun, 16 Feb 2020 at 19:15, James Hearon <j_hearon@hotmail.com> wrote:
|