void main(void) { setup(&gspline_class, gspline_new, (method)gspline_free, (short)sizeof(t_gspline), gspline_menufun, A_GIMME, 0); addmess((method)gspline_dsp, "dsp", A_CANT, 0); addbang((method)gspline_bang); addfloat((method)gspline_float); addint((method)gspline_int); addmess((method)gspline_list, "list", A_GIMME, 0); addmess((method)gspline_deriv, "deriv", A_GIMME, 0); addmess((method)gspline_restore, "done", 0); addmess((method)gspline_color, "color", A_DEFLONG, 0); addmess((method)gspline_brgb, "brgb", A_DEFLONG, A_DEFLONG, A_DEFLONG, 0); addmess((method)gspline_frgb, "frgb", A_DEFLONG, A_DEFLONG, A_DEFLONG, 0); addmess((method)gspline_domain, "domain", A_DEFLONG, A_DEFLONG, 0); addmess((method)gspline_range, "range", A_DEFFLOAT, 0); addmess((method)gspline_update, "update", A_CANT, 0); addmess((method)gspline_assist, "assist", A_CANT, 0); addmess((method)gspline_setautoderiv, "autoderiv", 0); addmess((method)gspline_logamp, "logamp", 0); addmess((method)gspline_linamp, "linamp", 0); addmess((method)gspline_save, "psave", A_CANT, 0); bindMeBaby = gensym("#X"); // symbol that we will use for restore rescopy('STR#',RES_ID); dsp_initboxclass(); }
// 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); }
void main(void) { setup((struct messlist **)&dcblock_class, (method)dcblock_new, (method)dsp_free, (short)sizeof(t_dcblock), 0L, A_DEFFLOAT, 0); addmess((method)dcblock_dsp, "dsp", A_CANT, 0); addmess((method)dcblock_assist,"assist",A_CANT,0); dsp_initclass(); rescopy('STR#',3214); }
//primary MSP funcs void main(void) { setup((struct messlist **)&bowedbar_class, (method)bowedbar_new, (method)bowedbar_free, (short)sizeof(t_bowedbar), 0L, A_DEFFLOAT, 0); addmess((method)bowedbar_dsp, "dsp", A_CANT, 0); addmess((method)bowedbar_assist,"assist",A_CANT,0); addfloat((method)bowedbar_float); dsp_initclass(); rescopy('STR#',9979); }
//primary MSP funcs void main(void) { setup((struct messlist **)&cabasa_class, (method)cabasa_new, (method)dsp_free, (short)sizeof(t_cabasa), 0L, A_DEFFLOAT, 0); addmess((method)cabasa_dsp, "dsp", A_CANT, 0); addmess((method)cabasa_assist,"assist",A_CANT,0); addfloat((method)cabasa_float); addint((method)cabasa_int); addbang((method)cabasa_bang); dsp_initclass(); rescopy('STR#',9332); }
void main(void) { post("pitcher~ version " PITCHER_VERSION " by Brian K. Vogel"); post("Copyright © 1999 Regents of the University of California. "); setup((t_messlist **)&pitcher_class, (method)pitcher_new, (method)pitcher_free, (short)sizeof(t_pitcher), 0L, A_GIMME, 0); addmess((method)pitcher_dsp, "dsp", A_CANT, 0); addmess((method)pitcher_assist,"assist",A_CANT,0); dsp_initclass(); rescopy('STR#',3241); }
//primary MSP funcs void main(void) { setup((struct messlist **)&guiro_class, (method)guiro_new, (method)dsp_free, (short)sizeof(t_guiro), 0L, A_DEFFLOAT, 0); addmess((method)guiro_dsp, "dsp", A_CANT, 0); addmess((method)guiro_assist,"assist",A_CANT,0); addfloat((method)guiro_float); addint((method)guiro_int); addbang((method)guiro_bang); dsp_initclass(); rescopy('STR#',9333); }
//primary MSP funcs void main(void) { setup((struct messlist **)&marimba_class, (method)marimba_new, (method)marimba_free, (short)sizeof(t_marimba), 0L, A_DEFFLOAT, 0); addmess((method)marimba_dsp, "dsp", A_CANT, 0); addmess((method)marimba_assist,"assist",A_CANT,0); addmess((method)marimba_noteon, "noteon", A_GIMME, 0); addmess((method)marimba_noteoff, "noteoff", A_GIMME, 0); addfloat((method)marimba_float); dsp_initclass(); rescopy('STR#',9278); }
void main(void) { setup(&fir_class, fir_new, (method)dsp_free, (short)sizeof(t_fir), 0L, A_LONG, 0); addmess((method)fir_dsp, "dsp", A_CANT, 0); addbang((method)fir_bang); addmess((method)fir_set, "set", A_GIMME, 0); addmess((method)fir_clear, "clear", 0); addmess((method)fir_assist, "assist", A_CANT, 0); dsp_initclass(); rescopy('STR#',RES_ID); }
void main(void) { setup(&stft_class, stft_new, (method)stft_free, (short)sizeof(t_stft), 0L, A_GIMME, 0); addmess((method)stft_dsp, "dsp", A_CANT, 0); addmess((method)stft_assist, "assist", A_CANT, 0); addbang((method)stft_bang); ps_sdifstftbuffconnect = gensym("sdifstftbuffconnect"); rescopy('STR#',RES_ID); dsp_initclass(); }
void main(void) { setup(&fft_class, fft_new, (method)fft_free, (short)sizeof(t_fft), 0L, A_GIMME, 0); addmess((method)fft_dsp, "dsp", A_CANT, 0); addmess((method)fft_assist, "assist", A_CANT, 0); ps_fft = gensym("fft~"); ps_ifft = gensym("ifft~"); rescopy('STR#',3210); dsp_initclass(); fts_mode = (long)dsp_fts_mode; }
void main(void) { setup( (t_messlist **)&getonset_class, getonset_new, (method)getonset_free, (short)sizeof(t_getonset), 0L, A_GIMME, 0); addmess((method)getonset_dsp, "dsp", A_CANT, 0); addmess((method)getonset_assist, "assist", A_CANT, 0); addfloat((method)getonset_float); addint((method)getonset_int); dsp_initclass(); rescopy('STR#', RES_ID); }
void main(void) { setup(&fft_class, fft_new, (method)fft_free, (short)sizeof(t_fft), 0L, A_GIMME, 0); addmess((method)fft_dsp, "dsp", A_CANT, 0); addmess((method)fft_assist, "assist", A_CANT, 0); addbang((method)fft_bang); ps_rfft = gensym("fftÅ"); ps_rifft = gensym("ifftÅ"); ps_fftbuffconnect = gensym("fftbuffconnect"); rescopy('STR#',3210); dsp_initclass(); }
void main(void) { setup( (t_messlist **)&stringpitch_class, stringpitch_new, (method)stringpitch_free, (short)sizeof(t_stringpitch), 0L, A_GIMME, 0); addmess((method)stringpitch_dsp, "dsp", A_CANT, 0); addmess((method)stringpitch_assist, "assist", A_CANT, 0); addfloat((method)stringpitch_float); addint((method)stringpitch_int); dsp_initclass(); rescopy('STR#', RES_ID); }
/* initialization routine */ void main(fptr *f) { version(0); /* tell Max about your class. The cast to short is important for 68K */ setup(&tpeq_sinelist_class, tpeq_sinelist_new, (method) tpeq_sinelist_free, (short)sizeof(tpeq_sinelist), 0L, A_DEFLONG, 0); /* bind your methods to symbols */ addmess((method)tpeq_sinelist_assist, "assist", A_CANT, 0); addmess((method)version, "version", 0); addmess((method)tpeq_sinelist_tellmeeverything, "tellmeeverything", 0); addmess((method)tpeq_sinelist_list, "list", A_GIMME, 0); addmess((method)tpeq_sinelist_points, "tpe_points", A_GIMME, 0); rescopy('STR#', RESOURCE_ID_WITH_ASSIST_STRINGS); }
void main(void) { ps_rectangular = gensym("rectangular"); ps_hanning = gensym("hanning"); ps_hamming = gensym("hamming"); ps_blackman = gensym("blackman"); setup( ¢roid_class, centroid_new, (method)centroid_free, (short)sizeof(t_centroid), 0L, A_GIMME, 0); addmess((method)centroid_dsp, "dsp", A_CANT, 0); addmess((method)centroid_assist, "assist", A_CANT, 0); addfloat((method)centroid_float); addint((method)centroid_int); dsp_initclass(); rescopy('STR#', RES_ID); }
void main(void) { version(0); setup((t_messlist **)&ioi_report_class, (method) ioi_report_new, (method)ioi_report_free, (short)sizeof(t_ioi_report), 0L, A_GIMME, 0); addmess((method)ioi_report_dsp, "dsp", A_CANT, 0); addmess((method)ioi_report_dsp, "reset", 0); addmess((method)version, "version", 0); addmess((method)ioi_report_assist,"assist",A_CANT,0); addmess((method)ioi_report_min_ioi_time, "min_ioi", A_LONG, 0); addmess((method)ioi_report_max_ioi_time, "max_ioi", A_LONG, 0); addmess((method)ioi_report_max_iois_per_event, "max_per_event", A_LONG, 0); dsp_initclass(); rescopy('STR#',3241); }
void main(void) { post("Noisiness~ object version " VERSION " by Tristan Jehan (Media Laboratory)"); post("copyright © 2001 Massachusetts Institute of Technology"); post(""); ps_rectangular = gensym("rectangular"); ps_hanning = gensym("hanning"); ps_hamming = gensym("hamming"); ps_blackman62 = gensym("blackman62"); ps_blackman70 = gensym("blackman70"); ps_blackman74 = gensym("blackman74"); ps_blackman92 = gensym("blackman92"); setup((Messlist **)&noisiness_class, (method)noisiness_new, (method)noisiness_free, (short)sizeof(t_noisiness), 0L, A_GIMME, 0); addmess((method)noisiness_dsp, "dsp", A_CANT, 0); addmess((method)noisiness_assist, "assist", A_CANT, 0); addfloat((method)noisiness_float); addint((method)noisiness_int); dsp_initclass(); rescopy('STR#', RES_ID); }
void main(fptr *f) { CInfoRec ct; long oldA4; oldA4 = SetCurrentA4(); RememberA4(); FNS = f; setup(&lcd_class, (void *)LCD_new, (method) LCD_free, (short)sizeof(Lcd), (method)LCD_menu, A_GIMME, 0); addmess((method)LCD_ascii,"ascii",A_GIMME,0); addmess((method)LCD_update,"clear",0); addmess((method)LCD_click,"click",A_CANT,0); addmess((method)LCD_color,"color",A_LONG,0); addmess((method)LCD_debug,"debug",0); addmess((method)LCD_font,"font",A_DEFLONG,A_DEFLONG,0); addmess((method)LCD_frameOval,"frameOval",A_LONG,A_LONG,A_LONG,A_LONG,A_DEFLONG,0L,0); addmess((method)LCD_frameRect,"frameRect",A_LONG,A_LONG,A_LONG,A_LONG,A_DEFLONG,0L,0); addmess((method)LCD_Line,"Line",A_LONG,A_LONG,0L,0); addmess((method)LCD_LineTo,"LineTo",A_LONG,A_LONG,0L,0); addmess((method)LCD_Move,"Move",A_LONG,A_LONG,0L,0); addmess((method)LCD_MoveTo,"MoveTo",A_LONG,A_LONG,0L,0); addmess((method)LCD_linesegment,"LineSegment",A_LONG,A_LONG,A_LONG,A_LONG,A_DEFLONG,0); addmess((method)LCD_paintOval,"PaintOval",A_LONG,A_LONG,A_LONG,A_LONG,A_DEFLONG,0L,0); addmess((method)LCD_paintRect,"PaintRect",A_LONG,A_LONG,A_LONG,A_LONG,A_DEFLONG,0L,0); addmess((method)LCD_penMode,"penMode",A_LONG,0L,0); addmess((method)LCD_pos,"pos",A_LONG,A_LONG,0); addmess((method)LCD_save,"psave",A_CANT,0); addmess((method)LCD_reson,"reson",A_GIMME,0); addmess((method)LCD_resonSampleRate,"resonfreqmax",A_FLOAT,0L,0); addmess((method)LCD_resonSpect,"resonSpect",A_FLOAT,0L,0); addmess((method)LCD_resonTrim,"resonTrim",A_FLOAT,0L,0); addmess((method)LCD_update,"update",A_CANT, 0); addmess((method)LCD_write,"write",A_GIMME,0); addmess((method)LCD_assist,"assist",A_CANT, 0); addmess((method)LCD_local,"local",A_LONG,0); addmess((method)LCD_readpict,"readpict",A_GIMME,0); addmess((method)LCD_drawpict,"drawpict",0); addmess((method)LCD_picthandle,"picthandle",A_LONG,0); GetIndPattern(&blk,sysPatListID,1); GetIndPattern(&wht,sysPatListID,20); colorinfo(&ct); hasColorQD = ct.c_hasColorQD; numPaletteColors = ct.c_depth>=8? 256 : (ct.c_depth==4? 16 : 2); if (numPaletteColors<=16) hasColorQD=0; // sde 4-bit mode is screwey, ignore it. #ifdef debug post("hasColor %d",hasColorQD); post("numColors %d",numPaletteColors); #endif post("LCD Object by Michael Lee, Steve Ellison, David Zicarelli"); post("copyright © 1991-97 Regents of the University of California. All Rights Reserved."); LCD_makepalette(); /* DDZ made palette in main(), avoids rescopy */ rescopy('STR#',myRes); /* DDZ added assistance */ ps_picthandle=gensym("picthandle"); ps_pictname=gensym("pictname"); RestoreA4(oldA4); }
void main(fptr *f) { long oldA4; OSStatus err; DateTimeRec date; oldA4 = SetCurrentA4(); RememberA4(); FNS = f; #ifdef MULTI_SEGMENT /* Multi-segment code resource stuff */ { Str255 buf; short i, n, theID; char **ch; OSType theType; n = Count1Resources('Cccc'); post("This external has %ld resources", (long) n); for (i = 1; i <= n; i++) { ch = Get1IndResource('Cccc', i); GetResInfo(ch, &theID, &theType, buf); rescopy('Cccc', theID); } } #endif #ifdef EXTENDED_CODE_RESOURCE // Cause it's an extended code resource... // rescopy('Cccc',22222); #endif ps_readbufsize = gensym("readbufsize"); ps_writebufsize = gensym("writebufsize"); ps_OTTCP_nbytes = gensym("OTTCP_nbytes"); ps_OTTCP_delim = gensym("OTTCP_delim"); ps_connected = gensym("connected"); ps_disconnected = gensym("disconnected"); setup(&ottcp_class, ottcp_new, (method) ottcp_free, (short)sizeof(OTTCP), 0L, A_GIMME, 0); version(0); #ifdef DAVID_LIKES_EXPIRING_MAX_OBJECTS post("Expires %d/%d/%d", MONTH, DAY, YEAR); #endif #ifdef DAVID_LIKES_EXPIRING_MAX_OBJECTS GetTime(&date); if((date.year > YEAR) || (date.year == YEAR && ((date.month > MONTH) || (date.month == MONTH && date.day > DAY)))) { ouchstring(EXPIRATION_NOTICE); goto quit; } #endif // post ("*** before InitOpenTransport();"); err = InitOpenTransport(); if (err != kOTNoError) { ouchstring("Couldn't InitOpenTransport (err %d). Perhaps Open Transport is not installed.", err); goto quit; } /* bind methods */ addmess((method) ottcp_connect, "connect", A_SYM, A_LONG, 0); addmess((method) ottcp_disconnect, "disconnect", 0); addmess((method) ottcp_read_nbytes, "nbytes", A_LONG, 0); addmess((method) ottcp_read_until_delimiter_symbol, "delim", A_SYM, 0); addmess((method) ottcp_read_until_delimiter_bytes, "delim-bytes", A_GIMME, 0); addmess((method) ottcp_write, "write", A_LONG, A_LONG, 0); addmess((method) version, "version", 0); addmess((method) ottcp_ErrorReporting, "errorreporting", 0); addmess((method) ottcp_tellmeeverything, "tellmeeverything", 0); addmess((method) ottcp_assist, "assist", A_CANT, 0); finder_addclass("System","ottcp"); quit: RestoreA4(oldA4); }
void main(fptr *f) { OSStatus err; DateTimeRec date; #ifdef MULTI_SEGMENT /* Multi-segment code resource stuff */ { Str255 buf; short i, n, theID; char **ch; OSType theType; n = Count1Resources('Cccc'); post("This external has %ld resources", (long) n); for (i = 1; i <= n; i++) { ch = Get1IndResource('Cccc', i); GetResInfo(ch, &theID, &theType, buf); rescopy('Cccc', theID); } } #endif #ifdef EXTENDED_CODE_RESOURCE // Cause it's an extended code resource... // rescopy('Cccc',22222); #endif setup((t_messlist **)&otudp_class, (method)otudp_new, (method) otudp_free, (short)sizeof(OTUDP), 0L, A_GIMME, 0); version(0); #ifdef DAVID_LIKES_EXPIRING_MAX_OBJECTS post("Expires %d/%d/%d", MONTH, DAY, YEAR); #endif #ifdef DAVID_LIKES_EXPIRING_MAX_OBJECTS GetTime(&date); if((date.year > YEAR) || (date.year == YEAR && ((date.month > MONTH) || (date.month == MONTH && date.day > DAY)))) { ouchstring(EXPIRATION_NOTICE); return; } #endif // post ("*** before InitOpenTransport();"); err = InitOpenTransportInContext(kInitOTForExtensionMask, &OTContext); if (err != kOTNoError) { error("¥ OTUDP: Couldn't InitOpenTransport (err %d). Perhaps Open Transport is not installed.", err); return; } /* bind methods */ addmess((method) otudp_write, "FullPacket", A_LONG, A_LONG, 0); addmess((method) version, "version", 0); addmess((method) otudp_toggleErrorReporting, "errorreporting", 0); addmess((method) otudp_tellmeeverything, "tellmeeverything", 0); addmess((method) otudp_old_write, "write", A_GIMME, 0); addmess((method) otudp_old_write, "gimme", A_GIMME, 0); addmess((method) otudp_assist, "assist", A_CANT, 0); addmess((method) otudp_changeHost, "host", A_SYM, A_LONG, 0); addmess((method) otudp_changeReceivePort, "receiveport", A_LONG, 0); /* These methods are just for debugging. */ addmess((method) otudp_debugstats, "debugstats", 0); addmess((method) otudp_resetdebugstats, "resetdebugstats", 0); addmess((method) otudp_read, "readitagainsam", 0); finder_addclass("System","otudp"); ps_read = gensym("read"); ps_write = gensym("write"); ps_FullPacket = gensym("FullPacket"); ps_PartialPacket = gensym("PartialPacket"); ps_nbufs = gensym("nbufs"); ps_bufsize = gensym("bufsize"); }