Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28109
Modified Files: Tag: desiredata builtins.c Log Message: renamed class_addmethod3 to class_addmethod2
Index: builtins.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/builtins.c,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -C2 -d -r1.1.2.6 -r1.1.2.7 *** builtins.c 4 Jan 2007 04:58:27 -0000 1.1.2.6 --- builtins.c 4 Jan 2007 19:21:28 -0000 1.1.2.7 *************** *** 75,91 **** float powtodb(float f) { if (f <= 0) return 0; ! float val = 100 + 10./LOGTEN * log(f); ! return val < 0 ? 0 : val; }
float rmstodb(float f) { if (f <= 0) return 0; ! float val = 100 + 20./LOGTEN * log(f); ! return val < 0 ? 0 : val; }
float dbtopow(float f) { if (f <= 0) return 0; ! if (f > 870) f = 870; return exp((LOGTEN * 0.1) * (f-100.)); } --- 75,89 ---- float powtodb(float f) { if (f <= 0) return 0; ! return max(100 + 10./LOGTEN * log(f),0.); }
float rmstodb(float f) { if (f <= 0) return 0; ! return max(100 + 20./LOGTEN * log(f),0.); }
float dbtopow(float f) { if (f <= 0) return 0; ! f = min(f,870.f); return exp((LOGTEN * 0.1) * (f-100.)); } *************** *** 93,97 **** float dbtorms(float f) { if (f <= 0) return 0; ! if (f > 485) f = 485; return exp((LOGTEN * 0.05) * (f-100.)); } --- 91,95 ---- float dbtorms(float f) { if (f <= 0) return 0; ! f = min(f,485.f); return exp((LOGTEN * 0.05) * (f-100.)); } *************** *** 146,151 **** sizeof(t_openpanel), 0, A_DEFSYM, 0); class_addbang(openpanel_class, openpanel_bang); ! class_addmethod3(openpanel_class, openpanel_path, "path","s"); ! class_addmethod3(openpanel_class, openpanel_callback,"callback","s"); class_addsymbol(openpanel_class, openpanel_symbol); } --- 144,149 ---- sizeof(t_openpanel), 0, A_DEFSYM, 0); class_addbang(openpanel_class, openpanel_bang); ! class_addmethod2(openpanel_class, openpanel_path, "path","s"); ! class_addmethod2(openpanel_class, openpanel_callback,"callback","s"); class_addsymbol(openpanel_class, openpanel_symbol); } *************** *** 179,184 **** sizeof(t_savepanel), 0, A_DEFSYM, 0); class_addbang(savepanel_class, savepanel_bang); ! class_addmethod3(savepanel_class, openpanel_path, "path","s"); ! class_addmethod3(savepanel_class, savepanel_callback, "callback","s"); class_addsymbol(savepanel_class, savepanel_symbol); } --- 177,182 ---- sizeof(t_savepanel), 0, A_DEFSYM, 0); class_addbang(savepanel_class, savepanel_bang); ! class_addmethod2(savepanel_class, openpanel_path, "path","s"); ! class_addmethod2(savepanel_class, savepanel_callback, "callback","s"); class_addsymbol(savepanel_class, savepanel_symbol); } *************** *** 336,342 **** netsend_class = class_new(gensym("netsend"), (t_newmethod)netsend_new, (t_method)netsend_free, sizeof(t_netsend), 0, A_DEFFLOAT, 0); ! class_addmethod3(netsend_class, netsend_connect, "connect","sf"); ! class_addmethod3(netsend_class, netsend_disconnect, "disconnect",""); ! class_addmethod3(netsend_class, netsend_send, "send","*"); }
--- 334,340 ---- netsend_class = class_new(gensym("netsend"), (t_newmethod)netsend_new, (t_method)netsend_free, sizeof(t_netsend), 0, A_DEFFLOAT, 0); ! class_addmethod2(netsend_class, netsend_connect, "connect","sf"); ! class_addmethod2(netsend_class, netsend_disconnect, "disconnect",""); ! class_addmethod2(netsend_class, netsend_send, "send","*"); }
*************** *** 988,992 **** sizeof(t_random), 0, A_DEFFLOAT, 0); class_addbang(random_class, random_bang); ! class_addmethod3(random_class, random_seed,"seed","f"); }
--- 986,990 ---- sizeof(t_random), 0, A_DEFFLOAT, 0); class_addbang(random_class, random_bang); ! class_addmethod2(random_class, random_seed,"seed","f"); }
*************** *** 1004,1008 **** loadbang_class = class_new(gensym("loadbang"), (t_newmethod)loadbang_new, 0, sizeof(t_loadbang), CLASS_NOINLET, 0); ! class_addmethod3(loadbang_class, loadbang_loadbang, "loadbang",""); }
--- 1002,1006 ---- loadbang_class = class_new(gensym("loadbang"), (t_newmethod)loadbang_new, 0, sizeof(t_loadbang), CLASS_NOINLET, 0); ! class_addmethod2(loadbang_class, loadbang_loadbang, "loadbang",""); }
*************** *** 1092,1096 **** cputime_class = class_new(gensym("cputime"), (t_newmethod)cputime_new, 0, sizeof(t_cputime), 0, 0); class_addbang(cputime_class, cputime_bang); ! class_addmethod3(cputime_class, cputime_bang2, "bang2",""); }
--- 1090,1094 ---- cputime_class = class_new(gensym("cputime"), (t_newmethod)cputime_new, 0, sizeof(t_cputime), 0, 0); class_addbang(cputime_class, cputime_bang); ! class_addmethod2(cputime_class, cputime_bang2, "bang2",""); }
*************** *** 1115,1119 **** realtime_class = class_new(gensym("realtime"), (t_newmethod)realtime_new, 0, sizeof(t_realtime), 0, 0); class_addbang(realtime_class, realtime_bang); ! class_addmethod3(realtime_class, realtime_bang2, "bang2",""); }
--- 1113,1117 ---- realtime_class = class_new(gensym("realtime"), (t_newmethod)realtime_new, 0, sizeof(t_realtime), 0, 0); class_addbang(realtime_class, realtime_bang); ! class_addmethod2(realtime_class, realtime_bang2, "bang2",""); }
*************** *** 2075,2079 **** class_addbang(until_class, until_bang); class_addfloat(until_class, until_float); ! class_addmethod3(until_class, until_bang2,"bang2",""); }
--- 2073,2077 ---- class_addbang(until_class, until_bang); class_addfloat(until_class, until_float); ! class_addmethod2(until_class, until_bang2,"bang2",""); }
*************** *** 2107,2111 **** class_addfloat(makefilename_class, makefilename_float); class_addsymbol(makefilename_class, makefilename_symbol); ! class_addmethod3(makefilename_class, makefilename_set, "set","s"); }
--- 2105,2109 ---- class_addfloat(makefilename_class, makefilename_float); class_addsymbol(makefilename_class, makefilename_symbol); ! class_addmethod2(makefilename_class, makefilename_set, "set","s"); }
*************** *** 2163,2167 **** class_addbang(change_class, change_bang); class_addfloat(change_class, change_float); ! class_addmethod3(change_class, change_set, "set","F"); }
--- 2161,2165 ---- class_addbang(change_class, change_bang); class_addfloat(change_class, change_float); ! class_addmethod2(change_class, change_set, "set","F"); }
*************** *** 2785,2790 **** sizeof(t_makenote), 0, A_DEFFLOAT, A_DEFFLOAT, 0); class_addfloat(makenote_class, makenote_float); ! class_addmethod3(makenote_class, makenote_stop, "stop",""); ! class_addmethod3(makenote_class, makenote_clear,"clear",""); }
--- 2783,2788 ---- sizeof(t_makenote), 0, A_DEFFLOAT, A_DEFFLOAT, 0); class_addfloat(makenote_class, makenote_float); ! class_addmethod2(makenote_class, makenote_stop, "stop",""); ! class_addmethod2(makenote_class, makenote_clear,"clear",""); }
*************** *** 2907,2912 **** sizeof(t_poly), 0, A_DEFFLOAT, A_DEFFLOAT, 0); class_addfloat(poly_class, poly_float); ! class_addmethod3(poly_class, poly_stop, "stop",""); ! class_addmethod3(poly_class, poly_clear, "clear",""); }
--- 2905,2910 ---- sizeof(t_poly), 0, A_DEFFLOAT, A_DEFFLOAT, 0); class_addfloat(poly_class, poly_float); ! class_addmethod2(poly_class, poly_stop, "stop",""); ! class_addmethod2(poly_class, poly_clear, "clear",""); }
*************** *** 2972,2977 **** bag_class = class_new(gensym("bag"), (t_newmethod)bag_new, (t_method)bag_clear, sizeof(t_bag), 0, 0); class_addfloat(bag_class, bag_float); ! class_addmethod3(bag_class,bag_flush,"flush",""); ! class_addmethod3(bag_class,bag_clear,"clear",""); } void midi_setup() { --- 2970,2975 ---- bag_class = class_new(gensym("bag"), (t_newmethod)bag_new, (t_method)bag_clear, sizeof(t_bag), 0, 0); class_addfloat(bag_class, bag_float); ! class_addmethod2(bag_class,bag_flush,"flush",""); ! class_addmethod2(bag_class,bag_clear,"clear",""); } void midi_setup() { *************** *** 3009,3014 **** class_addcreator((t_newmethod)delay_new, gensym("del"), A_DEFFLOAT, 0); class_addbang(delay_class, delay_bang); ! class_addmethod3(delay_class,delay_stop,"stop",""); ! class_addmethod3(delay_class,delay_ft1,"ft1","f"); class_addfloat(delay_class, (t_method)delay_float); } --- 3007,3012 ---- class_addcreator((t_newmethod)delay_new, gensym("del"), A_DEFFLOAT, 0); class_addbang(delay_class, delay_bang); ! class_addmethod2(delay_class,delay_stop,"stop",""); ! class_addmethod2(delay_class,delay_ft1,"ft1","f"); class_addfloat(delay_class, (t_method)delay_float); } *************** *** 3046,3051 **** (t_method)metro_free, sizeof(t_metro), 0, A_DEFFLOAT, 0); class_addbang(metro_class, metro_bang); ! class_addmethod3(metro_class,metro_stop,"stop",""); ! class_addmethod3(metro_class,metro_ft1,"ft1","f"); class_addfloat(metro_class, (t_method)metro_float); } --- 3044,3049 ---- (t_method)metro_free, sizeof(t_metro), 0, A_DEFFLOAT, 0); class_addbang(metro_class, metro_bang); ! class_addmethod2(metro_class,metro_stop,"stop",""); ! class_addmethod2(metro_class,metro_ft1,"ft1","f"); class_addfloat(metro_class, (t_method)metro_float); } *************** *** 3126,3133 **** line_class = class_new(gensym("line"), (t_newmethod)line_new, (t_method)line_free, sizeof(t_line), 0, A_DEFFLOAT, A_DEFFLOAT, 0); ! class_addmethod3(line_class,line_ft1,"ft1","f"); ! class_addmethod3(line_class,line_stop,"stop",""); ! class_addmethod3(line_class,line_set,"set","f"); ! class_addmethod3(line_class,line_set_granularity,"granularity","f"); class_addfloat(line_class, (t_method)line_float); } --- 3124,3131 ---- line_class = class_new(gensym("line"), (t_newmethod)line_new, (t_method)line_free, sizeof(t_line), 0, A_DEFFLOAT, A_DEFFLOAT, 0); ! class_addmethod2(line_class,line_ft1,"ft1","f"); ! class_addmethod2(line_class,line_stop,"stop",""); ! class_addmethod2(line_class,line_set,"set","f"); ! class_addmethod2(line_class,line_set_granularity,"granularity","f"); class_addfloat(line_class, (t_method)line_float); } *************** *** 3153,3157 **** timer_class = class_new(gensym("timer"), (t_newmethod)timer_new, 0, sizeof(t_timer), 0, A_DEFFLOAT, 0); class_addbang(timer_class, timer_bang); ! class_addmethod3(timer_class,timer_bang2,"bang2",""); }
--- 3151,3155 ---- timer_class = class_new(gensym("timer"), (t_newmethod)timer_new, 0, sizeof(t_timer), 0, A_DEFFLOAT, 0); class_addbang(timer_class, timer_bang); ! class_addmethod2(timer_class,timer_bang2,"bang2",""); }
*************** *** 3321,3326 **** pipe_class = class_new(gensym("pipe"), (t_newmethod)pipe_new, (t_method)pipe_clear, sizeof(t_pipe), 0, A_GIMME, 0); class_addlist(pipe_class, pipe_list); ! class_addmethod3(pipe_class,pipe_flush,"flush",""); ! class_addmethod3(pipe_class,pipe_clear,"clear",""); }
--- 3319,3324 ---- pipe_class = class_new(gensym("pipe"), (t_newmethod)pipe_new, (t_method)pipe_clear, sizeof(t_pipe), 0, A_GIMME, 0); class_addlist(pipe_class, pipe_list); ! class_addmethod2(pipe_class,pipe_flush,"flush",""); ! class_addmethod2(pipe_class,pipe_clear,"clear",""); }
*************** *** 3364,3391 ****
qlist_class = class_new(gensym("qlist"), (t_newmethod)qlist_new, (t_method)qlist_free, sizeof(t_qlist), 0, 0); ! class_addmethod3(qlist_class,qlist_rewind, "rewind",""); ! class_addmethod3(qlist_class,qlist_next, "next","F"); ! class_addmethod3(qlist_class,qlist_set, "set","*"); ! class_addmethod3(qlist_class,qlist_clear, "clear",""); ! class_addmethod3(qlist_class,qlist_add, "add","*"); ! class_addmethod3(qlist_class,qlist_add2, "add2","*"); ! class_addmethod3(qlist_class,qlist_add, "append","*"); ! class_addmethod3(qlist_class,qlist_read, "read","sS"); ! class_addmethod3(qlist_class,qlist_write, "write","sS"); ! class_addmethod3(qlist_class,qlist_print, "print","S"); ! class_addmethod3(qlist_class,qlist_tempo, "tempo","f"); class_addbang(qlist_class, qlist_bang);
textfile_class = class_new(gensym("textfile"), (t_newmethod)textfile_new, (t_method)textfile_free, sizeof(t_textfile), 0, 0); ! class_addmethod3(textfile_class,textfile_rewind, "rewind",""); ! class_addmethod3(textfile_class,qlist_set, "set","*"); ! class_addmethod3(textfile_class,qlist_clear, "clear",""); ! class_addmethod3(textfile_class,qlist_add, "add","*"); ! class_addmethod3(textfile_class,qlist_add2, "add2","*"); ! class_addmethod3(textfile_class,qlist_add, "append","*"); ! class_addmethod3(textfile_class,qlist_read, "read","sS"); ! class_addmethod3(textfile_class,qlist_write, "write","sS"); ! class_addmethod3(textfile_class,qlist_print, "print","S"); class_addbang(textfile_class, textfile_bang); netsend_setup(); --- 3362,3389 ----
qlist_class = class_new(gensym("qlist"), (t_newmethod)qlist_new, (t_method)qlist_free, sizeof(t_qlist), 0, 0); ! class_addmethod2(qlist_class,qlist_rewind, "rewind",""); ! class_addmethod2(qlist_class,qlist_next, "next","F"); ! class_addmethod2(qlist_class,qlist_set, "set","*"); ! class_addmethod2(qlist_class,qlist_clear, "clear",""); ! class_addmethod2(qlist_class,qlist_add, "add","*"); ! class_addmethod2(qlist_class,qlist_add2, "add2","*"); ! class_addmethod2(qlist_class,qlist_add, "append","*"); ! class_addmethod2(qlist_class,qlist_read, "read","sS"); ! class_addmethod2(qlist_class,qlist_write, "write","sS"); ! class_addmethod2(qlist_class,qlist_print, "print","S"); ! class_addmethod2(qlist_class,qlist_tempo, "tempo","f"); class_addbang(qlist_class, qlist_bang);
textfile_class = class_new(gensym("textfile"), (t_newmethod)textfile_new, (t_method)textfile_free, sizeof(t_textfile), 0, 0); ! class_addmethod2(textfile_class,textfile_rewind, "rewind",""); ! class_addmethod2(textfile_class,qlist_set, "set","*"); ! class_addmethod2(textfile_class,qlist_clear, "clear",""); ! class_addmethod2(textfile_class,qlist_add, "add","*"); ! class_addmethod2(textfile_class,qlist_add2, "add2","*"); ! class_addmethod2(textfile_class,qlist_add, "append","*"); ! class_addmethod2(textfile_class,qlist_read, "read","sS"); ! class_addmethod2(textfile_class,qlist_write, "write","sS"); ! class_addmethod2(textfile_class,qlist_print, "print","S"); class_addbang(textfile_class, textfile_bang); netsend_setup();