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 main(void) { t_class *c; c = class_new("fton", (method)fton_new, (method)fton_free, (long)sizeof(t_fton), 0L, A_GIMME, 0); c->c_flags |= CLASS_FLAG_NEWDICTIONARY; class_addmethod(c, (method)fton_int, "int", A_LONG, 0); class_addmethod(c, (method)fton_float, "float", A_FLOAT, 0); class_addmethod(c, (method)fton_list, "list", A_GIMME, 0); /* you CAN'T call this from the patcher */ class_addmethod(c, (method)fton_assist, "assist", A_CANT, 0); CLASS_ATTR_FLOAT(c, "refHz", 0, t_fton, a4); CLASS_ATTR_DEFAULT_SAVE(c, "refHz", 0, "440."); CLASS_ATTR_LONG(c, "roundMode", 0, t_fton, centMode); CLASS_ATTR_DEFAULT_SAVE(c, "roundMode", 0, "1"); CLASS_ATTR_LONG(c, "accidentalsMode", 0, t_fton, accdntls); CLASS_ATTR_DEFAULT_SAVE(c, "accidentalsMode", 0, "1"); class_register(CLASS_BOX, c); /* CLASS_NOBOX */ fton_class = c; version(0); return 0; }
extern "C" int C74_EXPORT main(void) { t_class *c; c = class_new("tap.count~",(method)count_tilde_new, (method)count_tilde_free, sizeof(t_count_tilde), (method)0L, A_GIMME, 0); common_symbols_init(); class_addmethod(c, (method)count_tilde_reset, "reset", 0L); class_addmethod(c, (method)count_tilde_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)count_tilde_assist, "assist", A_CANT, 0L); class_addmethod(c, (method)stdinletinfo, "inletinfo", A_CANT, 0); CLASS_ATTR_LONG(c, "high_bound", 0, t_count_tilde, attr_high_bound); CLASS_ATTR_LONG(c, "low_bound", 0, t_count_tilde, attr_low_bound); CLASS_ATTR_LONG(c, "active", 0, t_count_tilde, attr_active); CLASS_ATTR_STYLE(c, "active", 0, "onoff"); CLASS_ATTR_LONG(c, "autoreset", 0, t_count_tilde, attr_autoreset); CLASS_ATTR_STYLE(c, "autoreset", 0, "onoff"); CLASS_ATTR_LONG(c, "loop", 0, t_count_tilde, attr_loop); CLASS_ATTR_STYLE(c, "loop", 0, "onoff"); class_dspinit(c); // Setup object's class to work with MSP class_register(_sym_box, c); count_tilde_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 = class_new("j.meter~", (method)meter_new, (method)meter_free, sizeof(t_meter), (method)NULL, A_GIMME, 0L); c->c_flags |= CLASS_FLAG_NEWDICTIONARY; // use dictionary constructor jbox_initclass(c, 0); class_dspinitjbox(c); // jamoma_init(); common_symbols_init(); class_addmethod(c, (method)meter_bang, "bang", 0); class_addmethod(c, (method)meter_int, "int", A_LONG, 0); class_addmethod(c, (method)meter_float, "float", A_FLOAT, 0); class_addmethod(c, (method)meter_set, "set", A_FLOAT, 0); class_addmethod(c, (method)meter_dsp, "dsp", A_CANT, 0); class_addmethod(c, (method)meter_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)meter_paint, "paint", A_CANT, 0); class_addmethod(c, (method)meter_oksize, "oksize", A_CANT, 0); class_addmethod(c, (method)meter_bang, "mousedown", A_CANT, 0); class_addmethod(c, (method)meter_notify, "notify", A_CANT, 0); class_addmethod(c, (method)meter_assist, "assist", A_CANT, 0); // CLASS_ATTR_FLOAT(c, "interval", 0, t_meter, attrInterval); // CLASS_ATTR_FILTER_CLIP(c, "interval", kPollIntervalMinimum, kPollIntervalMaximum); // CLASS_ATTR_DEFAULT_SAVE(c, "interval", 0, "150"); // CLASS_ATTR_LABEL(c, "interval", 0, "Refresh Interval in Milliseconds"); // CLASS_ATTR_RGBA(c, "bordercolor", 0, t_meter, attrBorderColor); // CLASS_ATTR_STYLE_LABEL(c, "bordercolor", 0, "rgba", "Border Color"); // CLASS_ATTR_DEFAULT_SAVE_PAINT(c, "bordercolor", 0, "0.2 0.2 0.2 1."); CLASS_ATTR_LONG(c, "orientation", 0, t_meter, attrOrientation); CLASS_ATTR_LABEL(c, "orientation", 0, "Orientation"); CLASS_ATTR_CATEGORY(c, "orientation", 0,"Appearance"); CLASS_ATTR_ENUMINDEX(c, "orientation", 0, "Automatic Horizontal Vertical"); CLASS_ATTR_DEFAULT_SAVE_PAINT(c, "orientation", 0,"0"); CLASS_ATTR_RGBA(c, "bgcolor", 0, t_meter, attrBgColor); CLASS_ATTR_DEFAULTNAME_SAVE_PAINT(c, "bgcolor", 0, "0.1 0.1 0.1 1.0"); CLASS_ATTR_STYLE(c, "bgcolor", 0, "rgba"); CLASS_ATTR_LABEL(c, "bgcolor", 0, "Background Color"); CLASS_ATTR_LONG(c, "defeat", 0, t_meter, attrDefeat); CLASS_ATTR_LABEL(c, "defeat", 0, "defeat"); CLASS_ATTR_DEFAULT(c, "defeat", 0, "0"); CLASS_ATTR_SAVE(c, "defeat", 0); CLASS_ATTR_STYLE(c, "defeat", 0, "onoff"); CLASS_ATTR_CATEGORY(c, "defeat", 0,"Behavior"); CLASS_ATTR_DEFAULT(c, "patching_rect", 0, "0. 0. 100. 12."); CLASS_ATTR_MIN(c, "patching_size", 0, "1. 1."); // CLASS_ATTR_DEFAULT_SAVE_PAINT(c, "bgcolor", 0, "0.1 0.1 0.1 1.0"); class_register(CLASS_BOX, c); s_meter_class = c; return 0; }
extern "C" void setup_c0x2enumber_tilde(void) { t_eclass *c; c = eclass_new("c.number~", (method)number_tilde_new, (method)number_tilde_free, (short)sizeof(t_number_tilde), 0L, A_GIMME, 0); eclass_dspinit(c); eclass_init(c, 0); cream_initclass(c); eclass_addmethod(c, (method) number_tilde_dsp, "dsp", A_NULL, 0); eclass_addmethod(c, (method) number_tilde_assist, "assist", A_NULL, 0); eclass_addmethod(c, (method) number_tilde_paint, "paint", A_NULL, 0); eclass_addmethod(c, (method) number_tilde_notify, "notify", A_NULL, 0); eclass_addmethod(c, (method) number_tilde_getdrawparams, "getdrawparams", A_NULL, 0); eclass_addmethod(c, (method) number_tilde_oksize, "oksize", A_NULL, 0); eclass_addmethod(c, (method) number_tilde_output, "bang", A_NULL, 0); CLASS_ATTR_DEFAULT (c, "size", 0, "53 13"); CLASS_ATTR_LONG (c, "interval", 0, t_number_tilde, f_interval); CLASS_ATTR_ORDER (c, "interval", 0, "2"); CLASS_ATTR_LABEL (c, "interval", 0, "Refresh Interval in Milliseconds"); CLASS_ATTR_FILTER_MIN (c, "interval", 20); CLASS_ATTR_DEFAULT (c, "interval", 0, "50"); CLASS_ATTR_SAVE (c, "interval", 1); CLASS_ATTR_STYLE (c, "interval", 0, "number"); CLASS_ATTR_LONG (c, "decimal", 0, t_number_tilde, f_ndecimal); CLASS_ATTR_ORDER (c, "decimal", 0, "3"); CLASS_ATTR_LABEL (c, "decimal", 0, "Number of decimal"); CLASS_ATTR_DEFAULT (c, "decimal", 0, "6"); CLASS_ATTR_FILTER_MIN (c, "decimal", 0); CLASS_ATTR_FILTER_MAX (c, "decimal", 6); CLASS_ATTR_SAVE (c, "decimal", 1); CLASS_ATTR_STYLE (c, "decimal", 0, "number"); CLASS_ATTR_RGBA (c, "bgcolor", 0, t_number_tilde, f_color_background); CLASS_ATTR_LABEL (c, "bgcolor", 0, "Background Color"); CLASS_ATTR_ORDER (c, "bgcolor", 0, "1"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "bgcolor", 0, "0.75 0.75 0.75 1."); CLASS_ATTR_STYLE (c, "bgcolor", 0, "color"); CLASS_ATTR_RGBA (c, "bdcolor", 0, t_number_tilde, f_color_border); CLASS_ATTR_LABEL (c, "bdcolor", 0, "Border Color"); CLASS_ATTR_ORDER (c, "bdcolor", 0, "2"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "bdcolor", 0, "0.5 0.5 0.5 1."); CLASS_ATTR_STYLE (c, "bdcolor", 0, "color"); CLASS_ATTR_RGBA (c, "textcolor", 0, t_number_tilde, f_color_text); CLASS_ATTR_LABEL (c, "textcolor", 0, "Text Color"); CLASS_ATTR_ORDER (c, "textcolor", 0, "3"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "textcolor", 0, "0. 0. 0. 1."); CLASS_ATTR_STYLE (c, "textcolor", 0, "color"); eclass_register(CLASS_BOX, c); number_tilde_class = c; }
extern "C" void setup_c0x2escope_tilde(void) { t_eclass *c; c = eclass_new("c.scope~", (method)scope_new, (method)scope_free, (short)sizeof(t_scope), 0L, A_GIMME, 0); eclass_guiinit(c, 0); eclass_dspinit(c); eclass_addmethod(c, (method) scope_dsp, "dsp", A_NULL, 0); eclass_addmethod(c, (method) scope_paint, "paint", A_NULL, 0); eclass_addmethod(c, (method) scope_getdrawparams, "getdrawparams", A_NULL, 0); eclass_addmethod(c, (method) scope_oksize, "oksize", A_NULL, 0); CLASS_ATTR_INVISIBLE (c, "send", 1); CLASS_ATTR_DEFAULT (c, "size", 0, "125 100"); CLASS_ATTR_LONG (c, "bufdis", 0, t_scope, f_display_size); CLASS_ATTR_ORDER (c, "bufdis", 0, "1"); CLASS_ATTR_LABEL (c, "bufdis", 0, "Display Buffer Size"); CLASS_ATTR_FILTER_CLIP (c, "bufdis", 2, 8092); CLASS_ATTR_DEFAULT (c, "bufdis", 0, "256"); CLASS_ATTR_SAVE (c, "bufdis", 1); CLASS_ATTR_STYLE (c, "bufdis", 0, "number"); CLASS_ATTR_LONG (c, "bufsig", 0, t_scope, f_signal_size); CLASS_ATTR_ORDER (c, "bufsig", 0, "2"); CLASS_ATTR_LABEL (c, "bufsig", 0, "Signal Buffer Size"); CLASS_ATTR_FILTER_CLIP (c, "bufsig", 2, 8092); CLASS_ATTR_DEFAULT (c, "bufsig", 0, "256"); CLASS_ATTR_SAVE (c, "bufsig", 1); CLASS_ATTR_STYLE (c, "bufsig", 0, "number"); CLASS_ATTR_FLOAT_ARRAY (c, "range", 0, t_scope, f_range, 2); CLASS_ATTR_ORDER (c, "range", 0, "2"); CLASS_ATTR_LABEL (c, "range", 0, "Range"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "range", 0, "-1 1"); CLASS_ATTR_RGBA (c, "bgcolor", 0, t_scope, f_color_background); CLASS_ATTR_LABEL (c, "bgcolor", 0, "Background Color"); CLASS_ATTR_ORDER (c, "bgcolor", 0, "1"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "bgcolor", 0, "0.75 0.75 0.75 1."); CLASS_ATTR_STYLE (c, "bgcolor", 0, "color"); CLASS_ATTR_RGBA (c, "bdcolor", 0, t_scope, f_color_border); CLASS_ATTR_LABEL (c, "bdcolor", 0, "Border Color"); CLASS_ATTR_ORDER (c, "bdcolor", 0, "2"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "bdcolor", 0, "0.5 0.5 0.5 1."); CLASS_ATTR_STYLE (c, "bdcolor", 0, "color"); CLASS_ATTR_RGBA (c, "sicolor", 0, t_scope, f_color_signal); CLASS_ATTR_LABEL (c, "sicolor", 0, "Signal Color"); CLASS_ATTR_ORDER (c, "sicolor", 0, "3"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "sicolor", 0, "0. 0.6 0. 0.8"); CLASS_ATTR_STYLE (c, "sicolor", 0, "color"); eclass_register(CLASS_BOX, c); cscope_class = c; }
int main() { this_class = class_new("irmeasure~", (method) irmeasure_new, (method)irmeasure_free, sizeof(t_irmeasure), 0L, A_GIMME, 0); class_addmethod(this_class, (method)irmeasure_assist, "assist", A_CANT, 0L); class_addmethod(this_class, (method)irmeasure_dsp, "dsp", A_CANT, 0L); class_addmethod(this_class, (method)irmeasure_dsp64, "dsp64", A_CANT, 0L); class_addmethod(this_class, (method)irmeasure_sweep, "sweep", A_GIMME, 0L); class_addmethod(this_class, (method)irmeasure_mls, "mls", A_GIMME, 0L); class_addmethod(this_class, (method)irmeasure_noise, "white", A_GIMME, 0L); class_addmethod(this_class, (method)irmeasure_noise, "brown", A_GIMME, 0L); class_addmethod(this_class, (method)irmeasure_noise, "pink", A_GIMME, 0L); class_addmethod(this_class, (method)irmeasure_tone, "tone", A_FLOAT, A_DEFLONG, 0L); class_addmethod(this_class, (method)irmeasure_stop, "stop", 0L); class_addmethod(this_class, (method)irmeasure_clear, "clear", 0L); class_addmethod(this_class, (method)irmeasure_active_ins, "activeins", A_LONG, 0L); class_addmethod(this_class, (method)irmeasure_active_outs, "activeouts", A_LONG, 0L); class_addmethod(this_class, (method)irmeasure_reprocess, "reprocess", 0L); class_addmethod(this_class, (method)irmeasure_extract, "extract", A_GIMME, 0L); class_addmethod(this_class, (method)irmeasure_dump, "dump", A_GIMME, 0L); class_addmethod(this_class, (method)irmeasure_getir, "getir", A_GIMME, 0L); declare_HIRT_common_attributes(this_class); CLASS_ATTR_LONG(this_class, "absprogress", 0, t_irmeasure, abs_progress); CLASS_ATTR_STYLE_LABEL(this_class,"absprogress",0,"onoff","Absolute Progress"); CLASS_ATTR_DOUBLE(this_class, "amp", 0, t_irmeasure, amp); CLASS_ATTR_LABEL(this_class,"amp", 0, "Signal Amplitude (dB)"); CLASS_ATTR_LONG(this_class, "invamp", 0, t_irmeasure, inv_amp); CLASS_ATTR_STYLE_LABEL(this_class,"invamp",0,"onoff","Invert Amplitude"); CLASS_ATTR_LONG(this_class, "bandlimit", 0, t_irmeasure, bandlimit); CLASS_ATTR_STYLE_LABEL(this_class,"bandlimit",0,"onoff","Bandlimit Sweep Measurements"); class_dspinit(this_class); class_register(CLASS_BOX, this_class); buffer_access_init(); 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 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; }
void testequals_classinit(void) { t_class *c = class_new("test.equals", (method)testequals_new, (method)testequals_free, sizeof(t_testequals), (method)NULL, A_GIMME, 0); class_addmethod(c, (method)testequals_float, "float", A_FLOAT, 0); class_addmethod(c, (method)testequals_assist, "assist", A_CANT, 0); CLASS_ATTR_LONG(c, "tolerance", 0, t_testequals, x_tolerance); CLASS_ATTR_LONG(c, "single_precision", 0, t_testequals, x_single_precision); class_register(_sym_box, c); s_testequals_class = c; }
int main(void) { t_class *c; c = class_new("huygens~", (method)Huygens_new, (method)Huygens_free, (long)sizeof(t_Huygens), 0L, A_GIMME, 0); class_addmethod(c, (method)Huygens_dsp, "dsp", A_CANT, 0); class_addmethod(c, (method)Huygens_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)Huygens_assist, "assist", A_CANT, 0); class_addmethod(c, (method)Huygens_float, "float", A_FLOAT, 0); class_addmethod(c, (method)Huygens_float, "int", A_LONG, 0); CLASS_ATTR_LONG (c, "shape", 0, t_Huygens, f_mode); CLASS_ATTR_LABEL (c, "shape", 0, "Shape of the loudspeakers array"); CLASS_ATTR_ENUMINDEX (c, "shape", 0, "Linear \" \"Circular"); CLASS_ATTR_SAVE (c, "shape", 1); CLASS_ATTR_FILTER_CLIP (c, "shape", 0, 1); CLASS_ATTR_ORDER (c, "shape", 0, "0"); CLASS_ATTR_FLOAT (c, "distance", 0, t_Huygens, f_speakersDistance); CLASS_ATTR_LABEL (c, "distance", 0, "Distance between speakers array and listener"); //CLASS_ATTR_ACCESSORS (c, "distance", NULL, distance_set); CLASS_ATTR_SAVE (c, "distance", 1); CLASS_ATTR_FILTER_MIN (c, "distance", 0.); CLASS_ATTR_ORDER (c, "distance", 0, "1"); CLASS_ATTR_FLOAT (c, "delta", 0, t_Huygens, f_speakersDelta); CLASS_ATTR_LABEL (c, "delta", 0, "Distance between speakers"); //CLASS_ATTR_ACCESSORS (c, "delta", NULL, delta_set); CLASS_ATTR_SAVE (c, "delta", 1); CLASS_ATTR_FILTER_MIN (c, "delta", 0.); CLASS_ATTR_ORDER (c, "delta", 0, "2"); CLASS_ATTR_LONG (c, "interpolation", 0, t_Huygens, f_interpolation); CLASS_ATTR_LABEL (c, "interpolation", 0, "Delay interpolation"); CLASS_ATTR_ENUMINDEX (c, "interpolation", 0, "Linear \" \"Quadratic \" \"Lagrange"); CLASS_ATTR_SAVE (c, "interpolation", 1); CLASS_ATTR_FILTER_CLIP (c, "interpolation", 0, 2); CLASS_ATTR_ORDER (c, "interpolation", 0, "3"); class_dspinit(c); class_register(CLASS_BOX, c); Huygens_class = c; post("huygens~ by Julien Colafrancesco & Pierre Guillot"); post("Copyright (C) 2012, CICM / Universite Paris 8"); return 0; }
int C74_EXPORT main(void) { t_class *c; c = class_new("uisimp4", (method)uisimp_new, (method)uisimp_free, sizeof(t_uisimp), (method)NULL, A_GIMME, 0L); c->c_flags |= CLASS_FLAG_NEWDICTIONARY; jbox_initclass(c, JBOX_COLOR | JBOX_FIXWIDTH | JBOX_FONTATTR); class_addmethod(c, (method) uisimp_paint, "paint", A_CANT, 0); class_addmethod(c, (method) uisimp_int, "int", A_LONG, 0); class_addmethod(c, (method) uisimp_mousedown, "mousedown", A_CANT, 0); class_addmethod(c, (method) uisimp_mousedragdelta, "mousedragdelta", A_CANT, 0); class_addmethod(c, (method) uisimp_mouseup, "mouseup", A_CANT, 0); class_addmethod(c, (method) uisimp_assist, "assist", A_CANT, 0); class_addmethod(c, (method) jbox_notify, "notify", A_CANT, 0); CLASS_ATTR_DEFAULT(c, "patching_rect", 0, "0 0 60 60"); CLASS_ATTR_DEFAULT(c, "color", 0, "0.8 0.5 0.2 1"); CLASS_ATTR_LONG(c,"inset",0, t_uisimp, j_inset); CLASS_ATTR_LABEL(c,"inset",0,"Filled Area Inset"); CLASS_ATTR_CATEGORY(c,"inset",0,"Tweaks"); CLASS_ATTR_DEFAULT_SAVE_PAINT(c,"inset",0,"3"); CLASS_ATTR_CHAR(c,"reset",0, t_uisimp, j_reset); CLASS_ATTR_STYLE_LABEL(c,"reset",0,"onoff","Reset Counter on Click"); CLASS_ATTR_CATEGORY(c,"reset",0,"Tweaks"); CLASS_ATTR_DEFAULT_SAVE(c,"reset",0,"1"); CLASS_ATTR_LONG(c,"shape",0, t_uisimp, j_shape); CLASS_ATTR_LABEL(c,"shape", 0, "Fill Shape"); CLASS_ATTR_CATEGORY(c,"shape",0,"Shape"); CLASS_ATTR_ENUMINDEX(c,"shape", 0, "Square Circle Angle"); CLASS_ATTR_DEFAULT_SAVE_PAINT(c,"shape",0,"0"); s_uisimp_class = c; class_register(CLASS_BOX, s_uisimp_class); return 0; }
int main(void){ t_class *c; c = class_new("sc.gendy1~", (method)gendy_new, (method)gendy_free, (long)sizeof(t_gendy), 0L, A_GIMME, 0); class_addmethod(c, (method)gendy_dsp, "dsp", A_CANT, 0); class_addmethod(c, (method)gendy_assist, "assist", A_CANT, 0); // the gendy parameters are set via attributes CLASS_ATTR_LONG (c, "ampdist", ATTR_FLAGS_NONE, t_gendy, g_ampdist); CLASS_ATTR_FILTER_CLIP (c, "ampdist", 0, 6); CLASS_ATTR_ORDER (c, "ampdist", ATTR_FLAGS_NONE, "1"); CLASS_ATTR_LONG (c, "durdist", ATTR_FLAGS_NONE, t_gendy, g_durdist); CLASS_ATTR_FILTER_CLIP (c, "durdist", 0, 6); CLASS_ATTR_ORDER (c, "durdist", ATTR_FLAGS_NONE, "2"); CLASS_ATTR_FLOAT (c, "adparam", ATTR_FLAGS_NONE, t_gendy, g_adparam); CLASS_ATTR_ORDER (c, "adparam", ATTR_FLAGS_NONE, "3"); CLASS_ATTR_FLOAT (c, "ddparam", ATTR_FLAGS_NONE, t_gendy, g_ddparam); CLASS_ATTR_ORDER (c, "ddparam", ATTR_FLAGS_NONE, "4"); CLASS_ATTR_FLOAT (c, "minfreq", ATTR_FLAGS_NONE, t_gendy, g_minfreq); CLASS_ATTR_FILTER_MIN (c, "minfreq", 1.f); CLASS_ATTR_ORDER (c, "minfreq", ATTR_FLAGS_NONE, "5"); CLASS_ATTR_FLOAT (c, "maxfreq", ATTR_FLAGS_NONE, t_gendy, g_maxfreq); CLASS_ATTR_FILTER_MIN (c, "maxfreq", 1.f); CLASS_ATTR_ORDER (c, "maxfreq", ATTR_FLAGS_NONE, "6"); CLASS_ATTR_FLOAT (c, "ampscale", ATTR_FLAGS_NONE, t_gendy, g_ampscale); CLASS_ATTR_FILTER_CLIP (c, "ampscale", 0.f, 1.f); CLASS_ATTR_ORDER (c, "ampscale", ATTR_FLAGS_NONE, "7"); CLASS_ATTR_FLOAT (c, "durscale", ATTR_FLAGS_NONE, t_gendy, g_durscale); CLASS_ATTR_FILTER_CLIP (c, "durscale", 0.f, 1.f); CLASS_ATTR_ORDER (c, "durscale", ATTR_FLAGS_NONE, "8"); CLASS_ATTR_LONG (c, "knum", ATTR_FLAGS_NONE, t_gendy, g_knum); CLASS_ATTR_ORDER (c, "knum", ATTR_FLAGS_NONE, "9"); class_dspinit(c); class_register(CLASS_BOX, c); gendy_class = c; return EXIT_SUCCESS; }
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; }
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 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; }
void C74_EXPORT ext_main(void *r) { t_class *c; c = class_new("3Dpoltocar", (method)dpoltocar_new,0L, (short)sizeof(t_dpoltocar), 0L, A_DEFLONG, A_DEFLONG, 0); class_addmethod(c, (method)dpoltocar_assist , "assist", A_CANT, 0L); class_addmethod(c, (method)dpoltocar_bang, "bang", 0L); class_addmethod(c, (method)dpoltocar_list, "list", A_GIMME,0L); // class_addmethod(c, (method)dpoltocar_mode, "mode", A_LONG, 0L); // class_addmethod(c, (method)inspector_open, "info", A_CANT, 0L); // CLASS_STICKY_ATTR(c, "category", 0L, "3Dcartopol"); CLASS_ATTR_LONG(c, "mode", 0L, t_dpoltocar, d_mode); CLASS_ATTR_LABEL(c, "mode", 0L, "angle mode"); CLASS_ATTR_STYLE(c, "mode", 0L, "enum"); CLASS_ATTR_ENUMINDEX(c, "mode", 0L, "\"radians\" \"degrees\""); CLASS_ATTR_SAVE(c, "mode", 0L ); CLASS_ATTR_FILTER_CLIP(c, "mode", 0, 1); CLASS_ATTR_ORDER(c, "mode", 0L, "0"); my_pi = 3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117068; half_pi = my_pi / 2.0; divide_pi = my_pi / 180.0; two_pi = 2.0 * my_pi; divide_two_pi = 1.0 / two_pi; class_register(CLASS_BOX, c); dpoltocar_class = c; post("· 3Dpoltocar · jasch · "__DATE__" · © all rights reserved",0); return; }
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; }
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) #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; }
extern "C" void setup_c0x2eblackboard(void) { t_eclass *c; c = eclass_new("c.blackboard", (method)blackboard_new, (method)blackboard_free, (short)sizeof(t_blackboard), 0L, A_GIMME, 0); eclass_guiinit(c, 0); eclass_addmethod(c, (method) blackboard_paint, "paint", A_NULL, 0); eclass_addmethod(c, (method) blackboard_notify, "notify", A_NULL, 0); eclass_addmethod(c, (method) blackboard_getdrawparams, "getdrawparams", A_NULL, 0); eclass_addmethod(c, (method) blackboard_oksize, "oksize", A_NULL, 0); eclass_addmethod(c, (method) blackboard_width, "width", A_FLOAT,0); eclass_addmethod(c, (method) blackboard_color, "color", A_GIMME,0); eclass_addmethod(c, (method) blackboard_fill, "fill", A_FLOAT,0); eclass_addmethod(c, (method) blackboard_line, "line", A_GIMME,0); eclass_addmethod(c, (method) blackboard_path, "path", A_GIMME,0); eclass_addmethod(c, (method) blackboard_rect, "rect", A_GIMME,0); eclass_addmethod(c, (method) blackboard_oval, "oval", A_GIMME,0); eclass_addmethod(c, (method) blackboard_arc, "arc", A_GIMME,0); eclass_addmethod(c, (method) blackboard_image, "image", A_GIMME,0); eclass_addmethod(c, (method) blackboard_text, "text", A_GIMME,0); eclass_addmethod(c, (method) blackboard_clear, "clear", A_NULL, 0); eclass_addmethod(c, (method) blackboard_reset, "reset", A_NULL, 0); eclass_addmethod(c, (method) blackboard_mousemove, "mousemove", A_NULL, 0); eclass_addmethod(c, (method) blackboard_mousedrag, "mousedrag", A_NULL, 0); eclass_addmethod(c, (method) blackboard_mousedown, "mousedown", A_NULL, 0); eclass_addmethod(c, (method) blackboard_mouseup, "mouseup", A_NULL, 0); CLASS_ATTR_DEFAULT (c, "size", 0, "200 200"); CLASS_ATTR_INVISIBLE (c, "send", 1); CLASS_ATTR_LONG (c, "chalkmode", 0, t_blackboard, f_pen_mode); CLASS_ATTR_LABEL (c, "chalkmode", 0, "Chalk Mode"); CLASS_ATTR_FILTER_CLIP (c, "chalkmode", 0, 1); CLASS_ATTR_ORDER (c, "chalkmode", 0, "1"); CLASS_ATTR_DEFAULT (c, "chalkmode", 0, "1"); CLASS_ATTR_SAVE (c, "chalkmode", 0); CLASS_ATTR_STYLE (c, "chalkmode", 0, "onoff"); CLASS_ATTR_RGBA (c, "bgcolor", 0, t_blackboard, f_color_background); CLASS_ATTR_LABEL (c, "bgcolor", 0, "Background Color"); CLASS_ATTR_ORDER (c, "bgcolor", 0, "1"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "bgcolor", 0, "0.75 0.75 0.75 1."); CLASS_ATTR_STYLE (c, "bgcolor", 0, "color"); CLASS_ATTR_RGBA (c, "bdcolor", 0, t_blackboard, f_color_border); CLASS_ATTR_LABEL (c, "bdcolor", 0, "Border Color"); CLASS_ATTR_ORDER (c, "bdcolor", 0, "2"); CLASS_ATTR_DEFAULT_SAVE_PAINT (c, "bdcolor", 0, "0.5 0.5 0.5 1."); CLASS_ATTR_STYLE (c, "bdcolor", 0, "color"); eclass_register(CLASS_BOX, c); blackboard_class = c; }
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; }
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; }
/**************************************************************** * Initialization */ void ext_main(void *r) { t_class *c; c = class_new("strstr", (method)strstr_new, (method)strstr_free, (long)sizeof(t_strstr), (method)NULL, A_GIMME, 0); class_addmethod(c, (method)strstr_assist, "assist", A_CANT, 0); class_addmethod(c, (method)strstr_bang, "bang", 0); class_addmethod(c, (method)strstr_int, "int", A_LONG, 0); class_addmethod(c, (method)strstr_float, "float", A_FLOAT, 0); class_addmethod(c, (method)strstr_list, "list", A_GIMME, 0); class_addmethod(c, (method)strstr_anything, "anything", A_GIMME, 0); class_addmethod(c, (method)strstr_set, "set", A_GIMME, 0); class_addmethod(c, (method)strstr_post, "post", 0); class_addmethod(c, (method)stdinletinfo, "inletinfo", A_CANT, 0); CLASS_ATTR_LONG(c, "mode", 0, t_strstr, mode); CLASS_ATTR_ORDER(c, "mode", 0, "1"); // order CLASS_ATTR_LABEL(c, "mode", 0, "mode"); // label CLASS_ATTR_FILTER_CLIP(c, "mode", 0, 1); // min-max filter CLASS_ATTR_SAVE(c, "mode", 0); // save with patcher CLASS_ATTR_SELFSAVE(c, "mode", 0); // display as saved CLASS_ATTR_ACCESSORS(c, "mode", NULL, str_mode_set); CLASS_ATTR_LONG(c, "fprecision", 0, t_strstr, fprecision); CLASS_ATTR_ORDER(c, "fprecision", 0, "2"); CLASS_ATTR_LABEL(c, "fprecision", 0, "float precision"); CLASS_ATTR_FILTER_CLIP(c, "fprecision", 0, 10); CLASS_ATTR_SAVE(c, "fprecision", 0); CLASS_ATTR_SELFSAVE(c, "fprecision", 0); CLASS_ATTR_ACCESSORS(c, "fprecision", NULL, str_fprecision_set); class_register(CLASS_BOX, c); strstr_class = c; }
int main (void) { this_class = class_new ("irextract~", (method) irextract_new, (method)irextract_free, sizeof(t_irextract), 0L, A_GIMME, 0); class_addmethod (this_class, (method)irextract_assist, "assist", A_CANT, 0L); class_addmethod (this_class, (method)irextract_sweep, "sweep", A_GIMME, 0L); class_addmethod (this_class, (method)irextract_mls, "mls", A_GIMME, 0L); class_addmethod (this_class, (method)irextract_noise, "white", A_GIMME, 0L); class_addmethod (this_class, (method)irextract_noise, "brown", A_GIMME, 0L); class_addmethod (this_class, (method)irextract_noise, "pink", A_GIMME, 0L); class_addmethod (this_class, (method)irextract_clear, "clear", 0L); class_addmethod (this_class, (method)irextract_getir, "getir", A_GIMME, 0L); class_addmethod (this_class, (method)irextract_dump, "dump", A_GIMME, 0L); declare_HIRT_common_attributes(this_class); CLASS_ATTR_DOUBLE(this_class, "amp", 0, t_irextract, amp); CLASS_ATTR_LABEL(this_class,"amp", 0, "Signal Amplitude (dB)"); CLASS_ATTR_LONG(this_class, "invamp", 0, t_irextract, inv_amp); CLASS_ATTR_STYLE_LABEL(this_class,"invamp",0,"onoff","Invert Amplitude"); CLASS_ATTR_LONG(this_class, "bandlimit", 0, t_irextract, bandlimit); CLASS_ATTR_STYLE_LABEL(this_class,"bandlimit",0,"onoff","Bandlimit Sweep Measurements"); class_register(CLASS_BOX, this_class); buffer_access_init(); 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) // main recieves a copy of the Max function macros table { t_class *c; TTDSPInit(); common_symbols_init(); // Define our class c = class_new("j.xfade~", (method)fade_new, (method)fade_free, sizeof(t_fade), (method)0L, A_GIMME, 0); // Make methods accessible for our class: class_addmethod(c, (method)fade_float, "float", A_FLOAT,0L); class_addmethod(c, (method)fade_dsp, "dsp", A_CANT, 0L); class_addmethod(c, (method)fade_dsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)object_obex_dumpout, "dumpout", A_CANT, 0); class_addmethod(c, (method)fade_assist, "assist", A_CANT, 0L); class_addmethod(c, (method)jamoma_fileusage, "fileusage", A_CANT, 0); // Add attributes to our class: CLASS_ATTR_LONG(c, "shape", 0, t_fade, attr_shape); CLASS_ATTR_ACCESSORS(c, "shape", NULL, attr_set_shape); CLASS_ATTR_ENUMINDEX(c, "shape", 0, "EqualPower Linear SquareRoot"); CLASS_ATTR_LONG(c, "mode", 0, t_fade, attr_mode); CLASS_ATTR_ACCESSORS(c, "mode", NULL, attr_set_mode); CLASS_ATTR_ENUMINDEX(c, "mode", 0, "LookupTable Calculate"); CLASS_ATTR_FLOAT(c, "position", 0, t_fade, attr_position); CLASS_ATTR_ACCESSORS(c, "position", NULL, attr_set_position); // Setup our class to work with MSP class_dspinit(c); // Finalize our class class_register(CLASS_BOX, c); s_fade_class = c; return 0; }