Re: [Csnd-dev] [EXTERNAL] Re: [Csnd-dev] expression with multiple outputs

Victor Lazzarini <[email protected]> Sun, 21 Sep 2025 19:41:57 +0000
Newsgroups gmane.comp.audio.csound.devel
Message-ID <[email protected]>
It's a can of worms. I have discussed this with Steven and we concluded it's a bad idea.


Prof. Victor Lazzarini
Maynooth University
Ireland

On 21 Sep 2025, at 19:25, Hlöðver Sigurðsson <[email protected]> wrote:


in theory the out could infer the [a,a] after I finish this behemoth change regarding struct arrays I could take a look at this

On Sun, 21 Sept 2025 at 17:17, Victor Lazzarini <[email protected]<mailto:[email protected]>> wrote:
No, we don't have that syntax and we have decided a while ago that we would not try to implement it.

So in summary, a multi-output opcode cannot be used inline like this.

Prof. Victor Lazzarini
Maynooth University
Ireland

> On 21 Sep 2025, at 14:35, joachim heintz <[email protected]<mailto:[email protected]>> wrote:
>
> *Warning*
>
> This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe.
>
> my assumption was that if out(a1,a2) works, it should also work if the
> two arguments are the outputs of an expression, like here.
>
>
>> On 21/09/2025 22:28, Eduardo Moguillansky wrote:
>> pan2 returns two outputs, not an array. So I would say that it is a
>> limitation in the sense that for that to work one would need to add a
>> variant of pan2 which returns an array.
>>
>> On Sun, Sep 21, 2025 at 3:18 PM joachim heintz <[email protected]<mailto:[email protected]>
>> <mailto:[email protected]<mailto:[email protected]>>> wrote:
>>
>>    nchnls = 2
>>    0dbfs = 1
>>
>>    instr 1
>>        sound:a = pinkish(.1)
>>        out(pan2(sound,random:i(0,1)))
>>    endin
>>    schedule(1,0,1)
>>
>>    error: opcode 'pan2' for expression with arg types ai returns out-args
>>    != 1, line 14
>>
>>    is this a limitation, or is it supposed to work?
>>
>>    thanks -
>>             joachim
>>