send respectively forward


    Jan 07 2011 | 4:00 pm
    hi there,
    can someone please provide me with a simple example of
    how to generate a message,
    that will be received by a receive object.
    lets say a [r bla].
    i tried with typedmess(), but failed..
    thanks a lot
    klaus

    • Jan 10 2011 | 1:12 pm
      ok, i found my simple one:
      void myobject_anything(t_myobject *x, t_symbol *s, long ac, t_atom *av)
      {
      	if(s->s_thing) typedmess(s->s_thing,gensym("list"),ac,av);
      }
      which sends 4.56 to a [r bla] if i pass the message bla 4.56
      thats what i wanted.
      but i am wondering why this is quite a bit slower than a patched combination of vanilla route and send.
      any insights on this speed issue?
      cheers
      klaus
    • Jan 12 2011 | 4:02 pm
      Hi Klaus,
      It's bit hard to know with limited information. One could speculate, however, that the call to gensym() here is expensive. You could cache the result of gensym("list"), or use the cached version from commonsyms.
      best,
      Tim