Пример #1
0
int C74_EXPORT main(void)
{
	t_class *c;
	
	c = class_new("hoa.pi~", (method)pi_new, (method)dsp_free, sizeof(t_pi), 0L, A_GIMME, 0);
	
	hoa_initclass(c, (method)hoa_getinfos);
    
	class_addmethod(c, (method)pi_dsp64,	"dsp64",    A_CANT, 0);
    class_addmethod(c, (method)pi_assist,	"assist",	A_CANT, 0);
	
    // @method int @digest Set π multiplier or phase
	// @description The <m>int</m> message set pi multiplier in the first inlet, the phase in the second one.
	// @marg 0 @name value @optional 0 @type int
    class_addmethod(c, (method)pi_int,		"int",		A_LONG, 0);
    
    // @method float @digest Set π multiplier or phase
	// @description The <m>float</m> message set pi multiplier in the first inlet, the phase in the second one.
	// @marg 0 @name value @optional 0 @type float
	class_addmethod(c, (method)pi_float,	"float",	A_FLOAT, 0);
	
    class_dspinit(c);
	class_register(CLASS_BOX, c);
	pi_class = c;
	return 0;
}
Пример #2
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;
}
Пример #3
0
int TTCLASSWRAPPERMAX_EXPORT main(void)
{
	ClassPtr c;

	TTAudioGraphInit();	
	common_symbols_init();

	c = class_new("jcom.unpack≈", (method)UnpackNew, (method)UnpackFree, sizeof(Unpack), (method)0L, A_GIMME, 0);
	
	class_addmethod(c, (method)UnpackNotify,		"notify",			A_CANT, 0);
	class_addmethod(c, (method)UnpackReset,			"audio.reset",		A_CANT, 0);
	class_addmethod(c, (method)UnpackConnect,		"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)UnpackDsp64,			"dsp64",			A_CANT, 0);		
	class_addmethod(c, (method)UnpackAssist,		"assist",			A_CANT, 0); 
    class_addmethod(c, (method)object_obex_dumpout,	"dumpout",			A_CANT, 0);  
	
	//CLASS_ATTR_FLOAT(c,		"gain", 0,		Unpack,	gain);
	//CLASS_ATTR_ACCESSORS(c,	"gain",	NULL,	UnpackSetGain);

	class_dspinit(c);
	class_register(_sym_box, c);
	sUnpackClass = c;
	return 0;
}
Пример #4
0
int main(void)
{	

	t_class *c;
	
	c = class_new("hoa.encoder~", (method)HoaEncode_new, (method)HoaEncode_free, (long)sizeof(t_HoaEncode), 0L, A_GIMME, 0);
	
	class_addmethod(c, (method)HoaEncode_float,		"float",	A_FLOAT, 0);
	class_addmethod(c, (method)HoaEncode_int,		"int",		A_LONG, 0);
	class_addmethod(c, (method)HoaEncode_dsp,		"dsp",		A_CANT, 0);
	class_addmethod(c, (method)HoaEncode_dsp64,		"dsp64",	A_CANT, 0);
	class_addmethod(c, (method)HoaEncode_assist,	"assist",	A_CANT, 0);
	
	class_dspinit(c);				
	class_register(CLASS_BOX, c);	
	HoaEncode_class = c;

	if(class_findbyname(CLASS_NOBOX, gensym("hoa.loader")) == NULL)
	{
		if(postons == 0)
		{
			hoa_postcredits();
			postons = 1;
		}
	}
	return 0;
}
Пример #5
0
void send_tilde_initclass(void)
{
    long attrflags = 0;
    t_class *c;
    t_object *attr;

    // Define our class
    c = class_new("jcom.send~", (method)audiosend_new, (method)audiosend_free,
                  sizeof(t_audiosend), (method)NULL, A_GIMME, 0);

    // Make methods accessible for our class:
    class_addmethod(c, (method)audiosend_bang,			"bang",			0);
    class_addmethod(c, (method)audiosend_dsp,			"dsp", 			A_CANT, 0);
    class_addmethod(c, (method)audiosend_assist,		"assist", 		A_CANT, 0);
    class_addmethod(c, (method)object_obex_dumpout, 	"dumpout", 		A_CANT,0);

    // ATTRIBUTE: name
    attr = attr_offset_new("target", _sym_symbol, attrflags,
                           (method)0, (method)audiosend_attr_settarget, calcoffset(t_audiosend, attr_target));
    class_addattr(c, attr);

    // Setup our class to work with MSP
    class_dspinit(c);

    // Finalize our class
    class_register(CLASS_BOX, c);
    s_audiosend_class = c;
}
Пример #6
0
int TTCLASSWRAPPERMAX_EXPORT main(void)
{
	ClassPtr c;

	TTAudioGraphInit();	
	common_symbols_init();

	c = class_new("j.unsig=", (method)OutNew, (method)OutFree, sizeof(Out), (method)0L, A_GIMME, 0);
	
	class_addmethod(c, (method)OutNotify,			"notify",				A_CANT, 0);
	class_addmethod(c, (method)OutReset,			"audio.reset",		A_CANT, 0);
	class_addmethod(c, (method)OutConnect,			"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)OutDsp,				"dsp",					A_CANT, 0);		
	class_addmethod(c, (method)OutAssist,			"assist",				A_CANT, 0); 
    class_addmethod(c, (method)object_obex_dumpout,	"dumpout",				A_CANT, 0);  
	
	//CLASS_ATTR_FLOAT(c,		"gain", 0,		Out,	gain);
	//CLASS_ATTR_ACCESSORS(c,	"gain",	NULL,	OutSetGain);

	class_dspinit(c);
	class_register(_sym_box, c);
	sOutClass = c;
	return 0;
}
Пример #7
0
int TTCLASSWRAPPERMAX_EXPORT main(void)
{
	t_class *c;
	
	TTDSPInit();
	common_symbols_init();

	c = class_new("jcom.gain~", (method)gain_new, (method)gain_free, sizeof(t_gain), (method)0L, A_GIMME, 0);

	// Make methods accessible for our class: 
	class_addmethod(c, (method)gain_dsp, 				"dsp", A_CANT, 0L);
	class_addmethod(c, (method)gain_dsp64,				"dsp64", A_CANT, 0);
    class_addmethod(c, (method)object_obex_dumpout, 	"dumpout", A_CANT,0);
    class_addmethod(c, (method)gain_assist, 			"assist", A_CANT, 0L);

	CLASS_ATTR_CHAR(c,		"bypass",	0,		t_gain,	attrBypass);
	CLASS_ATTR_ACCESSORS(c,	"bypass",	NULL,	attr_set_bypass);
	
	CLASS_ATTR_FLOAT(c,		"mix",		0,		t_gain,	attrBypass);
	CLASS_ATTR_ACCESSORS(c,	"mix",		NULL,	attr_set_mix);
	
	CLASS_ATTR_FLOAT(c,		"gain",		0,		t_gain,	attrBypass);
	CLASS_ATTR_ACCESSORS(c,	"gain",		NULL,	attr_set_gain);
		
	// Setup our class to work with MSP
	class_dspinit(c);

	// Finalize our class
	class_register(CLASS_BOX, c);
	s_gain_class = c;
	return 0;
}
Пример #8
0
int C74_EXPORT main(void)
{	

	t_class *c;
	
	c = class_new("hoa.2d.optim~", (method)hoa_optim_new, (method)hoa_optim_free, (long)sizeof(t_hoa_optim), 0L, A_GIMME, 0);
	
    hoa_initclass(c, (method)hoa_getinfos);
	
	// @method signal @digest Array of circular harmonic signals to be optimized.
	// @description Array of circular harmonic signals to be optimized.
	class_addmethod(c, (method)hoa_optim_dsp64,		"dsp64",	A_CANT, 0);
	class_addmethod(c, (method)hoa_optim_assist,    "assist",	A_CANT, 0);
	
	// @method basic @digest Set the optimization mode to <b>basic</b>, does not apply any optimization.
	// @description Set the optimization mode to <b>basic</b>. This is particulary suitable when the listener is ideally placed at the center of the loudspeaker arrangement, or for diffused soundfields.
	class_addmethod(c, (method)hoa_optim_basic,     "basic",	A_NOTHING, 0);
	
	// @method maxRe @digest Set the optimization mode to <b>maxRe</b>.
	// @description Set the optimization mode to <b>maxRe</b>. This is particulary suitable when the audience is confined at the center of the restitution area.
    class_addmethod(c, (method)hoa_optim_maxre,     "maxRe",	A_NOTHING, 0);
	
	// @method maxRe @digest Set the optimization mode to <b>maxRe</b>.
	// @description Set the optimization mode to <b>maxRe</b>. This is particulary suitable when the audience covers all of the restitution area.
    class_addmethod(c, (method)hoa_optim_inphase,   "inPhase",	A_NOTHING, 0);
    
	class_dspinit(c);
	class_register(CLASS_BOX, c);	
	hoa_optim_class = c;
    
	return 0;
}
Пример #9
0
int C74_EXPORT main(void) {
    t_class *c;             //Variable to store the class
    c = class_new("FMgrains3~", (method) FMNew, (method) FMfree, sizeof(fmsynth), 0L, A_GIMME, 0);
    
    class_addmethod(c, (method) FMDsp64, "dsp64", A_CANT, 0);
    class_addmethod(c, (method) FMminFreq, "float", A_FLOAT, 0);
    class_addmethod(c, (method) FMmaxFreq, "ft1", A_FLOAT, 0);
    class_addmethod(c, (method) FMminModFreq, "ft2", A_FLOAT, 0);
    class_addmethod(c, (method) FMmaxModFreq, "ft3", A_FLOAT, 0);
    class_addmethod(c, (method) FMIndex, "ft4", A_FLOAT, 0);
    class_addmethod(c, (method) FMminWin, "ft5", A_FLOAT, 0);
    class_addmethod(c, (method) FMmaxWin, "ft6", A_FLOAT, 0);
    class_addmethod(c, (method) FMAssist, "assist", A_CANT, 0);
    class_addmethod(c, (method) FMSet, "set", A_SYM, 0);
    class_dspinit(c);
	class_register(CLASS_BOX, c);
    //Make symbols to assign to global variables for carrier
    sineMess = gensym("sine");
    squareMess = gensym("square");
    sawMess = gensym("saw");
    phasorMess = gensym("phasor");
    triMess = gensym("triangle");
    //Make symbols to assign to global variables for modulator
    sineMessMod = gensym("sinemod");
    squareMessMod = gensym("squaremod");
    sawMessMod = gensym("sawmod");
    phasorMessMod = gensym("phasormod");
    triMessMod = gensym("trianglemod");
    myClass = c;
    return 0;
}
Пример #10
0
// initialization routine
int C74_EXPORT main (void)
{
    drag_class = class_new("db.drag~", (method)drag_new, (method)drag_dsp_free,
                           sizeof(t_drag), 0L, A_GIMME, 0);

    // register methods to handle incoming messages
    class_addmethod(drag_class, (method)drag_dsp64, "dsp64", A_CANT, 0);
    class_addmethod(drag_class, (method)drag_assist, "assist", A_CANT, 0);
    class_addmethod(drag_class, (method)drag_bang, "bang", A_FLOAT, 0);
    class_addmethod(drag_class, (method)drag_float, "float", A_FLOAT, 0);
    class_addmethod(drag_class, (method)drag_dcblock_set, "dc", A_GIMME, 0);
    class_addmethod(drag_class, (method)drag_shape_set, "shape", A_GIMME, 0);
    class_addmethod(drag_class, (method)drag_fmax_set, "fmax", A_GIMME, 0);
    class_addmethod(drag_class, (method)drag_drag_set, "drag", A_GIMME, 0);
    class_addmethod(drag_class, (method)drag_dragcurv_set, "dragcurve", A_GIMME, 0);

    class_dspinit(drag_class);
    class_register(CLASS_BOX, drag_class);

    post("db.drag~ by Daniel Bennett [email protected]");
    post("- Peter Blasser inspired Triangle \"drag & Bounds\" oscillators");
    post("args:- 1) no of voices (default 1 - henceforth \"n\") ");
    post("args:- 2) Lower bound for voice 1 (default -1)");
    post("args:- 3) Upper bound for voice n (default 1) ");
    post("args:- 4) mode -  ");

    // report to the MAX window
    return 0;
}
Пример #11
0
int C74_EXPORT main(void)
{
	t_class* c;
	c = class_new("hoa.in~", (method)hoa_sig_in_new, (method)hoa_sig_in_free, sizeof(t_hoa_sig_in), NULL, A_GIMME, 0);
    
	hoa_initclass(c, NULL);
	
	class_addmethod(c, (method)hoa_sig_in_dsp64,	"dsp64",	A_CANT, 0);
    class_addmethod(c, (method)hoa_sig_in_assist,	"assist",	A_CANT, 0);
	class_addmethod(c, (method)hoa_sig_in_int,		"int",		A_LONG, 0);
	
	CLASS_ATTR_LONG		(c, "extra", 0, t_hoa_sig_in, extra);
	CLASS_ATTR_ACCESSORS(c, "extra", 0, hoa_sig_in_setattr_extra);
	CLASS_ATTR_LABEL	(c, "extra", 0, "param index");
	
	CLASS_ATTR_SYM		(c, "comment", 0, t_hoa_sig_in, comment);
	CLASS_ATTR_ACCESSORS(c, "comment", 0, hoa_sig_in_setattr_comment);
	CLASS_ATTR_LABEL	(c, "comment", 0, "Description");
	CLASS_ATTR_SAVE		(c, "comment", 1);
    
	class_dspinit(c);
	class_register(CLASS_BOX, c);
	hoa_sig_in_class = c;
	return 0;
}
Пример #12
0
int C74_EXPORT main(void)
{	

	t_class *c;
	
	c = class_new("hoa.optim~", (method)HoaOptim_new, (method)dsp_free, (long)sizeof(t_HoaOptim), 0L, A_GIMME, 0);
	
	class_addmethod(c, (method)HoaOptim_dsp64,		"dsp64",	A_CANT, 0);
	class_addmethod(c, (method)HoaOptim_assist,		"assist",	A_CANT, 0);
    
    CLASS_ATTR_SYM				(c, "optim", 0, t_HoaOptim, f_optim_mode);
	CLASS_ATTR_CATEGORY			(c, "optim", 0, "Behavior");
	CLASS_ATTR_LABEL			(c, "optim", 0, "Optimization");
    CLASS_ATTR_ENUM             (c, "optim", 0, "basic maxRe inPhase");
	CLASS_ATTR_ORDER			(c, "optim", 0, "1");
	CLASS_ATTR_ACCESSORS		(c, "optim", NULL, HoaOptim_optim);
	CLASS_ATTR_SAVE				(c, "optim", 1);
	
	class_dspinit(c);				
	class_register(CLASS_BOX, c);	
	HoaOptim_class = c;
	
	class_findbyname(CLASS_BOX, gensym("hoa.encoder~"));
	return 0;
}
Пример #13
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;
}
Пример #14
0
extern "C" int C74_EXPORT main(void)
{
	t_class *c;
	
	c = class_new("tap.shift~",(method)shift_new, (method)shift_free, sizeof(t_shift), 
		(method)0L, A_GIMME, 0);

		common_symbols_init();								// Initialize TapTools

	// ADD ATTRIBUTES
	CLASS_ATTR_DOUBLE(c,		"ratio",			0,	t_shift, attr_ratio);
	CLASS_ATTR_ACCESSORS(c,	"ratio",			NULL, attr_set_ratio);

	CLASS_ATTR_DOUBLE(c,		"window_size",		0,	t_shift, attr_window_size);
	CLASS_ATTR_ACCESSORS(c,	"window_size",		NULL, attr_set_window_size);

	// ADD METHODS
	class_addmethod(c, (method)shift_float, 	"float", 	A_FLOAT, 0L);
	class_addmethod(c, (method)shift_int,	 	"int", 		A_LONG, 0L);
	class_addmethod(c, (method)shift_clear, 	"clear", 	0L);
	class_addmethod(c, (method)shift_dsp64, "dsp64", A_CANT, 0);
    class_addmethod(c, (method)shift_assist, 	"assist", 	A_CANT, 0L); 
	class_addmethod(c, (method)stdinletinfo,	"inletinfo",	A_CANT, 0);

	// WRAP UP
    class_dspinit(c);									// Setup object's class to work with MSP
class_register(_sym_box, c); 	shift_class = c;
}
Пример #15
0
int C74_EXPORT main(void)
{
	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);
	
	hoa_initclass(c, (method)hoa_getinfos);
	
	class_addmethod(c, (method)hoa_dac_dsp64,		"dsp64",		A_CANT,  0);
	class_addmethod(c, (method)hoa_dac_assist,		"assist",		A_CANT,	 0);
	class_addmethod(c, (method)hoa_dac_dblclick,	"dblclick",		A_CANT,  0);
	class_addmethod(c, (method)hoa_dac_int,			"int",			A_LONG,  0);
	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() ??
    
	class_addmethod(c, (method)hoa_dac_start,		"start",		A_NOTHING,  0);
	class_addmethod(c, (method)hoa_dac_stop,		"stop",			A_NOTHING,  0);
	class_addmethod(c, (method)hoa_dac_startwindow,	"startwindow",	A_NOTHING,  0);
	class_addmethod(c, (method)hoa_dac_open,		"open",			A_NOTHING,  0);
	class_addmethod(c, (method)hoa_dac_wclose,		"wclose",		A_NOTHING,  0);

	class_dspinit(c);
	class_register(CLASS_BOX, c);
	hoa_dac_class = c;
	return 0;
}
Пример #16
0
void ext_main(void *r)
{
	
	t_class *c = class_new("ambipan~", 
						   (method)ambipan_tilde_new, 
						   (method)ambipan_tilde_dest, 
						   (short)sizeof(t_ambipan_tilde), NULL, A_GIMME, 0);

	//-------------D�finition des m�thodes-------------------//
	class_addmethod(c, (method)ambipan_tilde_dsp64, "dsp64", A_CANT, 0);
	class_addmethod(c, (method)ambipan_tilde_recoit_liste, "list", A_GIMME, 0);
	class_addmethod(c, (method)ambipan_tilde_recoit_float, "float", A_FLOAT, 0);
	class_addmethod(c, (method)ambipan_tilde_initialiser_nb_hp, "set_nb_hp", A_LONG, 0);
	class_addmethod(c, (method)ambipan_tilde_teta_positionner_hp, "a_setpos", A_GIMME, 0);
	class_addmethod(c, (method)ambipan_tilde_dist_teta_positionner_hp, "ra_setpos", A_GIMME, 0);
	class_addmethod(c, (method)ambipan_tilde_xy_positionner_hp, "xy_setpos", A_GIMME, 0);
	class_addmethod(c, (method)ambipan_tilde_changer_offset, "set_offset", A_FLOAT, 0);
	class_addmethod(c, (method)ambipan_tilde_muter_entrees_signal, "mute_sig", A_LONG, 0);
	class_addmethod(c, (method)ambipan_tilde_changer_type_repere, "change_type", A_SYM, 0);
	class_addmethod(c, (method)ambipan_tilde_informations, "get_info", 0);
	class_addmethod(c, (method)ambipan_tilde_assist,"assist",A_CANT,0);	
	
    cicmtools_post_credits();
	
	class_dspinit(c);
	class_register(CLASS_BOX, c);
    ambipan_tilde_class = c;
}
Пример #17
0
int C74_EXPORT main(void)
{	
	t_class *c;
	
	c = class_new("hoa.binaural~", (method)HoaBinaural_new, (method)HoaBinaural_free, (long)sizeof(t_HoaBinaural), 0L, A_GIMME, 0);
	
	class_addmethod(c, (method)HoaBinaural_dsp,			"dsp",		A_CANT,		0);
	class_addmethod(c, (method)HoaBinaural_dsp64,		"dsp64",	A_CANT,		0);
	class_addmethod(c, (method)HoaBinaural_assist,		"assist",	A_CANT,		0);
    
    CLASS_ATTR_SYM              (c,"pinnasize", 0,      t_HoaBinaural, f_pinna_size);
    CLASS_ATTR_ACCESSORS		(c,"pinnasize", NULL,   HoaBinaural_set_pinnasize);
	CLASS_ATTR_LABEL			(c,"pinnasize", 0,      "Pinna Size");
	CLASS_ATTR_CATEGORY			(c,"pinnasize", 0,      "Behavior");
    CLASS_ATTR_ENUM             (c,"pinnasize", 0,      "small large");
	CLASS_ATTR_DEFAULT          (c,"pinnasize", 0,      "small");
    CLASS_ATTR_ORDER			(c,"pinnasize", 0,      "1");
    CLASS_ATTR_SAVE             (c,"pinnasize", 1);
	
	class_dspinit(c);				
	class_register(CLASS_BOX, c);	
	HoaBinaural_class = c;
	
	class_findbyname(CLASS_NOBOX, gensym("hoa.encoder~"));
	return 0;
}
Пример #18
0
int main(void)
{
	t_class *c = class_new("o.edge~", (method)oedge_new, (method)oedge_free, sizeof(t_oedge), 0L, A_GIMME, 0);
	//class_addmethod(c, (method)oedge_fullPacket, "FullPacket", A_LONG, A_LONG, 0);
	//class_addmethod(c, (method)oedge_fullPacket, "FullPacket", A_GIMME, 0);
	class_addmethod(c, (method)oedge_assist, "assist", A_CANT, 0);
	class_addmethod(c, (method)oedge_doc, "doc", 0);
    	class_addmethod(c, (method)oedge_dsp, "dsp", A_CANT, 0);
    	class_addmethod(c, (method)oedge_dsp64, "dsp64", A_CANT, 0);
	//class_addmethod(c, (method)oedge_bang, "bang", 0);
	//class_addmethod(c, (method)oedge_anything, "anything", A_GIMME, 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_dspinit(c);

	class_register(CLASS_BOX, c);
	oedge_class = c;

	common_symbols_init();

	ODOT_PRINT_VERSION;

	omax_realtime_clock_init();
	return 0;
}
Пример #19
0
extern "C" int TTCLASSWRAPPERMAX_EXPORT main(void)
{
	t_class *c;

	c = class_new("tap.decibels~",(method)decibels_new, (method)dsp_free, sizeof(t_decibels), 
		(method)0L, A_GIMME, 0);

		common_symbols_init();
	class_addmethod(c, (method)decibels_dsp, 			"dsp", A_CANT, 0L);		
	class_addmethod(c, (method)decibels_dsp64, "dsp64", A_CANT, 0);
    class_addmethod(c, (method)decibels_int, 			"int", A_LONG, 0L);		// Input as int
    class_addmethod(c, (method)decibels_float, 			"float", A_FLOAT, 0L);	// Input as double
    class_addmethod(c, (method)decibels_assist, 		"assist", A_CANT, 0L); 
	class_addmethod(c, (method)stdinletinfo,			"inletinfo",	A_CANT, 0);

	CLASS_ATTR_SYM(c,		"mode",			0,	t_decibels, attr_mode);
	CLASS_ATTR_ACCESSORS(c,	"mode",			NULL, attr_set_mode);
	CLASS_ATTR_ENUM(c,		"mode",			0,	"amp2db db2amp mm2db db2mm mm2amp amp2mm db2midi midi2db");

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

	// initialize class globals
	ps_amp2db = gensym("amp2db");
	ps_db2amp = gensym("db2amp");
	ps_mm2db = gensym("mm2db");
	ps_db2mm = gensym("db2mm");
	ps_mm2amp = gensym("mm2amp");
	ps_amp2mm = gensym("amp2mm");
	ps_db2midi = gensym("db2midi");
	ps_midi2db = gensym("midi2db");
}
Пример #20
0
int C74_EXPORT main(void)
{	

	t_class *c;
	
	c = class_new("hoa.3d.wider~", (method)hoa_wider_new, (method)hoa_wider_free, (long)sizeof(t_hoa_wider), 0L, A_GIMME, 0);
	
	hoa_initclass(c, (method)hoa_getinfos);
	
	// @method float @digest Set the widening value.
	// @description Set the widening value in the last inlet at control rate. The widening value is clipped between 0. and 1.
	class_addmethod(c, (method)hoa_wider_float,		"float",	A_FLOAT, 0);
	
	// @method int @digest Set the widening value.
	// @description Set the widening value in the last inlet at control rate. The widening value is clipped between 0. and 1.
	class_addmethod(c, (method)hoa_wider_int,       "int",		A_LONG, 0);
	
	// @method signal @digest Array of spherical harmonics signals to be processed, widening value.
	// @description Array of spherical harmonics signals to be processed. Set the widening value in the last inlet at signal rate. The widening value is clipped between 0. and 1.
	class_addmethod(c, (method)hoa_wider_dsp64,		"dsp64",	A_CANT, 0);
	class_addmethod(c, (method)hoa_wider_assist,    "assist",	A_CANT, 0);
	
	class_dspinit(c);
	class_register(CLASS_BOX, c);	
	hoa_wider_class = c;
	return 0;
}
Пример #21
0
/********************************************************************************
int main(void)

inputs:			nothing
description:	called the first time the object is used in MAX environment; 
		defines inlets, outlets and accepted messages
returns:		int
********************************************************************************/
int C74_EXPORT main(void)
{
    t_class *c;
    
    c = class_new(OBJECT_NAME, (method)gverb_new, (method)gverb_free,
			(short)sizeof(t_gverb), 0L, A_DEFFLOAT, 0);
    class_dspinit(c); // add standard functions to class
    
    class_addmethod(c, (method)gverb_dsp, "dsp", A_CANT, 0);
	
	/* bind method "gverb_float" to incoming floats */
	class_addmethod(c, (method)gverb_float, "float", A_FLOAT, 0);
	
	/* bind method "gverb_int" to incoming ints */
	class_addmethod(c, (method)gverb_int, "int", A_LONG, 0);
	
	/* bind method "gverb_assist" to the assistance message */
	class_addmethod(c, (method)gverb_assist, "assist", A_CANT, 0);
	
	/* bind method "gverb_getinfo" to the getinfo message */
	class_addmethod(c, (method)gverb_getinfo, "getinfo", A_NOTHING, 0);
    
    /* bind method "gverb_dsp64" to the dsp64 message */
    class_addmethod(c, (method)gverb_dsp64, "dsp64", A_CANT, 0);
    
    class_register(CLASS_BOX, c); // register the class w max
    gverb_class = c;
	
    #ifdef DEBUG
        post("%s: main function was called", OBJECT_NAME);
    #endif /* DEBUG */
    
    return 0;
}
Пример #22
0
int C74_EXPORT main(void)
{
    t_class *c = class_new("rtlsdr~", (method)rtlsdr_new, (method)rtlsdr_free, sizeof(t_rtlsdr), NULL, A_DEFFLOAT, 0);
    
    // this needs to be here even if we don't need to input any signals...
    class_addmethod(c, (method)rtlsdr_dsp64, "dsp64", A_CANT, 0); 	// respond to the dsp message
    
    class_addmethod(c, (method)rtlsdr_float, "float", A_FLOAT, 0);
    class_addmethod(c, (method)rtlsdr_int, "int", A_LONG, 0);
    
    class_addmethod(c, (method)rtlsdr_freq, "freq", A_GIMME, 0 );
    class_addmethod(c, (method)rtlsdr_gain, "gain", A_GIMME, 0 );
    class_addmethod(c, (method)rtlsdr_samplerate, "samplerate", A_GIMME, 0 );
    class_addmethod(c, (method)rtlsdr_resetbuf, "resetbuf", 0);
    class_addmethod(c, (method)rtlsdr_stop, "stop", 0);
    class_addmethod(c, (method)rtlsdr_start, "start", 0);
    class_addmethod(c, (method)rtlsdr_info, "info", 0);
    
    //    class_addmethod(c, (method)rtlsdr_bang,"bang", BANG, 0);
    
    // need to add message input here...
    
    class_addmethod(c, (method)rtlsdr_assist,"assist",A_CANT,0);
    
    class_dspinit(c);												// must call this function for MSP object classes
    
	class_register(CLASS_BOX, c);
	rtlsdr_class = c;
    
    
	return 0;
}
int C74_EXPORT main()
{
    this_class = class_new ("ibufconcatenate~",
							(method) ibufconcatenate_new, 
							(method)ibufconcatenate_free, 
							sizeof(t_ibufconcatenate), 
							0L, 
							A_SYM, 
							A_DEFLONG,
							0);
	
	class_addmethod (this_class, (method)ibufconcatenate_int, "int", A_LONG, 0L);
	class_addmethod (this_class, (method)ibufconcatenate_set, "set", A_SYM, 0L);
	class_addmethod (this_class, (method)ibufconcatenate_clear, "clear", 0L);
	class_addmethod (this_class, (method)ibufconcatenate_append, "append", A_SYM, 0L);
    class_addmethod (this_class, (method)ibufconcatenate_entry, "entry", A_DEFFLOAT, A_DEFFLOAT, 0L);
	class_addmethod (this_class, (method)ibufconcatenate_assist, "assist", A_CANT, 0L);
	class_addmethod(this_class, (method)ibufconcatenate_dsp, "dsp", A_CANT, 0);
	class_addmethod(this_class, (method)ibufconcatenate_dsp64, "dsp64", A_CANT, 0);
	
	class_register(CLASS_BOX, this_class);
	
	class_dspinit(this_class);
			
	return 0;
}
Пример #24
0
int C74_EXPORT main(void)
{	
	t_class *maxclass, *jitclass;
	
	// initialize our Jitter class
	hoa_gl_scope_init();
	
	// create our Max class
	maxclass = class_new("hoa.gl.scope3D~", (method)max_hoa_gl_scope_new, (method)max_hoa_gl_scope_free, sizeof(t_max_hoa_gl_scope), NULL, A_GIMME, 0);

	// specify a byte offset to keep additional information about our object
	max_jit_class_obex_setup(maxclass, calcoffset(t_max_hoa_gl_scope, obex));
	
	// look up our Jitter class in the class registry
	jitclass = (t_class*) jit_class_findbyname(gensym("hoa_gl_scope"));
	
	// wrap our Jitter class with the standard methods for Jitter objects
    max_jit_class_wrap_standard(maxclass, jitclass, 0);
    			   
   	// use standard ob3d assist method
    //class_addmethod(maxclass, (method)max_jit_ob3d_assist, "assist", A_CANT, 0);
	class_addmethod(maxclass, (method)hoa_gl_scope_dsp64,  "dsp64",		A_CANT, 0);
	class_addmethod(maxclass, (method)hoa_gl_scope_assist, "assist",	A_CANT, 0);

	// add methods for 3d drawing
    max_jit_class_ob3d_wrap(maxclass);
		
	class_dspinit(maxclass);
	class_register(CLASS_BOX, maxclass);
	max_hoa_gl_scope_class = maxclass;
	
	hoa_credit();
	
	return 0;
}
Пример #25
0
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;
}
Пример #26
0
int TTCLASSWRAPPERMAX_EXPORT main(void)
{
	long attrflags = 0;
	t_class *c;
	t_object *attr;

	TTDSPInit();	
	common_symbols_init();

	c = class_new("jcom.balance~",(method)balance_new, (method)balance_free, (short)sizeof(t_balance), 
		(method)0L, A_GIMME, 0);

 	class_addmethod(c, (method)balance_clear, 			"clear",	0L);		
 	class_addmethod(c, (method)balance_dsp, 			"dsp",		A_CANT, 0L);		
	class_addmethod(c, (method)balance_assist, 			"assist",	A_CANT, 0L); 

	attr = attr_offset_new("bypass", _sym_long, attrflags,
		(method)0L,(method)balance_setBypass, calcoffset(t_balance, attrBypass));
	class_addattr(c, attr);	

	attr = attr_offset_new("frequency", _sym_float32, attrflags,
		(method)0L,(method)balance_setFrequency, calcoffset(t_balance, attrFrequency));
	class_addattr(c, attr);	

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

	return 0;
}
Пример #27
0
int main(void)
{	
	// object initialization, note the use of dsp_free for the freemethod, which is required
	// unless you need to free allocated memory, in which case you should call dsp_free from
	// your custom free function.

	// OLD METHOD
	// setup((t_messlist **)&errfilt_class, (method)errfilt_new, (method)dsp_free, (short)sizeof(t_errfilt), 0L, A_GIMME, 0);
	// addfloat((method)errfilt_float);
	// you need this
	// addmess((method)errfilt_dsp,				"dsp",			A_CANT, 0);
    // addmess((method)errfilt_assist,			"assist",		A_CANT, 0);  
	// you need this
    // dsp_initclass();
	
	// NEW METHOD
	t_class *c;
	
	c = class_new("mbc.errfilt~", (method)errfilt_new, (method)errfilt_free, (long)sizeof(t_errfilt), 0L, A_DEFLONG, A_DEFFLOAT, 0);
	
	class_addmethod(c, (method)errfilt_dsp, "dsp", A_CANT, 0);
	class_addmethod(c, (method)errfilt_interp,"interp",A_DEFFLOAT,0);
	class_addmethod(c, (method)errfilt_order,"order",A_LONG,0);
	class_addmethod(c, (method)errfilt_assist,"assist",A_CANT,0);
	
	class_dspinit(c);				// new style object version of dsp_initclass();
	class_register(CLASS_BOX, c);	// register class as a box class
	errfilt_class = c;
	
	return 0;
}
Пример #28
0
int C74_EXPORT main(void)
{
	long attrflags = 0;
	t_class *c;
	t_object *attr;
	
	TTDSPInit();
	common_symbols_init();

	c = class_new("j.zerox~", (method)zerox_new, (method)zerox_free, sizeof(t_zerox), (method)0L, A_GIMME, 0);

	class_addmethod(c, (method)zerox_dsp, 		"dsp",		A_CANT, 0L);		
	class_addmethod(c, (method)zerox_dsp64,		"dsp64",	A_CANT, 0);
    class_addmethod(c, (method)zerox_assist, 	"assist",	A_CANT, 0L); 
	class_addmethod(c, (method)jamoma_fileusage, "fileusage", A_CANT, 0);

	attr = attr_offset_new("size", _sym_long, attrflags,
		(method)0L, (method)attr_set_size, calcoffset(t_zerox, attr_size));
	class_addattr(c, attr);
	
	class_dspinit(c);
	class_register(CLASS_BOX, c);
	s_zerox_class = c;
	return 0;
}
Пример #29
0
int TTCLASSWRAPPERMAX_EXPORT main(void)
{
	t_class *c;

	TTDSPInit();	
	common_symbols_init();

	c = class_new("jcom.op~",(method)op_new, (method)op_free, sizeof(t_op), (method)0L, A_GIMME, 0);
	
 	class_addmethod(c, (method)op_dsp,					"dsp",			A_CANT, 0);
	class_addmethod(c, (method)op_dsp64,				"dsp64",		A_CANT, 0);
	class_addmethod(c, (method)op_assist,				"assist",		A_CANT, 0); 
    class_addmethod(c, (method)object_obex_dumpout,		"dumpout", 		A_CANT, 0);  
	
	CLASS_ATTR_SYM(c,		"operator",		0,	t_op,	attrOperator);
	CLASS_ATTR_ACCESSORS(c,	"operator",		NULL,	op_setOperator);
	CLASS_ATTR_ENUM(c,		"operator",	0,	"+ - * / % > >= == != <= < abs acos asin atan ceil cos cosh exp floor log log10 sin sinh sqrt tan tanh");

	CLASS_ATTR_FLOAT(c,		"operand",		0,	t_op,	attrOperand);
	CLASS_ATTR_ACCESSORS(c,	"operand",		NULL,	op_setOperand);

	class_dspinit(c);						// Setup object's class to work with MSP
	class_register(CLASS_BOX, c);
	s_op_class = c;
	return 0;
}
Пример #30
0
int C74_EXPORT main(void)
{
	t_class *c;
	
	c = class_new("hoa.2d.encoder~", (method)hoa_encoder_new, (method)hoa_encoder_free, (long)sizeof(t_hoa_encoder), 0L,A_GIMME,0);
	
    hoa_initclass(c, (method)hoa_getinfos);
	
	// @method float @digest Set the azimuth of the encoding in radians
	// @description The <m>float</m> method sets the azimuth of the encoding in radians (between 0. and 2π).
	// @marg 0 @name azimuth @optional 0 @type float
	class_addmethod(c, (method)hoa_encoder_float,		"float",	A_FLOAT, 0);
	
	// @method int @digest Set the azimuth of the encoding in radians
	// @description The <m>int</m> method sets the azimuth of the encoding in radians (between 0 and 2π).
	// @marg 0 @name azimuth @optional 0 @type int
	class_addmethod(c, (method)hoa_encoder_int,         "int",		A_LONG, 0);
	
	// @method signal @digest Signal to encode / azimuth of the encoding in radians.
	// @description In the left inlet, the signal to encode. In The right inlet : set the azimuth of the encoding in radians
	class_addmethod(c, (method)hoa_encoder_dsp64,		"dsp64",	A_CANT, 0);
	class_addmethod(c, (method)hoa_encoder_assist,      "assist",	A_CANT, 0);
	
	class_dspinit(c);
	class_register(CLASS_BOX, c);	
	hoa_encoder_class = c;

	return 0;
}