Matt Barber wrote:
In other words, at the moment it seems to be just as hard to add the extra functionality to [inlet~] as it would be to make any ordinary objectclass whose right inlet could take a signal and a bang message.
actually it is rather trivial, see attached diff. this however is a quick hack and i don't think it should really be used.
probably a better approach would be to accept any messages in [inlet~] and just pass them on to the objects connected. then you could have another object that separates signals and messages. i would call the latter [route~]ld be made for the vinlet class.
BTW, to complicate things, if one wanted abstractions to REALLY work like objects, then if the abstraction's leftmost inlet were an [inlet~], it would automatically sprout the right outlet for passing messages (and this only if it were an abstraction -- you probably wouldn't want this for subpatches)...
i don't fully understand what you mean here. however, it seems to me that you are trying to mimick flaws in the external-API in the abstraction-API. it would probably be better to fix the flaws than to mimick them. (and one could hack together an external that takes messages+signals on any inlet; and signals only on a right-hand inlet,...)
fmgasd IOhannes
--- g_io.c (Revision 9980) +++ g_io.c (Arbeitskopie) @@ -36,8 +36,9 @@ /* if not reblocking, the next slot communicates the parent's inlet signal from the prolog to the DSP routine: */ t_signal *x_directsignal;
} t_vinlet;
static void *vinlet_new(t_symbol *s) @@ -47,43 +48,46 @@ x->x_inlet = canvas_addinlet(x->x_canvas, &x->x_obj.ob_pd, 0); x->x_bufsize = 0; x->x_buf = 0;
}
static void vinlet_bang(t_vinlet *x) {
}
static void vinlet_pointer(t_vinlet *x, t_gpointer *gp) {
}
static void vinlet_float(t_vinlet *x, t_float f) {
}
static void vinlet_symbol(t_vinlet *x, t_symbol *s) {
}
static void vinlet_list(t_vinlet *x, t_symbol *s, int argc, t_atom *argv) {
}
static void vinlet_anything(t_vinlet *x, t_symbol *s, int argc, t_atom *argv) {
}
static void vinlet_free(t_vinlet *x) { canvas_rminlet(x->x_canvas, x->x_inlet);
}
@@ -247,17 +251,24 @@
static void *vinlet_newsig(t_symbol *s) {
x->x_inlet = canvas_addinlet(x->x_canvas, &x->x_obj.ob_pd, &s_signal);
x->x_msgoutlet=0;
x->x_inlet = canvas_addinlet(x->x_canvas, &x->x_obj.ob_pd, 0);
x->x_msgoutlet=outlet_new(&x->x_obj, 0);