Csound Csound-dev Csound-tekno Search About

[Csnd] chngetk

Date2020-02-16 19:15
FromJames 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>

Date2020-02-16 19:52
FromRory Walsh
SubjectRe: [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:
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>
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here