Csound Csound-dev Csound-tekno Search About

[Csnd] String parameters to UDOs

Date2013-02-27 13:31
FromRory Walsh
Subject[Csnd] String parameters to UDOs
I'm having a small problem with a simple UDO that accepts 16 strings.
Here's the most basic version of the UDO:

opcode testOp, k, kSSSSSSSSSSSSSSSS
kindex, S1, S2, S3, S4, S5, S6, S7, S8, S8, S9, S10, S11, S12, S13,
S14, S15, S16 xin
kOff = 0
chnset kOff, S16
xout 1
endop

And in use:

kDummy testOp, 0, "step1", "step2", "step3", "step4", "step5",
"step6", "step7", "step8", "step9", "step10", "step11", "step12",
"step13", "step14", "step15", "step16"

Results in:

INIT ERROR in instr 2000 (opcode testOp): invalid channel name
	chnset.k	kOff	S16	
	  B  1.000 - note deleted.  i2000 had 1 init errors

If I comment out the chnset line I get no errors. And ideas?

Date2013-02-27 14:04
Fromjoachim heintz
SubjectRe: [Csnd] String parameters to UDOs
it only occurs for S16, did you see?
so it looks like there is a limit of 15 strings as input for an UDO.
perhaps you can give your channels as *one* string and then parse it 
internally? this would also give you more flexibility, i think.
best -
	joachim


Am 27.02.2013 14:31, schrieb Rory Walsh:
> I'm having a small problem with a simple UDO that accepts 16 strings.
> Here's the most basic version of the UDO:
>
> opcode testOp, k, kSSSSSSSSSSSSSSSS
> kindex, S1, S2, S3, S4, S5, S6, S7, S8, S8, S9, S10, S11, S12, S13,
> S14, S15, S16 xin
> kOff = 0
> chnset kOff, S16
> xout 1
> endop
>
> And in use:
>
> kDummy testOp, 0, "step1", "step2", "step3", "step4", "step5",
> "step6", "step7", "step8", "step9", "step10", "step11", "step12",
> "step13", "step14", "step15", "step16"
>
> Results in:
>
> INIT ERROR in instr 2000 (opcode testOp): invalid channel name
> 	chnset.k	kOff	S16	
> 	  B  1.000 - note deleted.  i2000 had 1 init errors
>
> If I comment out the chnset line I get no errors. And ideas?
>
>
> Send bugs reports to the Sourceforge bug tracker
>              https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>

Date2013-02-27 14:05
FromRory Walsh
SubjectRe: [Csnd] String parameters to UDOs
That's what I first thought, but I'm not so sure. It seems like such
an odd limitation?

On 27 February 2013 14:04, joachim heintz  wrote:
> it only occurs for S16, did you see?
> so it looks like there is a limit of 15 strings as input for an UDO.
> perhaps you can give your channels as *one* string and then parse it
> internally? this would also give you more flexibility, i think.
> best -
>         joachim
>
>
> Am 27.02.2013 14:31, schrieb Rory Walsh:
>>
>> I'm having a small problem with a simple UDO that accepts 16 strings.
>> Here's the most basic version of the UDO:
>>
>> opcode testOp, k, kSSSSSSSSSSSSSSSS
>> kindex, S1, S2, S3, S4, S5, S6, S7, S8, S8, S9, S10, S11, S12, S13,
>> S14, S15, S16 xin
>> kOff = 0
>> chnset kOff, S16
>> xout 1
>> endop
>>
>> And in use:
>>
>> kDummy testOp, 0, "step1", "step2", "step3", "step4", "step5",
>> "step6", "step7", "step8", "step9", "step10", "step11", "step12",
>> "step13", "step14", "step15", "step16"
>>
>> Results in:
>>
>> INIT ERROR in instr 2000 (opcode testOp): invalid channel name
>>         chnset.k        kOff    S16
>>           B  1.000 - note deleted.  i2000 had 1 init errors
>>
>> If I comment out the chnset line I get no errors. And ideas?
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>              https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>