Csound Csound-dev Csound-tekno Search About

[Cs-dev] UDOs and arrays

Date2014-04-09 01:32
FromMichael Gogins
Subject[Cs-dev] UDOs and arrays
AttachmentsNone  None  
Can user-defined opcodes use arrays in xin and xout? If so what are the codes?

Thanks,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com

Date2014-04-09 02:13
FromSteven Yi
SubjectRe: [Cs-dev] UDOs and arrays
Attachmentstest_udo_a_array.csd  None  None  
Hi Michael,

Yes, you can, if you are using a build from the develop branch.
Enabling arrays of any type for UDO's was part of the work I did for
6.03.0.  I've attached a test CSD that I had used.

To define an array as an argument, use something like "a[]".  For
example, the opcode definition looks like:

opcode test1, a[], a[]

The xin line should use the array var definition form, meaning it
should start with "a" and end with []:

asigs[] xin

(for a-arrays, can be ksomething[], etc.).

For xout, just use the var name:

xout aout

as the parser knows the type of the var.

Let me know if you have further questions.

Thanks!
steven


On Tue, Apr 8, 2014 at 8:32 PM, Michael Gogins  wrote:
> Can user-defined opcodes use arrays in xin and xout? If so what are the
> codes?
>
> Thanks,
> Mike
>
> -----------------------------------------------------
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
> ------------------------------------------------------------------------------
> Put Bad Developers to Shame
> Dominate Development with Jenkins Continuous Integration
> Continuously Automate Build, Test & Deployment
> Start a new project now. Try Jenkins in the cloud.
> http://p.sf.net/sfu/13600_Cloudbees
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

Date2014-04-09 02:44
FromMichael Gogins
SubjectRe: [Cs-dev] UDOs and arrays
AttachmentsNone  None  
Thanks for your quick response. This seems to work also with multiple array args, e.g.

opcode test1, a[], a[]k[]
setksmps 1
asigs[], ksigs[] xin

Is that not correct?

Another question: what about the software bus? Do chnset, chmnmix, chnget work with a[] and k[]?

Best,
Mike


-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Tue, Apr 8, 2014 at 9:13 PM, Steven Yi <stevenyi@gmail.com> wrote:
Hi Michael,

Yes, you can, if you are using a build from the develop branch.
Enabling arrays of any type for UDO's was part of the work I did for
6.03.0.  I've attached a test CSD that I had used.

To define an array as an argument, use something like "a[]".  For
example, the opcode definition looks like:

opcode test1, a[], a[]

The xin line should use the array var definition form, meaning it
should start with "a" and end with []:

asigs[] xin

(for a-arrays, can be ksomething[], etc.).

For xout, just use the var name:

xout aout

as the parser knows the type of the var.

Let me know if you have further questions.

Thanks!
steven


On Tue, Apr 8, 2014 at 8:32 PM, Michael Gogins <michael.gogins@gmail.com> wrote:
> Can user-defined opcodes use arrays in xin and xout? If so what are the
> codes?
>
> Thanks,
> Mike
>
> -----------------------------------------------------
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
> ------------------------------------------------------------------------------
> Put Bad Developers to Shame
> Dominate Development with Jenkins Continuous Integration
> Continuously Automate Build, Test & Deployment
> Start a new project now. Try Jenkins in the cloud.
> http://p.sf.net/sfu/13600_Cloudbees
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel



Date2014-04-09 03:52
FromSteven Yi
SubjectRe: [Cs-dev] UDOs and arrays
Yes, you can have multiple array args for ins and outs.  At least, it
*should* work now, and if it doesn't, it's a bug.

I don't think the channel system has been updated for arrays.  We need
to figure out a good way to do this not only internally, but also with
the API, especially in regards to the language wrappers. I think we'll
need to work out a design for that.

On Tue, Apr 8, 2014 at 9:44 PM, Michael Gogins  wrote:
> Thanks for your quick response. This seems to work also with multiple array
> args, e.g.
>
> opcode test1, a[], a[]k[]
> setksmps 1
> asigs[], ksigs[] xin
>
> Is that not correct?
>
> Another question: what about the software bus? Do chnset, chmnmix, chnget
> work with a[] and k[]?
>
> Best,
> Mike
>
>
> -----------------------------------------------------
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Tue, Apr 8, 2014 at 9:13 PM, Steven Yi  wrote:
>>
>> Hi Michael,
>>
>> Yes, you can, if you are using a build from the develop branch.
>> Enabling arrays of any type for UDO's was part of the work I did for
>> 6.03.0.  I've attached a test CSD that I had used.
>>
>> To define an array as an argument, use something like "a[]".  For
>> example, the opcode definition looks like:
>>
>> opcode test1, a[], a[]
>>
>> The xin line should use the array var definition form, meaning it
>> should start with "a" and end with []:
>>
>> asigs[] xin
>>
>> (for a-arrays, can be ksomething[], etc.).
>>
>> For xout, just use the var name:
>>
>> xout aout
>>
>> as the parser knows the type of the var.
>>
>> Let me know if you have further questions.
>>
>> Thanks!
>> steven
>>
>>
>> On Tue, Apr 8, 2014 at 8:32 PM, Michael Gogins 
>> wrote:
>> > Can user-defined opcodes use arrays in xin and xout? If so what are the
>> > codes?
>> >
>> > Thanks,
>> > Mike
>> >
>> > -----------------------------------------------------
>> > Michael Gogins
>> > Irreducible Productions
>> > http://michaelgogins.tumblr.com
>> > Michael dot Gogins at gmail dot com
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Put Bad Developers to Shame
>> > Dominate Development with Jenkins Continuous Integration
>> > Continuously Automate Build, Test & Deployment
>> > Start a new project now. Try Jenkins in the cloud.
>> > http://p.sf.net/sfu/13600_Cloudbees
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >
>>
>>
>> ------------------------------------------------------------------------------
>> Put Bad Developers to Shame
>> Dominate Development with Jenkins Continuous Integration
>> Continuously Automate Build, Test & Deployment
>> Start a new project now. Try Jenkins in the cloud.
>> http://p.sf.net/sfu/13600_Cloudbees
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
>
> ------------------------------------------------------------------------------
> Put Bad Developers to Shame
> Dominate Development with Jenkins Continuous Integration
> Continuously Automate Build, Test & Deployment
> Start a new project now. Try Jenkins in the cloud.
> http://p.sf.net/sfu/13600_Cloudbees
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net