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;
}
示例#2
0
void ext_main(void *r)
#endif
{
    t_class *c;
    
    c = class_new("hoa.dac~", (method)hoa_dac_new, (method)hoa_dac_free, (short)sizeof(t_hoa_dac), 0L, A_GIMME, 0);
    class_setname((char *)"hoa.dac~", (char *)"hoa.dac~");
    
    hoa_initclass(c, (method)hoa_getinfos);
    
    // @method signal @digest Function depends on inlet
    // @description The <m>signal</m> A signal coming into an inlet of dac~ is sent to the audio output channel corresponding to the inlet. The signal must be between -1 and 1 to avoid clipping by the DAC.
    class_addmethod(c, (method)hoa_dac_dsp64,		"dsp64",		A_CANT,  0);
    class_addmethod(c, (method)hoa_dac_assist,		"assist",		A_CANT,	 0);
    
    // @method (mouse) @digest Double-click to open the Audio Status window
    class_addmethod(c, (method)hoa_dac_dblclick,	"dblclick",		A_CANT,  0);
    
    // @method int @digest Enable/disable audio processing
    // @description A non-zero number turns on audio processing in all loaded patches. 0 turns off audio processing in all loaded patches.
    // @marg 0 on/off-flag @optional 0 @type int
    class_addmethod(c, (method)hoa_dac_int,			"int",			A_LONG,  0);
    
    // @method list @digest Enable/disable audio processing
    // @description List comprised of integers, sets the logical output channels for each signal inlet in order from left to right.
    // @marg 0 output-channel-designation @optional 0 @type list
    class_addmethod(c, (method)hoa_dac_list,		"list",			A_GIMME, 0);
    //class_addmethod(c, (method)hoa_dac_set,			"set",			A_GIMME, 0); // Todo : proxy_setinlet() ??
    
    // @method start @digest Turns on audio processing in all loaded patches.
    // @description Turns on audio processing in all loaded patches.
    class_addmethod(c, (method)hoa_dac_start,		"start",		A_NOTHING,  0);
    
    // @method stop @digest Turns off audio processing in all loaded patches.
    // @description Turns off audio processing in all loaded patches.
    class_addmethod(c, (method)hoa_dac_stop,		"stop",			A_NOTHING,  0);
    
    // @method startwindow @digest Enable audio processing in local patch and subpatches only.
    // @description Turns on audio processing only in the patch in which this <o>hoa.dac~</o> is located, and in subpatches of that patch. Turns off audio processing in all other patches.
    class_addmethod(c, (method)hoa_dac_startwindow,	"startwindow",	A_NOTHING,  0);
    
    // @method open @digest Opens the Audio Status window.
    // @description Opens the Audio Status window.
    class_addmethod(c, (method)hoa_dac_open,		"open",			A_NOTHING,  0);
    
    // @method wclose @digest Close the Audio Status window.
    // @description Close the Audio Status window.
    class_addmethod(c, (method)hoa_dac_wclose,		"wclose",		A_NOTHING,  0);
    
    class_dspinit(c);
    class_register(CLASS_BOX, c);
    hoa_dac_class = c;
}
示例#3
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;
}
示例#4
0
void ext_main(void *r)
{
	t_class *c;

	c = class_new("times~", (method)times_new, (method)dsp_free, sizeof(t_times), 0L, A_DEFFLOAT, 0);
	class_dspinit(c);

	class_addmethod(c, (method)times_dsp64, "dsp64", A_CANT, 0);
	class_addmethod(c, (method)times_float, "float", A_FLOAT, 0);
	class_addmethod(c, (method)times_int, "int", A_LONG, 0);
	class_addmethod(c, (method)times_assist, "assist", A_CANT, 0);
	class_setname("*~","times~"); // because the filename on disk is different from the object name in Max

	class_register(CLASS_BOX, c);
	times_class = c;
}
int C74_EXPORT main(void)
#endif
{
    t_class *c;
    
    c = class_new("hoa.2d.projector~", (method)hoa_projector_new, (method)hoa_projector_free, (long)sizeof(t_hoa_projector), 0L, A_GIMME, 0);
    class_setname((char *)"hoa.2d.projector~", (char *)"hoa.2d.projector~");
    
    hoa_initclass(c, (method)hoa_getinfos);
    
    // @method signal @digest Array of circular harmonic signals to be projected.
    // @description Array of circular harmonic signals to be projected.
    class_addmethod(c, (method)hoa_projector_dsp64,		"dsp64",	A_CANT, 0);
    class_addmethod(c, (method)hoa_projector_assist,    "assist",	A_CANT, 0);
    
    class_dspinit(c);
    class_register(CLASS_BOX, c);
    class_alias(c, gensym("hoa.projector~"));
    hoa_projector_class = c;
    
    return 0;
}
void ext_main(void *r)
#endif
{
    t_class *c;
    
    c = class_new("hoa.gain~", (method)hoa_gain_new, (method)hoa_gain_free, sizeof(t_hoa_gain), (method)NULL, A_GIMME, 0L);
    class_setname((char *)"hoa.gain~", (char *)"hoa.gain~");
    
    c->c_flags |= CLASS_FLAG_NEWDICTIONARY;
    class_dspinitjbox(c);
    jbox_initclass(c, JBOX_FIXWIDTH | JBOX_COLOR );
    
    hoa_initclass(c, (method)hoa_getinfos);
    
    class_addmethod (c, (method) hoa_gain_assist,              "assist",               A_CANT, 0);
    class_addmethod (c, (method) hoa_gain_paint,               "paint",                A_CANT, 0);
    
    // @method signal @digest The inputs signals to be scaled by the slider.
    // @description The inputs signals to be scaled by the slider.
    class_addmethod (c, (method) hoa_gain_dsp64,               "dsp64",                A_CANT, 0);
    
    // @method int @digest Set the value of the slider
    // @description The <m>int</m> method sets the value of the slider, ramps the output signal to the level corresponding to the new value over the specified ramp time, and outputs the slider's value out the right outlet.
    // @marg 0 @name value @optional 0 @type int
    class_addmethod (c, (method) hoa_gain_int,                 "int",                  A_LONG, 0);
    
    // @method float @digest Set the value of the slider
    // @description The <m>float</m> method sets the value of the slider, ramps the output signal to the level corresponding to the new value over the specified ramp time, and outputs the slider's value out the right outlet.
    // @marg 0 @name value @optional 0 @type int
    class_addmethod (c, (method) hoa_gain_float,               "float",                A_FLOAT, 0);
    
    // @method contextvalue @digest Set the value of the slider with DeciBels, Amplitude or MIDI value type.
    // @description Set the value of the slider with DeciBels, Amplitude or MIDI value type.
    // @marg 0 @name inputmode @optional 0 @type int @description 0 = DeciBels, 1 = 1mplitude, 2 = MIDI.
    // @marg 1 @name value @optional 0 @type float @description The slider value
    class_addmethod (c, (method) hoa_gain_contextValue,        "contextvalue", A_LONG, A_FLOAT, 0);
    
    // @method bang @digest Send current value out right outlet.
    // @description The <m>bang</m> message send current value out right outlet.
    class_addmethod (c, (method) hoa_gain_bang,                "bang",                         0);
    
    // @method set @digest Set the value of the slider without outputting slider value.
    // @description The word set, followed by a number, sets the value of the slider, ramps the output signal to the level corresponding to the new value over the specified ramp time, but does not output the slider's value out the right outlet.
    // @marg 1 @name value @optional 0 @type float @description The slider value
    class_addmethod (c, (method) hoa_gain_set,                 "set",                  A_GIMME, 0);
    //class_addmethod (c, (method) hoa_gain_tometer,             "anything",             A_GIMME, 0);
    class_addmethod (c, (method) hoa_gain_anything,            "anything",             A_GIMME, 0);
    
    // @method (mouse) @digest click and drag to set the slider outlet.
    // @description Clicking and dragging with the mouse sets the value of the slider, ramps the output signal to the level corresponding to the new value over the specified ramp time, and outputs the slider’s value out the right outlet. double-click to set the slider value to <m>defvaldb</m>
    
    class_addmethod (c, (method) hoa_gain_mousedoubleclick,    "mousedoubleclick",     A_CANT, 0);
    class_addmethod (c, (method) hoa_gain_mousedown,           "mousedown",            A_CANT, 0);
    class_addmethod (c, (method) hoa_gain_mousedragdelta,      "mousedragdelta",       A_CANT, 0);
    class_addmethod (c, (method) hoa_gain_mouseup,             "mouseup",              A_CANT, 0);
    class_addmethod (c, (method) hoa_gain_getvalueof,          "getvalueof",           A_CANT, 0);
    class_addmethod (c, (method) hoa_gain_setvalueof,          "setvalueof",           A_CANT, 0);
    class_addmethod (c, (method) hoa_gain_preset,              "preset",                       0);
    class_addmethod (c, (method) hoa_gain_notify,              "notify",               A_CANT, 0);
    class_addmethod (c, (method) hoa_gain_oksize,              "oksize",               A_CANT, 0);
    
    CLASS_ATTR_DEFAULT(c,"patching_rect",0, "0. 0. 140. 22.");
    
    CLASS_STICKY_CATEGORY		(c,0,"Value");
    
    CLASS_ATTR_DOUBLE			(c, "interp", 0, t_hoa_gain, f_interp);
    CLASS_ATTR_ACCESSORS		(c, "interp",(method)NULL,(method)hoa_gain_setattr_interp);
    CLASS_ATTR_LABEL			(c, "interp", 0, "Ramp Time (ms)");
    CLASS_ATTR_FILTER_MIN		(c, "interp", 0);
    // @description Ramp time in milliseconds
    
    CLASS_ATTR_CHAR				(c,"relative", 0, t_hoa_gain, j_relative);
    CLASS_ATTR_LABEL			(c,"relative", 0, "Mousing Mode");
    CLASS_ATTR_ENUMINDEX2		(c, "relative", 0, "Absolute", "Relative");
    CLASS_ATTR_BASIC			(c, "relative", 0);
    // @description Mousing can either be <b>absolute</b> or <b>relative</b>
    
    CLASS_ATTR_CHAR				(c,"inputmode", 0, t_hoa_gain, f_inputMode);
    CLASS_ATTR_LABEL			(c,"inputmode", 0, "Input Mode");
    CLASS_ATTR_ENUMINDEX3		(c, "inputmode", 0, "DeciBels", "Amplitude", "Midi");
    // @description Input mode can either be in <b>DeciBels</b>, <b>Amplitude</b> or <b>Midi</b>
    
    CLASS_ATTR_DOUBLE			(c, "defvaldb", 0, t_hoa_gain, j_defaultValuedB);
    CLASS_ATTR_LABEL			(c, "defvaldb", 0, "Default Value (dB)");
    // @description Default value in <b>DeciBels</b>, <b>Amplitude</b> or <b>Midi</b>
    
    CLASS_STICKY_CATEGORY_CLEAR(c);
    
    CLASS_ATTR_CHAR				(c,"orientation",0,t_hoa_gain,j_orientation);
    CLASS_ATTR_LABEL			(c,"orientation",0,"Orientation");
    CLASS_ATTR_ENUMINDEX3		(c,"orientation", 0,"Automatic", "Horizontal", "Vertical");
    CLASS_ATTR_CATEGORY			(c, "orientation", 0, "Appearance");
    CLASS_ATTR_DEFAULT_SAVE_PAINT(c, "orientation", 0, "0");
    // @description Orientation can either be in <b>Automatic</b>, <b>Horizontal</b> or <b>Vertical</b>
    
    CLASS_STICKY_CATEGORY(c, 0, "Color");
    
    CLASS_ATTR_INVISIBLE(c, "color", 0);
    // @exclude hoa.gain~
    
    CLASS_ATTR_RGBA_LEGACY		(c, "bgcolor", "brgb", 0, t_hoa_gain, j_brgba);
    CLASS_ATTR_ALIAS			(c,"bgcolor", "brgba");
    CLASS_ATTR_DEFAULTNAME_SAVE_PAINT(c,"bgcolor",0,"0.611765 0.611765 0.611765 1.");
    CLASS_ATTR_STYLE_LABEL		(c, "bgcolor", 0, "rgba", "Background Color");
    CLASS_ATTR_BASIC			(c, "bgcolor", 0);
    // @description Sets the RGBA values for the background color of the <o>hoa.gain~</o> object
    
    CLASS_ATTR_RGBA				(c, "knobcolor", 0, t_hoa_gain, j_knobcolor);
    CLASS_ATTR_STYLE_LABEL      (c, "knobcolor", 0, "rgba","Knob Color");
    CLASS_ATTR_DEFAULT_SAVE_PAINT(c, "knobcolor", 0, "0.396078 0.396078 0.396078 1.");
    // @description Sets the RGBA values for the knob color of the <o>hoa.gain~</o> object
    
    CLASS_ATTR_RGBA				(c, "barcolor", 0, t_hoa_gain, j_barcolor);
    CLASS_ATTR_STYLE_LABEL      (c, "barcolor", 0, "rgba","Value Bar Color");
    CLASS_ATTR_DEFAULT_SAVE_PAINT(c, "barcolor", 0, "0.396078 0.396078 0.396078 0.6");
    // @description Sets the RGBA values for the value bar color of the <o>hoa.gain~</o> object
    
    CLASS_STICKY_CATEGORY_CLEAR(c);
    
    CLASS_ATTR_DEFAULT_SAVE		(c,"relative",0,"0");
    CLASS_ATTR_DEFAULT_SAVE		(c,"defvaldb",0,"0");
    CLASS_ATTR_DEFAULT_SAVE		(c,"inputmode",0,"0");
    CLASS_ATTR_DEFAULT_SAVE		(c,"interp",0,"20");
    CLASS_ATTR_LABEL			(c,"min", 0, "Output Minimum");
    CLASS_ATTR_LABEL			(c,"mult", 0, "Output Multiplier");
    CLASS_ATTR_STYLE_LABEL		(c,"floatoutput",0,"onoff","Float Output");
    
    CLASS_ATTR_ORDER			(c, "relative",		0, "2");
    CLASS_ATTR_ORDER			(c, "size",			0, "3");
    CLASS_ATTR_ORDER			(c, "min",			0, "4");
    CLASS_ATTR_ORDER			(c, "mult",			0, "5");
    
    CLASS_ATTR_CATEGORY			(c, "channels", 0, "Custom");
    CLASS_ATTR_LONG				(c, "channels", 0, t_hoa_gain, f_number_of_channels);
    CLASS_ATTR_ACCESSORS        (c, "channels", NULL, hoa_gain_setattr_channels);
    CLASS_ATTR_ORDER			(c, "channels", 0, "1");
    CLASS_ATTR_LABEL			(c, "channels", 0, "Number of Channels");
    CLASS_ATTR_FILTER_CLIP		(c, "channels", 1, MAX_IO);
    CLASS_ATTR_DEFAULT			(c, "channels", 0, "8");
    CLASS_ATTR_SAVE				(c, "channels", 1);
    
    CLASS_ATTR_CATEGORY			(c, "range", 0, "Value");
    CLASS_ATTR_DOUBLE_ARRAY     (c, "range", 0, t_hoa_gain, f_range, 2);
    CLASS_ATTR_ACCESSORS        (c, "range", NULL, hoa_gain_setattr_range);
    CLASS_ATTR_ORDER			(c, "range", 0, "2");
    CLASS_ATTR_LABEL			(c, "range", 0, "Range (dB)");
    CLASS_ATTR_DEFAULT			(c, "range", 0, "-70. 18.");
    CLASS_ATTR_SAVE             (c, "range", 1);
    
    class_register(CLASS_BOX, c);
    s_hoa_gain_class = c;    
}
void ext_main(void *r)
#endif
{
    t_class *c;
    
    c = class_new("hoa.2d.meter~", (method)meter_new, (method)meter_free, (short)sizeof(t_meter), 0L, A_GIMME, 0);
    class_setname((char *)"hoa.2d.meter~", (char *)"hoa.2d.meter~");
    
    c->c_flags |= CLASS_FLAG_NEWDICTIONARY;
    class_dspinitjbox(c);
    jbox_initclass(c, JBOX_COLOR);
    
    hoa_initclass(c, (method)hoa_getinfos);
    
    // @method signal @digest Array of signals to visualize.
    // @description Array of signals to visualize.
    // @marg 0 @name channel-signal @optional 0 @type signal
    class_addmethod(c, (method) meter_dsp64,		 "dsp64",		  A_CANT, 0);
    class_addmethod(c, (method) meter_assist,		 "assist",		  A_CANT, 0);
    class_addmethod(c, (method) meter_paint,		 "paint",		  A_CANT, 0);
    class_addmethod(c, (method) meter_notify,        "notify",		  A_CANT, 0);
    
    CLASS_ATTR_DEFAULT              (c, "patching_rect", 0, "0 0 150 150");
    CLASS_ATTR_INVISIBLE            (c, "color", 0);
    
    /* APPEARANCE */
    CLASS_STICKY_CATEGORY           (c, 0, "Appearance");
    CLASS_ATTR_LONG                 (c, "ledsbg", 0, t_meter, f_drawledsbg);
    CLASS_ATTR_ORDER                (c, "ledsbg", 0, "1");
    CLASS_ATTR_STYLE_LABEL          (c, "ledsbg", 0, "onoff", "Draw Leds Background");
    CLASS_ATTR_DEFAULT              (c, "ledsbg", 0, "1");
    CLASS_ATTR_SAVE                 (c, "ledsbg", 1);
    // @description Draw leds background ?
    
    CLASS_ATTR_LONG                 (c, "vectors", 0, t_meter, f_drawvector);
    CLASS_ATTR_ORDER                (c, "vectors", 0, "2");
    CLASS_ATTR_LABEL                (c, "vectors", 0, "Draw Vectors");
    CLASS_ATTR_ENUMINDEX4           (c, "vectors", 0, "none", "energy", "velocity", "both")
    CLASS_ATTR_DEFAULT              (c, "vectors", 0, "1");
    CLASS_ATTR_SAVE                 (c, "vectors", 1);
    // @description The vector(s) to draw.
    
    CLASS_ATTR_LONG                 (c, "mborder", 0, t_meter, f_drawmborder);
    CLASS_ATTR_ORDER                (c, "mborder", 0, "3");
    CLASS_ATTR_LABEL                (c, "mborder", 0, "Draw Meter Borders");
    CLASS_ATTR_ENUMINDEX4           (c, "mborder", 0, "none", "Circles", "Axes", "both")
    CLASS_ATTR_DEFAULT              (c, "mborder", 0, "3");
    CLASS_ATTR_SAVE                 (c, "mborder", 1);
    // @description The meter border(s) to draw.
    
    CLASS_ATTR_DOUBLE               (c, "metersize", 0, t_meter, f_metersize);
    CLASS_ATTR_ORDER                (c, "metersize", 0, "4");
    CLASS_ATTR_LABEL                (c, "metersize", 0, "Meter Circle Size");
    CLASS_ATTR_FILTER_CLIP          (c, "metersize", 0., 1);
    CLASS_ATTR_DEFAULT              (c, "metersize", 0, "0.8");
    CLASS_ATTR_SAVE                 (c, "metersize", 1);
    // @description The size of the inner circle of the <o>hoa.2d.meter~</o>.
    
    CLASS_ATTR_LONG                 (c, "orientation", 0, t_meter, f_direction);
    CLASS_ATTR_LABEL                (c, "orientation", 0, "Meter Fill Orientation");
    CLASS_ATTR_ORDER                (c, "orientation", 0, "5");
    CLASS_ATTR_ENUMINDEX            (c, "orientation", 0, "inside outside");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "orientation", 0, "0");
    // @description The filling orientation of the peak level indicators <o>hoa.2d.meter~</o>.
    
    CLASS_STICKY_CATEGORY_CLEAR (c);
    
    CLASS_STICKY_CATEGORY           (c, 0, "Behavior");
    CLASS_ATTR_LONG                 (c, "channels", 0 , t_meter, f_attrs);
    CLASS_ATTR_ACCESSORS            (c, "channels", channels_get, channels_set);
    CLASS_ATTR_ORDER                (c, "channels", 0, "1");
    CLASS_ATTR_LABEL                (c, "channels", 0, "Number of Channels");
    CLASS_ATTR_SAVE                 (c, "channels", 1);
    CLASS_ATTR_DEFAULT              (c, "channels", 0, "4");
    // @description The number of displayed channel and peak level indicators.
    
    CLASS_ATTR_DOUBLE_VARSIZE       (c, "angles", ATTR_SET_DEFER_LOW, t_meter, f_attrs, f_attrs, MAX_UI_CHANNELS);
    CLASS_ATTR_ACCESSORS            (c, "angles", angles_get, angles_set);
    CLASS_ATTR_ORDER                (c, "angles", 0, "2");
    CLASS_ATTR_LABEL                (c, "angles", 0, "Angles of Channels");
    CLASS_ATTR_SAVE                 (c, "angles", 1);
    // @description The angles of the displayed channels and peak level indicators. Values are in degrees, wrapped between 0. and 360., so you can also set the angles with negative values.
    
    CLASS_ATTR_DOUBLE               (c, "offset", 0, t_meter, f_attrs);
    CLASS_ATTR_ACCESSORS            (c, "offset", offset_get, offset_set);
    CLASS_ATTR_ORDER                (c, "offset", 0, "3");
    CLASS_ATTR_LABEL                (c, "offset", 0, "Offset of Channels");
    CLASS_ATTR_DEFAULT              (c, "offset", 0, "0");
    CLASS_ATTR_SAVE                 (c, "offset", 1);
    // @description Display offset of channels and peak level indicators. the value is in degree, clipped between -180. and 180.
    
    CLASS_ATTR_LONG                 (c, "rotation", 0, t_meter, f_rotation);
    CLASS_ATTR_ORDER                (c, "rotation", 0, "4");
    CLASS_ATTR_LABEL                (c, "rotation", 0, "Rotation of Channels");
    CLASS_ATTR_ENUMINDEX            (c, "rotation", 0, "clockwise anti-clockwise");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "rotation",0, "1");
    // @description The rotation can either be <b>clockwise</b> or <b>anti-clockwise</b>
    
    CLASS_ATTR_LONG                 (c, "interval", 0, t_meter, f_interval);
    CLASS_ATTR_ORDER                (c, "interval", 0, "5");
    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);
    // @description The refresh interval time in milliseconds.
    
    CLASS_STICKY_CATEGORY_CLEAR     (c);
    
    CLASS_ATTR_LONG                 (c, "dbperled", 0, t_meter, f_dbperled);
    CLASS_ATTR_CATEGORY             (c, "dbperled", 0, "Value");
    CLASS_ATTR_ORDER                (c, "dbperled", 0, "4");
    CLASS_ATTR_LABEL                (c, "dbperled", 0, "DeciBels per Led");
    CLASS_ATTR_FILTER_CLIP          (c, "dbperled", 1, 12);
    CLASS_ATTR_DEFAULT              (c, "dbperled", 0, "3");
    CLASS_ATTR_SAVE                 (c, "dbperled", 1);
    // @description Sets the amount of signal level in deciBels represented by each LED. By default each LED represents a 3dB change in volume from its neighboring LEDs.
    
    CLASS_ATTR_LONG                 (c, "nhotleds", 0, t_meter, f_nhotleds);
    CLASS_ATTR_CATEGORY             (c, "nhotleds", 0, "Value");
    CLASS_ATTR_ORDER                (c, "nhotleds", 0, "5");
    CLASS_ATTR_LABEL                (c, "nhotleds", 0, "Number of Hot Leds");
    CLASS_ATTR_FILTER_CLIP          (c, "nhotleds", 0, 20);
    CLASS_ATTR_DEFAULT              (c, "nhotleds", 0, "3");
    CLASS_ATTR_SAVE                 (c, "nhotleds", 1);
    // @description Sets the total number "hot" warning LEDs displayed on the <o>hoa.2d.meter~</o> object (corresponding to the color set by the <b>hotcolor</b> message).
    
    CLASS_ATTR_LONG                 (c, "ntepidleds", 0, t_meter, f_ntepidleds);
    CLASS_ATTR_CATEGORY             (c, "ntepidleds", 0, "Value");
    CLASS_ATTR_ORDER                (c, "ntepidleds", 0, "6");
    CLASS_ATTR_LABEL                (c, "ntepidleds", 0, "Number of Tepid Leds");
    CLASS_ATTR_FILTER_CLIP          (c, "ntepidleds", 0, 20);
    CLASS_ATTR_DEFAULT              (c, "ntepidleds", 0, "3");
    CLASS_ATTR_SAVE                 (c, "ntepidleds", 1);
    // @description Sets the total number "tepid" mid-range LEDs displayed on the <o>hoa.2d.meter~</o> object (corresponding to the color set by the <b>tepidcolor</b> message).
    
    CLASS_ATTR_LONG                 (c, "nwarmleds", 0, t_meter, f_nwarmleds);
    CLASS_ATTR_CATEGORY             (c, "nwarmleds", 0, "Value");
    CLASS_ATTR_ORDER                (c, "nwarmleds", 0, "7");
    CLASS_ATTR_LABEL                (c, "nwarmleds", 0, "Number of Warm Leds");
    CLASS_ATTR_FILTER_CLIP          (c, "nwarmleds", 0, 20);
    CLASS_ATTR_DEFAULT              (c, "nwarmleds", 0, "3");
    CLASS_ATTR_SAVE                 (c, "nwarmleds", 1);
    // @description Sets the total number "warm" lower-mid-range LEDs displayed on the <o>hoa.2d.meter~</o> object (corresponding to the color set by the <b>warmcolor</b> message).
    
    CLASS_ATTR_LONG                 (c, "numleds", 0, t_meter, f_numleds);
    CLASS_ATTR_CATEGORY             (c, "numleds", 0, "Value");
    CLASS_ATTR_ORDER                (c, "numleds", 0, "8");
    CLASS_ATTR_LABEL                (c, "numleds", 0, "Total Number of Leds");
    CLASS_ATTR_FILTER_CLIP          (c, "numleds", 10, 20);
    CLASS_ATTR_DEFAULT              (c, "numleds", 0, "12");
    CLASS_ATTR_SAVE                 (c, "numleds", 1);
    // @description The word numleds, followed by a number between 10 and 20, sets the total number of LEDs displayed on the <o>hoa.2d.meter~</o> object. The range is 10-20 LEDs.
    
    CLASS_ATTR_RGBA                 (c, "bgcolor", 0, t_meter, f_color_bg);
    CLASS_ATTR_CATEGORY             (c, "bgcolor", 0, "Color");
    CLASS_ATTR_STYLE                (c, "bgcolor", 0, "rgba");
    CLASS_ATTR_LABEL                (c, "bgcolor", 0, "Background Color");
    CLASS_ATTR_ORDER                (c, "bgcolor", 0, "1");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bgcolor", 0, "0.76 0.76 0.76 1.");
    // @description Sets the RGBA values for the background color of the <o>hoa.2d.meter~</o> object
    
    CLASS_ATTR_RGBA                 (c, "mbgcolor", 0, t_meter, f_color_mbg);
    CLASS_ATTR_LABEL                (c, "mbgcolor", 0, "Meter Background Color");
    CLASS_ATTR_CATEGORY             (c, "mbgcolor", 0, "Color");
    CLASS_ATTR_STYLE                (c, "mbgcolor", 0, "rgba");
    CLASS_ATTR_ORDER                (c, "mbgcolor", 0, "2");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "mbgcolor", 0, "0.61 0.61 0.61 1.");
    // @description Sets the RGBA values for the filled circle background color of the <o>hoa.2d.meter~</o> object
    
    CLASS_ATTR_RGBA                 (c, "ledbgcolor", 0, t_meter, f_color_ledbg);
    CLASS_ATTR_LABEL                (c, "ledbgcolor", 0, "Leds Background Color");
    CLASS_ATTR_CATEGORY             (c, "ledbgcolor", 0, "Color");
    CLASS_ATTR_STYLE                (c, "ledbgcolor", 0, "rgba");
    CLASS_ATTR_ORDER                (c, "ledbgcolor", 0, "3");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "ledbgcolor", 0, "0. 0. 0. 0.05");
    // @description Sets the RGBA values for leds background color of the <o>hoa.2d.meter~</o> object
    
    CLASS_ATTR_RGBA                 (c, "coldcolor", 0, t_meter, f_color_cold);
    CLASS_ATTR_CATEGORY             (c, "coldcolor", 0, "Color");
    CLASS_ATTR_STYLE                (c, "coldcolor", 0, "rgba");
    CLASS_ATTR_LABEL                (c, "coldcolor", 0, "Cold Signal Color");
    CLASS_ATTR_ORDER                (c, "coldcolor", 0, "4");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "coldcolor", 0, "0. 0.6 0. 0.8");
    // @description Sets the RGBA values for the cold signal color of the <o>hoa.2d.meter~</o> object
    
    CLASS_ATTR_RGBA                 (c, "tepidcolor", 0, t_meter, f_color_tepid);
    CLASS_ATTR_CATEGORY             (c, "tepidcolor", 0, "Color");
    CLASS_ATTR_STYLE                (c, "tepidcolor", 0, "rgba");
    CLASS_ATTR_LABEL                (c, "tepidcolor", 0, "Tepid Signal Color");
    CLASS_ATTR_ORDER                (c, "tepidcolor", 0, "5");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "tepidcolor", 0, "0.6 0.73 0. 0.8");
    // @description Sets the RGBA values for the LEDs color for the lower-middle "tepid" range of the <o>hoa.2d.meter~</o> object
    
    CLASS_ATTR_RGBA                 (c, "warmcolor", 0, t_meter, f_color_warm);
    CLASS_ATTR_CATEGORY             (c, "warmcolor", 0, "Color");
    CLASS_ATTR_STYLE                (c, "warmcolor", 0, "rgba");
    CLASS_ATTR_LABEL                (c, "warmcolor", 0, "Warm Signal Color");
    CLASS_ATTR_ORDER                (c, "warmcolor", 0, "6");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "warmcolor", 0, ".85 .85 0. 0.8");
    // @description Sets the RGBA values for the LEDs color for upper-middle "warm" range of the <o>hoa.2d.meter~</o> object
    
    CLASS_ATTR_RGBA                 (c, "hotcolor", 0, t_meter, f_color_hot);
    CLASS_ATTR_CATEGORY             (c, "hotcolor", 0, "Color");
    CLASS_ATTR_STYLE                (c, "hotcolor", 0, "rgba");
    CLASS_ATTR_LABEL                (c, "hotcolor", 0, "Hot Signal Color");
    CLASS_ATTR_ORDER                (c, "hotcolor", 0, "7");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "hotcolor", 0, "1. 0.6 0. 0.8");
    // @description Sets the RGBA values for the LEDs color for the upper "hot" range of the <o>hoa.2d.meter~</o> object
    
    CLASS_ATTR_RGBA                 (c, "overloadcolor", 0, t_meter, f_color_over);
    CLASS_ATTR_CATEGORY             (c, "overloadcolor", 0, "Color");
    CLASS_ATTR_STYLE                (c, "overloadcolor", 0, "rgba");
    CLASS_ATTR_LABEL                (c, "overloadcolor", 0, "Overload Signal Color");
    CLASS_ATTR_ORDER                (c, "overloadcolor", 0, "8");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "overloadcolor", 0, "1. 0. 0. 0.8");
    // @description Sets the RGBA values for the LEDs color for the "over" indicator of the <o>hoa.2d.meter~</o> object
    
    CLASS_ATTR_RGBA                 (c, "energycolor", 0, t_meter, f_color_energy);
    CLASS_ATTR_CATEGORY             (c, "energycolor", 0, "Color");
    CLASS_ATTR_STYLE                (c, "energycolor", 0, "rgba");
    CLASS_ATTR_LABEL                (c, "energycolor", 0, "Energy Vector Color");
    CLASS_ATTR_ORDER                (c, "energycolor", 0, "9");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "energycolor", 0, "0. 0. 1. 0.8");
    // @description Sets the RGBA values for the energy vector color of the <o>hoa.2d.meter~</o> object
    
    CLASS_ATTR_RGBA                 (c, "velocitycolor", 0, t_meter, f_color_velocity);
    CLASS_ATTR_CATEGORY             (c, "velocitycolor", 0, "Color");
    CLASS_ATTR_STYLE                (c, "velocitycolor", 0, "rgba");
    CLASS_ATTR_LABEL                (c, "velocitycolor", 0, "Velocity Vector Color");
    CLASS_ATTR_ORDER                (c, "velocitycolor", 0, "9");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "velocitycolor", 0, "1. 0. 0. 0.8");
    // @description Sets the RGBA values for the velocity vector color of the <o>hoa.2d.meter~</o> object
    
    class_register(CLASS_BOX, c);
    class_alias(c, gensym("hoa.meter~"));
    meter_class = c;
}
void ext_main(void *r)
#endif
{
    t_class *c;
    
    c = class_new("hoa.3d.scope~", (method)hoa_3d_scope_new, (method)hoa_3d_scope_free, (short)sizeof(t_hoa_3d_scope), 0L, A_GIMME, 0);
    class_setname((char *)"hoa.3d.scope~", (char *)"hoa.3d.scope~");
    
    c->c_flags |= CLASS_FLAG_NEWDICTIONARY;
    class_dspinitjbox(c);
    jbox_initclass(c, JBOX_COLOR | JBOX_FIXWIDTH);
    
    hoa_initclass(c, (method)hoa_getinfos);
    
    // @method signal @digest Array of spherical harmonic signals that represent a sound field
    // @description Array of spherical harmonic signals that represent a sound field
    class_addmethod(c, (method)hoa_3d_scope_dsp64,		"dsp64",		A_CANT, 0);
    class_addmethod(c, (method)hoa_3d_scope_assist,		"assist",		A_CANT,	0);
    class_addmethod(c, (method)hoa_3d_scope_paint,		"paint",		A_CANT,	0);
    class_addmethod(c, (method)hoa_3d_scope_notify,		"notify",		A_CANT, 0);
    class_addmethod(c, (method)hoa_3d_scope_oksize,		"oksize",		A_CANT, 0);
    
    CLASS_ATTR_INVISIBLE            (c, "color", 0);
    CLASS_ATTR_INVISIBLE            (c, "textcolor", 0);
    CLASS_ATTR_DEFAULT              (c, "patching_rect", 0, "0 0 150 150");
    
    CLASS_ATTR_LONG                 (c, "order", 0, t_hoa_3d_scope, f_order);
    CLASS_ATTR_ACCESSORS            (c, "order", NULL, set_order);
    CLASS_ATTR_CATEGORY             (c, "order", 0, "Ambisonic");
    CLASS_ATTR_ORDER                (c, "order", 0, "1");
    CLASS_ATTR_LABEL                (c, "order", 0, "Ambisonic Order");
    CLASS_ATTR_FILTER_MIN           (c, "order", 1);
    CLASS_ATTR_DEFAULT              (c, "order", 0, "1");
    CLASS_ATTR_SAVE                 (c, "order", 1);
    // @description The ambisonic order of decomposition. Will adapt the number of input accordingly.
    
    CLASS_ATTR_FLOAT                (c, "gain", 0, t_hoa_3d_scope, f_gain);
    CLASS_ATTR_CATEGORY             (c, "gain", 0, "Behavior");
    CLASS_ATTR_ORDER                (c, "gain", 0, "1");
    CLASS_ATTR_LABEL                (c, "gain", 0, "Gain");
    CLASS_ATTR_FILTER_MIN           (c, "gain", 1.);
    CLASS_ATTR_DEFAULT              (c, "gain", 0, "1.");
    CLASS_ATTR_SAVE                 (c, "gain", 1);
    // @description The <b>gain</b> factor can be used to offer a better visualisation of low amplitude sound fields.
    
    CLASS_ATTR_LONG                 (c, "interval", 0, t_hoa_3d_scope, f_interval);
    CLASS_ATTR_CATEGORY             (c, "interval", 0, "Behavior");
    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, "100");
    CLASS_ATTR_SAVE                 (c, "interval", 1);
    // @description The refresh interval time in milliseconds.
    
    CLASS_ATTR_DOUBLE_ARRAY         (c, "view", 0, t_hoa_3d_scope, f_view, 3);
    CLASS_ATTR_CATEGORY             (c, "view", 0, "Behavior");
    CLASS_ATTR_ORDER                (c, "view", 0, "3");
    CLASS_ATTR_LABEL                (c, "view", 0, "Offset of the View");
    CLASS_ATTR_ACCESSORS            (c, "view", NULL, view_set);
    CLASS_ATTR_DEFAULT              (c, "view", 0, "0. 0. 0.");
    CLASS_ATTR_SAVE                 (c, "view", 1);
    // @description Set the offset of the view with a list of 3 double values corresponding to the x y z offset, in degrees between 0. and 360.
    
    CLASS_ATTR_RGBA                 (c, "bgcolor", 0, t_hoa_3d_scope, f_color_bg);
    CLASS_ATTR_CATEGORY             (c, "bgcolor", 0, "Color");
    CLASS_ATTR_STYLE                (c, "bgcolor", 0, "rgba");
    CLASS_ATTR_LABEL                (c, "bgcolor", 0, "Background Color");
    CLASS_ATTR_ORDER                (c, "bgcolor", 0, "1");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bgcolor", 0, "0.76 0.76 0.76 1.");
    // @description Sets the RGBA values for the background color of the <o>hoa.3d.scope~</o> object
    
    CLASS_ATTR_RGBA                 (c, "phcolor", 0, t_hoa_3d_scope, f_color_ph);
    CLASS_ATTR_CATEGORY             (c, "phcolor", 0, "Color");
    CLASS_ATTR_STYLE                (c, "phcolor", 0, "rgba");
    CLASS_ATTR_LABEL                (c, "phcolor", 0, "Positive Harmonics Color");
    CLASS_ATTR_ORDER                (c, "phcolor", 0, "3");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "phcolor", 0, "1. 0. 0. 1.");
    // @description Sets the RGBA values for the positive harmonics color of the <o>hoa.3d.scope~</o> object
    
    CLASS_ATTR_RGBA                 (c, "nhcolor", 0, t_hoa_3d_scope, f_color_nh);
    CLASS_ATTR_CATEGORY             (c, "nhcolor", 0, "Color");
    CLASS_ATTR_STYLE                (c, "nhcolor", 0, "rgba");
    CLASS_ATTR_LABEL                (c, "nhcolor", 0, "Negative Harmonics Color");
    CLASS_ATTR_ORDER                (c, "nhcolor", 0, "4");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "nhcolor", 0, "0. 0. 1. 1.");
    // @description Sets the RGBA values for the negative harmonics color of the <o>hoa.3d.scope~</o> object
    
    class_register(CLASS_BOX, c);
    hoa_3d_scope_class = c;
}