Csound Csound-dev Csound-tekno Search About

pass udo name as variable

Date2015-08-12 15:11
FromRichard
Subjectpass udo name as variable
I have a simple udo (extrapol) that returns an k-rate variable.
When I use it like this, I get an error: error: syntax error, unexpected 
NEWLINE, expecting ',' or ')'  (token "
") from file extrapol.csd (1)
  line 56:
 >>>a1    oscil 100, 220 + extrapol 150, -1 <<<
Parsing failed due to 1 syntax error!


instr 1
;kval extrapol 150
a1    oscil 100, 220 + extrapol 150, -1
outs a1/2, a1/2
endin

When I use it like so, it is ok:

instr 1
kval extrapol 150
a1    oscil 100, 220 + kval, -1
outs a1/2, a1/2
endin

why is this?

------------------------------------------------------------------------------
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2015-08-12 15:56
FromVictor Lazzarini
SubjectRe: pass udo name as variable
Try

extrapol(.)

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 12 Aug 2015, at 15:11, Richard  wrote:
> 
> I have a simple udo (extrapol) that returns an k-rate variable.
> When I use it like this, I get an error: error: syntax error, unexpected 
> NEWLINE, expecting ',' or ')'  (token "
> ") from file extrapol.csd (1)
>  line 56:
>>>> a1    oscil 100, 220 + extrapol 150, -1 <<<
> Parsing failed due to 1 syntax error!
> 
> 
> instr 1
> ;kval extrapol 150
> a1    oscil 100, 220 + extrapol 150, -1
> outs a1/2, a1/2
> endin
> 
> When I use it like so, it is ok:
> 
> instr 1
> kval extrapol 150
> a1    oscil 100, 220 + kval, -1
> outs a1/2, a1/2
> endin
> 
> why is this?
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

------------------------------------------------------------------------------
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2015-08-12 16:05
FromRichard
SubjectRe: pass udo name as variable
Yes, that works!
Thanks.

On 12/08/15 16:56, Victor Lazzarini wrote:
> Try
>
> extrapol(.)
>
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
>
>> On 12 Aug 2015, at 15:11, Richard  wrote:
>>
>> I have a simple udo (extrapol) that returns an k-rate variable.
>> When I use it like this, I get an error: error: syntax error, unexpected
>> NEWLINE, expecting ',' or ')'  (token "
>> ") from file extrapol.csd (1)
>>   line 56:
>>>>> a1    oscil 100, 220 + extrapol 150, -1 <<<
>> Parsing failed due to 1 syntax error!
>>
>>
>> instr 1
>> ;kval extrapol 150
>> a1    oscil 100, 220 + extrapol 150, -1
>> outs a1/2, a1/2
>> endin
>>
>> When I use it like so, it is ok:
>>
>> instr 1
>> kval extrapol 150
>> a1    oscil 100, 220 + kval, -1
>> outs a1/2, a1/2
>> endin
>>
>> why is this?
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Csound-users mailing list
>> Csound-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-users
>> Send bugs reports to
>>         https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
>          https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here


------------------------------------------------------------------------------
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here