Beispiel #1
0
static void list2send_list(t_list2send *x, t_symbol *s, int ac, t_atom *av)
{
  if((ac >= 2) && (IS_A_FLOAT(av,0)))
  {
    int identifier_index = (int)atom_getintarg(0, ac, av);
    
    if(identifier_index < x->x_max)
    {
      if(x->x_snd_able[identifier_index])
      {
        t_symbol *sender = x->x_send_entries[identifier_index];
        
        if(sender->s_thing)
        {
          if(ac == 2)
          {
            if(IS_A_FLOAT(av, 1))
              pd_float(sender->s_thing, atom_getfloatarg(1, ac, av));
            else if(IS_A_SYMBOL(av, 1))
              pd_symbol(sender->s_thing, atom_getsymbolarg(1, ac, av));
          }
          else
            pd_list(sender->s_thing, &s_list, ac-1, av+1);
        }
      }
    }
  }
}
Beispiel #2
0
static void list2send_from(t_list2send *x, t_symbol *s, int ac, t_atom *av)
{
  int n=x->x_max;
  
  if(ac >= 1)
  {
    int i, j, beg=(int)atom_getintarg(0, ac, av);
    
    if((beg + ac - 1) <= n)
    {
      for(i=ac-1,j=beg+ac-2; i>=1; i--,j--)/*change*/
      {
        if(x->x_snd_able[j])
        {
          t_symbol *sender = x->x_send_entries[j];
          
          if(sender->s_thing)
          {
            if(IS_A_FLOAT(av, i))
              pd_float(sender->s_thing, atom_getfloatarg(i, ac, av));
            else if(IS_A_SYMBOL(av, i))
              pd_symbol(sender->s_thing, atom_getsymbolarg(i, ac, av));
          }
        }
      }
    }
  }
}
Beispiel #3
0
    /* objects interpret lists by feeding them to the individual inlets.
    Before you call this check that the object doesn't have a more
    specific way to handle lists. */
