Forums > Dev

Outlet creation order

February 5, 2007 | 10:57 am

Dear Max/MSP dev’ers,

I’m in the process of porting one of my PD externals to Max/MSP, and
I’ve run into what seems to be a strange problem. In the PD object, the
first inlet and and first outlet are for control data, the others are
used for audio data. I try doing this in Max/MSP, and when I connect the
rightmost outlet to the inlet of another audio object I get:

error: ugen_connect dssi~ dac~ -1 1 (2 2)

In the Max console window.

The setup code looks like this:

—–

dsp_setup((t_pxobject *)x, x->plugin_ins);

for(i = 0;i < x->plugin_outs; i++) outlet_new((t_pxobject *)x,
"signal");

x->control_outlet = outlet_new ((t_pxobject *)x, "control");

—-

The external works fine if outlet_new((t_pxobject *)x, "control") is
called first, but of course this results in the rightmost outlet being
the control outlet which is not what I want.

Is it a Max/MSP convention to have the in/outlets in a specfic order, or
am I doing something wrong in my code?

Many thanks,

Jamie


February 5, 2007 | 11:08 am

Jamie Bullock wrote:
> Dear Max/MSP dev’ers,
>
> I’m in the process of porting one of my PD externals to Max/MSP, and
> I’ve run into what seems to be a strange problem. In the PD object, the
> first inlet and and first outlet are for control data,

In Max you have to create the outlets the other way round (right to
left), not left to right as in Pd.

Olaf


February 5, 2007 | 11:36 am

On Mon, 2007-02-05 at 12:08 +0100, Olaf Matthes wrote:

>
> In Max you have to create the outlets the other way round (right to
> left), not left to right as in Pd.
>

Yes, but my question is: is it possible for the outlets to be of
arbitrary type "signal"/"control"? My problem occurs if I try to make
the leftmost outlet a control outlet, and the rest signals. The other
way round, things work fine.

Jamie


February 5, 2007 | 5:15 pm

Just to confirm, I had the same experience. I gave up, and placed my
message outlet last (rightmost) instead.

On Feb 5, 2007, at 3:36 AM, Jamie Bullock wrote:

> On Mon, 2007-02-05 at 12:08 +0100, Olaf Matthes wrote:
>
>>
>> In Max you have to create the outlets the other way round (right to
>> left), not left to right as in Pd.
>>
>
> Yes, but my question is: is it possible for the outlets to be of
> arbitrary type "signal"/"control"? My problem occurs if I try to make
> the leftmost outlet a control outlet, and the rest signals. The other
> way round, things work fine.
>
> Jamie
>


February 5, 2007 | 5:35 pm


February 5, 2007 | 6:37 pm

On Mon, 2007-02-05 at 09:35 -0800, Joshua Kit Clayton wrote:
> On Feb 5, 2007, at 3:36 AM, Jamie Bullock wrote:
>
> Your findings are correct and described in the SDK documentation.
> First paragraph of "Writing MSP Code":"New Instance Routine":
>

Ooops. Thanks for the info. I should have RTFM :)

Jamie


Viewing 6 posts - 1 through 6 (of 6 total)