Example #1
0
extern "C" void hoa_setup(void)
{
    cream_class = eclass_new("hoa", (method)hoa_new, (method)eobj_free, (short)sizeof(t_eobj), CLASS_PD, A_NULL, 0);
    cream_class = eclass_new("Hoa", (method)hoa_new, (method)eobj_free, (short)sizeof(t_eobj), CLASS_PD, A_NULL, 0);
    t_eobj* obj = (t_eobj *)hoa_new(NULL);
    if(!obj)
    {
        verbose(3, "HOA Library by Pierre Guillot, Eliott Paris & Thomas Le Meur\n© 2013 - 2015  CICM | Paris 8 University\nVersion %s (%s) for Pure Data %i.%i\n",hoaversion, __DATE__, PD_MAJOR_VERSION, PD_MINOR_VERSION);
        eobj_free(obj);
    }

    // HOA COMMON //
    setup_hoa0x2econnect();
    setup_hoa0x2edac_tilde();
    setup_hoa0x2ein();
    setup_hoa0x2ein_tilde();
    setup_hoa0x2eout();
    setup_hoa0x2eout_tilde();
    setup_hoa0x2epi();
    setup_hoa0x2epi_tilde();
    setup_hoa0x2eprocess_tilde();
    setup_hoa0x2ethisprocess_tilde();
	setup_hoa0x2emap();

    // HOA 2D //
    setup_hoa0x2e2d0x2edecoder_tilde();
    setup_hoa0x2e2d0x2eencoder_tilde();
    setup_hoa0x2e2d0x2emap_tilde();
    setup_hoa0x2e2d0x2emeter_tilde();
    setup_hoa0x2e2d0x2eoptim_tilde();
    setup_hoa0x2e2d0x2eprojector_tilde();
    setup_hoa0x2e2d0x2erecomposer_tilde();
    setup_hoa0x2e2d0x2erotate_tilde();
    setup_hoa0x2e2d0x2escope_tilde();
    setup_hoa0x2e2d0x2espace();
    setup_hoa0x2e2d0x2ewider_tilde();
    setup_hoa0x2e2d0x2eexchanger_tilde();

    // HOA 3D //
    setup_hoa0x2e3d0x2edecoder_tilde();
    setup_hoa0x2e3d0x2eencoder_tilde();
    setup_hoa0x2e3d0x2eoptim_tilde();
    setup_hoa0x2e3d0x2ewider_tilde();
    setup_hoa0x2e3d0x2emap_tilde();
	setup_hoa0x2e3d0x2emeter_tilde();
    setup_hoa0x2e3d0x2escope_tilde();
    setup_hoa0x2e3d0x2eexchanger_tilde();

    epd_add_folder("Hoa", "patchers");
    epd_add_folder("Hoa", "clippings");
    epd_add_folder("Hoa", "dependencies");
    epd_add_folder("Hoa", "media");
    epd_add_folder("Hoa", "misc");
}
Example #2
0
extern "C" void setup_c0x2eblackboard(void)
{
    t_eclass *c;
    
    c = eclass_new("c.blackboard", (method)blackboard_new, (method)blackboard_free, (short)sizeof(t_blackboard), 0L, A_GIMME, 0);
    eclass_guiinit(c, 0);

    
    eclass_addmethod(c, (method) blackboard_paint,           "paint",            A_NULL, 0);
    eclass_addmethod(c, (method) blackboard_notify,          "notify",           A_NULL, 0);
    eclass_addmethod(c, (method) blackboard_getdrawparams,   "getdrawparams",    A_NULL, 0);
    eclass_addmethod(c, (method) blackboard_oksize,          "oksize",           A_NULL, 0);
    
    eclass_addmethod(c, (method) blackboard_width,           "width",            A_FLOAT,0);
    eclass_addmethod(c, (method) blackboard_color,           "color",            A_GIMME,0);
    eclass_addmethod(c, (method) blackboard_fill,            "fill",             A_FLOAT,0);
    
    eclass_addmethod(c, (method) blackboard_line,            "line",             A_GIMME,0);
    eclass_addmethod(c, (method) blackboard_path,            "path",             A_GIMME,0);
    eclass_addmethod(c, (method) blackboard_rect,            "rect",             A_GIMME,0);
    eclass_addmethod(c, (method) blackboard_oval,            "oval",             A_GIMME,0);
    eclass_addmethod(c, (method) blackboard_arc,             "arc",              A_GIMME,0);
    eclass_addmethod(c, (method) blackboard_image,           "image",            A_GIMME,0);
    eclass_addmethod(c, (method) blackboard_text,            "text",             A_GIMME,0);
    
    eclass_addmethod(c, (method) blackboard_clear,           "clear",            A_NULL, 0);
    eclass_addmethod(c, (method) blackboard_reset,           "reset",            A_NULL, 0);
    
    eclass_addmethod(c, (method) blackboard_mousemove,       "mousemove",        A_NULL, 0);
    eclass_addmethod(c, (method) blackboard_mousedrag,       "mousedrag",        A_NULL, 0);
    eclass_addmethod(c, (method) blackboard_mousedown,       "mousedown",        A_NULL, 0);
    eclass_addmethod(c, (method) blackboard_mouseup,         "mouseup",          A_NULL, 0);
    
    CLASS_ATTR_DEFAULT              (c, "size", 0, "200 200");
    CLASS_ATTR_INVISIBLE            (c, "send", 1);
    
    CLASS_ATTR_LONG                 (c, "chalkmode", 0, t_blackboard, f_pen_mode);
    CLASS_ATTR_LABEL                (c, "chalkmode", 0, "Chalk Mode");
    CLASS_ATTR_FILTER_CLIP          (c, "chalkmode", 0, 1);
    CLASS_ATTR_ORDER                (c, "chalkmode", 0, "1");
    CLASS_ATTR_DEFAULT              (c, "chalkmode", 0, "1");
    CLASS_ATTR_SAVE                 (c, "chalkmode", 0);
    CLASS_ATTR_STYLE                (c, "chalkmode", 0, "onoff");
    
    CLASS_ATTR_RGBA                 (c, "bgcolor", 0, t_blackboard, f_color_background);
    CLASS_ATTR_LABEL                (c, "bgcolor", 0, "Background Color");
    CLASS_ATTR_ORDER                (c, "bgcolor", 0, "1");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bgcolor", 0, "0.75 0.75 0.75 1.");
    CLASS_ATTR_STYLE                (c, "bgcolor", 0, "color");
    
    CLASS_ATTR_RGBA                 (c, "bdcolor", 0, t_blackboard, f_color_border);
    CLASS_ATTR_LABEL                (c, "bdcolor", 0, "Border Color");
    CLASS_ATTR_ORDER                (c, "bdcolor", 0, "2");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bdcolor", 0, "0.5 0.5 0.5 1.");
    CLASS_ATTR_STYLE                (c, "bdcolor", 0, "color");
    
    eclass_register(CLASS_BOX, c);
    blackboard_class = c;
}
Example #3
0
extern "C" void setup_c0x2epatcherinfos(void)
{
	t_eclass *c = eclass_new("c.patcherinfos", (method)patcherinfos_new, (method)eobj_free, (short)sizeof(t_patcherinfos), 0L, A_GIMME, 0);
    class_addcreator((t_newmethod)patcherinfos_new, gensym("c.canvasinfos"), A_GIMME, 0);
    eclass_addmethod(c, (method)patcherinfos_output,      "bang",       A_NULL, 0);
    eclass_register(CLASS_OBJ, c);
    patcherinfos_class = c;
}
Example #4
0
extern "C" void setup_c0x2escope_tilde(void)
{
    t_eclass *c;

    c = eclass_new("c.scope~", (method)scope_new, (method)scope_free, (short)sizeof(t_scope), 0L, A_GIMME, 0);

    eclass_guiinit(c, 0);
    eclass_dspinit(c);
    eclass_addmethod(c, (method) scope_dsp,             "dsp",              A_NULL, 0);
    eclass_addmethod(c, (method) scope_paint,           "paint",            A_NULL, 0);
    eclass_addmethod(c, (method) scope_getdrawparams,   "getdrawparams",    A_NULL, 0);
    eclass_addmethod(c, (method) scope_oksize,          "oksize",           A_NULL, 0);

    CLASS_ATTR_INVISIBLE            (c, "send", 1);
    CLASS_ATTR_DEFAULT              (c, "size", 0, "125 100");

    CLASS_ATTR_LONG                 (c, "bufdis", 0, t_scope, f_display_size);
    CLASS_ATTR_ORDER                (c, "bufdis", 0, "1");
    CLASS_ATTR_LABEL                (c, "bufdis", 0, "Display Buffer Size");
    CLASS_ATTR_FILTER_CLIP          (c, "bufdis", 2, 8092);
    CLASS_ATTR_DEFAULT              (c, "bufdis", 0, "256");
    CLASS_ATTR_SAVE                 (c, "bufdis", 1);
    CLASS_ATTR_STYLE                (c, "bufdis", 0, "number");

    CLASS_ATTR_LONG                 (c, "bufsig", 0, t_scope, f_signal_size);
    CLASS_ATTR_ORDER                (c, "bufsig", 0, "2");
    CLASS_ATTR_LABEL                (c, "bufsig", 0, "Signal Buffer Size");
    CLASS_ATTR_FILTER_CLIP          (c, "bufsig", 2, 8092);
    CLASS_ATTR_DEFAULT              (c, "bufsig", 0, "256");
    CLASS_ATTR_SAVE                 (c, "bufsig", 1);
    CLASS_ATTR_STYLE                (c, "bufsig", 0, "number");

    CLASS_ATTR_FLOAT_ARRAY          (c, "range", 0, t_scope, f_range, 2);
    CLASS_ATTR_ORDER                (c, "range", 0, "2");
    CLASS_ATTR_LABEL                (c, "range", 0, "Range");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "range", 0, "-1 1");

    CLASS_ATTR_RGBA                 (c, "bgcolor", 0, t_scope, f_color_background);
    CLASS_ATTR_LABEL                (c, "bgcolor", 0, "Background Color");
    CLASS_ATTR_ORDER                (c, "bgcolor", 0, "1");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bgcolor", 0, "0.75 0.75 0.75 1.");
    CLASS_ATTR_STYLE                (c, "bgcolor", 0, "color");

    CLASS_ATTR_RGBA                 (c, "bdcolor", 0, t_scope, f_color_border);
    CLASS_ATTR_LABEL                (c, "bdcolor", 0, "Border Color");
    CLASS_ATTR_ORDER                (c, "bdcolor", 0, "2");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bdcolor", 0, "0.5 0.5 0.5 1.");
    CLASS_ATTR_STYLE                (c, "bdcolor", 0, "color");

    CLASS_ATTR_RGBA                 (c, "sicolor", 0, t_scope, f_color_signal);
    CLASS_ATTR_LABEL                (c, "sicolor", 0, "Signal Color");
    CLASS_ATTR_ORDER                (c, "sicolor", 0, "3");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "sicolor", 0, "0. 0.6 0. 0.8");
    CLASS_ATTR_STYLE                (c, "sicolor", 0, "color");

    eclass_register(CLASS_BOX, c);
    cscope_class = c;
}
extern "C" void setup_c0x2enumber_tilde(void)
{
	t_eclass *c;

	c = eclass_new("c.number~", (method)number_tilde_new, (method)number_tilde_free, (short)sizeof(t_number_tilde), 0L, A_GIMME, 0);

	eclass_dspinit(c);
	eclass_init(c, 0);
    cream_initclass(c);

	eclass_addmethod(c, (method) number_tilde_dsp,             "dsp",              A_NULL, 0);
	eclass_addmethod(c, (method) number_tilde_assist,          "assist",           A_NULL, 0);
	eclass_addmethod(c, (method) number_tilde_paint,           "paint",            A_NULL, 0);
	eclass_addmethod(c, (method) number_tilde_notify,          "notify",           A_NULL, 0);
    eclass_addmethod(c, (method) number_tilde_getdrawparams,   "getdrawparams",    A_NULL, 0);
    eclass_addmethod(c, (method) number_tilde_oksize,          "oksize",           A_NULL, 0);
    eclass_addmethod(c, (method) number_tilde_output,          "bang",             A_NULL, 0);

	CLASS_ATTR_DEFAULT			(c, "size", 0, "53 13");

    CLASS_ATTR_LONG                 (c, "interval", 0, t_number_tilde, f_interval);
	CLASS_ATTR_ORDER                (c, "interval", 0, "2");
	CLASS_ATTR_LABEL                (c, "interval", 0, "Refresh Interval in Milliseconds");
	CLASS_ATTR_FILTER_MIN           (c, "interval", 20);
	CLASS_ATTR_DEFAULT              (c, "interval", 0, "50");
	CLASS_ATTR_SAVE                 (c, "interval", 1);
    CLASS_ATTR_STYLE                (c, "interval", 0, "number");
    
    CLASS_ATTR_LONG                 (c, "decimal", 0, t_number_tilde, f_ndecimal);
	CLASS_ATTR_ORDER                (c, "decimal", 0, "3");
	CLASS_ATTR_LABEL                (c, "decimal", 0, "Number of decimal");
    CLASS_ATTR_DEFAULT              (c, "decimal", 0, "6");
	CLASS_ATTR_FILTER_MIN           (c, "decimal", 0);
    CLASS_ATTR_FILTER_MAX           (c, "decimal", 6);
	CLASS_ATTR_SAVE                 (c, "decimal", 1);
    CLASS_ATTR_STYLE                (c, "decimal", 0, "number");
    
	CLASS_ATTR_RGBA                 (c, "bgcolor", 0, t_number_tilde, f_color_background);
	CLASS_ATTR_LABEL                (c, "bgcolor", 0, "Background Color");
	CLASS_ATTR_ORDER                (c, "bgcolor", 0, "1");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bgcolor", 0, "0.75 0.75 0.75 1.");
    CLASS_ATTR_STYLE                (c, "bgcolor", 0, "color");
    
	CLASS_ATTR_RGBA                 (c, "bdcolor", 0, t_number_tilde, f_color_border);
	CLASS_ATTR_LABEL                (c, "bdcolor", 0, "Border Color");
	CLASS_ATTR_ORDER                (c, "bdcolor", 0, "2");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bdcolor", 0, "0.5 0.5 0.5 1.");
    CLASS_ATTR_STYLE                (c, "bdcolor", 0, "color");
    
	CLASS_ATTR_RGBA                 (c, "textcolor", 0, t_number_tilde, f_color_text);
	CLASS_ATTR_LABEL                (c, "textcolor", 0, "Text Color");
	CLASS_ATTR_ORDER                (c, "textcolor", 0, "3");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "textcolor", 0, "0. 0. 0. 1.");
    CLASS_ATTR_STYLE                (c, "textcolor", 0, "color");
    
    eclass_register(CLASS_BOX, c);
	number_tilde_class = c;
}
Example #6
0
extern "C" void setup_c0x2ematrix(void)
{
	t_eclass *c;

	c = eclass_new("c.matrix", (method)matrixctrl_new, (method)matrixctrl_free, (short)sizeof(t_matrixctrl), 0L, A_GIMME, 0);
	eclass_guiinit(c, 0);
    eclass_addmethod(c, (method) matrixctrl_assist,          "assist",           A_NULL, 0);
	eclass_addmethod(c, (method) matrixctrl_paint,           "paint",            A_NULL, 0);
	eclass_addmethod(c, (method) matrixctrl_notify,          "notify",           A_NULL, 0);
    eclass_addmethod(c, (method) matrixctrl_getdrawparams,   "getdrawparams",    A_NULL, 0);
    eclass_addmethod(c, (method) matrixctrl_oksize,          "oksize",           A_NULL, 0);
    eclass_addmethod(c, (method) matrixctrl_set,             "set",              A_GIMME,0);
    eclass_addmethod(c, (method) matrixctrl_list,            "list",             A_GIMME,0);
    eclass_addmethod(c, (method) matrixctrl_bang,            "bang",             A_NULL, 0);
    eclass_addmethod(c, (method) matrixctrl_clear,           "clear",            A_NULL, 0);
    eclass_addmethod(c, (method) matrixctrl_getrow,          "getrow",           A_FLOAT,0);
    eclass_addmethod(c, (method) matrixctrl_getcolumn,       "getcolumn",        A_FLOAT,0);

    eclass_addmethod(c, (method) matrixctrl_mousedown,       "mousedown",        A_NULL, 0);
    eclass_addmethod(c, (method) matrixctrl_mousedrag,       "mousedrag",        A_NULL, 0);
    eclass_addmethod(c, (method) matrixctrl_mouseleave,      "mouseleave",       A_NULL, 0);

    eclass_addmethod(c, (method) matrixctrl_preset,          "preset",           A_NULL, 0);

    CLASS_ATTR_INVISIBLE            (c, "fontname", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontweight", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontslant", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontsize", 1);
	CLASS_ATTR_DEFAULT              (c, "size", 0, "105 53");

    CLASS_ATTR_FLOAT_ARRAY          (c, "matrix", 0, t_matrixctrl, f_size, 2);
	CLASS_ATTR_LABEL                (c, "matrix", 0, "Matrix Size");
    CLASS_ATTR_ACCESSORS			(c, "matrix", NULL, matrixctrl_matrix_set);
	CLASS_ATTR_ORDER                (c, "matrix", 0, "1");
	CLASS_ATTR_DEFAULT              (c, "matrix", 0, "8 4");
    CLASS_ATTR_SAVE                 (c, "matrix", 0);

    CLASS_ATTR_RGBA                 (c, "bgcolor", 0, t_matrixctrl, f_color_background);
	CLASS_ATTR_LABEL                (c, "bgcolor", 0, "Background Color");
	CLASS_ATTR_ORDER                (c, "bgcolor", 0, "1");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bgcolor", 0, "0.75 0.75 0.75 1.");
    CLASS_ATTR_STYLE                (c, "bgcolor", 0, "color");

	CLASS_ATTR_RGBA                 (c, "bdcolor", 0, t_matrixctrl, f_color_border);
	CLASS_ATTR_LABEL                (c, "bdcolor", 0, "Border Color");
	CLASS_ATTR_ORDER                (c, "bdcolor", 0, "2");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bdcolor", 0, "0.5 0.5 0.5 1.");
	CLASS_ATTR_STYLE                (c, "bdcolor", 0, "color");

    CLASS_ATTR_RGBA                 (c, "accolor", 0, t_matrixctrl, f_color_on);
	CLASS_ATTR_LABEL                (c, "accolor", 0, "Active Cell Color");
	CLASS_ATTR_ORDER                (c, "accolor", 0, "3");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "accolor", 0, "0.5 0.5 0.5 1.");
	CLASS_ATTR_STYLE                (c, "accolor", 0, "color");

    eclass_register(CLASS_BOX, c);
	matrixctrl_class = c;
}
Example #7
0
extern "C" void setup_c0x2eincdec(void)
{
	t_eclass *c;

	c = eclass_new("c.incdec", (method)incdec_new, (method)incdec_free, (short)sizeof(t_incdec), 0L, A_GIMME, 0);

	eclass_init(c, 0);

	eclass_addmethod(c, (method) incdec_assist,          "assist",           A_CANT, 0);
	eclass_addmethod(c, (method) incdec_paint,           "paint",            A_CANT, 0);
	eclass_addmethod(c, (method) incdec_notify,          "notify",           A_CANT, 0);
    eclass_addmethod(c, (method) incdec_getdrawparams,   "getdrawparams",    A_CANT, 0);
    eclass_addmethod(c, (method) incdec_oksize,          "oksize",           A_CANT, 0);
    eclass_addmethod(c, (method) incdec_set,             "set",              A_FLOAT,0);
    eclass_addmethod(c, (method) incdec_float,           "float",            A_FLOAT,0);
    eclass_addmethod(c, (method) incdec_output,          "bang",             A_CANT, 0);
    eclass_addmethod(c, (method) incdec_inc,             "inc",              A_CANT, 0);
    eclass_addmethod(c, (method) incdec_dec,             "dec",              A_CANT, 0);
    eclass_addmethod(c, (method) incdec_mousedown,       "mousedown",        A_CANT, 0);
    eclass_addmethod(c, (method) incdec_mouseup,         "mouseup",          A_CANT, 0);
    
    CLASS_ATTR_INVISIBLE            (c, "fontname", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontweight", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontslant", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontsize", 1);
    CLASS_ATTR_INVISIBLE            (c, "send", 1);
	CLASS_ATTR_DEFAULT              (c, "size", 0, "13 20");

    CLASS_ATTR_FLOAT                (c, "step", 0, t_incdec, f_increment);
	CLASS_ATTR_LABEL                (c, "step", 0, "Step increment");
    CLASS_ATTR_FILTER_MIN           (c, "step", 0.);
	CLASS_ATTR_ORDER                (c, "step", 0, "1");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "step", 0, "1.");
    CLASS_ATTR_STYLE                (c, "step", 0, "number");
    CLASS_ATTR_STEP                 (c, "step", 0.1);
    
	CLASS_ATTR_RGBA                 (c, "bgcolor", 0, t_incdec, f_color_background);
	CLASS_ATTR_LABEL                (c, "bgcolor", 0, "Background Color");
	CLASS_ATTR_ORDER                (c, "bgcolor", 0, "1");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bgcolor", 0, "0.75 0.75 0.75 1.");
    CLASS_ATTR_STYLE                (c, "bgcolor", 0, "color");
    
	CLASS_ATTR_RGBA                 (c, "bdcolor", 0, t_incdec, f_color_border);
	CLASS_ATTR_LABEL                (c, "bdcolor", 0, "Border Color");
	CLASS_ATTR_ORDER                (c, "bdcolor", 0, "2");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bdcolor", 0, "0.5 0.5 0.5 1.");
    CLASS_ATTR_STYLE                (c, "bdcolor", 0, "color");
    
	CLASS_ATTR_RGBA                 (c, "arcolor", 0, t_incdec, f_color_arrow);
	CLASS_ATTR_LABEL                (c, "arcolor", 0, "Arrow Color");
	CLASS_ATTR_ORDER                (c, "arcolor", 0, "3");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "arcolor", 0, "0. 0. 0. 1.");
    CLASS_ATTR_STYLE                (c, "arcolor", 0, "color");

    eclass_register(CLASS_BOX, c);
    cicm_post();
	incdec_class = c;
}
Example #8
0
extern "C" void setup_c0x2eloadmess(void)
{
	t_eclass *c;
    
	c = eclass_new("c.loadmess", (method)loadmess_new, (method)loadmess_free, (short)sizeof(t_loadmess), 0L, A_GIMME, 0);

    eclass_addmethod(c, (method) loadmess_loadbang,    "loadbang",         A_NULL, 0);
    eclass_addmethod(c, (method) loadmess_output,      "bang",             A_NULL, 0);
	eclass_addmethod(c, (method) loadmess_click,       "click",            A_NULL, 0);
	eclass_register(CLASS_OBJ, c);
    loadmess_class = c;
}
Example #9
0
extern "C" void setup_hoa0x2ewider_tilde(void)
{
    t_eclass* c;
    c = eclass_new("hoa.wider~", (method)hoa_wider_new, (method)hoa_wider_free, (short)sizeof(t_hoa_wider), 0, A_GIMME, 0);
    
	eclass_dspinit(c);
    
	eclass_addmethod(c, (method)hoa_wider_dsp,       "dsp",      A_CANT, 0);
    
    eclass_register(CLASS_OBJ, c);
    hoa_wider_class = c;
}
Example #10
0
extern "C" void setup_hoa0x2econverter_tilde(void)
{
    t_eclass* c;
    c = eclass_new("hoa.converter~", (method)hoa_converter_tilde_new, (method)NULL, sizeof(t_hoa_converter_tilde), CLASS_NOINLET, A_GIMME, 0);
    
    eclass_dspinit(c);
    hoa_initclass(c, (method)hoa_getinfos);
   
    eclass_addmethod(c, (method)hoa_converter_tilde_dsp,      "dsp",      A_CANT, 0);
    
    eclass_register(CLASS_OBJ, c);
    hoa_converter_tilde_class = c;
}
Example #11
0
extern "C" void setup_hoa0x2e3d0x2ewider_tilde(void)
{
    t_eclass* c;
    c = eclass_new("hoa.3d.wider~", (method)hoa_wider_3D_new, (method)hoa_wider_3D_free, (short)sizeof(t_hoa_wider_3D), 0, A_GIMME, 0);
    
	eclass_dspinit(c);
    hoa_initclass(c, (method)hoa_getinfos);
	eclass_addmethod(c, (method)hoa_wider_3D_dsp,       "dsp",      A_CANT, 0);
    eclass_addmethod(c, (method)hoa_wider_3D_float,    "float",    A_FLOAT, 0);
    
    eclass_register(CLASS_OBJ, c);
    hoa_wider_3D_class = c;
}
Example #12
0
extern "C" void setup_hoa0x2ein_tilde(void)
{
    t_eclass* c;
    c = eclass_new("hoa.in~", (method)hoa_intilde_new, (method)hoa_intilde_free, (short)sizeof(t_hoa_in_tilde), CLASS_NOINLET, A_GIMME, 0);
    
    hoa_initclass(c, (method)hoa_getinfos);
    eclass_dspinit(c);
    eclass_addmethod(c, (method)hoa_intilde_dsp, "dsp", A_CANT, 0);
    
    eclass_register(CLASS_OBJ, c);
    hoa_intilde_class = c;
    
}
Example #13
0
extern "C" void setup_c0x2epak(void)
{
	t_eclass *c;
    
	c = eclass_new("c.pak", (method)pak_new, (method)pak_free, (short)sizeof(t_pak), CLASS_NOINLET, A_GIMME, 0);

    eclass_addmethod(c, (method)pak_anything,    "anything",       A_GIMME, 0);
    eclass_addmethod(c, (method)pak_list,        "list",           A_GIMME, 0);
    eclass_addmethod(c, (method)pak_float,       "float",          A_FLOAT, 0);
    eclass_addmethod(c, (method)pak_symbol,      "symbol",         A_SYMBOL,0);
    eclass_addmethod(c, (method)pak_output,      "bang",           A_NULL,  0);
    eclass_register(CLASS_OBJ, c);
    pak_class = c;
}
Example #14
0
extern "C" void setup_hoa0x2espace_tilde(void)
{
    t_eclass* c;
    c = eclass_new("hoa.space~", (method)hoa_space_t_new, (method)hoa_space_t_free, (short)sizeof(t_hoa_space_t), 0L, A_GIMME, 0);
    
    eclass_dspinit(c);
    eclass_addmethod(c, (method)hoa_space_t_dsp,   "dsp",      A_CANT, 0);
    eclass_addmethod(c, (method)hoa_space_t_list,  "coeffs",   A_GIMME,0);
    eclass_addmethod(c, (method)hoa_space_t_list,  "list",     A_GIMME,0);
    
	eclass_register(CLASS_OBJ, c);
    hoa_post();
    hoa_space_t_class = c;
}
Example #15
0
extern "C" void setup_c0x2earray(void)
{
	t_eclass *c;
    
	c = eclass_new("c.array", (method)carray_new, (method)carray_free, (short)sizeof(t_carray), 0L, A_GIMME, 0);
    
	eclass_init(c, 0);
	
	eclass_addmethod(c, (method) carray_assist,          "assist",           A_CANT, 0);
	eclass_addmethod(c, (method) carray_paint,           "paint",            A_CANT, 0);
	eclass_addmethod(c, (method) carray_notify,          "notify",           A_CANT, 0);
    eclass_addmethod(c, (method) carray_getdrawparams,   "getdrawparams",    A_CANT, 0);
    eclass_addmethod(c, (method) carray_oksize,          "oksize",           A_CANT, 0);
    eclass_addmethod(c, (method) carray_output,          "float",            A_FLOAT,0);
    eclass_addmethod(c, (method) carray_output,          "bang",             A_CANT, 0);
    eclass_addmethod(c, (method) carray_output,          "list",             A_GIMME,0);
    eclass_addmethod(c, (method) carray_output,          "anything",         A_GIMME,0);
    
    eclass_addmethod(c, (method) carray_mousedown,       "mousedown",        A_CANT, 0);
    eclass_addmethod(c, (method) carray_mouseup,         "mouseup",          A_CANT, 0);
    
    CLASS_ATTR_INVISIBLE            (c, "fontname", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontweight", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontslant", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontsize", 1);
	CLASS_ATTR_DEFAULT              (c, "size", 0, "16. 16.");
    
    CLASS_ATTR_SYMBOL               (c, "array", 0, t_carray, f_name);
    CLASS_ATTR_ACCESSORS            (c, "array", NULL, carray_buffer_set);
	CLASS_ATTR_LABEL                (c, "array", 0, "Array Name");
	CLASS_ATTR_ORDER                (c, "array", 0, "1");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "array", 0, "(null)");
    
	CLASS_ATTR_RGBA                 (c, "bgcolor", 0, t_carray, f_color_background);
	CLASS_ATTR_LABEL                (c, "bgcolor", 0, "Background Color");
	CLASS_ATTR_ORDER                (c, "bgcolor", 0, "1");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bgcolor", 0, "0.75 0.75 0.75 1.");
	CLASS_ATTR_STYLE                (c, "bgcolor", 0, "color");
    
	CLASS_ATTR_RGBA                 (c, "bdcolor", 0, t_carray, f_color_border);
	CLASS_ATTR_LABEL                (c, "bdcolor", 0, "Border Color");
	CLASS_ATTR_ORDER                (c, "bdcolor", 0, "2");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bdcolor", 0, "0.5 0.5 0.5 1.");
	CLASS_ATTR_STYLE                (c, "bdcolor", 0, "color");
	
    eclass_register(CLASS_BOX, c);
    cicm_post();
	carray_class = c;
}
Example #16
0
extern "C" void setup_c0x2ebang(void)
{
	t_eclass *c;
    
	c = eclass_new("c.bang", (method)bang_new, (method)bang_free, (short)sizeof(t_bang), 0L, A_GIMME, 0);
    
	eclass_init(c, 0);
	
	eclass_addmethod(c, (method) bang_assist,          "assist",           A_CANT, 0);
	eclass_addmethod(c, (method) bang_paint,           "paint",            A_CANT, 0);
	eclass_addmethod(c, (method) bang_notify,          "notify",           A_CANT, 0);
    eclass_addmethod(c, (method) bang_getdrawparams,   "getdrawparams",    A_CANT, 0);
    eclass_addmethod(c, (method) bang_oksize,          "oksize",           A_CANT, 0);
    eclass_addmethod(c, (method) bang_output,          "float",            A_FLOAT,0);
    eclass_addmethod(c, (method) bang_output,          "bang",             A_CANT, 0);
    eclass_addmethod(c, (method) bang_output,          "list",             A_GIMME,0);
    eclass_addmethod(c, (method) bang_output,          "anything",         A_GIMME,0);
    
    eclass_addmethod(c, (method) bang_mousedown,       "mousedown",        A_CANT, 0);
    eclass_addmethod(c, (method) bang_mouseup,         "mouseup",          A_CANT, 0);
    
    CLASS_ATTR_INVISIBLE            (c, "fontname", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontweight", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontslant", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontsize", 1);
	CLASS_ATTR_DEFAULT              (c, "size", 0, "16. 16.");
    
	CLASS_ATTR_RGBA                 (c, "bgcolor", 0, t_bang, f_color_background);
	CLASS_ATTR_LABEL                (c, "bgcolor", 0, "Background Color");
	CLASS_ATTR_ORDER                (c, "bgcolor", 0, "1");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bgcolor", 0, "0.75 0.75 0.75 1.");
	CLASS_ATTR_STYLE                (c, "bgcolor", 0, "color");
    
	CLASS_ATTR_RGBA                 (c, "bdcolor", 0, t_bang, f_color_border);
	CLASS_ATTR_LABEL                (c, "bdcolor", 0, "Border Color");
	CLASS_ATTR_ORDER                (c, "bdcolor", 0, "2");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bdcolor", 0, "0.5 0.5 0.5 1.");
	CLASS_ATTR_STYLE                (c, "bdcolor", 0, "color");
    
	CLASS_ATTR_RGBA                 (c, "bacolor", 0, t_bang, f_color_bang);
	CLASS_ATTR_LABEL                (c, "bacolor", 0, "Bang Color");
	CLASS_ATTR_ORDER                (c, "bacolor", 0, "3");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bacolor", 0, "0. 0. 0. 1.");
	CLASS_ATTR_STYLE                (c, "bacolor", 0, "color");
	
    eclass_register(CLASS_BOX, c);
    cicm_post();
	bang_class = c;
}
extern "C" void setup_hoa0x2e2d0x2erotate_tilde(void)
{
    t_eclass* c;
    
    c = eclass_new("hoa.2d.rotate~",(method)hoa_rotate_new,(method)hoa_rotate_free, (short)sizeof(t_hoa_rotate), 0L, A_GIMME, 0);
    class_addcreator((t_newmethod)hoa_rotate_new, gensym("hoa.rotate~"), A_GIMME, 0);
    
	eclass_dspinit(c);
    hoa_initclass(c, (method)hoa_getinfos);
	eclass_addmethod(c, (method)hoa_rotate_dsp,     "dsp",      A_CANT, 0);
    eclass_addmethod(c, (method)hoa_rotate_float,   "float",    A_FLOAT, 0);
    
    eclass_register(CLASS_OBJ, c);
    hoa_rotate_class = c;
}
Example #18
0
extern "C" void setup_c0x2eprepend(void)
{
    t_eclass *c;
    
    c = eclass_new("c.prepend", (method)prepend_new, (method)prepend_free, (short)sizeof(t_prepend), 0L, A_GIMME, 0);

    
    eclass_addmethod(c, (method)prepend_anything,    "anything",       A_GIMME, 0);
    eclass_addmethod(c, (method)prepend_list,        "list",           A_GIMME, 0);
    eclass_addmethod(c, (method)prepend_set,         "set",            A_GIMME, 0);
    eclass_addmethod(c, (method)prepend_float,       "float",          A_FLOAT, 0);
    eclass_addmethod(c, (method)prepend_symbol,      "symbol",         A_SYMBOL,0);
    eclass_addmethod(c, (method)prepend_bang,        "bang",           A_NULL,  0);
    eclass_register(CLASS_OBJ, c);
    prepend_class = c;
}
Example #19
0
extern "C" void setup_hoa0x2erecomposer_tilde(void)
{
    t_eclass* c;
    
    c = eclass_new("hoa.recomposer~", (method)hoa_recomposer_new, (method)hoa_recomposer_free, (short)sizeof(t_hoa_recomposer), 0L, A_GIMME, 0);
    
	eclass_dspinit(c);
    
	eclass_addmethod(c, (method)hoa_recomposer_dsp,     "dsp",      A_CANT, 0);
    eclass_addmethod(c, (method)hoa_recomposer_angle,   "angle",    A_GIMME,0);
    eclass_addmethod(c, (method)hoa_recomposer_wide,    "wide",      A_GIMME,0);
    
    eclass_register(CLASS_OBJ, c);
    hoa_post();
    hoa_recomposer_class = c;
}
Example #20
0
extern "C" void setup_c0x2etoggle(void)
{
	t_eclass *c;

	c = eclass_new("c.toggle", (method)toggle_new, (method)toggle_free, (short)sizeof(t_toggle), 0L, A_GIMME, 0);

	eclass_init(c, 0);

	eclass_addmethod(c, (method) toggle_assist,          "assist",           A_CANT, 0);
	eclass_addmethod(c, (method) toggle_paint,           "paint",            A_CANT, 0);
	eclass_addmethod(c, (method) toggle_notify,          "notify",           A_CANT, 0);
    eclass_addmethod(c, (method) toggle_getdrawparams,   "getdrawparams",    A_CANT, 0);
    eclass_addmethod(c, (method) toggle_oksize,          "oksize",           A_CANT, 0);
    eclass_addmethod(c, (method) toggle_float,           "float",            A_FLOAT,0);
    eclass_addmethod(c, (method) toggle_set,             "set",              A_FLOAT,0);
    eclass_addmethod(c, (method) toggle_bang,            "bang",             A_CANT, 0);
    eclass_addmethod(c, (method) toggle_mousedown,       "mousedown",        A_CANT, 0);
    eclass_addmethod(c, (method) toggle_preset,          "preset",           A_CANT, 0);

    CLASS_ATTR_INVISIBLE            (c, "fontname", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontweight", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontslant", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontsize", 1);
	CLASS_ATTR_DEFAULT              (c, "size", 0, "15. 15.");
    
	CLASS_ATTR_RGBA                 (c, "bgcolor", 0, t_toggle, f_color_background);
	CLASS_ATTR_LABEL                (c, "bgcolor", 0, "Background Color");
	CLASS_ATTR_ORDER                (c, "bgcolor", 0, "1");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bgcolor", 0, "0.75 0.75 0.75 1.");
    CLASS_ATTR_STYLE                (c, "bgcolor", 0, "color");
    
	CLASS_ATTR_RGBA                 (c, "bdcolor", 0, t_toggle, f_color_border);
	CLASS_ATTR_LABEL                (c, "bdcolor", 0, "Border Color");
	CLASS_ATTR_ORDER                (c, "bdcolor", 0, "2");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bdcolor", 0, "0.5 0.5 0.5 1.");
    CLASS_ATTR_STYLE                (c, "bdcolor", 0, "color");
    
	CLASS_ATTR_RGBA                 (c, "crcolor", 0, t_toggle, f_color_cross);
	CLASS_ATTR_LABEL                (c, "crcolor", 0, "Cross Color");
	CLASS_ATTR_ORDER                (c, "crcolor", 0, "3");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "crcolor", 0, "0.5 0.5 0.5 1.");
    CLASS_ATTR_STYLE                (c, "crcolor", 0, "color");

    eclass_register(CLASS_BOX, c);
    cicm_post();
	toggle_class = c;
}
Example #21
0
extern "C" void setup_c0x2edsp_tilde(void)
{
    t_eclass *c;
    
    c = eclass_new("c.dsp~", (method)dsp_tilde_new, (method)dsp_tilde_free, (short)sizeof(t_dsp_tilde), CLASS_NOINLET, A_GIMME, 0);
    
    eclass_init(c, 0);
    cream_initclass(c);
    
    eclass_addmethod(c, (method) dsp_tilde_assist,          "assist",           A_NULL, 0);
    eclass_addmethod(c, (method) dsp_tilde_paint,           "paint",            A_NULL, 0);
    eclass_addmethod(c, (method) dsp_tilde_getdrawparams,   "getdrawparams",    A_NULL, 0);
    eclass_addmethod(c, (method) dsp_tilde_oksize,          "oksize",           A_NULL, 0);
    eclass_addmethod(c, (method) dsp_tilde_mousedown,       "mousedown",        A_NULL, 0);
    eclass_addmethod(c, (method) dsp_tilde_anything,        "anything",         A_GIMME, 0);
    eclass_addmethod(c, (method) dsp_tilde_open,            "settings",         A_NULL, 0);
    eclass_addmethod(c, (method) dsp_tilde_start,           "start",            A_NULL, 0);
    eclass_addmethod(c, (method) dsp_tilde_stop,            "stop",             A_NULL, 0);
    
    CLASS_ATTR_INVISIBLE            (c, "fontname", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontweight", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontslant", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontsize", 1);
    CLASS_ATTR_DEFAULT              (c, "size", 0, "30 30");
    
    CLASS_ATTR_RGBA                 (c, "bgcolor", 0, t_dsp_tilde, f_color_background);
    CLASS_ATTR_LABEL                (c, "bgcolor", 0, "Background Color");
    CLASS_ATTR_ORDER                (c, "bgcolor", 0, "1");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bgcolor", 0, "0.75 0.75 0.75 1.");
    CLASS_ATTR_STYLE                (c, "bgcolor", 0, "color");
    
    CLASS_ATTR_RGBA                 (c, "bdcolor", 0, t_dsp_tilde, f_color_border);
    CLASS_ATTR_LABEL                (c, "bdcolor", 0, "Border Color");
    CLASS_ATTR_ORDER                (c, "bdcolor", 0, "2");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bdcolor", 0, "0.5 0.5 0.5 1.");
    CLASS_ATTR_STYLE                (c, "bdcolor", 0, "color");
    
    CLASS_ATTR_RGBA                 (c, "logocolor", 0, t_dsp_tilde, f_color_logo);
    CLASS_ATTR_LABEL                (c, "logocolor", 0, "Logo Color");
    CLASS_ATTR_ORDER                (c, "logocolor", 0, "3");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "logocolor", 0, "0. 0.6 0. 0.8");
    CLASS_ATTR_STYLE                (c, "logocolor", 0, "color");
    
    eclass_register(CLASS_BOX, c);
    dsp_tildeclass = c;
}
Example #22
0
extern "C" void setup_hoa0x2e2d0x2eoptim_tilde(void)
{
    t_eclass* c;
    
    c = eclass_new("hoa.2d.optim~", (method)hoa_optim_new, (method)hoa_optim_free, (short)sizeof(t_hoa_optim), 0L, A_GIMME, 0);
    class_addcreator((t_newmethod)hoa_optim_new, gensym("hoa.optim~"), A_GIMME, 0);
    
	eclass_dspinit(c);
    hoa_initclass(c, (method)hoa_getinfos);
	eclass_addmethod(c, (method)hoa_optim_dsp,      "dsp",      A_CANT, 0);
    eclass_addmethod(c, (method)hoa_optim_basic,    "basic",	A_NULL, 0);
    eclass_addmethod(c, (method)hoa_optim_maxre,    "maxRe",	A_NULL, 0);
    eclass_addmethod(c, (method)hoa_optim_inphase,  "inPhase",	A_NULL, 0);
    eclass_addmethod(c, (method)hoa_optim_deprecated,"mode",    A_GIMME, 0);
    
    eclass_register(CLASS_OBJ, c);
    hoa_optim_class = c;
}
Example #23
0
extern "C"  void setup_c0x2efreeverb_tilde(void)
{
	t_eclass *c;
    
	c = eclass_new("c.freeverb~", (method)freeverb_new, (method)freeverb_free, (short)sizeof(t_freeverb), 0L, A_GIMME, 0);
    
    eclass_dspinit(c);

    
    eclass_addmethod(c, (method) freeverb_dsp,             "dsp",              A_NULL, 0);
	eclass_addmethod(c, (method) freeverb_assist,          "assist",           A_NULL, 0);
    
    eclass_addmethod(c, (method) freeverb_roomsize,        "roomsize",         A_FLOAT, 0);
    eclass_addmethod(c, (method) freeverb_damp,            "damp",             A_FLOAT, 0);
    eclass_addmethod(c, (method) freeverb_freeze,          "freeze",           A_FLOAT, 0);
    eclass_register(CLASS_OBJ, c);
    freeverb_class = c;
}
Example #24
0
extern "C" OSSIA_PD_EXPORT void ossia_setup(void)
{
  t_eclass* c = eclass_new(
      "ossia", (method)ossia_new, (method)ossia_free, sizeof(t_ossia),
      CLASS_DEFAULT, A_GIMME, 0);

  setup_ossia0x2eassert();
  setup_ossia0x2eattribute();
  setup_ossia0x2eclient();
  setup_ossia0x2edevice();
  setup_ossia0x2eexplorer();
  setup_ossia0x2elogger();
  setup_ossia0x2emodel();
  setup_ossia0x2eparam();
  setup_ossia0x2eremote();
  setup_ossia0x2eview();

  class_addcreator((t_newmethod)ossia_new,gensym("ø"), A_GIMME, 0);

  node_base::class_setup(c);

  eclass_addmethod(c, (method) device::expose, "expose",    A_GIMME, 0);
  eclass_addmethod(c, (method) device::name,   "name",      A_GIMME, 0);
  eclass_addmethod(c, (method) device::stop_expose, "stop", A_FLOAT, 0);
  eclass_addmethod(c, (method) device::get_mess_cb, "get", A_SYMBOL, 0);
  eclass_addmethod(c, (method) enable_testing, "testing", A_FLOAT, 0);

  ossia_pd::ossia_class = c;

  auto& inst = ossia_pd::instance();
  inst.parameters.reserve(2048);
  inst.remotes.reserve(1024);
  inst.models.reserve(512);
  inst.attributes.reserve(512);
  inst.views.reserve(512);
  inst.devices.reserve(4);
  inst.clients.reserve(4);

  ossia_pd::browse_clock = clock_new(nullptr, (t_method) ossia_pd::discover_network_devices);
  clock_delay(ossia_pd::browse_clock, 100.);

  post("Welcome to ossia library");
  post("build SHA %s", ossia::get_commit_sha().c_str());
}
Example #25
0
extern "C" void setup_hoa0x2egrain_tilde(void)
{    
    t_eclass* c;
    
    c = eclass_new("hoa.grain~", (method)hoa_grain_new, (method)hoa_grain_free, (short)sizeof(t_hoa_grain), 0L, A_GIMME, 0);
    
	eclass_dspinit(c);
    
    eclass_addmethod(c, (method)hoa_grain_dsp,           "dsp",          A_CANT,  0);
    eclass_addmethod(c, (method)hoa_grain_size,          "size",         A_GIMME, 0);
    eclass_addmethod(c, (method)hoa_grain_delay,         "delay",        A_GIMME, 0);
    eclass_addmethod(c, (method)hoa_grain_feed,          "feedback",     A_GIMME, 0);
    eclass_addmethod(c, (method)hoa_grain_rare,          "rarefaction",  A_GIMME, 0);
    eclass_addmethod(c, (method)hoa_grain_buffer_set,    "set",        A_SYMBOL,0);
    
    eclass_register(CLASS_OBJ, c);
    hoa_post();
    hoa_grain_class = c;
}
Example #26
0
extern "C" void setup_hoa0x2efreeverb_tilde(void)
{
    t_eclass *c;
    c = eclass_new("hoa.freeverb~", (method)hoa_freeverb_new,(method)hoa_freeverb_free, sizeof(t_hoa_freeverb), 0L, A_GIMME, 0);
    
    eclass_dspinit(c);
    
    eclass_addmethod(c, (method)hoa_freeverb_dsp,     "dsp",		A_CANT, 0);
    eclass_addmethod(c, (method)hoa_freeverb_size,    "size",	A_GIMME, 0);
    eclass_addmethod(c, (method)hoa_freeverb_damp,    "damp",	A_GIMME, 0);
    eclass_addmethod(c, (method)hoa_freeverb_dry,     "dry",		A_GIMME, 0);
    eclass_addmethod(c, (method)hoa_freeverb_wet,     "wet",		A_GIMME, 0);
    eclass_addmethod(c, (method)hoa_freeverb_fspread, "fspread",	A_GIMME, 0);
    eclass_addmethod(c, (method)hoa_freeverb_lspread, "lspread",	A_GIMME, 0);
    eclass_addmethod(c, (method)hoa_freeverb_spread,  "spread",	A_GIMME, 0);
    eclass_addmethod(c, (method)hoa_freeverb_freeze,  "freeze",	A_GIMME, 0);
    
    eclass_register(CLASS_OBJ, c);
    hoa_post();
    hoa_freeverb_class = c;
}
Example #27
0
extern "C" void setup_i0x2dscore(void)
{
  setenv("LC_NUMERIC", "C", 1);

  t_eclass* c = eclass_new(
      "score", (method)score_new, (method)score_free, sizeof(t_score),
      CLASS_DEFAULT, A_GIMME, 0);

  // it is checked in eobj_new but never initialized.
  c->c_class.c_patchable = true;

  if (c)
  {
    eclass_addmethod(c, (method)score_bang, "bang", A_NULL, 0);
    eclass_addmethod(c, (method)score_float, "float", A_FLOAT, 0);
    eclass_addmethod(c, (method)score_load, "load", A_SYMBOL, 0);
    eclass_addmethod(c, (method)score_find_device, "device", A_NULL, 0);
  }

  score_class = c;
}
Example #28
0
extern "C" void setup_hoa0x2e3d0x2emap_tilde(void)
{
    t_eclass* c;
    
    c = eclass_new("hoa.3d.map~", (method)hoa_map_3D_tilde_new, (method)hoa_map_3D_tilde_free, (short)sizeof(t_hoa_map_3D_tilde), CLASS_NOINLET, A_GIMME, 0);
    
	eclass_dspinit(c);
    hoa_initclass(c, (method)hoa_getinfos);
	eclass_addmethod(c, (method)hoa_map_3D_tilde_dsp,          "dsp",      A_CANT, 0);
    eclass_addmethod(c, (method)hoa_map_3D_tilde_list,         "list",     A_GIMME, 0);
    eclass_addmethod(c, (method)hoa_map_3D_tilde_float,        "float",    A_FLOAT, 0);
    
    CLASS_ATTR_DOUBLE           (c, "ramp", 0, t_hoa_map_3D_tilde, f_ramp);
	CLASS_ATTR_CATEGORY			(c, "ramp", 0, "Behavior");
	CLASS_ATTR_LABEL			(c, "ramp", 0, "Ramp Time (ms)");
	CLASS_ATTR_ORDER			(c, "ramp", 0, "2");
	CLASS_ATTR_ACCESSORS		(c, "ramp", NULL, ramp_set);
	CLASS_ATTR_SAVE				(c, "ramp", 1);
    
    eclass_register(CLASS_OBJ, c);
    hoa_map_3D_tilde_class = c;
}
extern "C" void setup_hoa0x2e2d0x2emeter_tilde(void)
{
	t_eclass *c;
    
	c = eclass_new("hoa.2d.meter~", (method)hoa_meter_new, (method)hoa_meter_free, (short)sizeof(t_hoa_meter), 0L, A_GIMME, 0);
    class_addcreator((t_newmethod)hoa_meter_new, gensym("hoa.meter~"), A_GIMME, 0);
    
	eclass_dspinit(c);
	eclass_init(c, 0);
	hoa_initclass(c, (method)hoa_getinfos);
	eclass_addmethod(c, (method) hoa_meter_dsp,             "dsp",           A_CANT, 0);
	eclass_addmethod(c, (method) hoa_meter_assist,          "assist",		 A_CANT, 0);
	eclass_addmethod(c, (method) hoa_meter_paint,           "paint",		 A_CANT, 0);
	eclass_addmethod(c, (method) hoa_meter_notify,          "notify",        A_CANT, 0);
    eclass_addmethod(c, (method) hoa_meter_getdrawparams,   "getdrawparams", A_CANT, 0);
    eclass_addmethod(c, (method) hoa_meter_oksize,          "oksize",        A_CANT, 0);
    
    eclass_addmethod(c, (method)hoa_meter_deprecated,   "loudspeakers",	A_GIMME, 0);
    eclass_addmethod(c, (method)hoa_meter_deprecated,   "bordercolor",	A_GIMME, 0);
    eclass_addmethod(c, (method)hoa_meter_deprecated,   "mbgcolor",     A_GIMME, 0);
    
	CLASS_ATTR_INVISIBLE            (c, "fontname", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontweight", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontslant", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontsize", 1);
    CLASS_ATTR_INVISIBLE            (c, "send", 1);
	CLASS_ATTR_DEFAULT              (c, "size", 0, "225. 225.");
	
    CLASS_ATTR_LONG                 (c, "channels", 0 , t_hoa_meter, f_attrs);
    CLASS_ATTR_ACCESSORS            (c, "channels", channels_get, channels_set);
	CLASS_ATTR_ORDER                (c, "channels", 0, "1");
	CLASS_ATTR_LABEL                (c, "channels", 0, "Number of Channels");
	CLASS_ATTR_SAVE                 (c, "channels", 1);
    CLASS_ATTR_DEFAULT              (c, "channels", 0, "8");
    CLASS_ATTR_STYLE                (c, "channels", 1, "number");
    
    CLASS_ATTR_FLOAT_VARSIZE        (c, "angles", 0, t_hoa_meter, f_attrs, f_attrs, MAX_SPEAKER);
	CLASS_ATTR_ACCESSORS            (c, "angles", angles_get, angles_set);
	CLASS_ATTR_ORDER                (c, "angles", 0, "2");
	CLASS_ATTR_LABEL                (c, "angles", 0, "Angles of Channels");
	CLASS_ATTR_SAVE                 (c, "angles", 1);
    CLASS_ATTR_DEFAULT              (c, "angles", 0, "0 45 90 135 180 225 270 315");
    
    CLASS_ATTR_FLOAT                (c, "offset", 0, t_hoa_meter, f_attrs);
    CLASS_ATTR_ACCESSORS            (c, "offset", offset_get, offset_set);
	CLASS_ATTR_ORDER                (c, "offset", 0, "3");
	CLASS_ATTR_LABEL                (c, "offset", 0, "Offset of Channels");
	CLASS_ATTR_DEFAULT              (c, "offset", 0, "0");
	CLASS_ATTR_SAVE                 (c, "offset", 1);
    CLASS_ATTR_STYLE                (c, "offset", 1, "number");
    
    CLASS_ATTR_SYMBOL               (c, "rotation", 0, t_hoa_meter, f_clockwise);
    CLASS_ATTR_ACCESSORS            (c, "rotation", NULL, rotation_set);
    CLASS_ATTR_ORDER                (c, "rotation", 0, "4");
	CLASS_ATTR_LABEL                (c, "rotation", 0, "Rotation of Channels");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "rotation", 0, "0");
    CLASS_ATTR_STYLE                (c, "rotation", 1, "menu");
    CLASS_ATTR_ITEMS                (c, "rotation", 1, "anti-clockwise clockwise");
    
	CLASS_ATTR_SYMBOL               (c, "vectors", 0, t_hoa_meter, f_vector_type);
    CLASS_ATTR_ACCESSORS            (c, "vectors", NULL, vectors_set);
	CLASS_ATTR_ORDER                (c, "vectors", 0, "2");
    CLASS_ATTR_LABEL                (c, "vectors", 0, "Vectors");
	CLASS_ATTR_DEFAULT              (c, "vectors", 0, "Energy");
	CLASS_ATTR_SAVE                 (c, "vectors", 1);
    CLASS_ATTR_STYLE                (c, "vectors", 1, "menu");
    CLASS_ATTR_ITEMS                (c, "vectors", 1, "none energy velocity both");
    
    CLASS_ATTR_LONG                 (c, "interval", 0, t_hoa_meter, f_interval);
	CLASS_ATTR_ORDER                (c, "interval", 0, "5");
	CLASS_ATTR_LABEL                (c, "interval", 0, "Refresh Interval (in ms)");
	CLASS_ATTR_FILTER_MIN           (c, "interval", 20);
	CLASS_ATTR_DEFAULT              (c, "interval", 0, "50");
	CLASS_ATTR_SAVE                 (c, "interval", 1);
	CLASS_ATTR_STYLE                (c, "interval", 1, "number");
    
    CLASS_ATTR_RGBA					(c, "bgcolor", 0, t_hoa_meter, f_color_bg);
	CLASS_ATTR_CATEGORY				(c, "bgcolor", 0, "Color");
	CLASS_ATTR_STYLE				(c, "bgcolor", 0, "rgba");
	CLASS_ATTR_LABEL				(c, "bgcolor", 0, "Background Color");
	CLASS_ATTR_DEFAULT_SAVE_PAINT	(c, "bgcolor", 0, "0.76 0.76 0.76 1.");
	CLASS_ATTR_STYLE                (c, "bgcolor", 1, "color");
    
    CLASS_ATTR_RGBA					(c, "bdcolor", 0, t_hoa_meter, f_color_bd);
	CLASS_ATTR_CATEGORY				(c, "bdcolor", 0, "Color");
	CLASS_ATTR_STYLE                (c, "bdcolor", 0, "rgba");
    CLASS_ATTR_LABEL				(c, "bdcolor", 0, "Border Color");
	CLASS_ATTR_DEFAULT_SAVE_PAINT	(c, "bdcolor", 0, "0.7 0.7 0.7 1.");
	CLASS_ATTR_STYLE                (c, "bdcolor", 1, "color");
    
	CLASS_ATTR_RGBA                 (c, "coldcolor", 0, t_hoa_meter, f_color_cold_signal);
	CLASS_ATTR_LABEL                (c, "coldcolor", 0, "Cold Signal Color");
	CLASS_ATTR_ORDER                (c, "coldcolor", 0, "4");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "coldcolor", 0, "0. 0.6 0. 0.8");
	CLASS_ATTR_STYLE                (c, "coldcolor", 1, "color");
    
	CLASS_ATTR_RGBA                 (c, "tepidcolor", 0, t_hoa_meter, f_color_tepid_signal);
	CLASS_ATTR_LABEL                (c, "tepidcolor", 0, "Tepid Signal Color");
	CLASS_ATTR_ORDER                (c, "tepidcolor", 0, "5");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "tepidcolor", 0, "0.6 0.73 0. 0.8");
	CLASS_ATTR_STYLE                (c, "tepidcolor", 1, "color");
    
	CLASS_ATTR_RGBA                 (c, "warmcolor", 0, t_hoa_meter, f_color_warm_signal);
	CLASS_ATTR_LABEL                (c, "warmcolor", 0, "Warm Signal Color");
	CLASS_ATTR_ORDER                (c, "warmcolor", 0, "6");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "warmcolor", 0, ".85 .85 0. 0.8");
	CLASS_ATTR_STYLE                (c, "warmcolor", 1, "color");
    
	CLASS_ATTR_RGBA                 (c, "hotcolor", 0, t_hoa_meter, f_color_hot_signal);
	CLASS_ATTR_LABEL                (c, "hotcolor", 0, "Hot Signal Color");
	CLASS_ATTR_ORDER                (c, "hotcolor", 0, "7");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "hotcolor", 0, "1. 0.6 0. 0.8");
	CLASS_ATTR_STYLE                (c, "hotcolor", 1, "color");
    
	CLASS_ATTR_RGBA                 (c, "overcolor", 0, t_hoa_meter, f_color_over_signal);
	CLASS_ATTR_LABEL                (c, "overcolor", 0, "Overload Signal Color");
	CLASS_ATTR_ORDER                (c, "overcolor", 0, "8");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "overcolor", 0, "1. 0. 0. 0.8");
	CLASS_ATTR_STYLE                (c, "overcolor", 1, "color");
    
	CLASS_ATTR_RGBA                 (c, "energycolor", 0, t_hoa_meter, f_color_energy_vector);
	CLASS_ATTR_LABEL                (c, "energycolor", 0, "Energy Vector Color");
	CLASS_ATTR_ORDER                (c, "energycolor", 0, "9");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "energycolor", 0, "0. 0. 1. 0.8");
    CLASS_ATTR_STYLE                (c, "energycolor", 1, "color");
    
    CLASS_ATTR_RGBA                 (c, "velocitycolor", 0, t_hoa_meter, f_color_velocity_vector);
	CLASS_ATTR_LABEL                (c, "velocitycolor", 0, "Velocity Vector Color");
	CLASS_ATTR_ORDER                (c, "velocitycolor", 0, "9");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "velocitycolor", 0, "1. 0. 0. 0.8");
    CLASS_ATTR_STYLE                (c, "velocitycolor", 1, "color");
	
    eclass_register(CLASS_BOX, c);
	hoa_meter_class = c;
}
Example #30
0
extern "C" void setup_c0x2eknob(void)
{
    t_eclass *c = eclass_new("c.knob", (method)knob_new, (method)ebox_free, (short)sizeof(t_knob), 0L, A_GIMME, 0);
    
    if(c)
    {
        eclass_guiinit(c, 0);
        
        eclass_addmethod(c, (method) knob_paint,            "paint",            A_NULL, 0);
        eclass_addmethod(c, (method) knob_notify,           "notify",           A_NULL, 0);
        eclass_addmethod(c, (method) knob_getdrawparams,    "getdrawparams",    A_NULL, 0);
        eclass_addmethod(c, (method) knob_oksize,           "oksize",           A_NULL, 0);
        eclass_addmethod(c, (method) knob_set,              "set",              A_FLOAT,0);
        eclass_addmethod(c, (method) knob_float,            "float",            A_FLOAT,0);
        eclass_addmethod(c, (method) knob_bang,             "bang",             A_NULL, 0);
        
        eclass_addmethod(c, (method) knob_mousedown,        "mousedown",        A_NULL, 0);
        eclass_addmethod(c, (method) knob_mousedrag,        "mousedrag",        A_NULL, 0);
        eclass_addmethod(c, (method) knob_mouseup,          "mouseup",          A_NULL, 0);
        
        CLASS_ATTR_DEFAULT              (c, "size", 0, "50. 50.");
        
        CLASS_ATTR_CHAR                 (c, "endless", 0, t_knob, f_endless);
        CLASS_ATTR_LABEL                (c, "endless", 0, "Endless Mode");
        CLASS_ATTR_ORDER                (c, "endless", 0, "1");
        CLASS_ATTR_FILTER_CLIP          (c, "endless", 0, 1);
        CLASS_ATTR_DEFAULT              (c, "endless", 0, "0");
        CLASS_ATTR_SAVE                 (c, "endless", 0);
        CLASS_ATTR_STYLE                (c, "endless", 0, "onoff");
        CLASS_ATTR_PAINT                (c, "endless", 0);
        
        CLASS_ATTR_FLOAT_ARRAY          (c, "minmax", 0, t_knob, f_dummy, 2);
        CLASS_ATTR_ORDER                (c, "minmax", 0, "3");
        CLASS_ATTR_LABEL                (c, "minmax", 0, "Min/Max Values");
        CLASS_ATTR_DEFAULT              (c, "minmax", 0, "0 1");
        CLASS_ATTR_ACCESSORS            (c, "minmax", knob_minmax_get, knob_minmax_set);
        CLASS_ATTR_SAVE                 (c, "minmax", 1);
        
        CLASS_ATTR_INT                  (c, "bdsize", 0, t_knob, f_bdsize);
        CLASS_ATTR_LABEL                (c, "bdsize", 0, "Border Size");
        CLASS_ATTR_ORDER                (c, "bdsize", 0, "1");
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bdsize", 0, "2");
        CLASS_ATTR_FILTER_CLIP          (c, "bdsize", 0, 4);
        CLASS_ATTR_STYLE                (c, "bdsize", 0, "number");
        
        CLASS_ATTR_RGBA                 (c, "bgcolor", 0, t_knob, f_color_background);
        CLASS_ATTR_LABEL                (c, "bgcolor", 0, "Background Color");
        CLASS_ATTR_ORDER                (c, "bgcolor", 0, "1");
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bgcolor", 0, "0.75 0.75 0.75 1.");
        CLASS_ATTR_STYLE                (c, "bgcolor", 0, "color");
        
        CLASS_ATTR_RGBA                 (c, "bdcolor", 0, t_knob, f_color_border);
        CLASS_ATTR_LABEL                (c, "bdcolor", 0, "Border Color");
        CLASS_ATTR_ORDER                (c, "bdcolor", 0, "2");
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bdcolor", 0, "0.5 0.5 0.5 1.");
        CLASS_ATTR_STYLE                (c, "bdcolor", 0, "color");
        
        CLASS_ATTR_RGBA                 (c, "necolor", 0, t_knob, f_color_needle);
        CLASS_ATTR_LABEL                (c, "necolor", 0, "Needle Color");
        CLASS_ATTR_ORDER                (c, "necolor", 0, "3");
        CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "necolor", 0, "0.5 0.5 0.5 1.");
        CLASS_ATTR_STYLE                (c, "necolor", 0, "color");
        
        eclass_register(CLASS_BOX, c);
        knob_class = c;
    }
}