Beispiel #1
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;
}
extern "C" int TTCLASSWRAPPERMAX_EXPORT main(void)
{
	t_class *c;
	
	c = class_new("tap.fft.binmodulator~",(method)binmod_new, (method)binmod_free, sizeof(t_binmod), 
		(method)0L, A_GIMME, 0);

		common_symbols_init();												// Initialize TapTools
	class_addmethod(c, (method)binmod_dsp, 				"dsp", A_CANT, 0L);		
    class_addmethod(c, (method)binmod_assist, 			"assist", A_CANT, 0L); 
    
    class_addmethod(c, (method)binmod_resync,			"phase_resync", 0L);
    class_addmethod(c, (method)binmod_zero_frequency,	"zero_frequency", 0L);
    class_addmethod(c, (method)binmod_zero_phase,		"zero_phase", 0L);
    class_addmethod(c, (method)binmod_zero_depth,		"zero_depth", 0L);
    class_addmethod(c, (method)binmod_zero_shape,		"zero_shape", 0L);
    class_addmethod(c, (method)binmod_get_frequency_n,	"getfrequencyn", A_LONG, 0L);
    class_addmethod(c, (method)binmod_get_phase_n,		"getphasen", A_LONG, 0L);
    class_addmethod(c, (method)binmod_get_depth_n,		"getdepthn", A_LONG, 0L);
    class_addmethod(c, (method)binmod_get_shape_n,		"getshapen", A_LONG, 0L);
	class_addmethod(c, (method)stdinletinfo,			"inletinfo",	A_CANT, 0);

	CLASS_ATTR_FLOAT(c,			"bypass",		0,	t_binmod, attr_bypass);
	CLASS_ATTR_STYLE(c,			"bypass",		0,	"onoff");

	CLASS_ATTR_FLOAT_VARSIZE(c,	"frequency",	0,	t_binmod, attr_freq, attr_freq_len, MAX_NUM_LFOS);
	CLASS_ATTR_ACCESSORS(c,		"frequency",	NULL, binmod_freq_set);

	CLASS_ATTR_FLOAT_VARSIZE(c,	"depth",		0,	t_binmod, attr_depth, attr_depth_len, MAX_NUM_LFOS);
	CLASS_ATTR_ACCESSORS(c,		"depth",		NULL, binmod_depth_set);

	CLASS_ATTR_FLOAT_VARSIZE(c,	"phase",		0,	t_binmod, attr_phase, attr_phase_len, MAX_NUM_LFOS);
	CLASS_ATTR_ACCESSORS(c,		"phase",		NULL, binmod_phase_set);

	CLASS_ATTR_SYM_VARSIZE(c,	"shape",		0,	t_binmod, attr_shape, attr_shape_len, MAX_NUM_LFOS);
	CLASS_ATTR_ACCESSORS(c,		"shape",		NULL, binmod_shape_set);

	class_dspinit(c);									// Setup object's class to work with MSP
class_register(_sym_box, c); 	binmod_class = c;

	// init globals
	ps_sine = gensym("sine");
	ps_ramp = gensym("ramp");
	ps_sawtooth = gensym("sawtooth");
	ps_square = gensym("square");
	ps_triangle = gensym("triangle");
}
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);
	
    hoa_initclass(c, (method)hoa_getinfos);
	
	// @method signal @digest Array of channels signals.
	// @description Array of channels signals.
	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);
	// @description The number of channels.
    
    CLASS_ATTR_DOUBLE               (c, "offset", 0, t_hoa_vector, f_attrs);
	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, "2");
    CLASS_ATTR_SAVE                 (c, "offset", 0);
	// @description The offset of the channels.
    
    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, "3");
	CLASS_ATTR_SAVE                 (c, "angles", 0);
	CLASS_ATTR_DEFAULT              (c, "angles", 0, "0. 90. 180. 270.");
	// @description The angles of the channels. Angles are in degree wrapped between 0. and 360.
    
    class_dspinit(c);
	class_register(CLASS_BOX, c);	
	hoa_vector_class = c;
    
	return 0;
}
extern "C" void setup_hoa0x2e2d0x2emeter_tilde(void)
{
	t_eclass *c;
    
	c = eclass_new("hoa.2d.meter~", (method)hoa_meter_new, (method)hoa_meter_free, (short)sizeof(t_hoa_meter), 0L, A_GIMME, 0);
    class_addcreator((t_newmethod)hoa_meter_new, gensym("hoa.meter~"), A_GIMME, 0);
    
	eclass_dspinit(c);
	eclass_init(c, 0);
	hoa_initclass(c, (method)hoa_getinfos);
	eclass_addmethod(c, (method) hoa_meter_dsp,             "dsp",           A_CANT, 0);
	eclass_addmethod(c, (method) hoa_meter_assist,          "assist",		 A_CANT, 0);
	eclass_addmethod(c, (method) hoa_meter_paint,           "paint",		 A_CANT, 0);
	eclass_addmethod(c, (method) hoa_meter_notify,          "notify",        A_CANT, 0);
    eclass_addmethod(c, (method) hoa_meter_getdrawparams,   "getdrawparams", A_CANT, 0);
    eclass_addmethod(c, (method) hoa_meter_oksize,          "oksize",        A_CANT, 0);
    
    eclass_addmethod(c, (method)hoa_meter_deprecated,   "loudspeakers",	A_GIMME, 0);
    eclass_addmethod(c, (method)hoa_meter_deprecated,   "bordercolor",	A_GIMME, 0);
    eclass_addmethod(c, (method)hoa_meter_deprecated,   "mbgcolor",     A_GIMME, 0);
    
	CLASS_ATTR_INVISIBLE            (c, "fontname", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontweight", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontslant", 1);
    CLASS_ATTR_INVISIBLE            (c, "fontsize", 1);
    CLASS_ATTR_INVISIBLE            (c, "send", 1);
	CLASS_ATTR_DEFAULT              (c, "size", 0, "225. 225.");
	
    CLASS_ATTR_LONG                 (c, "channels", 0 , t_hoa_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, "8");
    CLASS_ATTR_STYLE                (c, "channels", 1, "number");
    
    CLASS_ATTR_FLOAT_VARSIZE        (c, "angles", 0, t_hoa_meter, f_attrs, f_attrs, MAX_SPEAKER);
	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);
    CLASS_ATTR_DEFAULT              (c, "angles", 0, "0 45 90 135 180 225 270 315");
    
    CLASS_ATTR_FLOAT                (c, "offset", 0, t_hoa_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);
    CLASS_ATTR_STYLE                (c, "offset", 1, "number");
    
    CLASS_ATTR_SYMBOL               (c, "rotation", 0, t_hoa_meter, f_clockwise);
    CLASS_ATTR_ACCESSORS            (c, "rotation", NULL, rotation_set);
    CLASS_ATTR_ORDER                (c, "rotation", 0, "4");
	CLASS_ATTR_LABEL                (c, "rotation", 0, "Rotation of Channels");
    CLASS_ATTR_DEFAULT_SAVE_PAINT   (c, "rotation", 0, "0");
    CLASS_ATTR_STYLE                (c, "rotation", 1, "menu");
    CLASS_ATTR_ITEMS                (c, "rotation", 1, "anti-clockwise clockwise");
    
	CLASS_ATTR_SYMBOL               (c, "vectors", 0, t_hoa_meter, f_vector_type);
    CLASS_ATTR_ACCESSORS            (c, "vectors", NULL, vectors_set);
	CLASS_ATTR_ORDER                (c, "vectors", 0, "2");
    CLASS_ATTR_LABEL                (c, "vectors", 0, "Vectors");
	CLASS_ATTR_DEFAULT              (c, "vectors", 0, "Energy");
	CLASS_ATTR_SAVE                 (c, "vectors", 1);
    CLASS_ATTR_STYLE                (c, "vectors", 1, "menu");
    CLASS_ATTR_ITEMS                (c, "vectors", 1, "none energy velocity both");
    
    CLASS_ATTR_LONG                 (c, "interval", 0, t_hoa_meter, f_interval);
	CLASS_ATTR_ORDER                (c, "interval", 0, "5");
	CLASS_ATTR_LABEL                (c, "interval", 0, "Refresh Interval (in ms)");
	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", 1, "number");
    
    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_DEFAULT_SAVE_PAINT	(c, "bgcolor", 0, "0.76 0.76 0.76 1.");
	CLASS_ATTR_STYLE                (c, "bgcolor", 1, "color");
    
    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_DEFAULT_SAVE_PAINT	(c, "bdcolor", 0, "0.7 0.7 0.7 1.");
	CLASS_ATTR_STYLE                (c, "bdcolor", 1, "color");
    
	CLASS_ATTR_RGBA                 (c, "coldcolor", 0, t_hoa_meter, f_color_cold_signal);
	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_STYLE                (c, "coldcolor", 1, "color");
    
	CLASS_ATTR_RGBA                 (c, "tepidcolor", 0, t_hoa_meter, f_color_tepid_signal);
	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_STYLE                (c, "tepidcolor", 1, "color");
    
	CLASS_ATTR_RGBA                 (c, "warmcolor", 0, t_hoa_meter, f_color_warm_signal);
	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_STYLE                (c, "warmcolor", 1, "color");
    
	CLASS_ATTR_RGBA                 (c, "hotcolor", 0, t_hoa_meter, f_color_hot_signal);
	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_STYLE                (c, "hotcolor", 1, "color");
    
	CLASS_ATTR_RGBA                 (c, "overcolor", 0, t_hoa_meter, f_color_over_signal);
	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_STYLE                (c, "overcolor", 1, "color");
    
	CLASS_ATTR_RGBA                 (c, "energycolor", 0, t_hoa_meter, f_color_energy_vector);
	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");
    CLASS_ATTR_STYLE                (c, "energycolor", 1, "color");
    
    CLASS_ATTR_RGBA                 (c, "velocitycolor", 0, t_hoa_meter, f_color_velocity_vector);
	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");
    CLASS_ATTR_STYLE                (c, "velocitycolor", 1, "color");
	
    eclass_register(CLASS_BOX, c);
	hoa_meter_class = c;
}
int JAMOMA_EXPORT_MAXOBJ main(void)
{
	long		flags;
	t_class*	c;
	long		numDataspaces = 0;
	t_symbol**	dataspaceNames = NULL;
	TTValue		functionNames;
	TTSymbol*	functionName;
	char		dataspaces[2048];
	char		functions[2048];
	char		tempstr[64];
	short		i;

	jamoma_init();
common_symbols_init();
	jamoma_getDataspaceList(&numDataspaces, &dataspaceNames);
	dataspaces[0] = 0;
	for(i=0; i<numDataspaces; i++){
		strcat(dataspaces, dataspaceNames[i]->s_name);
		strcat(dataspaces, " ");
	}
	FunctionLib::getUnitNames(functionNames);
	functions[0] = 0;
	for(i=0; i<functionNames.getSize(); i++){
		functionNames.get(i, &functionName);
		strcat(functions, functionName->getCString());	
		strcat(functions, " ");
	}

	c = class_new("jcom.paramui",
				  (method)paramui_new,
				  (method)paramui_free,
				  sizeof(t_paramui),
				  (method)NULL,
				  A_GIMME,
				  0L);

	flags = JBOX_TEXTFIELD | JBOX_COLOR;
	jbox_initclass(c, flags);
	c->c_flags |= CLASS_FLAG_NEWDICTIONARY; // to specify dictionary constructor

	class_addmethod(c, (method)paramui_notify,			"notify",			A_CANT, 0);
	class_addmethod(c, (method)paramui_paint,			"paint",			A_CANT, 0);
	class_addmethod(c, (method)paramui_mousedown,		"mousedown",		A_CANT, 0);
	class_addmethod(c, (method)paramui_mousedragdelta,	"mousedragdelta",	A_CANT, 0);
	class_addmethod(c, (method)paramui_mouseup,			"mouseup",			A_CANT, 0);
	class_addmethod(c, (method)paramui_oksize,			"oksize",			A_CANT, 0);

	CLASS_ATTR_DEFAULT(c,		"patching_rect",	0, "0. 0. 144. 20.");
	CLASS_ATTR_DEFAULT(c,		"fontname",			0, JAMOMA_DEFAULT_FONT);
	snprintf(tempstr, 64, "%f", JAMOMA_DEFAULT_FONTSIZE);
	CLASS_ATTR_DEFAULT(c,		"fontsize",			0, tempstr);

	CLASS_STICKY_ATTR(c,		"category",			0, "Jamoma");
	
	CLASS_ATTR_SYM(c,			"name",				0, t_paramui, attr_name);
	CLASS_ATTR_LABEL(c,			"name",				0, "Parameter Name");
	CLASS_ATTR_DEFAULT(c,		"name",				0, "my/parameter");
	CLASS_ATTR_SAVE(c,			"name",				0);
	CLASS_ATTR_ACCESSORS(c,		"name",				paramui_getName, paramui_setName);

	CLASS_ATTR_SYM(c,			"label",			0, t_paramui, attr_label);
	CLASS_ATTR_LABEL(c,			"label",			0, "Parameter Label");
	CLASS_ATTR_STYLE(c,			"label",			0, "text_onesymbol");
	CLASS_ATTR_DEFAULT(c,		"label",			0, "");
	CLASS_ATTR_SAVE(c,			"label",			0);

	CLASS_ATTR_SYM(c,			"type",				0, t_paramui, attr_type);
	CLASS_ATTR_LABEL(c,			"type",				0, "Data Type");
	CLASS_ATTR_ENUM(c,			"type",				0, "decimal integer string boolean");
	CLASS_ATTR_DEFAULT(c,		"type",				0, "decimal");
	CLASS_ATTR_SAVE(c,			"type",				0);
	CLASS_ATTR_ACCESSORS(c,		"type",				paramui_getType, paramui_setType);

	CLASS_ATTR_FLOAT_VARSIZE(c,	"value/default",	0, t_paramui, attr_default, attr_defaultSize, LISTSIZE);
	CLASS_ATTR_LABEL(c,			"value/default",	0, "Default Value");
	CLASS_ATTR_DEFAULT(c,		"value/default",	0, "0.");
	CLASS_ATTR_SAVE(c,			"value/default",	0);
	CLASS_ATTR_ACCESSORS(c,		"value/default",	paramui_getDefault, paramui_setDefault);

	CLASS_ATTR_SYM(c,			"ramp/drive",		0, t_paramui, attr_rampDrive);
	CLASS_ATTR_LABEL(c,			"ramp/drive",		0, "Ramp Drive");
	CLASS_ATTR_DEFAULT(c,		"ramp/drive",		0, "none");
	CLASS_ATTR_SAVE(c,			"ramp/drive",		0);
	CLASS_ATTR_ACCESSORS(c,		"ramp/drive",		paramui_getRampDrive, paramui_setRampDrive);

	CLASS_ATTR_SYM(c,			"ramp/function",	0, t_paramui, attr_rampFunction);
	CLASS_ATTR_LABEL(c,			"ramp/function",	0, "Ramp Function/Shape");
	CLASS_ATTR_ENUM(c,			"ramp/function",	0, functions);
	CLASS_ATTR_DEFAULT(c,		"ramp/function",	0, "linear");
	CLASS_ATTR_SAVE(c,			"ramp/function",	0);
	CLASS_ATTR_ACCESSORS(c,		"ramp/function",	paramui_getRampFunction, paramui_setRampFunction);

	CLASS_ATTR_LONG(c,			"view/freeze",		0, t_paramui, attr_uiFreeze);
	CLASS_ATTR_LABEL(c,			"view/freeze",		0, "Freeze the UI");
	CLASS_ATTR_STYLE(c,			"view/freeze",		0, "onoff");
	CLASS_ATTR_DEFAULT(c,		"view/freeze",		0, "0");
	CLASS_ATTR_SAVE(c,			"view/freeze",		0);
	CLASS_ATTR_ACCESSORS(c,		"view/freeze",		paramui_getUIFreeze, paramui_setUIFreeze);

	CLASS_ATTR_FLOAT(c,			"value/stepsize",	0, t_paramui, attr_stepsize);
	CLASS_ATTR_LABEL(c,			"value/stepsize",	0, "Step Size for inc/dec");
	CLASS_ATTR_DEFAULT(c,		"value/stepsize",	0, "1.0");
	CLASS_ATTR_SAVE(c,			"value/stepsize",	0);
	CLASS_ATTR_ACCESSORS(c,		"value/stepsize",	paramui_getStepsize, paramui_setStepsize);

	CLASS_ATTR_LONG(c,			"priority",			0, t_paramui, attr_priority);
	CLASS_ATTR_LABEL(c,			"priority",			0, "Priority when Recalled from Presets");
	CLASS_ATTR_DEFAULT(c,		"priority",			0, "0");
	CLASS_ATTR_SAVE(c,			"priority",			0);
	CLASS_ATTR_ACCESSORS(c,		"priority",			paramui_getPriority, paramui_setPriority);

	CLASS_ATTR_FLOAT_ARRAY(c,	"range/bounds",		0, t_paramui, attr_range, 2);
	CLASS_ATTR_LABEL(c,			"range/bounds",		0, "Range");
	CLASS_ATTR_DEFAULT(c,		"range/bounds",		0, "0.0 1.0");
	CLASS_ATTR_SAVE(c,			"range/bounds",		0);
	CLASS_ATTR_ACCESSORS(c,		"range/bounds",		paramui_getRange, paramui_setRange);

	CLASS_ATTR_LONG(c,			"repetitions/allow",		0, t_paramui, attr_repetitions);
	CLASS_ATTR_LABEL(c,			"repetitions/allow",		0, "Allow Repeated Values");
	CLASS_ATTR_STYLE(c,			"repetitions/allow",		0, "onoff");
	CLASS_ATTR_DEFAULT(c,		"repetitions/allow",		0, "0");
	CLASS_ATTR_SAVE(c,			"repetitions/allow",		0);
	CLASS_ATTR_ACCESSORS(c,		"repetitions/allow",		paramui_getRepetitions, paramui_setRepetitions);

	CLASS_ATTR_SYM(c,			"range/clipmode",	0, t_paramui, attr_clipmode);
	CLASS_ATTR_LABEL(c,			"range/clipmode",	0, "Mode for Clipping to Range");
	CLASS_ATTR_ENUM(c,			"range/clipmode",	0, "none low high both");
	CLASS_ATTR_DEFAULT(c,		"range/clipmode",	0, "none");
	CLASS_ATTR_SAVE(c,			"range/clipmode",	0);
	CLASS_ATTR_ACCESSORS(c,		"range/clipmode",	paramui_getClipmode, paramui_setClipmode);

	CLASS_ATTR_SYM(c,			"description",		0, t_paramui, attr_description);
	CLASS_ATTR_LABEL(c,			"description",		0, "Parameter Description");
	//CLASS_ATTR_STYLE(c,			"description",		0, "text_large");
	CLASS_ATTR_STYLE(c,			"description",		0, "text_onesymbol");
	CLASS_ATTR_DEFAULT(c,		"description",		0, "This parameter should do something.");
	CLASS_ATTR_SAVE(c,			"description",		0);
	CLASS_ATTR_ACCESSORS(c,		"description",		paramui_getDescription, paramui_setDescription);

	CLASS_ATTR_SYM(c,			"dataspace",		0, t_paramui, attr_dataspace);
	CLASS_ATTR_LABEL(c,			"dataspace",		0, "Dataspace");
	CLASS_ATTR_ENUM(c,			"dataspace",		0, dataspaces);
	CLASS_ATTR_DEFAULT(c,		"dataspace",		0, "none");
	CLASS_ATTR_SAVE(c,			"dataspace",		0);
	CLASS_ATTR_ACCESSORS(c,		"dataspace",		paramui_getDataspace, paramui_setDataspace);

	CLASS_ATTR_SYM(c,			"dataspace/unit/active",		0, t_paramui, attr_unitActive);
	CLASS_ATTR_LABEL(c,			"dataspace/unit/active",		0, "Active Unit within the Dataspace");
	CLASS_ATTR_DEFAULT(c,		"dataspace/unit/active",		0, "none");
	CLASS_ATTR_SAVE(c,			"dataspace/unit/active",		0);
	CLASS_ATTR_ACCESSORS(c,		"dataspace/unit/active",		paramui_getUnitActive, paramui_setUnitActive);

	CLASS_ATTR_SYM(c,			"dataspace/unit/native",		0, t_paramui, attr_unitNative);
	CLASS_ATTR_LABEL(c,			"dataspace/unit/native",		0, "Native Unit within the Dataspace");
	CLASS_ATTR_DEFAULT(c,		"dataspace/unit/native",		0, "none");
	CLASS_ATTR_SAVE(c,			"dataspace/unit/native",		0);
	CLASS_ATTR_ACCESSORS(c,		"dataspace/unit/native",		paramui_getUnitNative, paramui_setUnitNative);

	CLASS_STICKY_ATTR_CLEAR(c,	"category");

	class_register(CLASS_BOX, c);
	s_ui_class = c;
	
	sysmem_freeptr(dataspaceNames);
	return 0;
}