// Main function void main(void) { post("gaussdraw object version " VERSION " by Tristan Jehan"); post("copyright © 2001 Massachusetts Institute of Technology"); post(""); setup( // Setup Object (Messlist**) &gaussdraw_class, // Pointer to class (method) gaussdraw_new, // Constructor (method) gaussdraw_free, // Destructor (short) sizeof(t_gaussdraw), // Class Size 0L, A_GIMME, 0); /* bind your methods to symbols */ addbang((method)gaussdraw_bang); addfloat((method)gaussdraw_float); addint((method)gaussdraw_int); addinx((method)gaussdraw_int_1,1); addinx((method)gaussdraw_int_2,2); addftx((method)gaussdraw_float_1,1); addftx((method)gaussdraw_float_2,2); addmess((method)gaussdraw_assist,"assist",A_CANT,0); addmess((method)gaussdraw_min,"min",A_GIMME,0); addmess((method)gaussdraw_max,"max",A_GIMME,0); addmess((method)gaussdraw_numpts,"numbars",A_GIMME,0); addmess((method)gaussdraw_default,"default",A_GIMME,0); addmess((method)gaussdraw_print,"print",A_GIMME,0); /* list object in the new object list */ finder_addclass("Statistics", "gaussdraw"); rescopy('STR#', RES_ID); }
int main(void) { setup((t_messlist **)&rvbap_class, (method)rvbap_new, 0L, (short)sizeof(t_rvbap), 0L, A_GIMME, 0); /* rvbap_new = creation function, A_DEFLONG = its (optional) arguement is a long (32-bit) int */ addmess((method)rvbap_assist, "assist", A_CANT, 0); addbang((method)rvbap_bang); /* the procedure it uses when it gets a bang in the left inlet */ addinx((method)rvbap_in1, 1); /* the rocedure for an int in the right inlet (inlet 1) */ addinx((method)rvbap_in2, 2); /* the rocedure for an int in the right inlet (inlet 2) */ addinx((method)rvbap_in3, 3); addinx((method)rvbap_in4, 4); addftx((method)rvbap_ft1, 1); /* the rocedure for an int in the right inlet (inlet 1) */ addftx((method)rvbap_ft2, 2); /* the rocedure for an int in the right inlet (inlet 2) */ addftx((method)rvbap_ft3, 3); addftx((method)rvbap_ft4, 4); addmess((method)rvbap_matrix, "loudspeaker-matrices", A_GIMME, 0); post("rvbap v1.1, © 2003-2007 by Olaf Matthes, based on vbap by Ville Pulkki"); return 0; }