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.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;
}
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;    
}
示例#4
0
int C74_EXPORT main(void)
{
	t_class *c;
    
	c = class_new("hoa.meter3D~", (method)hoa_meter_new, (method)hoa_meter_free, sizeof(t_hoa_meter), 0L, A_GIMME, 0);
    
	c->c_flags |= CLASS_FLAG_NEWDICTIONARY;
	
    class_dspinitjbox(c);
    jucebox_initclass(c, (method)hoa_meter_paint,  JBOX_COLOR | JBOX_FIXWIDTH);
    hoa_initclass(c, (method)hoa_getinfos);
    
	class_addmethod(c, (method)hoa_meter_dsp64,				"dsp64",            A_CANT, 0);
	class_addmethod(c, (method)hoa_meter_mousedown,			"mousedown",        A_CANT, 0);
    class_addmethod(c, (method)hoa_meter_mousedrag,			"mousedrag",        A_CANT, 0);
	class_addmethod(c, (method)hoa_meter_assist,			"assist",           A_CANT, 0);
	class_addmethod(c, (method)hoa_meter_getdrawparams,		"getdrawparams",    A_CANT, 0);
	class_addmethod(c, (method)hoa_meter_notify,			"notify",           A_CANT, 0);
	class_addmethod(c, (method)hoa_meter_setLoudspeakers,   "lscoord",    A_GIMME, 0);
    
    CLASS_ATTR_DEFAULT              (c, "patching_rect", 0, "0 0 200 200");
    CLASS_ATTR_INVISIBLE            (c, "color", 0);
    
    CLASS_ATTR_LONG                 (c, "loudspeakers", 0, t_hoa_meter, f_number_of_loudspeakers);
    CLASS_ATTR_ACCESSORS            (c, "loudspeakers", NULL,  hoa_meter_attr_set_loudspeakers);
	CLASS_ATTR_CATEGORY             (c, "loudspeakers", 0, "Planewaves");
	CLASS_ATTR_ORDER                (c, "loudspeakers", 0, "1");
	CLASS_ATTR_LABEL                (c, "loudspeakers", 0, "Number Of Loudspeakers");
	CLASS_ATTR_FILTER_MIN           (c, "loudspeakers", 1);
	CLASS_ATTR_DEFAULT              (c, "loudspeakers", 0, "8");
	CLASS_ATTR_SAVE                 (c, "loudspeakers", 1);
    CLASS_ATTR_PAINT                (c, "loudspeakers", 1);
    
    CLASS_ATTR_LONG                 (c, "interval", 0, t_hoa_meter, f_interval);
	CLASS_ATTR_CATEGORY             (c, "interval", 0, "Behavior");
	CLASS_ATTR_ORDER                (c, "interval", 0, "1");
	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);
    
    CLASS_ATTR_RGBA                 (c, "bgcolor", 0, t_hoa_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.9 0.9 0.9 1.");
	
	CLASS_ATTR_RGBA                 (c, "bdcolor", 0, t_hoa_meter, f_color_bd);
	CLASS_ATTR_CATEGORY             (c, "bdcolor", 0, "Color");
	CLASS_ATTR_STYLE                (c, "bdcolor", 0, "rgba");
	CLASS_ATTR_LABEL                (c, "bdcolor", 0, "Border Color");
	CLASS_ATTR_ORDER                (c, "bdcolor", 0, "1");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "bdcolor", 0, "0.1 0.1 0.1 1.");
	
    CLASS_ATTR_RGBA                 (c, "coldcolor", 0, t_hoa_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");
	
	CLASS_ATTR_RGBA                 (c, "tepidcolor", 0, t_hoa_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");
	
	CLASS_ATTR_RGBA                 (c, "warmcolor", 0, t_hoa_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");
	
	CLASS_ATTR_RGBA                 (c, "hotcolor", 0, t_hoa_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");
	
	CLASS_ATTR_RGBA                 (c, "overcolor", 0, t_hoa_meter, f_color_over);
    CLASS_ATTR_CATEGORY             (c, "overcolor", 0, "Color");
    CLASS_ATTR_STYLE                (c, "overcolor", 0, "rgba");
	CLASS_ATTR_LABEL                (c, "overcolor", 0, "Overload Signal Color");
	CLASS_ATTR_ORDER                (c, "overcolor", 0, "8");
	CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "overcolor", 0, "1. 0. 0. 0.8");
	
	CLASS_ATTR_DOUBLE_ARRAY         (c, "camera", 0, t_hoa_meter, f_camera, 2);
	CLASS_ATTR_CATEGORY             (c, "camera", 0, "Rendering Context");
    CLASS_ATTR_ORDER                (c, "camera", 0, "1");
	CLASS_ATTR_LABEL                (c, "camera", 0, "Camera");
	CLASS_ATTR_DEFAULT_SAVE         (c, "camera", 0, "0. 0.");
	CLASS_ATTR_ACCESSORS            (c, "camera", NULL, hoa_meter_attr_set_camera);
    CLASS_ATTR_PAINT                (c, "camera", 1);
    
	class_register(CLASS_BOX, c);
	hoa_meter_class = c;
    
	return 0;
}
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;
}