you'd just write
    signal_setchans(sp[2], ouchans).
That's what I had originally suggested, but you rightfully pointed out that changing the channel number in place can be problematic if signals are reused...

So it would have to be at least:

sp[2] = signal_setchans(sp[2], outchans);

empty output signals (channels=length=vec=0)
But then what is the point of having the signal if it does not provide any information?

Christof

On 25.01.2023 17:09, Miller Puckette wrote:
I think I hadn't pushed them, oops.  And now I'm thinking again - maybe it's
more elegant yet to provide empty output signals (channels=length=vec=0)
and instead of (for example)
    sp[2] = signal_swapforchans(sp[2], outchans);
you'd just write
    signal_setchans(sp[2], ouchans).

cheers
Miller

On Wed, Jan 25, 2023 at 03:42:15PM +0100, Christof Ressi wrote:
Cool!

I don't see these changes yet. Did you forget to push them or are you still
working on it?

(I am working on some clone multi-channel bugfixes and I would need the new
signal_swapforchans() function :-)

Christof

On 25.01.2023 05:46, Miller Puckette via Pd-dev wrote:
OK, just now changed this - there's a one-channel signal created for all
signal outputs.  Now if you want more than one channel you have to call
signal_swapforchans() (see d_arithmentic for example).

cheers
M

On Tue, Jan 24, 2023 at 08:07:22AM +0100, IOhannes m zmoelnig wrote:
On 1/24/23 04:54, Alexandre Torres Porres wrote:
Em seg., 23 de jan. de 2023 às 14:34, IOhannes m zmoelnig <zmoel...@iem.at>
escreveu:

multichannel objects must create the output signals themselves.
(as the object might change the number of channels).

even with [nchs~] where I'd have a fixed number of inputs/outputs?
yes.
with all multichannel aware externals.
how would Pd know the fixed number of outputs, if you don't tell it?

see the example (mostly: pack~)

I saw it and it's quite simple, withou a 'perform' routine it uses a copy
function.
the interesting part is the "dsp" method.
you cannot change the number of output signals in the perform routine (that
is: every tick).
but you can change  (or rather: must set) it when the DSP-graph is created,
thus in the "dsp" method.


mgfdsrfad
IOhannes


_______________________________________________
Pd-dev mailing list
Pd-dev@lists.iem.at
https://urldefense.com/v3/__https://lists.puredata.info/listinfo/pd-dev__;!!Mih3wA!E_5bIP-O1UTLD7F5f7i9Dk8oo0HG_TrZ092w4Og25eSX8i6DqXeMOObvGcx0pqosUm-4qtGLqPF-qQ$


_______________________________________________
Pd-dev mailing list
Pd-dev@lists.iem.at
https://urldefense.com/v3/__https://lists.puredata.info/listinfo/pd-dev__;!!Mih3wA!E_5bIP-O1UTLD7F5f7i9Dk8oo0HG_TrZ092w4Og25eSX8i6DqXeMOObvGcx0pqosUm-4qtGLqPF-qQ$



_______________________________________________
Pd-dev mailing list
Pd-dev@lists.iem.at
https://lists.puredata.info/listinfo/pd-dev

Reply via email to