void obj_list(t_object *x, t_symbol *s, int argc, t_atom *argv)
{
    t_atom *ap;
    int count;
    t_inlet *ip = ((t_object *)x)->ob_inlet;
    if (!argc) return;
    for (count = argc-1, ap = argv+1; ip && count--; ap++, ip = ip->i_next)
    {
        if (ap->a_type == A_POINTER) pd_pointer(&ip->i_pd, ap->a_w.w_gpointer);
        else if (ap->a_type == A_FLOAT) pd_float(&ip->i_pd, ap->a_w.w_float);
        else pd_symbol(&ip->i_pd, ap->a_w.w_symbol);
    }
    if (argv->a_type == A_POINTER) pd_pointer(&x->ob_pd, argv->a_w.w_gpointer);
    else if (argv->a_type == A_FLOAT) pd_float(&x->ob_pd, argv->a_w.w_float);
    else pd_symbol(&x->ob_pd, argv->a_w.w_symbol);
} 
Beispiel #4
0
static void inlet_symbol(t_inlet *x, t_symbol *s)
{
    if (x->i_symfrom == &s_symbol) 
    	pd_vmess(x->i_dest, x->i_symto, "s", s);
    else if (!x->i_symfrom) pd_symbol(x->i_dest, s);
    else inlet_wrong(x, &s_symbol);
}
Beispiel #5
0
void outlet_symbol(t_outlet *x, t_symbol *s)
{
    t_outconnect *oc;
    char c;
    if (&c < stacklimit)
    	outlet_stackerror(x);
    else for (oc = x->o_connections; oc; oc = oc->oc_next)
    	pd_symbol(oc->oc_to, s);
}
Beispiel #6
0
static void dist_symbol(t_dist *x, t_symbol *s)
{
	int i;

	for(i = 0; i <= x->x_rec; i++)
	{
		if (x->x_sym[i]->s_thing) pd_symbol(x->x_sym[i]->s_thing, s);
	}
}
Beispiel #7
0
Datei: m_pd.c Projekt: Tzero2/pd
static void bindlist_symbol(t_bindlist *x, t_symbol *s)
{
    t_bindelem *e;
	change_bindlist_via_graph = 1;
    for (e = x->b_list; e; e = e->e_next)
        if (e->e_who != NULL) pd_symbol(e->e_who, s);
	if (change_bindlist_via_graph > 1)
		bindlist_cleanup(x);
	change_bindlist_via_graph = 0;
}
Beispiel #8
0
void outlet_symbol(t_outlet *x, t_symbol *s)
{
    t_outconnect *oc;
    if(++stackcount >= STACKITER)
        outlet_stackerror(x);
    else
    for (oc = x->o_connections; oc; oc = oc->oc_next)
        pd_symbol(oc->oc_to, s);
    --stackcount;
}
Beispiel #9
0
static void grab_symbol(t_grab *x, t_symbol *s)
{
    t_pd *grabbed;
    grab_start(x);
    while (grabbed = grab_next(x))
    {
	pd_symbol(grabbed, s);
	grab_restore(x);
    }
}
Beispiel #10
0
int libpd_symbol(const char *recv, const char *sym) {
  void *obj;
  sys_lock();
  obj = get_object(recv);
  if (obj == NULL)
  {
    sys_unlock();
    return -1;
  }
  pd_symbol(obj, gensym(sym));
  sys_unlock();
  return 0;
}
Beispiel #11
0
static void inlet_symbol(t_inlet *x, t_symbol *s)
{
    if (x->i_symfrom == &s_symbol)
        pd_vmess(x->i_dest, x->i_symto, "s", s);
    else if (!x->i_symfrom) pd_symbol(x->i_dest, s);
    else if (x->i_symfrom == &s_list)
    {
        t_atom a;
        SETSYMBOL(&a, s);
        inlet_list(x, &s_symbol, 1, &a);
    }
    else inlet_wrong(x, &s_symbol);
}
Beispiel #12
0
static void list2send_all(t_list2send *x, t_symbol *s, int ac, t_atom *av)
{
  int i, n=x->x_max;
  
  if(ac == n)
  {
    for(i=n-1; i>=0; i--)/*change*/
    {
      if(x->x_snd_able[i])
      {
        t_symbol *sender = x->x_send_entries[i];
        
        if(sender->s_thing)
        {
          if(IS_A_FLOAT(av, i))
            pd_float(sender->s_thing, atom_getfloatarg(i, ac, av));
          else if(IS_A_SYMBOL(av, i))
            pd_symbol(sender->s_thing, atom_getsymbolarg(i, ac, av));
        }
      }
    }
  }
}
Beispiel #13
0
static void new_inlet_symbol(t_inlet *x, t_symbol *s)
{
    if (x->i_symfrom == &s_symbol)
        pd_vmess(x->i_dest, x->i_un.iu_symto, "s", s);
    else if (!x->i_symfrom)
        pd_symbol(x->i_dest, s);
    else if (x->i_symfrom == &s_list)
    {
        t_atom a;
        SETSYMBOL(&a, s);
        new_inlet_list(x, &s_symbol, 1, &a);
    }
    else if (*x->i_dest == eproxy_class)
    {
        t_atom a;
        t_eproxy* proxy = (t_eproxy *)x->i_dest;
        t_eobj *z = (t_eobj *)proxy->p_owner;
        z->o_current_proxy = proxy->p_index;
        SETSYMBOL(&a, s);
        pd_typedmess((t_pd *)x->i_dest, &s_symbol, 1, &a);
        z->o_current_proxy = 0;
    }
    else inlet_wrong(x, &s_symbol);
}
Beispiel #14
0
static void hammer_pwd(t_hammer *x, t_symbol *s)
{
    t_symbol *dir;
    if (s && s->s_thing && (dir = hammerpanel_getopendir(x->x_filehandle)))
	pd_symbol(s->s_thing, dir);
}
Beispiel #15
0
static void send_symbol(t_send *x, t_symbol *s)
{
    if (x->x_sym->s_thing) pd_symbol(x->x_sym->s_thing, s);
}
Beispiel #16
0
static void bindlist_symbol(t_bindlist *x, t_symbol *s)
{
    t_bindelem *e;
    for (e = x->b_list; e; e = e->e_next)
        pd_symbol(e->e_who, s);
}
Beispiel #17
0
static void eproxy_symbol(t_eproxy *x, t_symbol* s)
{
    t_eobj *z = (t_eobj *)x->p_owner;
    z->o_current_proxy = x->p_index;
    pd_symbol((t_pd *)x->p_owner, s);
}
Beispiel #18
0
static void iem_send_symbol(t_iem_send *x, t_symbol *s)
{
	if(x->x_send_label_sym)
    if(x->x_send_label_sym->s_thing)
      pd_symbol(x->x_send_label_sym->s_thing, s);
}
static void iem_send_kernel_symbol(t_iem_send_kernel *x, t_symbol *s)
{
  if(x->x_sym->s_thing)
    pd_symbol(x->x_sym->s_thing, s);
}