| Wow, I'm learning some great stuff today!
Yes, that seems to be working... I made some slightly modified
versions of the opcode for at S i and a rates, and was able to test
all appropriately. This could be very useful indeed.
Thanks for the heads up!
On Sun, Oct 18, 2015 at 5:53 AM, joachim heintz wrote:
> thanks for this extension, kevin — nice to see it works as you described.
>
> i learned some weeks ago that UDOs can be polymorphic. so you should be
> able to define all data types seperately, and then the UDO will pick up the
> right one:
>
> opcode Chnls,0,kS[]o
> kVal, Schnls[], iCnt xin
> ...
> endop
>
> opcode Chnls,0,aS[]o
> aVal, Schnls[], iCnt xin
> ...
> endop
>
> etc
>
> can you try? best -
> joachim
>
>
>
> On 18/10/15 10:08, Kevin Welsh wrote:
>>
>> I got a chance to test this example... for those following along at
>> home, it works with an inline fillarray function like so:
>> Chnls kVal, fillarray( "a", "b", "c"). Thanks Joachim!
>>
>> The only problem I ran into (which is obvious in retrospect)... you
>> would need a version of this opcode for each potential data type, ika
>> and S. Or is there some other csound voodoo that could make this one
>> UDO handle all types?
>>
>> On Sat, Oct 17, 2015 at 8:44 PM, Kevin Welsh wrote:
>>>
>>> I think I follow Joachim's example, but I'll have to politely disagree
>>> with Victor's "You can do that easily with an UDO" assertion, or at
>>> least admit that my concept of easily may differ greatly from yours.
>>>
>>> Aside from requiring an understanding of arrays and recursive UDOs, it
>>> looks like in cases where you're only setting a few channels here or
>>> there it might still be easier to just do it the old fashioned way.
>>> Definitely useful for setting large banks of channels tho.
>>>
>>> I haven't gotten to test the example yet, but is there a way an array
>>> be created inline function style, like so?
>>>
>>> Chnls kVal, fillarray:S( "a", "b", "c")
>>>
>>> On Sat, Oct 17, 2015 at 4:23 PM, Victor Lazzarini
>>> wrote:
>>>>
>>>> I'm already polishing up my routine here.
>>>>
>>>> Victor Lazzarini
>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>> Maynooth University
>>>> Ireland
>>>>
>>>> On 17 Oct 2015, at 15:15, Rory Walsh wrote:
>>>>
>>>> If academia doesn't work out for you there is always stand up!
>>>>
>>>> On 17 October 2015 at 13:57, Victor Lazzarini
>>>> wrote:
>>>>>
>>>>>
>>>>> It literally takes a while; or an until.
>>>>>
>>>>> Victor Lazzarini
>>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>>> Maynooth University
>>>>> Ireland
>>>>>
>>>>> On 17 Oct 2015, at 13:15, Rory Walsh wrote:
>>>>>
>>>>> Yes, you're right. It will take a while before arrays are the first
>>>>> thing
>>>>> I think of when dealing with these things in Csound!
>>>>>
>>>>> On 17 October 2015 at 12:43, Victor Lazzarini
>>>>>
>>>>> wrote:
>>>>>>
>>>>>>
>>>>>> yes, exactly, an array of strings and a k-rate loop.
>>>>>>
>>>>>> Victor Lazzarini
>>>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>>>> Maynooth University
>>>>>> Ireland
>>>>>>
>>>>>>> On 17 Oct 2015, at 12:22, jpff wrote:
>>>>>>>
>>>>>>> Surely an array o chanel names should sove this?
>>>>>>>
>>>>>>>
>>>>>>>> On Sat, 17 Oct 2015, Kevin Welsh wrote:
>>>>>>>>
>>>>>>>> Rory, not variable length per se, but you can have optional
>>>>>>>> arguments
>>>>>>>> that default to a specific value. Obviously you still have to
>>>>>>>> account
>>>>>>>> for them in the opcode if you want them to do anything. There's not
>>>>>>>> an optional string input however.
>>>>>>>>
>>>>>>>> There's an opcode like that in the instrument I sent you last night,
>>>>>>>> "setsliders". There's a place in the code I only call it with one
>>>>>>>> argument, even tho it accepts 8.
>>>>>>>>
>>>>>>>> Get ready to see that opcode again, because I think I've isolated a
>>>>>>>> cabbage slug (or maybe just a limitation?) with it and will be
>>>>>>>> posting
>>>>>>>> a stripped down example tomorrow once I finish it.
>>>>>>>>
>>>>>>>> On Sat, Oct 17, 2015 at 6:59 AM, Rory Walsh
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> Can UDOs have variables length of input arguments?
>>>>>>>>>
>>>>>>>>> On 17 October 2015 at 11:41, Victor Lazzarini
>>>>>>>>>
>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> You can do that easily with an UDO, no need for another opcode.
>>>>>>>>>>
>>>>>>>>>> Victor Lazzarini
>>>>>>>>>> Dean of Arts, Celtic Studies, and Philosophy
>>>>>>>>>> Maynooth University
>>>>>>>>>> Ireland
>>>>>>>>>>
>>>>>>>>>>> On 17 Oct 2015, at 11:28, Kevin Welsh wrote:
>>>>>>>>>>>
>>>>>>>>>>> I had an idea that chnset could be altered to send to multiple
>>>>>>>>>>> channels, basically an arbitrary number of optional arguments
>>>>>>>>>>> after
>>>>>>>>>>> p2. It would be especially useful when resetting a group of
>>>>>>>>>>> related
>>>>>>>>>>> channels, for example usage would be:
>>>>>>>>>>>
>>>>>>>>>>> chnset kval, "chan1", "chan2", "chan3"
>>>>>>>>>>>
>>>>>>>>>>> instead of:
>>>>>>>>>>>
>>>>>>>>>>> chnset kval, "chan1"
>>>>>>>>>>> chnset kval, "chan2"
>>>>>>>>>>> chnset kval, "chan3"
>>>>>>>>>>>
>>>>>>>>>>> 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
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 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
>>>>>>>
>>>>>>>
>>>>>>> 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
>>>>>
>>>>>
>>>>>
>>>>> 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
>>>>
>>>>
>>>>
>>>> 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
>>
>>
>> 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
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 |