int main(void) { t_class *c = class_new("polywave~", (method)polywave_new, (method)polywave_free, (long)sizeof(t_polywave), NULL, A_GIMME, 0); class_addmethod(c, (method)polywave_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)polywave_assist, "assist", A_CANT, 0); CLASS_ATTR_SYM_VARSIZE(c, "buffer", 0, t_polywave, buf_name, numbufs, POLYWAVE_MAX_BUFFERS); CLASS_ATTR_ACCESSORS(c, "buffer", polywave_buf_get, polywave_buf_set); CLASS_ATTR_LABEL(c, "buffer", 0, "buffer list"); CLASS_ATTR_INT32(c, "interpolation", 0, t_polywave, interp_type); CLASS_ATTR_ACCESSORS(c, "interpolation", polywave_interp_get, polywave_interp_set); CLASS_ATTR_ENUMINDEX3(c, "interpolation", 0, "none", "linear", "cubic"); CLASS_ATTR_INT32(c, "dimensions", ATTR_SET_OPAQUE_USER, t_polywave, dims); // CLASS_ATTR_ENUMINDEX3(c, "dimensions", ATTR_SET_OPAQUE_USER, "0D", "1D", "2D"); t_class *bufpxy = class_new("bufferproxy", NULL, NULL, sizeof(t_buffer_proxy), 0L, 0); class_addmethod(bufpxy, (method)buffer_proxy_notify, "notify", A_CANT, 0); class_register(CLASS_NOBOX, bufpxy); buffer_proxy_class = bufpxy; class_dspinit(c); class_register(CLASS_BOX, c); polywave_class = c; ps_buffer_modified = gensym("buffer_modified"); post("%s by %s.", NAME, AUTHORS); post("Copyright (c) " COPYRIGHT_YEARS " Regents of the University of California. All rights reserved."); return 0; }
void testrunner_classinit(void) { t_class *c = class_new("test.runner", (method)testrunner_new, (method)testrunner_free, sizeof(t_testrunner), (method)NULL, A_GIMME, 0L); class_addmethod(c, (method)testrunner_integration, "integration", 0); // integration tests class_addmethod(c, (method)testrunner_notify, "notify", A_CANT, 0); // notifications from integration tests CLASS_ATTR_SYM_VARSIZE(c, "tests", 0, t_testrunner, r_testnames, r_numtestnames, 256); class_register(_sym_nobox, c); s_testrunner_class = c; ps_test_terminate = gensym("test.terminate"); }
extern "C" int TTCLASSWRAPPERMAX_EXPORT main(void) { t_class *c; c = class_new("tap.fft.binmodulator~",(method)binmod_new, (method)binmod_free, sizeof(t_binmod), (method)0L, A_GIMME, 0); common_symbols_init(); // Initialize TapTools class_addmethod(c, (method)binmod_dsp, "dsp", A_CANT, 0L); class_addmethod(c, (method)binmod_assist, "assist", A_CANT, 0L); class_addmethod(c, (method)binmod_resync, "phase_resync", 0L); class_addmethod(c, (method)binmod_zero_frequency, "zero_frequency", 0L); class_addmethod(c, (method)binmod_zero_phase, "zero_phase", 0L); class_addmethod(c, (method)binmod_zero_depth, "zero_depth", 0L); class_addmethod(c, (method)binmod_zero_shape, "zero_shape", 0L); class_addmethod(c, (method)binmod_get_frequency_n, "getfrequencyn", A_LONG, 0L); class_addmethod(c, (method)binmod_get_phase_n, "getphasen", A_LONG, 0L); class_addmethod(c, (method)binmod_get_depth_n, "getdepthn", A_LONG, 0L); class_addmethod(c, (method)binmod_get_shape_n, "getshapen", A_LONG, 0L); class_addmethod(c, (method)stdinletinfo, "inletinfo", A_CANT, 0); CLASS_ATTR_FLOAT(c, "bypass", 0, t_binmod, attr_bypass); CLASS_ATTR_STYLE(c, "bypass", 0, "onoff"); CLASS_ATTR_FLOAT_VARSIZE(c, "frequency", 0, t_binmod, attr_freq, attr_freq_len, MAX_NUM_LFOS); CLASS_ATTR_ACCESSORS(c, "frequency", NULL, binmod_freq_set); CLASS_ATTR_FLOAT_VARSIZE(c, "depth", 0, t_binmod, attr_depth, attr_depth_len, MAX_NUM_LFOS); CLASS_ATTR_ACCESSORS(c, "depth", NULL, binmod_depth_set); CLASS_ATTR_FLOAT_VARSIZE(c, "phase", 0, t_binmod, attr_phase, attr_phase_len, MAX_NUM_LFOS); CLASS_ATTR_ACCESSORS(c, "phase", NULL, binmod_phase_set); CLASS_ATTR_SYM_VARSIZE(c, "shape", 0, t_binmod, attr_shape, attr_shape_len, MAX_NUM_LFOS); CLASS_ATTR_ACCESSORS(c, "shape", NULL, binmod_shape_set); class_dspinit(c); // Setup object's class to work with MSP class_register(_sym_box, c); binmod_class = c; // init globals ps_sine = gensym("sine"); ps_ramp = gensym("ramp"); ps_sawtooth = gensym("sawtooth"); ps_square = gensym("square"); ps_triangle = gensym("triangle"); }