| Okey doke. Cheers for your help!
Pete
On Thu, Jan 5, 2017 at 3:58 PM, Victor Lazzarini
wrote:
> No, it’s all about overloading.
> ========================
> Prof. Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952
>
>> On 5 Jan 2017, at 15:50, Peter Burgess wrote:
>>
>> Ok, that's fair enough, I was just hoping there was a way to do it
>> without writing it out again. Is it possible to have optional outputs
>> with proper opcodes?
>>
>> On Thu, Jan 5, 2017 at 1:53 PM, Victor Lazzarini
>> wrote:
>>> Overload the UDO:
>>>
>>> opcode Test,kk,kk
>>> k1,k2 xin
>>> xout k1*k2,k1+k2
>>> endop
>>>
>>> opcode Test,k,kk
>>> k1,k2 xin
>>> k1,k2 Test k1,k2
>>> xout k1
>>> endop
>>>
>>>
>>> instr 1
>>> k1 Test 1,2
>>> k2,k3 Test 1,2
>>> printk2 k1
>>> printk2 k2
>>> printk2 k3
>>> endin
>>>
>>> ========================
>>> Prof. Victor Lazzarini
>>> Dean of Arts, Celtic Studies, and Philosophy,
>>> Maynooth University,
>>> Maynooth, Co Kildare, Ireland
>>> Tel: 00 353 7086936
>>> Fax: 00 353 1 7086952
>>>
>>>> On 5 Jan 2017, at 13:17, Peter Burgess wrote:
>>>>
>>>> Hi. While writing a UDO, is there a way of listing an output as
>>>> optional, so I can choose whether or not use one or more of the
>>>> outputs. For example:
>>>>
>>>> Let's pretend the 'o' on the UDO's output list represents the optional one....
>>>>
>>>> opcode "MyUDO", ao, ii
>>>> iIn1, iIn2 xin
>>>> ;Some Code Here
>>>> xout aOut, aOutOptional
>>>> endop
>>>>
>>>> With the above pseudo code, I would want to be able to do either of
>>>> the following:
>>>>
>>>> aRes MyUDO iIn1, iIn2
>>>>
>>>> aRes, aResOptional MyUDO iIn1, iIn2
>>>>
>>>> Is there a way to do that already? And if not, is there a way to do
>>>> that when writing an opcode in C/C++?
>>>>
>>>> Pete
>>>>
>>>>
>>>> --
>>>> http://algorythmradio.com
>>>> https://soundcloud.com/algorythmradio
>>>>
>>>> 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
>>
>>
>>
>> --
>> http://algorythmradio.com
>> https://soundcloud.com/algorythmradio
>>
>> 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
--
http://algorythmradio.com
https://soundcloud.com/algorythmradio
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 |