diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/0x260x260x7e.c | 9 | ||||
-rw-r--r-- | src/0x2e.c | 8 | ||||
-rw-r--r-- | src/0x3c0x7e.c | 7 | ||||
-rw-r--r-- | src/0x3d0x3d0x7e.c | 8 | ||||
-rw-r--r-- | src/0x3e0x7e.c | 10 | ||||
-rw-r--r-- | src/0x7c0x7c0x7e.c | 9 | ||||
-rw-r--r-- | src/fifop.c | 8 | ||||
-rw-r--r-- | src/glue.c | 6 | ||||
-rw-r--r-- | src/length.c | 1 | ||||
-rw-r--r-- | src/lifop.c | 6 | ||||
-rw-r--r-- | src/lister.c | 7 | ||||
-rw-r--r-- | src/multiline~.c | 5 | ||||
-rw-r--r-- | src/operating_system.c | 7 | ||||
-rw-r--r-- | src/prime.c | 7 | ||||
-rw-r--r-- | src/regex.c | 5 | ||||
-rw-r--r-- | src/sort.c | 5 | ||||
-rw-r--r-- | src/strcmp.c | 8 | ||||
-rw-r--r-- | src/symbol2list.c | 6 | ||||
-rw-r--r-- | src/urn.c | 6 | ||||
-rw-r--r-- | src/wrap.c | 6 | ||||
-rw-r--r-- | src/zexyconf.h | 19 |
21 files changed, 136 insertions, 17 deletions
diff --git a/src/0x260x260x7e.c b/src/0x260x260x7e.c index 1b054d9..7b8aacc 100644 --- a/src/0x260x260x7e.c +++ b/src/0x260x260x7e.c @@ -267,18 +267,27 @@ static void scalarandand_tilde_dsp(t_scalarandand_tilde *x, t_signal **sp) dsp_add(scalarandand_tilde_perf8, 4, in, &x->x_g, out, n); } +static void andand_tilde_help(t_object*x) +{ + post("\n%c &&~\t\t:: logical AND operation on 2 signals", HEARTSYMBOL); +} + void setup_0x260x260x7e(void) { andand_tilde_class = class_new(gensym("&&~"), (t_newmethod)andand_tilde_new, 0, sizeof(t_andand_tilde), 0, A_GIMME, 0); class_addmethod(andand_tilde_class, (t_method)andand_tilde_dsp, gensym("dsp"), 0); CLASS_MAINSIGNALIN(andand_tilde_class, t_andand_tilde, x_f); + class_addmethod (andand_tilde_class, (t_method)andand_tilde_help, gensym("help"), A_NULL); class_sethelpsymbol(andand_tilde_class, gensym("zexy/sigbinops+")); + + scalarandand_tilde_class = class_new(gensym("&&~"), 0, 0, sizeof(t_scalarandand_tilde), 0, 0); CLASS_MAINSIGNALIN(scalarandand_tilde_class, t_scalarandand_tilde, x_f); class_addmethod(scalarandand_tilde_class, (t_method)scalarandand_tilde_dsp, gensym("dsp"), 0); + class_addmethod (scalarandand_tilde_class, (t_method)andand_tilde_help, gensym("help"), A_NULL); class_sethelpsymbol(scalarandand_tilde_class, gensym("zexy/sigbinops+")); zexy_register("&&~"); @@ -148,15 +148,23 @@ static void *scalmul_new(t_symbol *s, int argc, t_atom *argv) return (x); } +static void scalmul_help(t_scalmul*x) +{ + post("\n%c .\t\t:: scalar multiplication (in-product)", HEARTSYMBOL); +} + void setup_0x2e(void) { scalmul_class = class_new(gensym("."), (t_newmethod)scalmul_new, (t_method)scalmul_free, sizeof(t_scalmul), 0, A_GIMME, 0); class_addlist(scalmul_class, scalmul_lst); class_addmethod (scalmul_class, (t_method)scalmul_lst2, gensym(""), A_GIMME, 0); + class_addmethod(scalmul_class, (t_method)scalmul_help, gensym("help"), A_NULL); + scalmul_scal_class = class_new(gensym("."), 0, (t_method)scalmul_free, sizeof(t_scalmul), 0, 0); class_addlist(scalmul_scal_class, scalmul_lst); + class_addmethod(scalmul_scal_class, (t_method)scalmul_help, gensym("help"), A_NULL); class_sethelpsymbol(scalmul_class, gensym("zexy/scalarmult")); class_sethelpsymbol(scalmul_scal_class, gensym("zexy/scalarmult")); diff --git a/src/0x3c0x7e.c b/src/0x3c0x7e.c index 38c239c..26cfcc9 100644 --- a/src/0x3c0x7e.c +++ b/src/0x3c0x7e.c @@ -228,6 +228,10 @@ static void scalarlt_tilde_dsp(t_scalarlt_tilde *x, t_signal **sp) else dsp_add(scalarlt_tilde_perf8, 4, in, &x->x_g, out, n); } +static void lt_tilde_help(t_object*x) +{ + post("\n%c <~\t\t:: compare 2 signals", HEARTSYMBOL); +} void setup_0x3c0x7e(void) { @@ -235,12 +239,15 @@ void setup_0x3c0x7e(void) sizeof(t_lt_tilde), 0, A_GIMME, 0); class_addmethod(lt_tilde_class, (t_method)lt_tilde_dsp, gensym("dsp"), 0); CLASS_MAINSIGNALIN(lt_tilde_class, t_lt_tilde, x_f); + class_addmethod (lt_tilde_class, (t_method)lt_tilde_help, gensym("help"), A_NULL); class_sethelpsymbol(lt_tilde_class, gensym("zexy/sigbinops+")); + scalarlt_tilde_class = class_new(gensym("<~"), 0, 0, sizeof(t_scalarlt_tilde), 0, 0); CLASS_MAINSIGNALIN(scalarlt_tilde_class, t_scalarlt_tilde, x_f); class_addmethod(scalarlt_tilde_class, (t_method)scalarlt_tilde_dsp, gensym("dsp"), 0); + class_addmethod (lt_tilde_class, (t_method)lt_tilde_help, gensym("help"), A_NULL); class_sethelpsymbol(scalarlt_tilde_class, gensym("zexy/sigbinops+")); zexy_register("<~"); } diff --git a/src/0x3d0x3d0x7e.c b/src/0x3d0x3d0x7e.c index 91d90ff..8439837 100644 --- a/src/0x3d0x3d0x7e.c +++ b/src/0x3d0x3d0x7e.c @@ -227,18 +227,26 @@ static void scalareq_tilde_dsp(t_scalareq_tilde *x, t_signal **sp) dsp_add(scalareq_tilde_perf8, 4, in, &x->x_g, out, n); } +static void eq_tilde_help(t_object*x) +{ + post("\n%c &&~\t\t:: test 2 signals for equality", HEARTSYMBOL); +} void setup_0x3d0x3d0x7e(void) { eq_tilde_class = class_new(gensym("==~"), (t_newmethod)eq_tilde_new, 0, sizeof(t_eq_tilde), 0, A_GIMME, 0); class_addmethod(eq_tilde_class, (t_method)eq_tilde_dsp, gensym("dsp"), 0); CLASS_MAINSIGNALIN(eq_tilde_class, t_eq_tilde, x_f); + class_addmethod (eq_tilde_class, (t_method)eq_tilde_help, gensym("help"), A_NULL); class_sethelpsymbol(eq_tilde_class, gensym("zexy/sigbinops+")); + scalareq_tilde_class = class_new(gensym("==~"), 0, 0, sizeof(t_scalareq_tilde), 0, 0); CLASS_MAINSIGNALIN(scalareq_tilde_class, t_scalareq_tilde, x_f); class_addmethod(scalareq_tilde_class, (t_method)scalareq_tilde_dsp, gensym("dsp"), 0); + class_addmethod (eq_tilde_class, (t_method)eq_tilde_help, gensym("help"), A_NULL); class_sethelpsymbol(scalareq_tilde_class, gensym("zexy/sigbinops+")); + zexy_register("==~"); } diff --git a/src/0x3e0x7e.c b/src/0x3e0x7e.c index 9f8e0eb..aa72f08 100644 --- a/src/0x3e0x7e.c +++ b/src/0x3e0x7e.c @@ -228,18 +228,28 @@ static void scalargt_tilde_dsp(t_scalargt_tilde *x, t_signal **sp) else dsp_add(scalargt_tilde_perf8, 4, in, &x->x_g, out, n); } + +static void gt_tilde_help(t_object*x) +{ + post("\n%c >~\t\t:: compare 2 signals", HEARTSYMBOL); +} + void setup_0x3e0x7e(void) { gt_tilde_class = class_new(gensym(">~"), (t_newmethod)gt_tilde_new, 0, sizeof(t_gt_tilde), 0, A_GIMME, 0); class_addmethod(gt_tilde_class, (t_method)gt_tilde_dsp, gensym("dsp"), 0); CLASS_MAINSIGNALIN(gt_tilde_class, t_gt_tilde, x_f); + class_addmethod (gt_tilde_class, (t_method)gt_tilde_help, gensym("help"), A_NULL); class_sethelpsymbol(gt_tilde_class, gensym("zexy/sigbinops+")); + scalargt_tilde_class = class_new(gensym(">~"), 0, 0, sizeof(t_scalargt_tilde), 0, 0); CLASS_MAINSIGNALIN(scalargt_tilde_class, t_scalargt_tilde, x_f); class_addmethod(scalargt_tilde_class, (t_method)scalargt_tilde_dsp, gensym("dsp"), 0); + class_addmethod (gt_tilde_class, (t_method)gt_tilde_help, gensym("help"), A_NULL); class_sethelpsymbol(scalargt_tilde_class, gensym("zexy/sigbinops+")); + zexy_register(">~"); } diff --git a/src/0x7c0x7c0x7e.c b/src/0x7c0x7c0x7e.c index 774605f..9a9a2ae 100644 --- a/src/0x7c0x7c0x7e.c +++ b/src/0x7c0x7c0x7e.c @@ -243,18 +243,27 @@ static void scalaroror_tilde_dsp(t_scalaroror_tilde *x, t_signal **sp) dsp_add(scalaroror_tilde_perf8, 4, in, &x->x_g, out, n); } +static void oror_tilde_help(t_object*x) +{ + post("\n%c &&~\t\t:: logical OR operation on 2 signals", HEARTSYMBOL); +} + void setup_0x7c0x7c0x7e(void) { oror_tilde_class = class_new(gensym("||~"), (t_newmethod)oror_tilde_new, 0, sizeof(t_oror_tilde), 0, A_GIMME, 0); class_addmethod(oror_tilde_class, (t_method)oror_tilde_dsp, gensym("dsp"), 0); CLASS_MAINSIGNALIN(oror_tilde_class, t_oror_tilde, x_f); + class_addmethod (oror_tilde_class, (t_method)oror_tilde_help, gensym("help"), A_NULL); class_sethelpsymbol(oror_tilde_class, gensym("zexy/sigbinops+")); + scalaroror_tilde_class = class_new(gensym("||~"), 0, 0, sizeof(t_scalaroror_tilde), 0, 0); CLASS_MAINSIGNALIN(scalaroror_tilde_class, t_scalaroror_tilde, x_f); class_addmethod(scalaroror_tilde_class, (t_method)scalaroror_tilde_dsp, gensym("dsp"), 0); + class_addmethod (oror_tilde_class, (t_method)oror_tilde_help, gensym("help"), A_NULL); class_sethelpsymbol(scalaroror_tilde_class, gensym("zexy/sigbinops+")); + zexy_register("||~"); } diff --git a/src/fifop.c b/src/fifop.c index 0555c21..fdbe57d 100644 --- a/src/fifop.c +++ b/src/fifop.c @@ -204,6 +204,13 @@ static void fifop_query(t_fifop*x) outlet_float(x->x_infout, (t_float)x->counter); } + +static void fifop_help(t_fifop*x) +{ + post("\n%c fifop\t\t:: a First-In-First-Out queue with priorities", HEARTSYMBOL); +} + + static void fifop_free(t_fifop *x) { t_fifop_prioritylist *fifo_list=x->fifo_list; @@ -257,6 +264,7 @@ void fifop_setup(void) class_addbang (fifop_class, fifop_bang); class_addlist (fifop_class, fifop_list); class_addmethod (fifop_class, (t_method)fifop_query, gensym("info"), A_NULL); + class_addmethod (fifop_class, (t_method)fifop_help, gensym("help"), A_NULL); class_sethelpsymbol(fifop_class, gensym("zexy/fifop")); zexy_register("fifop"); @@ -104,6 +104,11 @@ static void *glue_new(t_symbol *s, int argc, t_atom *argv) return (x); } +static void glue_help(t_glue*x) +{ + post("\n%c glue\t\t:: glue together 2 lists (like [list append])", HEARTSYMBOL); +} + void glue_setup(void) { glue_class = class_new(gensym("glue"), (t_newmethod)glue_new, @@ -111,6 +116,7 @@ void glue_setup(void) class_addlist(glue_class, glue_lst); class_addmethod (glue_class, (t_method)glue_lst2, gensym(""), A_GIMME, 0); class_addbang(glue_class, glue_bang); + class_addmethod (glue_class, (t_method)glue_help, gensym("help"), 0); class_sethelpsymbol(glue_class, gensym("zexy/glue")); zexy_register("glue"); diff --git a/src/length.c b/src/length.c index 72304db..a3fd41c 100644 --- a/src/length.c +++ b/src/length.c @@ -19,7 +19,6 @@ #include "zexy.h" static t_class *length_class; - typedef struct _length { t_object x_obj; diff --git a/src/lifop.c b/src/lifop.c index ebfca54..ef57d6a 100644 --- a/src/lifop.c +++ b/src/lifop.c @@ -231,7 +231,10 @@ static void *lifop_new(void) return (x); } - +static void lifop_help(t_lifop*x) +{ + post("\n%c lifop\t\t:: a Last-In-First-Out queue with priorities", HEARTSYMBOL); +} void lifop_setup(void) { lifop_class = class_new(gensym("lifop"), (t_newmethod)lifop_new, @@ -240,6 +243,7 @@ void lifop_setup(void) class_addbang (lifop_class, lifop_bang); class_addlist (lifop_class, lifop_list); class_addmethod (lifop_class, (t_method)lifop_query, gensym("info"), A_NULL); + class_addmethod (lifop_class, (t_method)lifop_help, gensym("help"), A_NULL); class_sethelpsymbol(lifop_class, gensym("zexy/lifop")); zexy_register("lifop"); diff --git a/src/lister.c b/src/lister.c index b72e93a..e9bb1a6 100644 --- a/src/lister.c +++ b/src/lister.c @@ -71,6 +71,12 @@ static void *mypdlist_new(t_symbol *s, int argc, t_atom *argv) return (x); } + +static void mypdlist_help(t_mypdlist*x) +{ + post("\n%c lister\t\t:: basic list storage (use pd>=0.39 for real [list] objects)", HEARTSYMBOL); +} + void lister_setup(void) { mypdlist_class = class_new(gensym("lister"), (t_newmethod)mypdlist_new, @@ -83,6 +89,7 @@ void lister_setup(void) class_addlist (mypdlist_class, mypdlist_list); class_addmethod (mypdlist_class, (t_method)mypdlist_secondlist, gensym("lst2"), A_GIMME, 0); + class_addmethod(mypdlist_class, (t_method)mypdlist_help, gensym("help"), A_NULL); class_sethelpsymbol(mypdlist_class, gensym("zexy/lister")); zexy_register("lister"); } diff --git a/src/multiline~.c b/src/multiline~.c index 70c62e9..071db10 100644 --- a/src/multiline~.c +++ b/src/multiline~.c @@ -248,6 +248,10 @@ static void *mline_new(t_symbol *s, int argc, t_atom *argv) } +static void mline_help(t_mline*x) +{ + post("\n%c multiline~\t:: ramped multiplication of multiple signals", HEARTSYMBOL); +} void multiline_tilde_setup(void) { @@ -260,6 +264,7 @@ void multiline_tilde_setup(void) class_addmethod(mline_class, (t_method)mline_list, gensym(""), A_GIMME, 0); class_addmethod(mline_class, (t_method)mline_stop, gensym("stop"), 0); + class_addmethod (mline_class, (t_method)mline_help, gensym("help"), A_NULL); class_sethelpsymbol(mline_class, gensym("zexy/multiline~")); zexy_register("multiline_tilde"); } diff --git a/src/operating_system.c b/src/operating_system.c index 25453b8..3764330 100644 --- a/src/operating_system.c +++ b/src/operating_system.c @@ -37,6 +37,7 @@ typedef struct _operating_system static void operating_system_bang(t_operating_system *x) { + /* LATER think about querying the version of the system at runtime! */ t_symbol *s=gensym("unknown"); #ifdef __linux__ s=gensym("linux"); @@ -55,12 +56,18 @@ static void *operating_system_new() return (x); } +static void operating_system_help(t_operating_system*x) +{ + post("\n%c operating_system\t:: get the current operating system", HEARTSYMBOL); +} + void operating_system_setup(void) { operating_system_class = class_new(gensym("operating_system"), (t_newmethod)operating_system_new, 0, sizeof(t_operating_system), 0, A_NULL); class_addbang (operating_system_class, operating_system_bang); + class_addmethod(operating_system_class, (t_method)operating_system_help, gensym("help"), A_NULL); class_sethelpsymbol(operating_system_class, gensym("zexy/operating_system")); zexy_register("operating_system"); } diff --git a/src/prime.c b/src/prime.c index 3a4a5ba..4c3081a 100644 --- a/src/prime.c +++ b/src/prime.c @@ -63,6 +63,12 @@ static void *prime_new(void) return (x); } +static void prime_help(t_prime*x) +{ + post("\n%c prime\t\t:: test whether a given number is prime", HEARTSYMBOL); +} + + void prime_setup(void) { prime_class = class_new(gensym("prime"), (t_newmethod)prime_new, @@ -70,5 +76,6 @@ void prime_setup(void) { CLASS_DEFAULT, 0); class_addfloat(prime_class, prime_float); + class_addmethod(prime_class, (t_method)prime_help, gensym("help"), A_NULL); zexy_register("prime"); } diff --git a/src/regex.c b/src/regex.c index d3b1579..1ccc543 100644 --- a/src/regex.c +++ b/src/regex.c @@ -233,6 +233,10 @@ static void regex_free(t_regex *x) #endif } +static void regex_help(t_regex*x) +{ + post("\n%c regex\t\t:: test the input whether it matches a regular expression", HEARTSYMBOL); +} void regex_setup(void) { @@ -242,6 +246,7 @@ void regex_setup(void) class_addlist (regex_class, regex_symbol); class_addmethod (regex_class, (t_method)regex_regex, gensym("regex"), A_GIMME, 0); + class_addmethod(regex_class, (t_method)regex_help, gensym("help"), A_NULL); class_sethelpsymbol(regex_class, gensym("zexy/regex")); zexy_register("regex"); } @@ -139,6 +139,10 @@ static void *sort_new(t_floatarg f) return (x); } +static void sort_help(t_sort*x) +{ + post("\n%c sort\t\t:: sort a list of numbers", HEARTSYMBOL); +} void sort_setup(void) { sort_class = class_new(gensym("sort"), (t_newmethod)sort_new, @@ -146,6 +150,7 @@ void sort_setup(void) class_addlist (sort_class, sort_list); class_addmethod (sort_class, (t_method)sort_dir, gensym("direction"), A_DEFFLOAT, 0); + class_addmethod(sort_class, (t_method)sort_help, gensym("help"), A_NULL); class_sethelpsymbol(sort_class, gensym("zexy/sort")); zexy_register("sort"); diff --git a/src/strcmp.c b/src/strcmp.c index 52f39c5..9d5f13b 100644 --- a/src/strcmp.c +++ b/src/strcmp.c @@ -152,6 +152,12 @@ static void strcmp_free(t_strcmp *x) } +static void strcmp_help(t_strcmp*x) +{ + post("\n%c strcmp\t\t:: compare to lists as strings", HEARTSYMBOL); +} + + void strcmp_setup(void) { strcmp_class = class_new(gensym("strcmp"), (t_newmethod)strcmp_new, @@ -166,7 +172,7 @@ void strcmp_setup(void) CLASS_PD | CLASS_NOINLET, 0); class_addsymbol(strcmp_proxy_class, strcmp_proxy_symbol); class_addlist(strcmp_proxy_class, strcmp_proxy_list); - + class_addmethod(strcmp_class, (t_method)strcmp_help, gensym("help"), A_NULL); class_sethelpsymbol(strcmp_class, gensym("zexy/strcmp")); zexy_register("strcmp"); } diff --git a/src/symbol2list.c b/src/symbol2list.c index 4b3c339..4cb5344 100644 --- a/src/symbol2list.c +++ b/src/symbol2list.c @@ -150,8 +150,11 @@ static void *symbol2list_new(t_symbol *s, int argc, t_atom *argv) } static void symbol2list_free(t_symbol2list *x) +{} + +static void symbol2list_help(t_symbol2list*x) { - ZEXY_USEVAR(x); + post("\n%c symbol2list\t:: split a symbol into a list of atoms", HEARTSYMBOL); } void symbol2list_setup(void) @@ -163,6 +166,7 @@ void symbol2list_setup(void) class_addsymbol (symbol2list_class, symbol2list_symbol); class_addbang (symbol2list_class, symbol2list_bang); class_addmethod (symbol2list_class, (t_method)symbol2list_delimiter, gensym(""), A_SYMBOL, 0); + class_addmethod(symbol2list_class, (t_method)symbol2list_help, gensym("help"), A_NULL); class_sethelpsymbol(symbol2list_class, gensym("zexy/symbol2list")); zexy_register("symbol2list"); @@ -138,6 +138,11 @@ static void *urn_new(t_symbol *s, int argc, t_atom *argv) return (x); } +static void urn_help(t_urn*x) +{ + post("\n%c urn\t\t:: generate randum numbers without repetition", HEARTSYMBOL); +} + void urn_setup(void) { urn_class = class_new(gensym("urn"), (t_newmethod)urn_new, @@ -148,6 +153,7 @@ void urn_setup(void) class_addmethod(urn_class, (t_method)urn_flt2, gensym(""), A_DEFFLOAT, 0); class_addmethod(urn_class, (t_method)urn_seed, gensym("seed"), A_DEFFLOAT, 0); + class_addmethod(urn_class, (t_method)urn_help, gensym("help"), A_NULL); class_sethelpsymbol(urn_class, gensym("zexy/urn")); zexy_register("urn"); @@ -68,6 +68,11 @@ static void *wrap_new(t_symbol *s, int argc, t_atom*argv) return (x); } +static void wrap_help(t_wrap*x) +{ + post("\n%c wrap\t\t:: wrap a float between to boundaries", HEARTSYMBOL); +} + void wrap_setup(void) { wrap_class = class_new(gensym("wrap"), (t_newmethod)wrap_new, @@ -76,6 +81,7 @@ void wrap_setup(void) { class_addfloat (wrap_class, wrap_float); class_addmethod(wrap_class, (t_method)wrap_set, gensym("set"), A_GIMME, 0); + class_addmethod(wrap_class, (t_method)wrap_help, gensym("help"), A_NULL); class_sethelpsymbol(wrap_class, gensym("zexy/wrap")); zexy_register("wrap"); } diff --git a/src/zexyconf.h b/src/zexyconf.h index 1e02d87..3231f5d 100644 --- a/src/zexyconf.h +++ b/src/zexyconf.h @@ -1,25 +1,18 @@ -/* this is a zexyconf.h for windows - * on unix-derivatives (linux, os-X,...) this file should be overwritten by configure - * via the template zexyconf.h.in - * - * if you cannot use configure to re-generate this file, make sure all the defines - * are set correctly - */ - +/* zexyconf.h. Generated by configure. */ /* Define if you have the <regex.h> header file. */ -#undef HAVE_REGEX_H +#define HAVE_REGEX_H 1 /* Define if you have the <alloca.h> header file. */ -#undef HAVE_ALLOCA_H +#define HAVE_ALLOCA_H 1 /* define if you want parallelport-support (direct access to the port address) */ #define Z_WANT_LPT 1 /* define if you have the <linux/ppdev.h> header file. - * (for parport _device_ support) - * you need Z_WANT_LPT for this to have an effect ! + * (for parport _device_ support) + * you need Z_WANT_LPT for this to have an effect ! */ -#undef HAVE_LINUX_PPDEV_H +#define HAVE_LINUX_PPDEV_H 1 |