Csound Csound-dev Csound-tekno Search About

[Csnd-dev] Question about the csound6~ object inlet/outlet setup process

Date2021-10-02 16:46
FromIain Duncan
Subject[Csnd-dev] Question about the csound6~ object inlet/outlet setup process
Hi Victor, (or anyone else who feels like answering) I'm looking through the csound6~ code, and am I correct that the number of signal inlets and outlets in the pd object itself is determined entirely from the number of csound channels loaded in csound, either through the command line or the loaded files?

thanks,
iain

Bit from the setup function:
if (!x->result) {
        x->end = 0;
        x->cleanup = 1;
        x->chans = csoundGetNchnls(x->csound);
        x->pksmps = csoundGetKsmps(x->csound);
        x->numlets = x->chans;
        for (i = 1; i < x->numlets && i < CS_MAX_CHANS; i++)
          inlet_new(&x->x_obj, &x->x_obj.ob_pd,
                    gensym("signal"), gensym("signal"));
        for (i = 1; i < x->numlets && i < CS_MAX_CHANS; i++)
          outlet_new(&x->x_obj, gensym("signal"));
        x->pos = 0;
      }
      else
        post("csound6~ warning: could not compile");

Date2021-10-02 19:04
FromVictor Lazzarini
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] Question about the csound6~ object inlet/outlet setup process
yes, I think that's how it is supposed to work.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 2 Oct 2021, at 16:46, Iain Duncan <iainduncanlists@gmail.com> 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.

Hi Victor, (or anyone else who feels like answering) I'm looking through the csound6~ code, and am I correct that the number of signal inlets and outlets in the pd object itself is determined entirely from the number of csound channels loaded in csound, either through the command line or the loaded files?

thanks,
iain

Bit from the setup function:
if (!x->result) {
        x->end = 0;
        x->cleanup = 1;
        x->chans = csoundGetNchnls(x->csound);
        x->pksmps = csoundGetKsmps(x->csound);
        x->numlets = x->chans;
        for (i = 1; i < x->numlets && i < CS_MAX_CHANS; i++)
          inlet_new(&x->x_obj, &x->x_obj.ob_pd,
                    gensym("signal"), gensym("signal"));
        for (i = 1; i < x->numlets && i < CS_MAX_CHANS; i++)
          outlet_new(&x->x_obj, gensym("signal"));
        x->pos = 0;
      }
      else
        post("csound6~ warning: could not compile");

Date2021-10-02 19:43
FromIain Duncan
SubjectRe: [Csnd-dev] [EXTERNAL] [Csnd-dev] Question about the csound6~ object inlet/outlet setup process
thanks Victor.

On Sat, Oct 2, 2021 at 11:04 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
yes, I think that's how it is supposed to work.

Prof. Victor Lazzarini
Maynooth University
Ireland

On 2 Oct 2021, at 16:46, Iain Duncan <iainduncanlists@gmail.com> 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.

Hi Victor, (or anyone else who feels like answering) I'm looking through the csound6~ code, and am I correct that the number of signal inlets and outlets in the pd object itself is determined entirely from the number of csound channels loaded in csound, either through the command line or the loaded files?

thanks,
iain

Bit from the setup function:
if (!x->result) {
        x->end = 0;
        x->cleanup = 1;
        x->chans = csoundGetNchnls(x->csound);
        x->pksmps = csoundGetKsmps(x->csound);
        x->numlets = x->chans;
        for (i = 1; i < x->numlets && i < CS_MAX_CHANS; i++)
          inlet_new(&x->x_obj, &x->x_obj.ob_pd,
                    gensym("signal"), gensym("signal"));
        for (i = 1; i < x->numlets && i < CS_MAX_CHANS; i++)
          outlet_new(&x->x_obj, gensym("signal"));
        x->pos = 0;
      }
      else
        post("csound6~ warning: could not compile");