static void*autoabstraction_new(t_symbol *s, int argc, t_atom *argv) { t_autoabstraction*x = (t_autoabstraction*)pd_new(autoabstraction_class); if(argc&&A_SYMBOL==argv->a_type) { s_templatefilename=atom_getsymbol(argv)->s_name; } #ifdef AUTOABSTRACTION_ENABLED autoabstraction_initialize(); #endif /* AUTOABSTRACTION_ENABLED */ return (x); }
void autoabstraction_setup(void) { /* relies on t.grill's loader functionality, fully added in 0.40 */ iemguts_boilerplate("automatic abstraction creator", 0); #ifdef AUTOABSTRACTION_ENABLED autoabstraction_initialize(); sys_register_loader(autoabstraction_loader); #else error("autoabstraction needs to be compiled against Pd 0.40 or higher,\n"); error("\tor a version that has sys_register_loader()"); #endif autoabstraction_class = class_new(gensym("autoabstraction"), (t_newmethod)autoabstraction_new, 0, sizeof(t_autoabstraction), 0, A_GIMME, 0); class_addfloat(autoabstraction_class, (t_method)autoabstraction_state); }
void autoabstraction_setup(void) { /* relies on t.grill's loader functionality, fully added in 0.40 */ post("automatic abstraction creator %s",version); post("\twritten by IOhannes m zmoelnig, IEM <*****@*****.**>"); post("\tcompiled on "__DATE__" at "__TIME__ " "); post("\tcompiled against Pd version %d.%d.%d.%s", PD_MAJOR_VERSION, PD_MINOR_VERSION, PD_BUGFIX_VERSION, PD_TEST_VERSION); #ifdef AUTOABSTRACTION_ENABLED autoabstraction_initialize(); sys_register_loader(autoabstraction_loader); #else error("to function, this needs to be compiled against Pd 0.40 or higher,\n"); error("\tor a version that has sys_register_loader()"); #endif autoabstraction_class = class_new(gensym("autoabstraction"), (t_newmethod)autoabstraction_new, 0, sizeof(t_autoabstraction), 0, A_GIMME, 0); class_addfloat(autoabstraction_class, (t_method)autoabstraction_state); }