inlet structure with SDK 8.2

paulclift's icon

Hey all,

I am making a t_pxobject in xcode, using SDK 8.2. What is the right way to create:

IN1 signal

IN2 signal

IN3 list

IN4 list

IN5 float

...because dsp_setup(x, 2) plus proxies and floatin consistently produces:

signal

proxy

proxy

float

signal

Help very much appreciated, this has been driving me a bit nuts.

Cheers,

Paul

paulclift's icon

Hmm, silence on this one..... I assume there is no way around this then. But it does feel pretty weird that signal inlets have to be min and max (unless I am mistaken about this).

Source Audio's icon

what do you mean with "signal inlets have to be min and max" ?

there is one simple rule for multiple inlets,

creation order reversed from their location

or in other words from right to left as stated in SDK.

paulclift's icon

>> what do you mean with "signal inlets have to be min and max" ?

I meant the first and the last, as in the one on the left (first) and the one on the right (last).

In any case, my problem is that MSP signal inlets and Max message inlets do not share the same numbering scheme. So once you mix dsp_setup(), proxy_new(), floatin(), etc. the mapping is not right-to-left anymore.

I've been over the info on the website ins&outs but I still wasn't able to organise the inlets as I wanted...

Source Audio's icon

your 5 inlets : sig sig list list float object creation could look like this:

void myAudioObject_new(t_symbol s, long argc, t_atom *argv) {

t_myAudioObject x = (t_myAudioObject )object_alloc(myAudioObject_class);

if (x) {

// 1: Create the rightmost inlet - Physical 4, float

floatin(x, 1);

// 2: Create List Inlets (Right to Left) first List B Physical Inlet 3. second List A Physical Inlet 2

x->proxy_idB = 2;

x->proxy_listB = proxy_new((t_object *)x, x->proxy_idB, &x->proxy_idB);

x->proxy_idA = 1;

x->proxy_listA = proxy_new((t_object *)x, x->proxy_idA, &x->proxy_idA);

// 3: Create 2 Audio Inlets 0 and 1

dsp_setup((t_pxobject *)x, 2);

// Create signal outlet

outlet_new((t_object *)x, "signal");

}

return x;

}

paulclift's icon

Brilliant--not sure how I got that so wrong :-D

In any case, thanks very much. That fixed it.