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; }
extern "C" int TTCLASSWRAPPERMAX_EXPORT main(void) { t_class *c; c = class_new("tap.colorspace",(method)cs_new, (method)cs_free, sizeof(t_cs), (method)0L, A_GIMME, 0); common_symbols_init(); class_addmethod(c, (method)cs_bang, "bang", 0L); class_addmethod(c, (method)cs_int, "int", A_LONG, 0L); // Input as int class_addmethod(c, (method)cs_float, "float", A_FLOAT, 0L); // Input as float class_addmethod(c, (method)cs_list, "list", A_GIMME, 0L); class_addmethod(c, (method)cs_assist, "assist", A_CANT, 0L); class_addmethod(c, (method)object_obex_dumpout, "dumpout", A_CANT,0); class_addmethod(c, (method)cs_inletinfo, "inletinfo", A_CANT, 0); CLASS_ATTR_SYM(c, "mode", 0, t_cs, attr_mode); CLASS_ATTR_ENUM(c, "mode", 0, "no_transform rgb2cmy cmy2rgb rgb2hsv hsv2rgb rgb2xyz xyz2rgb rgb2uvw uvw2rgb rgb2retinalcone retinalcone2rgb rgb2lab lab2rgb rgb2yiq yiq2rgb rgb2hls hls2rgb rgb2rgbcie rgbcie2rgb rgb2rgbsmpte rgbsmpte2rgb rgb2hsl hsl2rgb"); CLASS_ATTR_SYM(c, "outputtype", 0, t_cs, attr_outputtype); CLASS_ATTR_ENUM(c, "outputtype", 0, "split packed"); CLASS_ATTR_LONG(c, "autopack", 0, t_cs, attr_autopack); CLASS_ATTR_STYLE(c, "autopack", 0, "onoff"); this_class = c; class_register(_sym_box, c); // initialize class globals ps_no_transform = gensym("no_transform"); ps_rgb2cmy = gensym("rgb2cmy"); ps_cmy2rgb = gensym("cmy2rgb"); ps_rgb2hsv = gensym("rgb2hsv"); ps_hsv2rgb = gensym("hsv2rgb"); ps_rgb2xyz = gensym("rgb2xyz"); ps_xyz2rgb = gensym("xyz2rgb"); ps_rgb2uvw = gensym("rgb2uvw"); ps_uvw2rgb = gensym("uvw2rgb"); ps_rgb2retinalcone = gensym("rgb2retinalcone"); ps_retinalcone2rgb = gensym("retinalcone2rgb"); ps_rgb2lab = gensym("rgb2lab"); ps_lab2rgb = gensym("lab2rgb"); ps_rgb2yiq = gensym("rgb2yiq"); ps_yiq2rgb = gensym("yiq2rgb"); ps_rgb2hls = gensym("rgb2hls"); ps_hls2rgb = gensym("hls2rgb"); ps_rgb2rgbcie = gensym("rgb2rgbcie"); ps_rgbcie2rgb = gensym("rgbcie2rgb"); ps_rgb2rgbsmpte = gensym("rgb2rgbsmpte"); ps_rgbsmpte2rgb = gensym("rgbsmpte2rgb"); ps_rgb2hsl = gensym("rgb2hsl"); ps_hsl2rgb = gensym("hsl2rgb"); ps_split = gensym("split"); ps_packed = gensym("packed"); // Finalize our class class_register(CLASS_BOX, c); this_class = c; }
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; }
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; }
int JAMOMA_EXPORT_MAXOBJ main(void) { t_class *c; t_object *attr = NULL; long numDataspaces = 0; SymbolPtr* dataspaceNames = NULL; char dataspaces[2048]; short i; jamoma_init(); common_symbols_init(); jamoma_getDataspaceList(&numDataspaces, &dataspaceNames); dataspaces[0] = 0; for (i=0; i<numDataspaces; i++) { strcat(dataspaces, dataspaceNames[i]->s_name); strcat(dataspaces, " "); } // Define our class c = class_new("jcom.return",(method)return_new, (method)return_free, sizeof(t_return), (method)0L, A_GIMME, 0); // Make methods accessible for our class: class_addmethod(c, (method)return_bang, "bang", A_CANT, 0L); class_addmethod(c, (method)return_int, "int", A_DEFLONG, 0L); class_addmethod(c, (method)return_float, "float", A_DEFFLOAT, 0L); class_addmethod(c, (method)return_list, "list", A_GIMME, 0L); class_addmethod(c, (method)return_symbol, "anything", A_GIMME, 0L); class_addmethod(c, (method)return_dump, "dump", 0L); class_addmethod(c, (method)return_updatename, "update_name", A_CANT, 0L); class_addmethod(c, (method)return_assist, "assist", A_CANT, 0L); jcom_core_subscriber_classinit_extended(c, attr); // ATTRIBUTE: type - options are generic, integer, decimal, string, boolean jamoma_class_attr_new(c, "type", _sym_symbol, (method)return_attr_settype, (method)return_attr_gettype); // ATTRIBUTES: dataspace stuff CLASS_ATTR_SYM(c, "dataspace", 0, t_return, attrDataspace); CLASS_ATTR_LABEL(c, "dataspace", 0, "dataspace"); CLASS_ATTR_ENUM(c, "dataspace", 0, dataspaces); CLASS_ATTR_SYM(c, "dataspace/unit/native", 0, t_return, attrUnitNative); CLASS_ATTR_LABEL(c, "dataspace/unit/native", 0, "dataspace/unit/native"); CLASS_ATTR_CHAR(c, "enable", 0, t_return, attrEnable); CLASS_ATTR_STYLE(c, "enable", 0, "onoff"); // Finalize our class class_register(CLASS_BOX, c); return_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 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 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 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; }
int C74_EXPORT main(void) { t_class *c; c = class_new("dummy", (method)dummy_new, (method)dummy_free, (long)sizeof(t_dummy), 0L /* leave NULL!! */, A_GIMME, 0); class_addmethod(c, (method)dummy_bang, "bang", 0); class_addmethod(c, (method)dummy_int, "int", A_LONG, 0); class_addmethod(c, (method)dummy_float, "float", A_FLOAT, 0); class_addmethod(c, (method)dummy_anything, "anything", A_GIMME, 0); class_addmethod(c, (method)dummy_identify, "identify", 0); CLASS_METHOD_ATTR_PARSE(c, "identify", "undocumented", gensym("long"), 0, "1"); // we want to 'reveal' the otherwise hidden 'xyzzy' method class_addmethod(c, (method)dummy_anything, "xyzzy", A_GIMME, 0); // here's an otherwise undocumented method, which does something that the user can't actually // do from the patcher however, we want them to know about it for some weird documentation reason. // so let's make it documentable. it won't appear in the quickref, because we can't send it from a message. class_addmethod(c, (method)dummy_acant, "blooop", A_CANT, 0); CLASS_METHOD_ATTR_PARSE(c, "blooop", "documentable", gensym("long"), 0, "1"); /* you CAN'T call this from the patcher */ class_addmethod(c, (method)dummy_assist, "assist", A_CANT, 0); class_addmethod(c, (method)dummy_dblclick, "dblclick", A_CANT, 0); CLASS_ATTR_SYM(c, "name", 0, t_dummy, name); class_register(CLASS_BOX, c); dummy_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; }
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) #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 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("o.downcast", (method)odowncast_new, (method)odowncast_free, sizeof(t_odowncast), 0L, A_GIMME, 0); class_addmethod(c, (method)odowncast_fullPacket, "FullPacket", A_GIMME, 0); class_addmethod(c, (method)odowncast_assist, "assist", A_CANT, 0); class_addmethod(c, (method)odowncast_doc, "doc", 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_SYM(c, "headertimetag", 0, t_odowncast, timetag_address); CLASS_ATTR_LONG(c, "doubles", 0, t_odowncast, doubles); CLASS_ATTR_LONG(c, "ints", 0, t_odowncast, ints); CLASS_ATTR_LONG(c, "bundles", 0, t_odowncast, bundles); CLASS_ATTR_LONG(c, "timetags", 0, t_odowncast, timetags); class_register(CLASS_BOX, c); odowncast_class = c; common_symbols_init(); ODOT_PRINT_VERSION; return 0; }
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 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) #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; }
extern "C" int TTCLASSWRAPPERMAX_EXPORT main(void) { t_class *c; c = class_new("tap.bits",(method)bits_new, (method)0L, sizeof(t_bits), (method)0L, A_GIMME, 0); common_symbols_init(); class_addmethod(c, (method)bits_int, "int", A_LONG, 0L); class_addmethod(c, (method)bits_list, "list", A_GIMME, 0L); class_addmethod(c, (method)bits_assist, "assist", A_CANT, 0L); class_addmethod(c, (method)stdinletinfo, "inletinfo", A_CANT, 0); CLASS_ATTR_SYM(c, "mode", 0, t_bits, mode); CLASS_ATTR_ENUM(c, "mode", 0, "bits2ints ints2bits matrixctrl2ints ints2matrixctrl"); CLASS_ATTR_LONG(c, "matrix_width", 0, t_bits, matrix_width); class_register(_sym_box, c); bits_class = c; // Initialize Globals ps_bits2ints = gensym("bits2ints"); // Initialize these globals (so we don't have to constantly run a gensym for them in our methods) ps_ints2bits = gensym("ints2bits"); ps_matrixctrl2ints = gensym("matrixctrl2ints"); ps_ints2matrixctrl = gensym("ints2matrixctrl"); 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 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 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; }
extern "C" int TTCLASSWRAPPERMAX_EXPORT main(void) { t_class *c; c = class_new("tap.inquisitor",(method)inquisitor_new, (method)inquisitor_free, sizeof(t_inquisitor), (method)0L, A_GIMME, 0); common_symbols_init(); class_addmethod(c, (method)inquisitor_get, "get", A_SYM, 0L); class_addmethod(c, (method)inquisitor_attributes, "attributes", 0); class_addmethod(c, (method)inquisitor_assist, "assist", A_CANT, 0L); CLASS_ATTR_SYM(c, "name", 0, t_inquisitor, name); CLASS_ATTR_ACCESSORS(c, "name", NULL, inquisitor_set_name); class_register(_sym_box, c); s_inquisitor_class = c; }
int main(void){ t_class *c = class_new("te_breakout~", (method)bkout_new, (method)dsp_free, sizeof(t_bkout), 0L, A_GIMME, 0); class_dspinit(c); class_addmethod(c, (method)bkout_dsp, "dsp", A_CANT, 0); class_addmethod(c, (method)bkout_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)bkout_notify, "notify", A_CANT, 0); class_addmethod(c, (method)bkout_assist, "assist", A_CANT, 0); CLASS_ATTR_SYM(c, "name", 0, t_bkout, name); CLASS_ATTR_LONG(c, "function", 0, t_bkout, function); CLASS_ATTR_LONG(c, "numoutlets", 0, t_bkout, numoutlets); class_register(CLASS_BOX, c); bkout_class = c; common_symbols_init(); return 0; }
int C74_EXPORT main(void) { t_class *c; c = class_new("breakgen", (method)breakgen_new, (method)breakgen_free, (long)sizeof(t_breakgen), 0L /* leave NULL!! */, A_GIMME, 0); class_addmethod(c, (method)breakgen_bang, "bang", 0); class_addmethod(c, (method)breakgen_identify, "identify", 0); CLASS_METHOD_ATTR_PARSE(c, "identify", "undocumented", gensym("long"), 0, "1"); // here's an otherwise undocumented method, which does something that the user can't actually // do from the patcher however, we want them to know about it for some weird documentation reason. // so let's make it documentable. it won't appear in the quickref, because we can't send it from a message. class_addmethod(c, (method)breakgen_acant, "blooop", A_CANT, 0); CLASS_METHOD_ATTR_PARSE(c, "blooop", "documentable", gensym("long"), 0, "1"); class_addmethod(c, (method)breakgen_wavetype, "wavetype", A_LONG, 0); class_addmethod(c, (method)breakgen_setfreq, "freq", A_FLOAT, 0); class_addmethod(c, (method)breakgen_setconstsig, "constval", A_FLOAT, 0); class_addmethod(c, (method)breakgen_setsr, "sr", A_FLOAT, 0); class_addmethod(c, (method)breakgen_setter, "set", A_GIMME, 0); class_addmethod(c, (method)breakgen_writebuf, "writebuf", A_GIMME, 0); class_addmethod(c, (method)breakgen_writefile, "writefile", A_GIMME, 0); /* you CAN'T call this from the patcher */ class_addmethod(c, (method)breakgen_assist, "assist", A_CANT, 0); class_addmethod(c, (method)breakgen_dblclick, "dblclick", A_CANT, 0); class_addmethod(c, (method)breakgen_getrand, "getrand", A_CANT, 0); CLASS_ATTR_SYM(c, "name", 0, t_breakgen, name); class_register(CLASS_BOX, c); breakgen_class = c; buffy_modified = gensym("buffer_modified"); return 0; }
int main(void) { t_class *c = class_new("radialbeameq~", (method)radialBeamformNew, (method)radialBeamformFree, sizeof(RadialBeamform), 0L, A_GIMME, 0); class_dspinit(c); version(0); CLASS_ATTR_LONG(c, "n", 0, RadialBeamform, sh_degree); CLASS_ATTR_FILTER_MIN(c, "n", 0); CLASS_ATTR_ACCESSORS(c, "n", 0, radialBeamformSetn); // needs special set get CLASS_ATTR_SYM(c, "mode", 0, RadialBeamform, bf_mode_sym); CLASS_ATTR_ACCESSORS(c, "mode", 0, radialBeamformSetMode); CLASS_ATTR_FLOAT(c, "max_wng", 0, RadialBeamform, max_wng); CLASS_ATTR_FILTER_MIN(c, "max_wng", 0); CLASS_ATTR_FILTER_MAX(c, "max_wng", 96); CLASS_ATTR_ACCESSORS(c, "max_wng", 0, radialBeamformSetWNG); CLASS_ATTR_FLOAT(c, "omega_cutoff", 0, RadialBeamform, omega_cutoff); CLASS_ATTR_FLOAT(c, "slope_cutoff", 0, RadialBeamform, slope_cutoff); CLASS_ATTR_FLOAT(c, "delta_n", 0, RadialBeamform, delta_n); CLASS_ATTR_ACCESSORS(c, "delta_n", 0, radialBeamformSetDeltan); CLASS_ATTR_FLOAT(c, "delta_n0", 0, RadialBeamform, delta_n0); CLASS_ATTR_ACCESSORS(c, "delta_n0", 0, radialBeamformSetDeltan); class_addmethod(c, (method)radialBeamformDsp, "dsp", A_CANT, 0); class_addmethod(c, (method)radialBeamformReset, "reset", 0); class_register(CLASS_BOX, c); radialbeameq_class = c; //common_symbols_init(); 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_float, "float", A_FLOAT, 0); class_addmethod(c, (method)HoaConvolve_int, "int", A_LONG, 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_ATTR_SYM (c, "buffers", 0, t_HoaConvolve, f_name); CLASS_ATTR_CATEGORY (c, "buffers", 0, "Behavior"); CLASS_ATTR_LABEL (c, "buffers", 0, "buffer~ Object Name"); CLASS_ATTR_ORDER (c, "buffers", 0, "1"); CLASS_ATTR_ACCESSORS (c, "buffers", NULL, buffer_set); CLASS_ATTR_DEFAULT (c, "buffers", 0, ""); CLASS_ATTR_SAVE (c, "buffers", 1); CLASS_ATTR_LONG (c, "channels", 0, t_HoaConvolve, f_channel); CLASS_ATTR_CATEGORY (c, "channels", 0, "Behavior"); CLASS_ATTR_LABEL (c, "channels", 0, "buffer~ Object Channel"); CLASS_ATTR_ORDER (c, "channels", 0, "2"); CLASS_ATTR_ACCESSORS (c, "channels", NULL, channel_set); CLASS_ATTR_DEFAULT (c, "channels", 0, "1"); CLASS_ATTR_SAVE (c, "channels", 1); class_dspinit(c); class_register(CLASS_BOX, c); HoaConvolve_class = c; class_findbyname(CLASS_NOBOX, gensym("hoa.encoder~")); return 0; }
int C74_EXPORT main(void) { t_class *c; c = class_new("hoa.recomposer~", (method)HoaRecomposer_new, (method)HoaRecomposer_free, (long)sizeof(t_HoaRecomposer), 0L, A_GIMME, 0); ; class_addmethod(c, (method)HoaRecomposer_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)HoaRecomposer_assist, "assist", A_CANT, 0); class_addmethod(c, (method)HoaRecomposer_angle, "angles", A_GIMME,0); class_addmethod(c, (method)HoaRecomposer_wide, "directivities", A_GIMME,0); class_addmethod(c, (method)HoaRecomposer_float, "float", A_FLOAT,0); CLASS_ATTR_SYM (c,"mode", 0, t_HoaRecomposer, f_mode); CLASS_ATTR_LABEL (c,"mode", 0, "Mode"); CLASS_ATTR_ENUM (c,"mode", 0, "fixe fisheye free"); CLASS_ATTR_CATEGORY (c,"mode", 0, "Behavior"); CLASS_ATTR_ACCESSORS (c,"mode", NULL, HoaRecomposer_set_attr_mode); CLASS_ATTR_ORDER (c,"mode", 0, "1"); CLASS_ATTR_SAVE (c,"mode", 1); CLASS_ATTR_DOUBLE (c,"ramp", 0, t_HoaRecomposer, f_ramp_time); CLASS_ATTR_LABEL (c,"ramp", 0, "Ramp Time in milliseconds"); CLASS_ATTR_CATEGORY (c,"ramp", 0, "Behavior"); CLASS_ATTR_ACCESSORS (c,"ramp", NULL, HoaRecomposer_ramp); CLASS_ATTR_ORDER (c,"ramp", 0, "2"); CLASS_ATTR_SAVE (c,"ramp", 1); class_dspinit(c); class_register(CLASS_BOX, c); HoaRecomposer_class = c; class_findbyname(CLASS_BOX, gensym("hoa.encoder~")); return 0; }
int JAMOMA_EXPORT_MAXOBJ main(void) { t_class *c; // Initialize Globals jamoma_init(); common_symbols_init(); // Define our class c = class_new("jcom.hub",(method)hub_new, (method)hub_free, sizeof(t_hub), (method)0L, A_GIMME, 0); // Make methods accessible for our class: class_addmethod(c, (method)hub_symbol, "anything", A_GIMME, 0L); class_addmethod(c, (method)hub_getobj_audioin, "getobj_audioin", A_CANT, 0); // return a pointer to the jcom.in~ object class_addmethod(c, (method)hub_getobj_audioout, "getobj_audioout", A_CANT, 0); // return a pointer to the jcom.out~ object class_addmethod(c, (method)hub_bang, "bang", 0); // bang is used by one of the ramp driving mechanisms to calculate values class_addmethod(c, (method)hub_subscribe, "subscribe", A_CANT, 0L); // client object subscribing class_addmethod(c, (method)hub_unsubscribe, "unsubscribe", A_CANT, 0L); // client object unsubscribing class_addmethod(c, (method)hub_subscriptions_refresh, "refreshSubscriptions", 0); class_addmethod(c, (method)hub_receive, "__feedback__", A_GIMME, 0L); // feedback from parameters and such class_addmethod(c, (method)hub_private, "private", A_GIMME, 0L); // internal communications such as jcom.remote class_addmethod(c, (method)hub_return, "return", A_GIMME, 0L); // feedback from jcom.return class_addmethod(c, (method)hub_return_extended, "return_extended", A_GIMME, 0L); // feedback from jcom.return // class_addmethod(c, (method)hub_autodoc, "documentation/generate", 0); // class_addmethod(c, (method)hub_autodoc, "/documentation/generate", 0); // class_addmethod(c, (method)hub_presets_post, "preset/post", 0); // class_addmethod(c, (method)hub_presets_post, "/preset/post", 0); class_addmethod(c, (method)hub_paramnames_get, "parameter_names:/dump", 0L); class_addmethod(c, (method)hub_paramnames_get, "/parameter_names:/dump", 0L); class_addmethod(c, (method)hub_messagenames_get, "message_names:/dump", 0L); class_addmethod(c, (method)hub_messagenames_get, "/message_names:/dump", 0L); class_addmethod(c, (method)hub_returnnames_get, "return_names:/dump", 0L); class_addmethod(c, (method)hub_returnnames_get, "/return_names:/dump", 0L); class_addmethod(c, (method)hub_allnames_get, "*_names:/dump", 0L); class_addmethod(c, (method)hub_allnames_get, "/*_names:/dump", 0L); class_addmethod(c, (method)hub_paramvalues_get, "parameter_values:/dump", 0L); class_addmethod(c, (method)hub_paramvalues_get, "/parameter_values:/dump", 0L); class_addmethod(c, (method)hub_modulename_get, "module_name:/get", 0L); class_addmethod(c, (method)hub_modulename_get, "/module_name:/get", 0L); class_addmethod(c, (method)core_modulename_get, "core_module_name:/get", 0L); class_addmethod(c, (method)hub_algorithmtype_get, "algorithm_type:/get", A_CANT); class_addmethod(c, (method)hub_algorithmtype_get, "/algorithm_type:/get", A_CANT); class_addmethod(c, (method)hub_paramnames_linklist, "fetchParameterNamesInLinklist", A_CANT, 0); // used by the ui ref menu class_addmethod(c, (method)hub_messagenames_linklist, "fetchMessageNamesInLinklist", A_CANT, 0); // used by the ui ref menu class_addmethod(c, (method)hub_returnnames_linklist, "fetchReturnNamesInLinklist", A_CANT, 0); // used by the ui ref menu class_addmethod(c, (method)hub_presetnames_linklist, "fetchPresetNamesInLinklist", A_CANT, 0); // used by the ui menu class_addmethod(c, (method)hub_module_help, "module/help", A_CANT, 0); // used by the ui ref menu class_addmethod(c, (method)hub_module_help, "/module/help", A_CANT, 0); // used by the ui ref menu class_addmethod(c, (method)hub_module_reference, "module/reference", A_CANT, 0); // used by the ui ref menu class_addmethod(c, (method)hub_module_reference, "/module/reference", A_CANT, 0); // used by the ui ref menu //class_addmethod(c, (method)hub_examine_context, "loadbang", A_CANT, 0); class_addmethod(c, (method)hub_notify, "notify", A_CANT, 0); class_addmethod(c, (method)hub_assist, "assist", A_CANT, 0L); class_addmethod(c, (method)object_obex_dumpout, "dumpout", A_CANT, 0); class_addmethod(c, (method)hub_edclose, "edclose", A_CANT, 0); // notification of closing the /getstate text editor window CLASS_ATTR_SYM(c, "name", 0, t_hub, osc_name); // instance name (osc) CLASS_ATTR_ACCESSORS(c, "name", NULL, hub_attr_setname); CLASS_ATTR_SYM(c, "class", 0, t_hub, attr_name); // module class name CLASS_ATTR_SYM(c, "module_type", 0, t_hub, attr_type); CLASS_ATTR_SYM(c, "algorithm_type", 0, t_hub, attr_algorithm_type); CLASS_ATTR_SYM(c, "description", 0, t_hub, attr_description); CLASS_ATTR_SYM(c, "user_path", 0, t_hub, user_path); // the path of the last file used to save the presets // Finalize our class class_register(_sym_box, c); s_hub_class = c; return 0; }