Ejemplo n.º 1
0
void Append_setup(void)
{
    append_class = class_new(gensym("Append"),
			     (t_newmethod)append_new,
			     (t_method)append_free,
			     sizeof(t_append), 0,
			     A_GIMME, 0);
    class_addbang(append_class, append_bang);
    class_addfloat(append_class, append_float);
    class_addsymbol(append_class, append_symbol);
    class_addlist(append_class, append_anything);  /* LATER rethink */
    class_addanything(append_class, append_anything);
    class_addmethod(append_class, (t_method)append_set,
		    gensym("set"), A_GIMME, 0);

    appendxy_class = class_new(gensym("append"), 0, 0, sizeof(t_appendxy),
			       CLASS_PD | CLASS_NOINLET, 0);
    class_addbang(appendxy_class, appendxy_bang);
    class_addfloat(appendxy_class, appendxy_float);
    class_addsymbol(appendxy_class, appendxy_symbol);
    class_addlist(appendxy_class, appendxy_list);
    class_addanything(appendxy_class, appendxy_anything);

    fitter_setup(append_class, append_fitter);
}
Ejemplo n.º 2
0
void bondo_setup(void)
{
    bondo_class = class_new(gensym("bondo"),
			    (t_newmethod)bondo_new,
			    (t_method)bondo_free,
			    sizeof(t_bondo), 0, A_GIMME, 0);
    class_addbang(bondo_class, bondo_bang);
    class_addfloat(bondo_class, bondo_float);
    class_addsymbol(bondo_class, bondo_symbol);
    class_addpointer(bondo_class, bondo_pointer);
    class_addlist(bondo_class, bondo_list);
    class_addanything(bondo_class, bondo_anything);
    class_addmethod(bondo_class, (t_method)bondo_set,
		    gensym("set"), A_GIMME, 0);
    bondo_proxy_class = class_new(gensym("_bondo_proxy"), 0, 0,
				  sizeof(t_bondo_proxy),
				  CLASS_PD | CLASS_NOINLET, 0);
    class_addbang(bondo_proxy_class, bondo_proxy_bang);
    class_addfloat(bondo_proxy_class, bondo_proxy_float);
    class_addsymbol(bondo_proxy_class, bondo_proxy_symbol);
    class_addpointer(bondo_proxy_class, bondo_proxy_pointer);
    class_addlist(bondo_proxy_class, bondo_proxy_list);
    class_addanything(bondo_proxy_class, bondo_proxy_anything);
    class_addmethod(bondo_proxy_class, (t_method)bondo_proxy_set,
		    gensym("set"), A_GIMME, 0);
}
Ejemplo n.º 3
0
void vvminus_setup(void)
{
  vvminus_class = class_new(gensym("vvminus"), (t_newmethod)vvminus_new, 
			    (t_method)vvminus_free, sizeof(t_vvminus), 0, A_GIMME, 0);
  class_addcreator((t_newmethod)vvminus_new, gensym("vv-"), A_GIMME, 0);
  class_addlist(vvminus_class, vvminus_lst);
  class_addmethod  (vvminus_class, (t_method)vvminus_lst2, gensym(""), A_GIMME, 0);
  vvminus_scal_class = class_new(gensym("vv-"), 0, (t_method)vvminus_free, 
				 sizeof(t_vvminus), 0, 0);
  class_addlist(vvminus_scal_class, vvminus_lst);
}
Ejemplo n.º 4
0
static void midiin_setup(void)
{
    midiin_class = class_new(gensym("midiin"), (t_newmethod)midiin_new,
        (t_method)midiin_free, sizeof(t_midiin),
            CLASS_NOINLET, A_DEFFLOAT, 0);
    class_addlist(midiin_class, midiin_list);
    class_sethelpsymbol(midiin_class, gensym("midi"));

    sysexin_class = class_new(gensym("sysexin"), (t_newmethod)sysexin_new,
        (t_method)sysexin_free, sizeof(t_midiin),
            CLASS_NOINLET, A_DEFFLOAT, 0);
    class_addlist(sysexin_class, midiin_list);
    class_sethelpsymbol(sysexin_class, gensym("midi"));
}
Ejemplo n.º 5
0
void matrix_tilde_setup(void)
{
    matrixps_matrixtilde = gensym("matrix~");
    matrix_class = class_new(matrixps_matrixtilde,
			     (t_newmethod)matrix_new,
			     (t_method)matrix_free,
			     sizeof(t_matrix), 0, A_GIMME, 0);
    fragile_class_raise(matrixps_matrixtilde, (t_newmethod)matrix_new);
    sic_setup(matrix_class, matrix_dsp, matrix_float);
    class_addlist(matrix_class, matrix_list);
    class_addmethod(matrix_class, (t_method)matrix_clear,
		    gensym("clear"), 0);
    class_addmethod(matrix_class, (t_method)matrix_set,
		    gensym("set"), A_FLOAT, A_DEFFLOAT, 0);
    class_addmethod(matrix_class, (t_method)matrix_connect,
		    gensym("connect"), A_GIMME, 0);
    class_addmethod(matrix_class, (t_method)matrix_connect,
		    gensym("disconnect"), A_GIMME, 0);
    class_addmethod(matrix_class, (t_method)matrix_ramp,
		    gensym("ramp"), A_FLOAT, 0);
    class_addmethod(matrix_class, (t_method)matrix_dump,
		    gensym("dump"), 0);
    class_addmethod(matrix_class, (t_method)matrix_dumptarget,
		    gensym("dumptarget"), 0);
    class_addmethod(matrix_class, (t_method)matrix_print,
		    gensym("print"), 0);
#ifdef MATRIX_DEBUG
    class_addmethod(matrix_class, (t_method)matrix_debug,
		    gensym("debug"), A_DEFSYM, 0);
#endif
    fitter_setup(matrix_class, 0);
}
Ejemplo n.º 6
0
void matrix_tilde_setup(void)
{
    matrix_class = class_new(gensym("matrix~"),
			     (t_newmethod)matrix_new,
			     (t_method)matrix_free,
			     sizeof(t_matrix), 0, A_GIMME, 0);
	class_addmethod(matrix_class, nullfn, gensym("signal"), 0);
	class_addfloat(matrix_class, matrix_float);
    class_addlist(matrix_class, matrix_list);
	//class_domainsignalin(matrix_class, -1); // not sure why needed, but crashes withouts
    class_addmethod(matrix_class, (t_method)matrix_dsp, gensym("dsp"), 0);
    class_addmethod(matrix_class, (t_method)matrix_clear, gensym("clear"), 0);
    class_addmethod(matrix_class, (t_method)matrix_connect, gensym("connect"), A_GIMME, 0);
    class_addmethod(matrix_class, (t_method)matrix_connect, gensym("disconnect"), A_GIMME, 0);
    class_addmethod(matrix_class, (t_method)matrix_ramp, gensym("ramp"), A_FLOAT, 0);
    class_addmethod(matrix_class, (t_method)matrix_dump, gensym("dump"), 0);
    class_addmethod(matrix_class, (t_method)matrix_dumptarget, gensym("dumptarget"), 0);
    class_addmethod(matrix_class, (t_method)matrix_print, gensym("print"), 0);
	/*
	#ifdef MATRIX_DEBUG
    class_addmethod(matrix_class, (t_method)matrix_debug,
		    gensym("debug"), A_DEFSYM, 0);
	#endif
	*/
}
Ejemplo n.º 7
0
void capture_setup(void)
{
    capture_class = class_new(gensym("capture"),
                              (t_newmethod)capture_new,
                              (t_method)capture_free,
                              sizeof(t_capture), 0, A_DEFFLOAT, A_DEFSYM, 0);
    class_addfloat(capture_class, capture_float);
    class_addlist(capture_class, capture_list);
    class_addmethod(capture_class, (t_method)capture_clear,
                    gensym("clear"), 0);
    class_addmethod(capture_class, (t_method)capture_count,
                    gensym("count"), 0);
    class_addmethod(capture_class, (t_method)capture_dump,
                    gensym("dump"), 0);
    class_addmethod(capture_class, (t_method)capture_write,
                    gensym("write"), A_DEFSYM, 0);
    class_addmethod(capture_class, (t_method)capture_open,
                    gensym("open"), 0);
    class_addmethod(capture_class, (t_method)capture_wclose,
                    gensym("wclose"), 0);
    class_addmethod(capture_class, (t_method)capture_click,
                    gensym("click"),
                    A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0);
    hammerfile_setup(capture_class, 0);
}
Ejemplo n.º 8
0
Archivo: a2s.c Proyecto: Angeldude/pd
void a2s_setup(void)
{
    a2s_class = class_new(gensym("a2s"), (t_newmethod)a2s_new,(t_method)a2s_free, sizeof( t_pd_obj_a2s), 0,A_DEFSYMBOL, 0);
    class_addlist(a2s_class, (t_method)a2s_list);
    class_addmethod(a2s_class, (t_method)a2s_help, gensym("help"), 0);
    class_sethelpsymbol(a2s_class, gensym("xgui/help_a2s"));
}
Ejemplo n.º 9
0
static void bendin_setup(void)
{
    bendin_class = class_new(gensym("bendin"), (t_newmethod)bendin_new,
        (t_method)bendin_free, sizeof(t_bendin), CLASS_NOINLET, A_DEFFLOAT, 0);
    class_addlist(bendin_class, bendin_list);
    class_sethelpsymbol(bendin_class, gensym("midi"));
}
Ejemplo n.º 10
0
void rint_setup(void){
	rint_class = class_new(gensym("rint"), (t_newmethod)rint_new,
            (t_method)rint_free, sizeof(t_rint), 0, A_DEFFLOAT, 0);
	class_addfloat(rint_class, (t_method)rint_float);
    class_addlist(rint_class, (t_method)rint_list);
    class_addbang(rint_class, (t_method)rint_bang);
}
Ejemplo n.º 11
0
void route_setup(void)
{
    route_class = class_new(gensym("route"), (t_newmethod)route_new,
    	(t_method)route_free, sizeof(t_route), 0, A_GIMME, 0);
    class_addlist(route_class, route_list);
    class_addanything(route_class, route_anything);
}
Ejemplo n.º 12
0
void prob_setup(void)
{
    prob_class = class_new(gensym("prob"),
			   (t_newmethod)prob_new,
			   (t_method)prob_free,
			   sizeof(t_prob), 0, 0);
    class_addbang(prob_class, prob_bang);
    class_addfloat(prob_class, prob_float);
    class_addlist(prob_class, prob_list);
    class_addmethod(prob_class, (t_method)prob_embed,
		    gensym("embed"), A_FLOAT, 0);
    class_addmethod(prob_class, (t_method)prob_reset,
		    gensym("reset"), A_FLOAT, 0);
    class_addmethod(prob_class, (t_method)prob_clear,
		    gensym("clear"), 0);
    class_addmethod(prob_class, (t_method)prob_dump,
		    gensym("dump"), 0);
    /* CHECKED: doesn't understand "seed" */
    class_addmethod(prob_class, (t_method)prob__silent,
		    gensym("_silent"), 0);
    class_addmethod(prob_class, (t_method)prob_click,
		    gensym("click"),
		    A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0);
    hammerfile_setup(prob_class, 1);
    fitter_setup(prob_class, 0);
}
Ejemplo n.º 13
0
void alist_setup(void)
{
    alist_class = class_new(gensym("list inlet"),
        0, 0, sizeof(t_alist), 0, 0);
    class_addlist(alist_class, alist_list);
    class_addanything(alist_class, alist_anything);
}
Ejemplo n.º 14
0
  OSC_API void OSCroute_setup(void) { 
#else
void OSCroute_setup(void) {
#endif
  OSCroute_class = class_new(gensym("OSCroute"), (t_newmethod)OSCroute_new,
			     (t_method)OSCroute_free,sizeof(t_OSCroute), 0, A_GIMME, 0);
  class_addlist(OSCroute_class, OSCroute_list);
  class_addanything(OSCroute_class, OSCroute_anything);
  class_addmethod(OSCroute_class, (t_method)OSCroute_version, gensym("version"), A_NULL, 0, 0);
  class_sethelpsymbol(OSCroute_class, gensym("OSCroute-help.pd"));

  /*
  class_addmethod(OSCroute_class, (t_method)OSCroute_connect,
		  gensym("connect"), A_SYMBOL, A_FLOAT, 0);
  class_addmethod(OSCroute_class, (t_method)OSCroute_disconnect,
		  gensym("disconnect"), 0);
  class_addmethod(OSCroute_class, (t_method)OSCroute_send, gensym("send"),
		  A_GIMME, 0);
  */
/*   ps_list = gensym("list"); */
/*   ps_complain = gensym("complain"); */
  ps_emptySymbol = gensym("");
  
  post("OSCroute object version " OSC_ROUTE_VERSION " by Matt Wright. pd: jdl Win32 raf.");
  post("OSCroute Copyright © 1999 Regents of the Univ. of California. All Rights Reserved.");
  error("[OSCroute]: OSCx is deprecated! \n\tConsider switching to mrpeach's [routeOSC]");
}
Ejemplo n.º 15
0
void matrix_setup(void)
{
  matrix_class = class_new(gensym("matrix"), (t_newmethod)matrix_new, 
			   (t_method)matrix_free, sizeof(t_matrix), 0, A_GIMME, 0);
  class_addcreator((t_newmethod)matrix_new, gensym("mtx"), A_GIMME, 0);
  class_addcreator((t_newmethod)matrix_new, gensym("iemmatrix"), A_GIMME, 0);

  /* the core : functions for matrices */
  class_addmethod  (matrix_class, (t_method)matrix_matrix, gensym("matrix"), A_GIMME, 0);
  class_addmethod  (matrix_class, (t_method)matrix_matrix2, gensym(""), A_GIMME, 0);
 
  /* the basics : functions for creation */
  class_addmethod  (matrix_class, (t_method)matrix_size, gensym("size"), A_GIMME, 0);
  class_addmethod  (matrix_class, (t_method)matrix_eye, gensym("eye"), A_GIMME, 0);
  class_addmethod  (matrix_class, (t_method)matrix_diag, gensym("diag"), A_GIMME, 0);
  class_addmethod  (matrix_class, (t_method)matrix_ones, gensym("ones"), A_GIMME, 0);
  class_addmethod  (matrix_class, (t_method)matrix_zeros, gensym("zeros"), A_GIMME, 0);
  class_addmethod  (matrix_class, (t_method)matrix_egg, gensym("egg"), A_GIMME, 0);
  class_addmethod  (matrix_class, (t_method)matrix_diegg, gensym("diegg"), A_GIMME, 0);
 
  /* the rest : functions for anything */
  class_addbang    (matrix_class, matrix_bang);
  class_addfloat   (matrix_class, matrix_float);
  class_addlist    (matrix_class, matrix_list);
  class_addmethod  (matrix_class, (t_method)matrix_row, gensym("row"), A_GIMME, 0);
  class_addmethod  (matrix_class, (t_method)matrix_col, gensym("column"), A_GIMME, 0);
  class_addmethod  (matrix_class, (t_method)matrix_col, gensym("col"), A_GIMME, 0);
  class_addmethod  (matrix_class, (t_method)matrix_element, gensym("element"), A_GIMME, 0);

  /* the file functions */
  class_addmethod  (matrix_class, (t_method)matrix_write, gensym("write"), A_SYMBOL, 0);
  class_addmethod  (matrix_class, (t_method)matrix_read , gensym("read") , A_SYMBOL, 0);
}
Ejemplo n.º 16
0
void mtx_mul_setup(void)
{
  mtx_mul_class = class_new(gensym("mtx_mul"), (t_newmethod)mtx_mul_new, (t_method)mtx_binmtx_free,
                            sizeof(t_mtx_binmtx), 0, A_GIMME, 0);
  class_addcreator((t_newmethod)mtx_mul_new, gensym("mtx_*"), A_GIMME,0);
  class_addmethod(mtx_mul_class, (t_method)mtx_mul_matrix, gensym("matrix"), A_GIMME, 0);
  class_addmethod(mtx_mul_class, (t_method)mtx_bin_matrix2, gensym(""), A_GIMME, 0);
  class_addfloat (mtx_mul_class, mtx_mul_float);
  class_addbang  (mtx_mul_class, mtx_binmtx_bang);

  mtx_mulelement_class = class_new(gensym("mtx_.*"), (t_newmethod)mtx_mul_new, (t_method)mtx_binmtx_free,
                                   sizeof(t_mtx_binmtx), 0, A_GIMME, 0);
  class_addmethod(mtx_mulelement_class, (t_method)mtx_mulelement_matrix, gensym("matrix"), A_GIMME, 0);
  class_addmethod(mtx_mulelement_class, (t_method)mtx_bin_matrix2, gensym(""), A_GIMME, 0);
  class_addfloat (mtx_mulelement_class, mtx_mul_float);
  class_addbang  (mtx_mulelement_class, mtx_binmtx_bang);
  class_sethelpsymbol(mtx_mulelement_class, gensym("mtx_mul-help"));

  mtx_mulscalar_class = class_new(gensym("mtx_mul"), 0, (t_method)mtx_binscalar_free,
                                  sizeof(t_mtx_binscalar), 0, 0);

  class_addmethod(mtx_mulscalar_class, (t_method)mtx_mulscalar_matrix, gensym("matrix"), A_GIMME, 0);
  class_addlist  (mtx_mulscalar_class, mtx_mulscalar_list);
  class_addbang  (mtx_mulscalar_class, mtx_binscalar_bang);
}
Ejemplo n.º 17
0
static void key_setup(void)
{
    key_class = class_new(gensym("key"),
        (t_newmethod)key_new, (t_method)key_free,
        sizeof(t_key), 0, A_GIMME, 0);
    class_addfloat(key_class, key_float);
    key_sym = gensym("#key");
    key_sym_a = gensym("#key_a");

    keyup_class = class_new(gensym("keyup"),
        (t_newmethod)keyup_new, (t_method)keyup_free,
        sizeof(t_keyup), 0, A_GIMME, 0);
    class_addfloat(keyup_class, keyup_float);
    keyup_sym = gensym("#keyup");
    keyup_sym_a = gensym("#keyup_a");
    //class_sethelpsymbol(keyup_class, gensym("key"));
    
    keyname_class = class_new(gensym("keyname"),
        (t_newmethod)keyname_new, (t_method)keyname_free,
        sizeof(t_keyname), 0, A_GIMME, 0);
    class_addlist(keyname_class, keyname_list);
    keyname_sym = gensym("#keyname");
    keyname_sym_a = gensym("#keyname_a");
    //class_sethelpsymbol(keyname_class, gensym("key"));
}
Ejemplo n.º 18
0
Archivo: flite.c Proyecto: Angeldude/pd
/*--------------------------------------------------------------------
 * setup
 *--------------------------------------------------------------------*/
void flite_setup(void) {
  post("");
  post(flite_description);
  post("");

  // --- setup synth
  flite_init();
  voice = PDFLITE_REGISTER_VOICE();

  // --- register class
  flite_class = class_new(gensym("flite"),
			  (t_newmethod)flite_new,  // newmethod
			  (t_method)flite_free,    // freemethod
			  sizeof(t_flite),         // size
			  CLASS_DEFAULT,           // flags
			  A_DEFSYM,                // arg1: table-name
			  0);

  // --- class methods
  class_addlist(flite_class, flite_list);
  class_addmethod(flite_class, (t_method)flite_set,   gensym("set"),   A_DEFSYM, 0);
  class_addmethod(flite_class, (t_method)flite_text,  gensym("text"),  A_GIMME, 0);
  class_addmethod(flite_class, (t_method)flite_synth, gensym("synth"), 0);

  // --- help patch
  //class_sethelpsymbol(flite_class, gensym("flite-help.pd")); /* breaks pd-extended help lookup */
}
Ejemplo n.º 19
0
void matchbox_setup(void)
{
#ifdef MATCHBOX_OSC
  post("matchbox: OSC-pattern matching code (c) Matt Wright, CNMAT");
#endif /* MATCHBOX_OSC */


  matchbox_class = class_new(gensym("matchbox"), (t_newmethod)matchbox_new,
                             (t_method)matchbox_free, sizeof(t_matchbox), 0, A_GIMME, 0);

  class_addlist  (matchbox_class, matchbox_list);

  class_addmethod(matchbox_class, (t_method)matchbox_add, gensym("add"),
                  A_GIMME, 0);
  class_addmethod(matchbox_class, (t_method)matchbox_delete,
                  gensym("delete"), A_GIMME, 0);
  class_addmethod(matchbox_class, (t_method)matchbox_clear, gensym("clear"),
                  A_NULL, 0);
  class_addmethod(matchbox_class, (t_method)matchbox_dump, gensym("dump"),
                  A_NULL);

  class_addmethod(matchbox_class, (t_method)matchbox_mode, gensym("mode"),
                  A_SYMBOL, 0);

  class_addmethod(matchbox_class, (t_method)matchbox_help, gensym("help"),
                  A_NULL);
  zexy_register("matchbox");
}
Ejemplo n.º 20
0
int setup_o0x2eudp0x2esend(void)
{
    t_class *c = class_new( gensym(OMAX_DOC_NAME), (t_newmethod)oudpsend_new,(t_method)oudpsend_free, (short)sizeof(t_oudpsend),0L, A_GIMME, 0);
    
    class_addmethod(c, (t_method)udpsend_connect, gensym("connect"), A_SYMBOL, A_FLOAT, 0);
    class_addmethod(c, (t_method)udpsend_set_multicast_ttl, gensym("multicast_ttl"), A_DEFFLOAT, 0);
    class_addmethod(c, (t_method)udpsend_set_multicast_loopback, gensym("multicast_loopback"), A_DEFFLOAT, 0);
    class_addmethod(c, (t_method)udpsend_set_multicast_interface, gensym("multicast_interface"), A_GIMME, 0);
    class_addmethod(c, (t_method)udpsend_disconnect, gensym("disconnect"), 0);
    class_addmethod(c, (t_method)udpsend_send, gensym("send"), A_GIMME, 0);
    class_addlist(c, (t_method)udpsend_send);

    class_addmethod(c, (t_method)odot_version, gensym("version"), 0);
    class_addmethod(c, (t_method)oudpsend_doc, gensym("doc"), 0);
    
    class_addmethod(c, (t_method)oudpsend_printcontents, gensym("printcontents"), 0);
    class_addmethod(c, (t_method)oudpsend_FullPacket, gensym("FullPacket"), A_GIMME, 0);
    
    
    //	finder_addclass("Devices","slipOSC");
    
    //	class_register(CLASS_BOX, c);
    oudpsend_class = c;
    
    ODOT_PRINT_VERSION;
    return 0;
}
Ejemplo n.º 21
0
static void list_tosymbol_setup(void)
{
    list_tosymbol_class = class_new(gensym("list tosymbol"),
        (t_newmethod)list_tosymbol_new, 0, sizeof(t_list_tosymbol), 0, 0);
    class_addlist(list_tosymbol_class, list_tosymbol_list);
    class_sethelpsymbol(list_tosymbol_class, &s_list);
}
Ejemplo n.º 22
0
void unpackOSC_setup(void)
{
    unpackOSC_class = class_new(gensym("unpackOSC"),
        (t_newmethod)unpackOSC_new, (t_method)unpackOSC_free,
        sizeof(t_unpackOSC), 0, 0);
    class_addlist(unpackOSC_class, (t_method)unpackOSC_list);
}
Ejemplo n.º 23
0
void obj_init(void)
{
    inlet_class = class_new(gensym("inlet"), 0, 0,
        sizeof(t_inlet), CLASS_PD, 0);
    class_addbang(inlet_class, inlet_bang);
    class_addpointer(inlet_class, inlet_pointer);
    class_addfloat(inlet_class, inlet_float);
    class_addsymbol(inlet_class, inlet_symbol);
    class_addlist(inlet_class, inlet_list);
    class_addanything(inlet_class, inlet_anything);

    pointerinlet_class = class_new(gensym("inlet"), 0, 0,
        sizeof(t_inlet), CLASS_PD, 0);
    class_addpointer(pointerinlet_class, pointerinlet_pointer);
    class_addanything(pointerinlet_class, inlet_wrong);

    floatinlet_class = class_new(gensym("inlet"), 0, 0,
        sizeof(t_inlet), CLASS_PD, 0);
    class_addfloat(floatinlet_class, (t_method)floatinlet_float);
    class_addanything(floatinlet_class, inlet_wrong);

    symbolinlet_class = class_new(gensym("inlet"), 0, 0,
        sizeof(t_inlet), CLASS_PD, 0);
    class_addsymbol(symbolinlet_class, symbolinlet_symbol);
    class_addanything(symbolinlet_class, inlet_wrong);

}
Ejemplo n.º 24
0
void nroute_setup(void)
{
	/* the object's class: */
    nroute_class = class_new(gensym("nroute"), (t_newmethod)nroute_new,
    	0, sizeof(t_nroute), 0, A_GIMME, 0);
#else
void maxlib_nroute_setup(void)
{
	/* the object's class: */
    nroute_class = class_new(gensym("maxlib/nroute"), (t_newmethod)nroute_new,
    	0, sizeof(t_nroute), 0, A_GIMME, 0);
	class_addcreator((t_newmethod)nroute_new, gensym("nroute"), A_GIMME, 0);
#endif
	/* a class for the proxy inlet: */
	proxy_class = class_new(gensym("maxlib/nroute_proxy"), NULL, NULL, sizeof(t_proxy),
		CLASS_PD|CLASS_NOINLET, A_NULL);

	class_addmethod(nroute_class, (t_method)nroute_setpos, gensym("right"), A_FLOAT, 0);
    class_addfloat(nroute_class, nroute_float);
	class_addlist(nroute_class, nroute_list);
	class_addanything(nroute_class, nroute_any);
	class_addanything(proxy_class, nroute_setmatch);
#ifndef MAXLIB
    
    logpost(NULL, 4, version);
#else
    class_sethelpsymbol(nroute_class, gensym("maxlib/nroute-help.pd"));
#endif
}
Ejemplo n.º 25
0
static void unpack_setup(void)
{
    unpack_class = class_new(gensym("unpack"), (t_newmethod)unpack_new,
    	(t_method)unpack_free, sizeof(t_unpack), 0, A_GIMME, 0);
    class_addlist(unpack_class, unpack_list);
    class_addanything(unpack_class, unpack_anything);
}
Ejemplo n.º 26
0
void biquad_freq_resp_setup(void)
{
  biquad_freq_resp_class = class_new(gensym("biquad_freq_resp"), (t_newmethod)biquad_freq_resp_new, 0,
    sizeof(t_biquad_freq_resp), 0, 0);
  class_addfloat(biquad_freq_resp_class, biquad_freq_resp_float);
  class_addlist(biquad_freq_resp_class, (t_method)biquad_freq_resp_list);
}
Ejemplo n.º 27
0
static void notein_setup(void)
{
    notein_class = class_new(gensym("notein"), (t_newmethod)notein_new,
        (t_method)notein_free, sizeof(t_notein), CLASS_NOINLET, A_DEFFLOAT, 0);
    class_addlist(notein_class, notein_list);
    class_sethelpsymbol(notein_class, gensym("midi"));
}
Ejemplo n.º 28
0
void grab_setup(void)
{
    t_symbol *s = gensym("grab");
    grab_class = class_new(s, (t_newmethod)grab_new,
			   (t_method)grab_free,
			   sizeof(t_grab), 0,
			   A_DEFFLOAT, A_DEFSYMBOL, 0);
    class_addfloat(grab_class, grab_float);
    class_addbang(grab_class, grab_bang);
    class_addsymbol(grab_class, grab_symbol);
    class_addpointer(grab_class, grab_pointer);
    class_addlist(grab_class, grab_list);
    class_addanything(grab_class, grab_anything);
    class_addmethod(grab_class, (t_method)grab_set,
		    gensym("set"), A_SYMBOL, 0);
    if (!bindlist_class)
    {
	t_class *c = grab_class;
	pd_bind(&grab_class, s);
	pd_bind(&c, s);
	if (!s->s_thing
	    || !(bindlist_class = *s->s_thing)
	    || bindlist_class->c_name != gensym("bindlist"))
	    error("grab: failure to initialize remote grabbing feature");
	pd_unbind(&c, s);
	pd_unbind(&grab_class, s);
    }
}
Ejemplo n.º 29
0
Archivo: dist.c Proyecto: IcaroL2ORK/pd
void dist_setup(void)
{
    dist_class = class_new(gensym("dist"), (t_newmethod)dist_new, 0,
    	sizeof(t_dist), 0, A_GIMME, 0);
#else
void maxlib_dist_setup(void)
{
    dist_class = class_new(gensym("maxlib_dist"), (t_newmethod)dist_new, 0,
    	sizeof(t_dist), 0, A_GIMME, 0);
#endif
    class_addcreator((t_newmethod)dist_new, gensym("d"), A_GIMME, 0);
    class_addbang(dist_class, dist_bang);
    class_addfloat(dist_class, dist_float);
    class_addsymbol(dist_class, dist_symbol);
    class_addpointer(dist_class, dist_pointer);
    class_addlist(dist_class, dist_list);
	class_addmethod(dist_class, (t_method)dist_connect, gensym("connect"), A_GIMME, 0);
	class_addmethod(dist_class, (t_method)dist_disconnect, gensym("disconnect"), A_GIMME, 0);
	class_addmethod(dist_class, (t_method)dist_clear, gensym("clear"), 0);
	class_addmethod(dist_class, (t_method)dist_print, gensym("print"), 0);
	class_addmethod(dist_class, (t_method)dist_send, gensym("send"), A_GIMME, 0);
    class_addanything(dist_class, dist_anything);
#ifndef MAXLIB
	
    post(version);
#else
	class_addcreator((t_newmethod)dist_new, gensym("dist"), A_GIMME, 0);
	class_sethelpsymbol(dist_class, gensym("maxlib/dist-help.pd"));
#endif
}
Ejemplo n.º 30
0
void unroute_setup(void)
{
    unroute_class = class_new(gensym("unroute"), (t_newmethod)unroute_new,
    	0, sizeof(t_unroute), 0, A_GIMME, 0);
#else
void maxlib_unroute_setup(void)
{
    unroute_class = class_new(gensym("maxlib/unroute"), (t_newmethod)unroute_new,
    	0, sizeof(t_unroute), 0, A_GIMME, 0);
#endif
		/* a class for the proxy inlet: */
	proxy_class = class_new(gensym("maxlib/unroute_proxy"), NULL, NULL, sizeof(t_proxy),
		CLASS_PD|CLASS_NOINLET, A_NULL);

	class_addanything(proxy_class, unroute_input);

    class_addfloat(unroute_class, unroute_float);
    class_addlist(unroute_class, unroute_list);
    class_addanything(unroute_class, unroute_any);
#ifndef MAXLIB
    
    logpost(NULL, 4, version);
#else
	class_addcreator((t_newmethod)unroute_new, gensym("unroute"), A_GIMME, 0);
    class_sethelpsymbol(unroute_class, gensym("maxlib/unroute-help.pd"));
#endif
}