Пример #1
0
void multipre_list(t_multipre *x, t_symbol *s, short ac, t_atom *av)
{
	int i;
	x->p_bodylength = ac;		// indicates input list length	
	x->p_inletNumber = MP_PROXY_GETINLET(x);
	for (i=0; i<ac; i++) x->p_post[i+1] = av[i];
	multipre_output(x) ;
}
Пример #2
0
void multipre_float(t_multipre *x, double f)
{	
	x->p_inletNumber = MP_PROXY_GETINLET(x);
	
	x->p_bodylength = 1;
	x->p_post[1].a_type = A_FLOAT;
	x->p_post[1].a_w.w_float = (double)f;
	multipre_output(x) ;
}
Пример #3
0
void multipre_int(t_multipre *x, long n)											
{
	x->p_inletNumber = MP_PROXY_GETINLET(x);

	x->p_bodylength = 1;
	x->p_post[1].a_type = A_LONG;
	x->p_post[1].a_w.w_long = n;
	multipre_output(x) ;
}
Пример #4
0
void strpbrk_float(t_strpbrk *x, double f)
{
	x->s_inletNumber = MP_PROXY_GETINLET(x);
	
	if(x->s_inletNumber == 0){
		sprintf(x->s_hotbuf, "%.6f", f);	
		str_action(x);
	}else if(x->s_inletNumber == 1){
		sprintf(x->s_coldbuf, "%.6f", f);
	}
}
Пример #5
0
void strpbrk_int(t_strpbrk *x, long n)
{
	x->s_inletNumber = MP_PROXY_GETINLET(x);
	
	if(x->s_inletNumber == 0){
		sprintf(x->s_hotbuf, "%ld", n);	
		str_action(x);
	}else if(x->s_inletNumber == 1){
		sprintf(x->s_coldbuf, "%ld", n);
	}
}
Пример #6
0
void multipre_anything(t_multipre *x, t_symbol *s, short ac, t_atom *av)
{
	int i;
	x->p_bodylength = ac+1;		
	
	x->p_inletNumber = MP_PROXY_GETINLET(x);
		
	x->p_post[1].a_type = A_SYM;
	x->p_post[1].a_w.w_sym = s;
		
	for (i=0; i<ac; i++) x->p_post[i+2] = av[i];
	multipre_output(x) ;
}
Пример #7
0
void strpbrk_anything(t_strpbrk *x, t_symbol *s, long argc, t_atom *argv)
{
	long i;
	char temp[4096];
	
	x->s_inletNumber = MP_PROXY_GETINLET(x);
	
	if(x->s_inletNumber == 0){
		x->s_hotbuf[0] = 0;
		strcpy(x->s_hotbuf, s->s_name);
		for(i = 0; i < argc; i++){
			strcat(x->s_hotbuf, " ");
			temp[0] = 0;
			if(argv[i].a_type == A_LONG){
				sprintf(temp, "%lld", argv[i].a_w.w_long);
			}else if(argv[i].a_type == A_FLOAT){
				sprintf(temp, "%.6f", argv[i].a_w.w_float);	
			}else if(argv[i].a_type == A_SYM){
				strcpy(temp, argv[i].a_w.w_sym->s_name);
			}
			if((strlen(x->s_hotbuf) + strlen(temp)) < 4096){
				strcat(x->s_hotbuf, temp);
			}else{
				return;
			}
		}
		str_action(x);
	}else if(x->s_inletNumber == 1){	
		x->s_coldbuf[0] = 0;
		strcpy(x->s_coldbuf, s->s_name);
		for(i = 0; i < argc; i++){
			strcat(x->s_coldbuf, " ");
			temp[0] = 0;
			if(argv[i].a_type == A_LONG){
				sprintf(temp, "%lld", argv[i].a_w.w_long);
			}else if(argv[i].a_type == A_FLOAT){
				sprintf(temp, "%.6f", argv[i].a_w.w_float);	
			}else if(argv[i].a_type == A_SYM){
				strcpy(temp, argv[i].a_w.w_sym->s_name);
			}
			if((strlen(x->s_coldbuf) + strlen(temp)) < 4096){
				strcat(x->s_coldbuf, temp);
			}else{
				return;
			}
		}
	}
}
Пример #8
0
void multipre_bang(t_multipre *x)
{
	x->p_inletNumber = MP_PROXY_GETINLET(x);
	x->p_bodylength = 0;
	multipre_output(x) ;
}