[Cs-dev] UDOs and arrays
Date | 2014-04-09 01:32 |
From | Michael Gogins |
Subject | [Cs-dev] UDOs and arrays |
Attachments | None None |
Can user-defined opcodes use arrays in xin and xout? If so what are the codes?
Thanks, Mike -----------------------------------------------------
Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com |
Date | 2014-04-09 02:13 |
From | Steven Yi |
Subject | Re: [Cs-dev] UDOs and arrays |
Attachments | test_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 |
Date | 2014-04-09 02:44 |
From | Michael Gogins |
Subject | Re: [Cs-dev] UDOs and arrays |
Attachments | None 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 GoginsIrreducible 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, |
Date | 2014-04-09 03:52 |
From | Steven Yi |
Subject | Re: [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 |