int TTCLASSWRAPPERMAX_EXPORT main(void) { t_class *c; TTDSPInit(); common_symbols_init(); c = class_new("jcom.op~",(method)op_new, (method)op_free, sizeof(t_op), (method)0L, A_GIMME, 0); class_addmethod(c, (method)op_dsp, "dsp", A_CANT, 0); class_addmethod(c, (method)op_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)op_assist, "assist", A_CANT, 0); class_addmethod(c, (method)object_obex_dumpout, "dumpout", A_CANT, 0); CLASS_ATTR_SYM(c, "operator", 0, t_op, attrOperator); CLASS_ATTR_ACCESSORS(c, "operator", NULL, op_setOperator); CLASS_ATTR_ENUM(c, "operator", 0, "+ - * / % > >= == != <= < abs acos asin atan ceil cos cosh exp floor log log10 sin sinh sqrt tan tanh"); CLASS_ATTR_FLOAT(c, "operand", 0, t_op, attrOperand); CLASS_ATTR_ACCESSORS(c, "operand", NULL, op_setOperand); class_dspinit(c); // Setup object's class to work with MSP class_register(CLASS_BOX, c); s_op_class = c; return 0; }
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; }
int C74_EXPORT main(void) { t_class* c; TTFoundationInit(); common_symbols_init(); // Define our class c = class_new("j.unit",(method)dataspace_new, (method)dataspace_free, sizeof(t_dataspace), (method)0L, A_GIMME, 0); // Make methods accessible for our class: class_addmethod(c, (method)dataspace_int, "int", A_LONG, 0); class_addmethod(c, (method)dataspace_float, "float", A_FLOAT, 0); class_addmethod(c, (method)dataspace_list, "list", A_GIMME, 0); class_addmethod(c, (method)dataspace_getDataspaces, "dataspaces.get", 0); class_addmethod(c, (method)dataspace_getUnits, "units.get", A_GIMME, 0); class_addmethod(c, (method)dataspace_assist, "assist", A_CANT, 0); class_addmethod(c, (method)object_obex_dumpout, "dumpout", A_CANT, 0); class_addmethod(c, (method)jamoma_fileusage, "fileusage", A_CANT, 0); class_addattr(c, attr_offset_new("dataspace", _sym_symbol, 0, (method)0, (method)dataspace_setDataspace, calcoffset(t_dataspace, attr_dataspace))); CLASS_ATTR_SYM(c, "input", 0, t_dataspace, attr_dataspace_active); CLASS_ATTR_ACCESSORS(c, "input", NULL, dataspace_setDataspaceActive); CLASS_ATTR_SYM(c, "output", 0, t_dataspace, attr_dataspace_native); CLASS_ATTR_ACCESSORS(c, "output", NULL, dataspace_setDataspaceNative); // Finalize our class class_register(CLASS_BOX, c); dataspace_class = c; return 0; }
void ext_main(void *r) #endif { t_class* c; c = class_new("hoa.in", (method)hoa_in_new, (method)hoa_in_free, sizeof(t_hoa_in), NULL, A_GIMME, 0); class_setname((char *)"hoa.in", (char *)"hoa.in"); hoa_initclass(c, (method)NULL); class_addmethod(c, (method)hoa_in_assist, "assist", A_CANT, 0); class_addmethod(c, (method)hoa_in_bang, "bang", A_CANT, 0); class_addmethod(c, (method)hoa_in_int, "int", A_CANT, 0); class_addmethod(c, (method)hoa_in_float, "float", A_CANT, 0); class_addmethod(c, (method)hoa_in_list, "list", A_CANT, 0); class_addmethod(c, (method)hoa_in_anything, "anything", A_CANT, 0); CLASS_ATTR_LONG (c, "extra", 0, t_hoa_in, extra); CLASS_ATTR_ACCESSORS(c, "extra", 0, hoa_in_setattr_extra); CLASS_ATTR_LABEL (c, "extra", 0, "extra index"); CLASS_ATTR_INVISIBLE(c, "extra", 1); CLASS_ATTR_SAVE (c, "extra", 0); // @description Defines an extra inlet. Extra inlet are added to the "normal" instance inlet and can be used to send messages to all instances. CLASS_ATTR_SYM (c, "comment", 0, t_hoa_in, comment); CLASS_ATTR_ACCESSORS(c, "comment", 0, hoa_in_setattr_comment); CLASS_ATTR_LABEL (c, "comment", 0, "Description"); CLASS_ATTR_SAVE (c, "comment", 1); // @description Sets a description to the inlet which will be shown in the assist inlet of the <o>hoa.process~</o> that load this <o>hoa.in</o>. // Only works if the <m>extra</m> parameter is greater than 0. class_register(CLASS_BOX, c); hoa_in_class = c; }
int main(void) { t_class *c; c = class_new("hoa.connect", (method)connect_new, (method)connect_free, (short)sizeof(t_connect), 0L, A_GIMME, 0); class_addmethod(c, (method)connect_notify, "notify", A_CANT, 0); class_addmethod(c, (method)connect_bang, "bang", A_CANT, 0); // defaults don't work with non-UI objects (an optimization) CLASS_ATTR_CATEGORY(c, "poscolor", 0, "Behavior"); CLASS_ATTR_RGBA(c, "poscolor", 0, t_connect, f_colorPositiv); CLASS_ATTR_ACCESSORS(c, "poscolor", NULL, connect_setattr_poscolor); CLASS_ATTR_SAVE(c, "poscolor", 1); CLASS_ATTR_CATEGORY(c, "negcolor", 0, "Behavior"); CLASS_ATTR_RGBA(c, "negcolor", 0, t_connect, f_colorNegativ); CLASS_ATTR_ACCESSORS(c, "negcolor", NULL, connect_setattr_negcolor); CLASS_ATTR_SAVE(c, "poscolor", 1); CLASS_ATTR_CATEGORY(c, "planecolor", 0, "Behavior"); CLASS_ATTR_RGBA(c, "planecolor", 0, t_connect, f_colorPlane); CLASS_ATTR_ACCESSORS(c, "planecolor", NULL, connect_setattr_planecolor); CLASS_ATTR_SAVE(c, "poscolor", 1); class_register(CLASS_BOX, c); connect_class = c; class_findbyname(CLASS_NOBOX, gensym("hoa.encoder~")); }
int C74_EXPORT main(void) { t_class* c; c = class_new("hoa.in~", (method)hoa_sig_in_new, (method)hoa_sig_in_free, sizeof(t_hoa_sig_in), NULL, A_GIMME, 0); hoa_initclass(c, NULL); class_addmethod(c, (method)hoa_sig_in_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)hoa_sig_in_assist, "assist", A_CANT, 0); class_addmethod(c, (method)hoa_sig_in_int, "int", A_LONG, 0); CLASS_ATTR_LONG (c, "extra", 0, t_hoa_sig_in, extra); CLASS_ATTR_ACCESSORS(c, "extra", 0, hoa_sig_in_setattr_extra); CLASS_ATTR_LABEL (c, "extra", 0, "param index"); CLASS_ATTR_SYM (c, "comment", 0, t_hoa_sig_in, comment); CLASS_ATTR_ACCESSORS(c, "comment", 0, hoa_sig_in_setattr_comment); CLASS_ATTR_LABEL (c, "comment", 0, "Description"); CLASS_ATTR_SAVE (c, "comment", 1); class_dspinit(c); class_register(CLASS_BOX, c); hoa_sig_in_class = c; return 0; }
int TTCLASSWRAPPERMAX_EXPORT main(void) { t_class *c; TTDSPInit(); common_symbols_init(); c = class_new("jcom.gain~", (method)gain_new, (method)gain_free, sizeof(t_gain), (method)0L, A_GIMME, 0); // Make methods accessible for our class: class_addmethod(c, (method)gain_dsp, "dsp", A_CANT, 0L); class_addmethod(c, (method)gain_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)object_obex_dumpout, "dumpout", A_CANT,0); class_addmethod(c, (method)gain_assist, "assist", A_CANT, 0L); CLASS_ATTR_CHAR(c, "bypass", 0, t_gain, attrBypass); CLASS_ATTR_ACCESSORS(c, "bypass", NULL, attr_set_bypass); CLASS_ATTR_FLOAT(c, "mix", 0, t_gain, attrBypass); CLASS_ATTR_ACCESSORS(c, "mix", NULL, attr_set_mix); CLASS_ATTR_FLOAT(c, "gain", 0, t_gain, attrBypass); CLASS_ATTR_ACCESSORS(c, "gain", NULL, attr_set_gain); // Setup our class to work with MSP class_dspinit(c); // Finalize our class class_register(CLASS_BOX, c); s_gain_class = c; return 0; }
int TTCLASSWRAPPERMAX_EXPORT main(void) { ClassPtr c; TTAudioGraphInit(); common_symbols_init(); c = class_new("jcom.op≈", (method)OpNew, (method)OpFree, sizeof(Op), (method)0L, A_GIMME, 0); class_addmethod(c, (method)OpResetAudio, "audio.reset", A_CANT, 0); class_addmethod(c, (method)OpSetupAudio, "audio.setup", A_CANT, 0); class_addmethod(c, (method)OpConnectAudio, "audio.connect", A_OBJ, A_LONG, 0); class_addmethod(c, (method)OpDropAudio, "audio.drop", A_CANT, 0); class_addmethod(c, (method)MaxAudioGraphObject, "audio.object", A_CANT, 0); class_addmethod(c, (method)MaxAudioGraphReset, "graph.reset", A_CANT, 0); //class_addmethod(c, (method)OpSetup, "graph.setup", A_CANT, 0); // no setup -- no graph outlets class_addmethod(c, (method)MaxGraphConnect, "graph.connect", A_OBJ, A_LONG, 0); class_addmethod(c, (method)MaxGraphDrop, "graph.drop", A_CANT, 0); class_addmethod(c, (method)MaxGraphObject, "graph.object", A_CANT, 0); class_addmethod(c, (method)OpAssist, "assist", A_CANT, 0); class_addmethod(c, (method)object_obex_dumpout, "dumpout", A_CANT, 0); CLASS_ATTR_SYM(c, "operator", 0, Op, attrOperator); CLASS_ATTR_ACCESSORS(c, "operator", OpGetOperator, OpSetOperator); CLASS_ATTR_ENUM(c, "operator", 0, "+ - * / % > >= == != <= < abs acos asin atan ceil cos cosh exp floor log log10 sin sinh sqrt tan tanh"); CLASS_ATTR_FLOAT(c, "operand", 0, Op, attrOperand); CLASS_ATTR_ACCESSORS(c, "operand", OpGetOperand, OpSetOperand); class_register(_sym_box, c); sOpClass = c; return 0; }
int main(void) { t_class *c; long flags; common_symbols_init(); c = class_new("dbviewer", (method)dbviewer_new, (method)dbviewer_free, sizeof(t_dbviewer), (method)0L, A_GIMME, 0); c->c_flags |= CLASS_FLAG_NEWDICTIONARY; flags = JBOX_COLOR; jbox_initclass(c, flags); class_addmethod(c, (method)dbviewer_bang, "bang", 0); // refresh class_addmethod(c, (method)dbviewer_getcelltext, "getcelltext", A_CANT, 0); class_addmethod(c, (method)dbviewer_newpatcherview, "newpatcherview", A_CANT, 0); class_addmethod(c, (method)dbviewer_freepatcherview, "freepatcherview", A_CANT, 0); class_addmethod(c, (method)dbviewer_notify, "notify", A_CANT, 0); class_addmethod(c, (method)dbviewer_assist, "assist", A_CANT, 0); class_addmethod(c, (method)stdinletinfo, "inletinfo", A_CANT, 0); class_addmethod(c, (method)object_obex_dumpout, "dumpout", A_CANT, 0); CLASS_ATTR_SYM(c, "query", ATTR_SET_DEFER, t_dbviewer, d_query); CLASS_ATTR_ACCESSORS(c, "query", NULL, dbviewer_set_query); CLASS_ATTR_SAVE(c, "query", 0); CLASS_ATTR_SYM(c, "database", ATTR_SET_DEFER, t_dbviewer, d_database); CLASS_ATTR_ACCESSORS(c, "database", NULL, dbviewer_set_database); CLASS_ATTR_SAVE(c, "database", 0); class_register(_sym_box, c); s_dbviewer_class = c; ps_dbview_update = gensym("dbview_update"); ps_dbview_query_changed = gensym("dbview_query_changed"); return 0; }
int C74_EXPORT main(void) #endif { t_class* c; c = class_new("hoa.out~", (method) hoa_sig_out_new, (method)hoa_sig_out_free, sizeof(t_hoa_sig_out), NULL, A_GIMME, 0); class_setname((char *)"hoa.out~", (char *)"hoa.out~"); hoa_initclass(c, (method)NULL); // @method signal @digest output signal in the corresponding hoa.process~ object's signal outlet // @description output signal in the corresponding hoa.process~ object's signal outlet class_addmethod(c, (method)hoa_sig_out_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)hoa_sig_out_assist, "assist", A_CANT, 0); CLASS_ATTR_LONG (c, "extra", 0, t_hoa_sig_out, extra); CLASS_ATTR_ACCESSORS(c, "extra", 0, hoa_sig_in_setattr_extra); CLASS_ATTR_LABEL (c, "extra", 0, "extra index"); // @description Defines an extra outlet. Extra outlet are added to the "normal" instance outlet and can be used to receive signal from all instances. CLASS_ATTR_SYM (c, "comment", 0, t_hoa_sig_out, comment); CLASS_ATTR_ACCESSORS(c, "comment", 0, hoa_sig_in_setattr_comment); CLASS_ATTR_LABEL (c, "comment", 0, "Description"); CLASS_ATTR_SAVE (c, "comment", 1); // @description Sets a description to the outlet which will be shown in the assist outlet of the <o>hoa.process~</o> that load this <o>hoa.out~</o>. // Only works if the <m>extra</m> parameter is greater than 0. class_dspinit(c); class_register(CLASS_BOX, c); hoa_sig_out_class = c; return 0; }
int C74_EXPORT main(void) { t_class *c; c = class_new("hoa.2d.vector~", (method)hoa_vector_new, (method)hoa_vector_free, (long)sizeof(t_hoa_vector), 0L, A_GIMME, 0); class_alias(c, gensym("hoa.vector~")); hoa_initclass(c, (method)hoa_getinfos); class_addmethod(c, (method)hoa_vector_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)hoa_vector_assist, "assist", A_CANT, 0); CLASS_ATTR_LONG (c, "channels", 0, t_hoa_vector, f_attrs); CLASS_ATTR_CATEGORY (c, "channels", 0, "Planewaves"); CLASS_ATTR_LABEL (c, "channels", 0, "Number of Channels"); CLASS_ATTR_ACCESSORS (c, "channels", channels_get, channels_set); CLASS_ATTR_ORDER (c, "channels", 0, "1"); CLASS_ATTR_DEFAULT (c, "channels", 0, "4"); CLASS_ATTR_SAVE (c, "channels", 0); CLASS_ATTR_FLOAT_VARSIZE (c, "angles", 0, t_hoa_vector, f_attrs, f_attrs, MAX_CHANNELS); CLASS_ATTR_CATEGORY (c, "angles", 0, "Planewaves"); CLASS_ATTR_LABEL (c, "angles", 0, "Angles of Channels"); CLASS_ATTR_ACCESSORS (c, "angles", angles_get, angles_set); CLASS_ATTR_ORDER (c, "angles", 0, "2"); CLASS_ATTR_SAVE (c, "angles", 0); CLASS_ATTR_DEFAULT (c, "angles", 0, "0. 90. 180. 270."); class_dspinit(c); class_register(CLASS_BOX, c); hoa_vector_class = c; return 0; }
int C74_EXPORT main(void) { t_class* c; TTGraphInit(); common_symbols_init(); c = class_new("j.append-", (method)AppendNew, (method)AppendFree, sizeof(Append), (method)0L, A_GIMME, 0); class_addmethod(c, (method)MaxGraphReset, "graph.reset", A_CANT, 0); class_addmethod(c, (method)MaxGraphSetup, "graph.setup", A_CANT, 0); class_addmethod(c, (method)MaxGraphConnect, "graph.connect", A_OBJ, A_LONG, 0); class_addmethod(c, (method)MaxGraphDrop, "graph.drop", A_CANT, 0); class_addmethod(c, (method)MaxGraphObject, "graph.object", A_CANT, 0); class_addmethod(c, (method)AppendAssist, "assist", A_CANT, 0); class_addmethod(c, (method)object_obex_dumpout, "dumpout", A_CANT, 0); CLASS_ATTR_SYM(c, "key", 0, Append, attrKey); CLASS_ATTR_ACCESSORS(c, "key", NULL, AppendSetKey); CLASS_ATTR_FLOAT(c, "value", 0, Append, attrValue); CLASS_ATTR_ACCESSORS(c, "value", NULL, AppendSetValue); class_register(_sym_box, c); sAppendClass = c; return 0; }
extern "C" int C74_EXPORT main(void) { t_class *c; c = class_new("tap.shift~",(method)shift_new, (method)shift_free, sizeof(t_shift), (method)0L, A_GIMME, 0); common_symbols_init(); // Initialize TapTools // ADD ATTRIBUTES CLASS_ATTR_DOUBLE(c, "ratio", 0, t_shift, attr_ratio); CLASS_ATTR_ACCESSORS(c, "ratio", NULL, attr_set_ratio); CLASS_ATTR_DOUBLE(c, "window_size", 0, t_shift, attr_window_size); CLASS_ATTR_ACCESSORS(c, "window_size", NULL, attr_set_window_size); // ADD METHODS class_addmethod(c, (method)shift_float, "float", A_FLOAT, 0L); class_addmethod(c, (method)shift_int, "int", A_LONG, 0L); class_addmethod(c, (method)shift_clear, "clear", 0L); class_addmethod(c, (method)shift_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)shift_assist, "assist", A_CANT, 0L); class_addmethod(c, (method)stdinletinfo, "inletinfo", A_CANT, 0); // WRAP UP class_dspinit(c); // Setup object's class to work with MSP class_register(_sym_box, c); shift_class = c; }
void C74_EXPORT ext_main(void *r) { t_class *c; c = class_new("bezier",(method)bezier_new, (method)bezier_free, (short)sizeof(t_bezier), (method)0L, A_GIMME, 0); class_addmethod(c, (method)bezier_assist, "assist", A_CANT, 0L); class_addmethod(c, (method)bezier_bang, "bang", 0L); class_addmethod(c, (method)bezier_int, "int", A_LONG,0L); class_addmethod(c, (method)bezier_float, "float", A_FLOAT,0L); class_addmethod(c, (method)bezier_list, "list", A_GIMME,0L); CLASS_ATTR_LONG(c, "steps", 0, t_bezier, b_steps); CLASS_ATTR_SAVE(c, "steps", 0); CLASS_ATTR_ACCESSORS(c, "steps", 0L, (method)bezier_steps); CLASS_ATTR_ORDER(c, "steps", 0, "-0"); CLASS_ATTR_LONG(c, "mode", 0, t_bezier, b_mode); CLASS_ATTR_SAVE(c, "mode", 0); CLASS_ATTR_ACCESSORS(c, "mode", 0L, (method)bezier_mode); CLASS_ATTR_ORDER(c, "mode", 0, "-1"); CLASS_ATTR_LONG(c, "last", 0, t_bezier, b_last); CLASS_ATTR_SAVE(c, "last", 0); CLASS_ATTR_ACCESSORS(c, "last", 0L, (method)bezier_last); CLASS_ATTR_ORDER(c, "last", 0, "-2"); class_register(CLASS_BOX, c); bezier_class = c; post("· bezier · jasch · "__DATE__" · © all rights reserved",0); return; }
int C74_EXPORT main(void) { t_class *c; c = class_new("el.adsr~", (method)adsr_new, (method)dsp_free, sizeof(t_adsr), 0,A_GIMME, 0); class_addmethod(c, (method)adsr_assist,"assist",A_CANT,0); class_addmethod(c, (method)adsr_list, "list", A_GIMME, 0); class_addmethod(c, (method)adsr_mute, "mute", A_FLOAT, 0); class_addmethod(c, (method)adsr_set_gain2, "ft1", A_FLOAT, 0); class_addmethod(c, (method)adsr_set_gain1, "ft2", A_FLOAT, 0); class_addmethod(c, (method)adsr_set_r, "ft3", A_FLOAT, 0); class_addmethod(c, (method)adsr_set_s, "ft4", A_FLOAT, 0); class_addmethod(c, (method)adsr_set_d, "ft5", A_FLOAT, 0); class_addmethod(c, (method)adsr_set_a, "ft6", A_FLOAT, 0); class_addmethod(c, (method)adsr_bang, "bang", 0); class_addmethod(c, (method)adsr_dsp64, "dsp64", A_CANT,0); CLASS_ATTR_FLOAT(c, "attack", 0, t_adsr, a); CLASS_ATTR_DEFAULT_SAVE(c, "attack", 0, "20"); CLASS_ATTR_ACCESSORS(c, "attack", (method)adsr_a_get, (method)adsr_a_set); CLASS_ATTR_LABEL(c, "attack", 0, "Attack Time"); CLASS_ATTR_FLOAT(c, "decay", 0, t_adsr, d); CLASS_ATTR_DEFAULT_SAVE(c, "decay", 0, "50"); CLASS_ATTR_ACCESSORS(c, "decay", (method)adsr_d_get, (method)adsr_d_set); CLASS_ATTR_LABEL(c, "decay", 0, "Decay Time"); CLASS_ATTR_FLOAT(c, "sustain", 0, t_adsr, s); CLASS_ATTR_DEFAULT_SAVE(c, "sustain", 0, "150"); CLASS_ATTR_ACCESSORS(c, "sustain", (method)adsr_s_get, (method)adsr_s_set); CLASS_ATTR_LABEL(c, "sustain", 0, "Sustain Time"); CLASS_ATTR_FLOAT(c, "release", 0, t_adsr, r); CLASS_ATTR_DEFAULT_SAVE(c, "release", 0, "200"); CLASS_ATTR_ACCESSORS(c, "release", (method)adsr_r_get, (method)adsr_r_set); CLASS_ATTR_LABEL(c, "release", 0, "Release Time"); CLASS_ATTR_FLOAT(c, "gain1", 0, t_adsr, egain1); CLASS_ATTR_DEFAULT_SAVE(c, "gain1", 0, "1.0"); CLASS_ATTR_LABEL(c, "gain1", 0, "Gain 1"); CLASS_ATTR_FLOAT(c, "gain2", 0, t_adsr, egain2); CLASS_ATTR_DEFAULT_SAVE(c, "gain2", 0, "0.7"); CLASS_ATTR_LABEL(c, "gain2", 0, "Gain 2"); CLASS_ATTR_ORDER(c, "attack", 0, "1"); CLASS_ATTR_ORDER(c, "decay", 0, "2"); CLASS_ATTR_ORDER(c, "sustain", 0, "3"); CLASS_ATTR_ORDER(c, "release", 0, "4"); CLASS_ATTR_ORDER(c, "gain1", 0, "5"); CLASS_ATTR_ORDER(c, "gain2", 0, "6"); class_dspinit(c); class_register(CLASS_BOX, c); adsr_class = c; potpourri_announce(OBJECT_NAME); return 0; }
int C74_EXPORT main(void) { t_class *c; c = class_new("hoa.2d.decoder~", (method)hoa_decoder_new, (method)hoa_decoder_free, (long)sizeof(t_hoa_decoder), 0L, A_GIMME, 0); class_alias(c, gensym("hoa.decoder~")); hoa_initclass(c, (method)hoa_getinfos); class_addmethod(c, (method)hoa_decoder_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)hoa_decoder_assist, "assist", A_CANT, 0); CLASS_ATTR_LONG (c, "autoconnect", 0, t_hoa_decoder, f_send_config); CLASS_ATTR_CATEGORY (c, "autoconnect", 0, "Behavior"); CLASS_ATTR_STYLE_LABEL (c, "autoconnect", 0, "onoff", "Auto connection"); CLASS_ATTR_ORDER (c, "autoconnect", 0, "1"); CLASS_ATTR_SAVE (c, "autoconnect", 1); CLASS_ATTR_SYM (c, "mode", 0, t_hoa_decoder, f_attr); CLASS_ATTR_CATEGORY (c, "mode", 0, "Planewaves"); CLASS_ATTR_LABEL (c, "mode", 0, "Mode"); CLASS_ATTR_ENUM (c, "mode", 0, "ambisonic binaural irregular"); CLASS_ATTR_ACCESSORS (c, "mode", mode_get, mode_set); CLASS_ATTR_ORDER (c, "mode", 0, "1"); CLASS_ATTR_SAVE (c, "mode", 1); CLASS_ATTR_LONG (c, "channels", 0, t_hoa_decoder, f_attr); CLASS_ATTR_CATEGORY (c, "channels", 0, "Planewaves"); CLASS_ATTR_LABEL (c, "channels", 0, "Number of Channels"); CLASS_ATTR_ACCESSORS (c, "channels", channel_get, channel_set); CLASS_ATTR_DEFAULT (c, "channels", 0, "4"); CLASS_ATTR_ORDER (c, "channels", 0, "2"); CLASS_ATTR_SAVE (c, "channels", 0); CLASS_ATTR_DOUBLE (c, "offset", 0, t_hoa_decoder, f_attr); CLASS_ATTR_CATEGORY (c, "offset", 0, "Planewaves"); CLASS_ATTR_LABEL (c, "offset", 0, "Offset of Channels"); CLASS_ATTR_ACCESSORS (c, "offset", offset_get, offset_set); CLASS_ATTR_DEFAULT (c, "offset", 0, "0"); CLASS_ATTR_ORDER (c, "offset", 0, "3"); CLASS_ATTR_SAVE (c, "offset", 0); CLASS_ATTR_DOUBLE_VARSIZE (c, "angles", 0, t_hoa_decoder, f_attr, f_attr, MAX_CHANNELS); CLASS_ATTR_CATEGORY (c, "angles", 0, "Planewaves"); CLASS_ATTR_LABEL (c, "angles", 0, "Angles of Channels"); CLASS_ATTR_ACCESSORS (c, "angles", angles_get, angles_set); CLASS_ATTR_ORDER (c, "angles", 0, "4"); CLASS_ATTR_SAVE (c, "angles", 0); class_dspinit(c); class_register(CLASS_BOX, c); hoa_decoder_class = c; return 0; }
int main(void) { t_class *c; c = class_new("hoa.convolve~", (method)HoaConvolve_new, (method)HoaConvolve_free, (long)sizeof(t_HoaConvolve), 0L, A_GIMME, 0); class_addmethod(c, (method)HoaConvolve_dsp, "dsp", A_CANT, 0); class_addmethod(c, (method)HoaConvolve_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)HoaConvolve_assist, "assist", A_CANT, 0); class_addmethod(c, (method)HoaConvolve_notify, "notify", A_CANT, 0); class_addmethod(c, (method)HoaConvolve_dblclick, "dblclick", A_CANT, 0); class_addmethod(c, (method)HoaConvolve_clear, "clear", 0); CLASS_ATTR_SYM (c, "buffer", 0, t_HoaConvolve, f_name); CLASS_ATTR_CATEGORY (c, "buffer", 0, "Behavior"); CLASS_ATTR_LABEL (c, "buffer", 0, "buffer~ Object Name"); CLASS_ATTR_ORDER (c, "buffer", 0, "1"); CLASS_ATTR_ACCESSORS (c, "buffer", NULL, buffer_set); CLASS_ATTR_DEFAULT (c, "buffer", 0, ""); CLASS_ATTR_SAVE (c, "buffer", 1); CLASS_ATTR_LONG (c, "channel", 0, t_HoaConvolve, f_channel); CLASS_ATTR_CATEGORY (c, "channel", 0, "Behavior"); CLASS_ATTR_LABEL (c, "channel", 0, "buffer~ Object Channel"); CLASS_ATTR_ORDER (c, "channel", 0, "2"); CLASS_ATTR_ACCESSORS (c, "channel", NULL, channel_set); CLASS_ATTR_DEFAULT (c, "channel", 0, "1"); CLASS_ATTR_SAVE (c, "channel", 1); CLASS_ATTR_DOUBLE (c, "dry", 0, t_HoaConvolve, f_dry); CLASS_ATTR_CATEGORY (c, "dry", 0, "Parameters"); CLASS_ATTR_LABEL (c, "dry", 0, "Dry value"); CLASS_ATTR_ORDER (c, "dry", 0, "1"); CLASS_ATTR_ACCESSORS (c, "dry", NULL, dry_set); CLASS_ATTR_DEFAULT (c, "dry", 0, "0."); CLASS_ATTR_SAVE (c, "dry", 1); CLASS_ATTR_DOUBLE (c, "wet", 0, t_HoaConvolve, f_wet); CLASS_ATTR_CATEGORY (c, "wet", 0, "Parameters"); CLASS_ATTR_LABEL (c, "wet", 0, "Wet value"); CLASS_ATTR_ORDER (c, "wet", 0, "2"); CLASS_ATTR_ACCESSORS (c, "wet", NULL, wet_set); CLASS_ATTR_DEFAULT (c, "wet", 0, "1."); CLASS_ATTR_SAVE (c, "wet", 1); class_dspinit(c); class_register(CLASS_BOX, c); HoaConvolve_class = c; class_findbyname(CLASS_NOBOX, gensym("hoa.encoder~")); return 0; }
void ext_main(void *r) #endif { t_class *c; c = class_new("hoa.3d.decoder~", (method)hoa_3d_decoder_new, (method)hoa_3d_decoder_free, (long)sizeof(t_hoa_3d_decoder), 0L, A_GIMME, 0); class_setname((char *)"hoa.3d.decoder~", (char *)"hoa.3d.decoder~"); hoa_initclass(c, (method)hoa_getinfos); // @method signal @digest Array of spherical harmonic signals to decode for a set of loudspeakers. // @description Array of spherical harmonic signals to decode for a set of loudspeakers. class_addmethod(c, (method)hoa_3d_decoder_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)hoa_3d_decoder_assist, "assist", A_CANT, 0); CLASS_ATTR_SYM (c, "mode", 0, t_hoa_3d_decoder, f_mode); CLASS_ATTR_LABEL (c, "mode", 0, "Mode"); CLASS_ATTR_ENUM (c, "mode", 0, "ambisonic binaural"); CLASS_ATTR_ACCESSORS (c, "mode", NULL, mode_set); CLASS_ATTR_ORDER (c, "mode", 0, "1"); // @description There is two decoding <m>mode</m> : // <ul> // <li><b>regular</b> : for a regular or irregular loudspeakers repartition over a sphere.</li> // <li><b>binaural</b> : for headphones.</li> // </ul> CLASS_ATTR_DOUBLE_VARSIZE (c, "angles", ATTR_SET_DEFER_LOW, t_hoa_3d_decoder, f_angles_of_channels, f_number_of_angles, HOA_MAX_PLANEWAVES*2); CLASS_ATTR_LABEL (c, "angles", 0, "Angles of Channels"); CLASS_ATTR_ACCESSORS (c, "angles", NULL, angles_set); CLASS_ATTR_ORDER (c, "angles", 0, "2"); // @description Set the angles of each channels in degrees. The angles of channels are only settable in <b>irregular</b> <m>mode</m>. Each angles are in degrees, wrapped between 0. and 360. You must specify 2 values per channel corresponding to the azimuth value followed by the elevation value. CLASS_ATTR_DOUBLE_ARRAY (c, "offset", ATTR_SET_DEFER_LOW, t_hoa_3d_decoder, f_offsets, 3); CLASS_ATTR_LABEL (c, "offset", 0, "Offset of Channels"); CLASS_ATTR_ACCESSORS (c, "offset", NULL, offset_set); CLASS_ATTR_ORDER (c, "offset", 0, "3"); // @description Set the offsets of channels with a list of 2 float values corresponding to the azimuth and elevation offset, in degrees between 0. and 360. CLASS_ATTR_LONG (c, "channels", ATTR_SET_DEFER_LOW, t_hoa_3d_decoder, f_number_of_channels); CLASS_ATTR_LABEL (c, "channels", 0, "Number of Channels"); CLASS_ATTR_ACCESSORS (c, "channels", NULL, channel_set); CLASS_ATTR_ORDER (c, "channels", 0, "4"); // @description The number of channels. CLASS_ATTR_LONG (c, "crop", 0, t_hoa_3d_decoder, f_cropsize); CLASS_ATTR_ACCESSORS (c, "crop", NULL, crop_set); CLASS_ATTR_LABEL (c, "crop", 0, "Crop of the Responses"); CLASS_ATTR_ORDER (c, "crop", 0, "5"); // @description The crop attribute can be used in binaural mode to reduce the CPU usage by cropping the impulse responses (between 0 and 512) 0 means no crop class_dspinit(c); class_register(CLASS_BOX, c); hoa_3d_decoder_class = c; }
int JAMOMA_EXPORT_MAXOBJ main(void) { t_class *c; common_symbols_init(); psRollOff = gensym("rolloff"); psSourcePosition = gensym("source_position"); psSourceGain = gensym("source_gain"); psSourceMute = gensym("src_mute"); psSourceBlur = gensym("blur"); psDestinationPosition = gensym("destination_position"); psNumberOfSources = gensym("num_sources"); psNumberOfDestinations = gensym("num_destinations"); // Define our class c = class_new("jcom.dbapBformat",(method)dbapBformatNew, (method)0L, sizeof(t_dbapBformat), (method)0L, A_GIMME, 0); // Make methods accessible for our class: class_addmethod(c, (method)dbapBformatBlur, "blur", A_GIMME, 0); class_addmethod(c, (method)dbapBformatBlurAll, "blurall", A_FLOAT, 0); class_addmethod(c, (method)dbapBformatPolarity, "polarity", A_GIMME, 0); class_addmethod(c, (method)dbapBformatPolarityAll, "polarityall", A_FLOAT, 0); class_addmethod(c, (method)dbapBformatSource, "src_position", A_GIMME, 0); class_addmethod(c, (method)dbapBformatDestination, "dst_position", A_GIMME, 0); class_addmethod(c, (method)dbapBformatSourceGain, "src_gain", A_GIMME, 0); class_addmethod(c, (method)dbapBformatSourceWeight, "src_weight", A_GIMME, 0); class_addmethod(c, (method)dbapBformatMasterGain, "master_gain", A_FLOAT, 0); class_addmethod(c, (method)dbapBformatSourceMute, "src_mute", A_GIMME, 0); class_addmethod(c, (method)dbapBformatAssist, "assist", A_CANT, 0); class_addmethod(c, (method)dbapBformatInfo, "info", 0); class_addmethod(c, (method)object_obex_dumpout, "dumpout", 0); // Add attributes to our class: CLASS_ATTR_LONG(c, "num_sources", 0, t_dbapBformat, attrNumberOfSources); CLASS_ATTR_ACCESSORS(c, "num_sources", NULL, dbapBformatAttrSetNumberOfSources); CLASS_ATTR_LONG(c, "num_destinations", 0, t_dbapBformat, attrNumberOfDestinations); CLASS_ATTR_ACCESSORS(c, "num_destinations", NULL, dbapBformatAttrSetNumberOfDestinations); CLASS_ATTR_FLOAT(c, "rolloff", 0, t_dbapBformat, attrRollOff); CLASS_ATTR_ACCESSORS(c, "rolloff", NULL, dbapBformatAttrSetRollOff); CLASS_ATTR_FLOAT(c, "vicinity", 0, t_dbapBformat, attrVicinity); CLASS_ATTR_ACCESSORS(c, "vicinity", NULL, dbapBformatAttrSetVicinity); // Finalize our class class_register(CLASS_BOX, c); this_class = c; return 0; }
int C74_EXPORT main(void) #endif { t_class* c; c = class_new("hoa.out", (method)hoa_out_new, (method)hoa_out_free, sizeof(t_hoa_out), NULL, A_GIMME, 0); class_setname((char *)"hoa.out", (char *)"hoa.out"); hoa_initclass(c, (method)NULL); class_addmethod(c, (method)hoa_out_assist, "assist", A_CANT, 0); // @method bang @digest output bang message in the corresponding hoa.process~ object's message outlet // @description The <m>bang</m> output bang message in the corresponding hoa.process~ object's message outlet class_addmethod(c, (method)hoa_out_bang, "bang", 0); // @method int @digest output int message in the corresponding hoa.process~ object's message outlet // @description The <m>int</m> output int message in the corresponding hoa.process~ object's message outlet // @marg 0 @name number @optional 0 @type int class_addmethod(c, (method)hoa_out_int, "int", A_LONG, 0); // @method float @digest output int message in the corresponding hoa.process~ object's message outlet // @description The <m>float</m> output int message in the corresponding hoa.process~ object's message outlet // @marg 0 @name number @optional 0 @type float class_addmethod(c, (method)hoa_out_float, "float", A_FLOAT, 0); // @method list @digest output a list in the corresponding hoa.process~ object's message outlet // @description The <m>list</m> output a list in the corresponding hoa.process~ object's message outlet // @marg 0 @name va-args @optional 0 @type list class_addmethod(c, (method)hoa_out_list, "list", A_GIMME, 0); // @method anything @digest output a message in the corresponding hoa.process~ object's message outlet // @description The <m>list</m> output a message in the corresponding hoa.process~ object's message outlet // @marg 0 @name anything @optional 0 @type symbol class_addmethod(c, (method)hoa_out_anything, "anything", A_GIMME, 0); CLASS_ATTR_LONG (c, "extra", 0, t_hoa_out, extra); CLASS_ATTR_ACCESSORS(c, "extra", 0, hoa_out_setattr_extra); CLASS_ATTR_LABEL (c, "extra", 0, "extra index"); CLASS_ATTR_INVISIBLE(c, "extra", 1); CLASS_ATTR_SAVE (c, "extra", 0); // @description Defines an extra outlet. Extra outlet are added to the "normal" instance outlet and can be used to receive messages from all instances. CLASS_ATTR_SYM (c, "comment", 0, t_hoa_out, comment); CLASS_ATTR_ACCESSORS(c, "comment", 0, hoa_out_setattr_comment); CLASS_ATTR_LABEL (c, "comment", 0, "Description"); CLASS_ATTR_SAVE (c, "comment", 1); // @description Sets a description to the outlet which will be shown in the assist outlet of the <o>hoa.process~</o> that load this <o>hoa.out</o>. // Only works if the <m>extra</m> parameter is greater than 0. class_register(CLASS_BOX, c); hoa_out_class = c; return 0; }
int C74_EXPORT main(void) { t_class *c; c = class_new("hoa.3d.decoder~", (method)hoa_decoder_new, (method)hoa_decoder_free, (long)sizeof(t_hoa_decoder), 0L, A_GIMME, 0); hoa_initclass(c, (method)hoa_getinfos); // @method signal @digest Array of spherical harmonic signals to decode for a set of loudspeakers // @description Array of spherical harmonic signals to decode for a set of loudspeakers class_addmethod(c, (method)hoa_decoder_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)hoa_decoder_assist, "assist", A_CANT, 0); CLASS_ATTR_SYM (c, "mode", 0, t_hoa_decoder, f_mode); CLASS_ATTR_LABEL (c, "mode", 0, "Mode"); CLASS_ATTR_ENUM (c, "mode", 0, "ambisonic binaural irregular"); CLASS_ATTR_ACCESSORS (c, "mode", NULL, mode_set); CLASS_ATTR_ORDER (c, "mode", 0, "1"); CLASS_ATTR_SAVE (c, "mode", 1); // @description There is three decoding <m>mode</m> : // <ul> // <li><b>Ambisonics</b> : for a regular loudspeakers repartition over a sphere.</li> // <li><b>Binaural</b> : for headphones.</li> // <li><b>Irregular</b> : for an irregular loudspeakers repartition</li> // </ul> CLASS_ATTR_DOUBLE_VARSIZE (c, "angles", ATTR_SET_DEFER_LOW, t_hoa_decoder, f_angles_of_channels, f_number_of_angles, MAX_CHANNELS*2); CLASS_ATTR_LABEL (c, "angles", 0, "Angles of Channels"); CLASS_ATTR_ACCESSORS (c, "angles", NULL, angles_set); CLASS_ATTR_ORDER (c, "angles", 0, "2"); // @description Set the angles of each channels in degrees. The angles of channels are only settable in <b>irregular</b> <m>mode</m>. Each angles are in degrees, wrapped between 0. and 360. You must specify 2 values per channel corresponding to the azimuth value followed by the elevation value. CLASS_ATTR_DOUBLE_ARRAY (c, "offset", 0, t_hoa_decoder, f_offset, 2); CLASS_ATTR_LABEL (c, "offset", 0, "Offset of Channels"); CLASS_ATTR_ACCESSORS (c, "offset", NULL, offset_set); CLASS_ATTR_DEFAULT (c, "offset", 0, "0 0"); CLASS_ATTR_ORDER (c, "offset", 0, "3"); // @description Set the offsets of channels with a list of 2 float values corresponding to the azimuth and elevation offset, in degrees between 0. and 360. CLASS_ATTR_SYM (c, "pinna", 0, t_hoa_decoder, f_pinna); CLASS_ATTR_LABEL (c, "pinna", 0, "Pinna Size"); CLASS_ATTR_ENUM (c, "pinna", 0, "small large"); CLASS_ATTR_ACCESSORS (c, "pinna", NULL, pinna_set); CLASS_ATTR_ORDER (c, "pinna", 0, "4"); // @description The pinna size to use for the binaural restitution. The <m>pinna</m> message followed by the <b>symbol</b> <b>small</b> or <b>large</b> set the pinna size of the HRTF responses for the binaural restitution. Choose the one that suits you best. class_dspinit(c); class_register(CLASS_BOX, c); hoa_decoder_class = c; return 0; }
int main(void) { t_class *c = class_new("o.context", (method)ocontext_new, (method)ocontext_free, sizeof(t_ocontext), 0L, A_GIMME, 0); class_addmethod(c, (method)ocontext_fullPacket, "FullPacket", A_GIMME, 0); class_addmethod(c, (method)ocontext_assist, "assist", A_CANT, 0); class_addmethod(c, (method)ocontext_doc, "doc", 0); class_addmethod(c, (method)ocontext_bang, "bang", 0); // remove this if statement when we stop supporting Max 5 //if(omax_dict_resolveDictStubs()){ class_addmethod(c, (method)omax_dict_dictionary, "dictionary", A_GIMME, 0); //} class_addmethod(c, (method)odot_version, "version", 0); CLASS_ATTR_ATOM(c, "prefix", 0, t_ocontext, prefix); CLASS_ATTR_LABEL(c, "prefix", 0, "OSC Address Prefix"); CLASS_ATTR_ACCESSORS(c, "prefix", ocontext_attr_prefix_get, ocontext_attr_prefix_set); class_register(CLASS_BOX, c); ocontext_class = c; common_symbols_init(); ODOT_PRINT_VERSION; return 0; }
int C74_EXPORT main(void) { t_class *c; c = class_new("hoa.optim~", (method)HoaOptim_new, (method)dsp_free, (long)sizeof(t_HoaOptim), 0L, A_GIMME, 0); class_addmethod(c, (method)HoaOptim_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)HoaOptim_assist, "assist", A_CANT, 0); CLASS_ATTR_SYM (c, "optim", 0, t_HoaOptim, f_optim_mode); CLASS_ATTR_CATEGORY (c, "optim", 0, "Behavior"); CLASS_ATTR_LABEL (c, "optim", 0, "Optimization"); CLASS_ATTR_ENUM (c, "optim", 0, "basic maxRe inPhase"); CLASS_ATTR_ORDER (c, "optim", 0, "1"); CLASS_ATTR_ACCESSORS (c, "optim", NULL, HoaOptim_optim); CLASS_ATTR_SAVE (c, "optim", 1); class_dspinit(c); class_register(CLASS_BOX, c); HoaOptim_class = c; class_findbyname(CLASS_BOX, gensym("hoa.encoder~")); return 0; }
int TTCLASSWRAPPERMAX_EXPORT main(void) { ClassPtr c; TTAudioGraphInit(); common_symbols_init(); c = class_new((char*)"j.plug.out=", (method)PlugOutNew, (method)PlugOutFree, sizeof(PlugOut), (method)0L, A_GIMME, 0); class_addmethod(c, (method)PlugOutNotify, "notify", A_CANT, 0); class_addmethod(c, (method)MaxAudioGraphReset, "audio.reset", A_CANT, 0); class_addmethod(c, (method)PlugOutSetup, "audio.setup", A_CANT, 0); class_addmethod(c, (method)MaxAudioGraphConnect, "audio.connect", A_OBJ, A_LONG, 0); class_addmethod(c, (method)MaxAudioGraphDrop, "audio.drop", A_CANT, 0); class_addmethod(c, (method)MaxAudioGraphObject, "audio.object", A_CANT, 0); class_addmethod(c, (method)PlugOutBuildAudioUnit, "build.au", A_GIMME, 0); class_addmethod(c, (method)PlugOutAssist, "assist", A_CANT, 0); class_addmethod(c, (method)object_obex_dumpout, "dumpout", A_CANT, 0); CLASS_ATTR_SYM(c, "manufacturer", 0, PlugOut, pluginManufacturer); CLASS_ATTR_SYM(c, "manufacturerCode", 0, PlugOut, pluginManufacturerCode); CLASS_ATTR_SYM(c, "pluginIdCode", 0, PlugOut, pluginID); CLASS_ATTR_SYM(c, "pluginName", 0, PlugOut, pluginName); CLASS_ATTR_SYM(c, "pluginVersion", 0, PlugOut, pluginVersion); CLASS_ATTR_ACCESSORS(c, "pluginVersion", NULL, PlugOutSetVersion); class_register(_sym_box, c); sPlugOutClass = c; return 0; }
extern "C" int TTCLASSWRAPPERMAX_EXPORT main(void) { t_class *c; c = class_new("tap.decibels~",(method)decibels_new, (method)dsp_free, sizeof(t_decibels), (method)0L, A_GIMME, 0); common_symbols_init(); class_addmethod(c, (method)decibels_dsp, "dsp", A_CANT, 0L); class_addmethod(c, (method)decibels_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)decibels_int, "int", A_LONG, 0L); // Input as int class_addmethod(c, (method)decibels_float, "float", A_FLOAT, 0L); // Input as double class_addmethod(c, (method)decibels_assist, "assist", A_CANT, 0L); class_addmethod(c, (method)stdinletinfo, "inletinfo", A_CANT, 0); CLASS_ATTR_SYM(c, "mode", 0, t_decibels, attr_mode); CLASS_ATTR_ACCESSORS(c, "mode", NULL, attr_set_mode); CLASS_ATTR_ENUM(c, "mode", 0, "amp2db db2amp mm2db db2mm mm2amp amp2mm db2midi midi2db"); class_dspinit(c); // Setup object's class to work with MSP class_register(_sym_box, c); decibels_class = c; // initialize class globals ps_amp2db = gensym("amp2db"); ps_db2amp = gensym("db2amp"); ps_mm2db = gensym("mm2db"); ps_db2mm = gensym("db2mm"); ps_mm2amp = gensym("mm2amp"); ps_amp2mm = gensym("amp2mm"); ps_db2midi = gensym("db2midi"); ps_midi2db = gensym("midi2db"); }
int C74_EXPORT main(void) { t_class *c; c = class_new("hoa.binaural~", (method)HoaBinaural_new, (method)HoaBinaural_free, (long)sizeof(t_HoaBinaural), 0L, A_GIMME, 0); class_addmethod(c, (method)HoaBinaural_dsp, "dsp", A_CANT, 0); class_addmethod(c, (method)HoaBinaural_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)HoaBinaural_assist, "assist", A_CANT, 0); CLASS_ATTR_SYM (c,"pinnasize", 0, t_HoaBinaural, f_pinna_size); CLASS_ATTR_ACCESSORS (c,"pinnasize", NULL, HoaBinaural_set_pinnasize); CLASS_ATTR_LABEL (c,"pinnasize", 0, "Pinna Size"); CLASS_ATTR_CATEGORY (c,"pinnasize", 0, "Behavior"); CLASS_ATTR_ENUM (c,"pinnasize", 0, "small large"); CLASS_ATTR_DEFAULT (c,"pinnasize", 0, "small"); CLASS_ATTR_ORDER (c,"pinnasize", 0, "1"); CLASS_ATTR_SAVE (c,"pinnasize", 1); class_dspinit(c); class_register(CLASS_BOX, c); HoaBinaural_class = c; class_findbyname(CLASS_NOBOX, gensym("hoa.encoder~")); return 0; }
int C74_EXPORT main(void) { t_class* c; TTAudioGraphInit(); common_symbols_init(); c = class_new("j.dcblock=", (method)DCBlockNew, (method)DCBlockFree, sizeof(DCBlock), (method)0L, A_GIMME, 0); class_addmethod(c, (method)DCBlockClear, "clear", 0); class_addmethod(c, (method)DCBlockReset, "audio.reset", A_CANT, 0); class_addmethod(c, (method)DCBlockSetup, "audio.setup", A_CANT, 0); class_addmethod(c, (method)DCBlockConnect, "audio.connect", A_OBJ, A_LONG, 0); class_addmethod(c, (method)MaxAudioGraphDrop, "audio.drop", A_CANT, 0); class_addmethod(c, (method)MaxAudioGraphObject, "audio.object", A_CANT, 0); class_addmethod(c, (method)DCBlockAssist, "assist", A_CANT, 0); class_addmethod(c, (method)object_obex_dumpout, "dumpout", A_CANT, 0); class_addmethod(c, (method)jamoma_fileusage, "fileusage", A_CANT, 0); CLASS_ATTR_LONG(c, "bypass", 0, DCBlock, attrBypass); CLASS_ATTR_STYLE(c, "bypass", 0, "onoff"); CLASS_ATTR_ACCESSORS(c, "bypass", NULL, DCBlockSetBypass); class_register(_sym_box, c); sDCBlockClass = c; return 0; }
int TTGRAPH_EXTERNAL_EXPORT main(void) { ClassPtr c; TTGraphInit(); common_symbols_init(); c = class_new("jcom.midi.out#", (method)MidiOutNew, (method)MidiOutFree, sizeof(MidiOut), (method)0L, A_GIMME, 0); class_addmethod(c, (method)MidiOutGetDeviceNames, "getAvailableDeviceNames", 0); class_addmethod(c, (method)MaxGraphReset, "graph.reset", A_CANT, 0); class_addmethod(c, (method)MaxGraphSetup, "graph.setup", A_CANT, 0); class_addmethod(c, (method)MaxGraphConnect, "graph.connect", A_OBJ, A_LONG, 0); class_addmethod(c, (method)MaxGraphDrop, "graph.drop", A_CANT, 0); class_addmethod(c, (method)MaxGraphObject, "graph.object", A_CANT, 0); class_addmethod(c, (method)MidiOutAssist, "assist", A_CANT, 0); class_addmethod(c, (method)object_obex_dumpout, "dumpout", A_CANT, 0); CLASS_ATTR_SYM(c, "device", 0, MidiOut, obj); CLASS_ATTR_ACCESSORS(c, "device", MidiOutGetDevice, MidiOutSetDevice); class_register(_sym_box, c); sMidiOutClass = c; return 0; }
void ext_main(void *r) { // Initialize the class - first argument: VERY important to match the name of the object in the procect settings!!! cmbuffercloud_class = class_new("cm.buffercloud~", (method)cmbuffercloud_new, (method)cmbuffercloud_free, sizeof(t_cmbuffercloud), 0, A_GIMME, 0); class_addmethod(cmbuffercloud_class, (method)cmbuffercloud_dsp64, "dsp64", A_CANT, 0); // Bind the 64 bit dsp method class_addmethod(cmbuffercloud_class, (method)cmbuffercloud_assist, "assist", A_CANT, 0); // Bind the assist message class_addmethod(cmbuffercloud_class, (method)cmbuffercloud_float, "float", A_FLOAT, 0); // Bind the float message (allowing float input) class_addmethod(cmbuffercloud_class, (method)cmbuffercloud_dblclick, "dblclick", A_CANT, 0); // Bind the double click message class_addmethod(cmbuffercloud_class, (method)cmbuffercloud_notify, "notify", A_CANT, 0); // Bind the notify message class_addmethod(cmbuffercloud_class, (method)cmbuffercloud_set, "set", A_GIMME, 0); // Bind the set message for user buffer set class_addmethod(cmbuffercloud_class, (method)cmbuffercloud_limit, "limit", A_GIMME, 0); // Bind the limit message class_addmethod(cmbuffercloud_class, (method)cmbuffercloud_bang, "bang", 0); CLASS_ATTR_ATOM_LONG(cmbuffercloud_class, "stereo", 0, t_cmbuffercloud, attr_stereo); CLASS_ATTR_ACCESSORS(cmbuffercloud_class, "stereo", (method)NULL, (method)cmbuffercloud_stereo_set); CLASS_ATTR_BASIC(cmbuffercloud_class, "stereo", 0); CLASS_ATTR_SAVE(cmbuffercloud_class, "stereo", 0); CLASS_ATTR_STYLE_LABEL(cmbuffercloud_class, "stereo", 0, "onoff", "Multichannel playback"); CLASS_ATTR_ATOM_LONG(cmbuffercloud_class, "w_interp", 0, t_cmbuffercloud, attr_winterp); CLASS_ATTR_ACCESSORS(cmbuffercloud_class, "w_interp", (method)NULL, (method)cmbuffercloud_winterp_set); CLASS_ATTR_BASIC(cmbuffercloud_class, "w_interp", 0); CLASS_ATTR_SAVE(cmbuffercloud_class, "w_interp", 0); CLASS_ATTR_STYLE_LABEL(cmbuffercloud_class, "w_interp", 0, "onoff", "Window interpolation on/off"); CLASS_ATTR_ATOM_LONG(cmbuffercloud_class, "s_interp", 0, t_cmbuffercloud, attr_sinterp); CLASS_ATTR_ACCESSORS(cmbuffercloud_class, "s_interp", (method)NULL, (method)cmbuffercloud_sinterp_set); CLASS_ATTR_BASIC(cmbuffercloud_class, "s_interp", 0); CLASS_ATTR_SAVE(cmbuffercloud_class, "s_interp", 0); CLASS_ATTR_STYLE_LABEL(cmbuffercloud_class, "s_interp", 0, "onoff", "Sample interpolation on/off"); CLASS_ATTR_ATOM_LONG(cmbuffercloud_class, "zero", 0, t_cmbuffercloud, attr_zero); CLASS_ATTR_ACCESSORS(cmbuffercloud_class, "zero", (method)NULL, (method)cmbuffercloud_zero_set); CLASS_ATTR_BASIC(cmbuffercloud_class, "zero", 0); CLASS_ATTR_SAVE(cmbuffercloud_class, "zero", 0); CLASS_ATTR_STYLE_LABEL(cmbuffercloud_class, "zero", 0, "onoff", "Zero crossing trigger mode on/off"); CLASS_ATTR_ORDER(cmbuffercloud_class, "stereo", 0, "1"); CLASS_ATTR_ORDER(cmbuffercloud_class, "w_interp", 0, "2"); CLASS_ATTR_ORDER(cmbuffercloud_class, "s_interp", 0, "3"); CLASS_ATTR_ORDER(cmbuffercloud_class, "zero", 0, "4"); class_dspinit(cmbuffercloud_class); // Add standard Max/MSP methods to your class class_register(CLASS_BOX, cmbuffercloud_class); // Register the class with Max ps_buffer_modified = gensym("buffer_modified"); // assign the buffer modified message to the static pointer created above ps_stereo = gensym("stereo"); }
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"); }