From 49cc44f855c16ae11988e9ff3739fdc01ac8aebe Mon Sep 17 00:00:00 2001 From: "N.N." Date: Thu, 11 Sep 2003 09:04:32 +0000 Subject: *** empty log message *** svn path=/trunk/externals/miXed/; revision=947 --- cyclone/Makefile.objects | 2 +- cyclone/build_counter | 2 +- cyclone/hammer/coll.c | 4 +- cyclone/hammer/funbuff.c | 2 +- cyclone/hammer/hammer.c | 19 +++-- cyclone/hammer/mtr.c | 6 +- cyclone/hammer/seq.c | 4 +- cyclone/hammer/zl.c | 60 ++++++++------- cyclone/shadow/cyclone.c | 20 +++-- cyclone/sickle/peek.c | 8 +- cyclone/sickle/poke.c | 4 +- cyclone/sickle/record.c | 68 +++++++++++------ cyclone/sickle/sickle.c | 19 +++-- shared/common/loud.c | 13 ++++ shared/common/loud.h | 1 + shared/common/port.c | 172 +++++++++++++++++++++++++------------------ shared/hammer/file.c | 27 ++++++- shared/hammer/file.h | 2 +- test/cyclone/buffir-test.pd | 66 +++++++++++++++++ test/cyclone/cyclone-test.pd | 55 ++++---------- 20 files changed, 351 insertions(+), 203 deletions(-) create mode 100644 test/cyclone/buffir-test.pd diff --git a/cyclone/Makefile.objects b/cyclone/Makefile.objects index 87d7ae4..4bd1695 100644 --- a/cyclone/Makefile.objects +++ b/cyclone/Makefile.objects @@ -21,5 +21,5 @@ SVEFL_OBJECTS = common/vefl.o sickle/sic.o common/loud.o unstable/fragile.o SARSIC_OBJECTS = sickle/sic.o sickle/arsic.o common/vefl.o \ common/loud.o unstable/fragile.o SFILE_OBJECTS = hammer/file.o sickle/sic.o common/loud.o unstable/forky.o -RELEASE_LIBS = cyclone hammer sickle +RELEASE_LIBS = cyclone hammer sickle dummies RELEASE_APPS = cyclist diff --git a/cyclone/build_counter b/cyclone/build_counter index 0414f92..3381c8b 100644 --- a/cyclone/build_counter +++ b/cyclone/build_counter @@ -1,3 +1,3 @@ #define CYCLONE_VERSION "0.1" #define CYCLONE_RELEASE "alpha" -#define CYCLONE_BUILD 45 +#define CYCLONE_BUILD 46 diff --git a/cyclone/hammer/coll.c b/cyclone/hammer/coll.c index c4a3388..3d9aa68 100644 --- a/cyclone/hammer/coll.c +++ b/cyclone/hammer/coll.c @@ -1373,7 +1373,7 @@ static void coll_read(t_coll *x, t_symbol *s) if (s && s != &s_) collcommon_doread(cc, s, x->x_canvas); else - hammerpanel_open(cc->c_filehandle); + hammerpanel_open(cc->c_filehandle, 0); } static void coll_write(t_coll *x, t_symbol *s) @@ -1391,7 +1391,7 @@ static void coll_readagain(t_coll *x) if (cc->c_filename) collcommon_doread(cc, 0, 0); else - hammerpanel_open(cc->c_filehandle); + hammerpanel_open(cc->c_filehandle, 0); } static void coll_writeagain(t_coll *x) diff --git a/cyclone/hammer/funbuff.c b/cyclone/hammer/funbuff.c index 8d9d698..5791b1e 100644 --- a/cyclone/hammer/funbuff.c +++ b/cyclone/hammer/funbuff.c @@ -260,7 +260,7 @@ static void funbuff_read(t_funbuff *x, t_symbol *s) if (s && s != &s_) funbuff_doread(x, s); else - hammerpanel_open(x->x_filehandle); + hammerpanel_open(x->x_filehandle, 0); } /* CHECKED symbol arg not allowed -- diff --git a/cyclone/hammer/hammer.c b/cyclone/hammer/hammer.c index a4d7efe..3c4f3c2 100644 --- a/cyclone/hammer/hammer.c +++ b/cyclone/hammer/hammer.c @@ -27,21 +27,24 @@ static void hammer_readhook(t_pd *z, t_symbol *fn, int ac, t_atom *av) import_max(fn->s_name, ""); } -static void hammer_import(t_hammer *x, t_symbol *fn, t_symbol *dir) +static void hammer_doimport(t_hammer *x, t_symbol *fn, t_symbol *dir) { + if (!dir || dir == &s_) dir = x->x_dir; if (fn && fn != &s_) - { - if (!dir || dir == &s_) dir = x->x_dir; import_max(fn->s_name, (dir && dir != &s_) ? dir->s_name : ""); - } else - hammerpanel_open(x->x_filehandle); + hammerpanel_open(x->x_filehandle, dir); } static void hammer_click(t_hammer *x, t_floatarg xpos, t_floatarg ypos, - t_floatarg shift, t_floatarg ctrl, t_floatarg alt) + t_floatarg shift, t_floatarg ctrl, t_floatarg alt) +{ + hammer_doimport(x, 0, 0); +} + +static void hammer_import(t_hammer *x, t_symbol *fn) { - hammer_import(x, 0, 0); + hammer_doimport(x, fn, 0); } static void hammer_bang(t_hammer *x) @@ -82,7 +85,7 @@ void hammer_setup(void) sizeof(t_hammer), 0, A_DEFSYM, 0); class_addbang(hammer_class, hammer_bang); class_addmethod(hammer_class, (t_method)hammer_import, - gensym("import"), A_DEFSYM, A_DEFSYM, 0); + gensym("import"), A_DEFSYM, 0); class_addmethod(hammer_class, (t_method)hammer_click, gensym("click"), A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0); diff --git a/cyclone/hammer/mtr.c b/cyclone/hammer/mtr.c index edc5e20..ecc80d3 100644 --- a/cyclone/hammer/mtr.c +++ b/cyclone/hammer/mtr.c @@ -321,7 +321,7 @@ static void mtrack_read(t_mtrack *tp, t_symbol *s) if (s && s != &s_) mtr_doread(tp->tr_owner, tp, s); else /* CHECKED no default */ - hammerpanel_open(tp->tr_filehandle); + hammerpanel_open(tp->tr_filehandle, 0); } static void mtrack_write(t_mtrack *tp, t_symbol *s) @@ -553,7 +553,7 @@ static void mtr_doread(t_mtr *x, t_mtrack *target, t_symbol *fname) { /* CHECKED no complaint, open dialog not presented... */ /* LATER rethink */ - hammerpanel_open(target ? target->tr_filehandle : x->x_filehandle); + hammerpanel_open(target ? target->tr_filehandle : x->x_filehandle, 0); } } @@ -672,7 +672,7 @@ static void mtr_read(t_mtr *x, t_symbol *s) if (s && s != &s_) mtr_doread(x, 0, s); else /* CHECKED no default */ - hammerpanel_open(x->x_filehandle); + hammerpanel_open(x->x_filehandle, 0); } static void mtr_write(t_mtr *x, t_symbol *s) diff --git a/cyclone/hammer/seq.c b/cyclone/hammer/seq.c index 5997d31..011c97d 100644 --- a/cyclone/hammer/seq.c +++ b/cyclone/hammer/seq.c @@ -782,7 +782,7 @@ static void seq_textread(t_seq *x, char *path) if (binbuf_read(bb, path, "", 0)) { /* CHECKED no complaint, open dialog presented */ - hammerpanel_open(x->x_filehandle); /* LATER rethink */ + hammerpanel_open(x->x_filehandle, 0); /* LATER rethink */ } else { @@ -872,7 +872,7 @@ static void seq_read(t_seq *x, t_symbol *s) if (s && s != &s_) seq_doread(x, s, 0); else /* CHECKED no default */ - hammerpanel_open(x->x_filehandle); + hammerpanel_open(x->x_filehandle, 0); } static void seq_write(t_seq *x, t_symbol *s) diff --git a/cyclone/hammer/zl.c b/cyclone/hammer/zl.c index 566c18e..59e8f84 100644 --- a/cyclone/hammer/zl.c +++ b/cyclone/hammer/zl.c @@ -7,6 +7,7 @@ #include "common/loud.h" #include "common/grow.h" +/* CHECKME bang behaviour (every mode) */ /* LATER test reentrancy, tune speedwise */ #define ZL_DEBUG @@ -20,7 +21,7 @@ struct _zl; typedef int (*t_zlintargfn)(struct _zl *, int); typedef void (*t_zlanyargfn)(struct _zl *, t_symbol *, int, t_atom *); typedef int (*t_zlnatomsfn)(struct _zl *); -typedef void (*t_zldoitfn)(struct _zl *, int, t_atom *); +typedef void (*t_zldoitfn)(struct _zl *, int, t_atom *, int); static int zl_nmodes = 0; static t_symbol *zl_modesym[ZL_MAXMODES]; @@ -255,7 +256,7 @@ static int zl_nop_count(t_zl *x) return (0); } -static void zl_nop(t_zl *x, int natoms, t_atom *buf) +static void zl_nop(t_zl *x, int natoms, t_atom *buf, int banged) { loud_warning((t_pd *)x, "unknown mode"); } @@ -270,7 +271,7 @@ static int zl_ecils_count(t_zl *x) return (x->x_entered ? -1 : 0); } -static void zl_ecils(t_zl *x, int natoms, t_atom *buf) +static void zl_ecils(t_zl *x, int natoms, t_atom *buf, int banged) { int cnt1, cnt2 = x->x_modearg; natoms = x->x_inbuf1.d_natoms; @@ -296,7 +297,7 @@ static int zl_group_count(t_zl *x) return (x->x_entered ? -1 : 0); } -static void zl_group(t_zl *x, int natoms, t_atom *buf) +static void zl_group(t_zl *x, int natoms, t_atom *buf, int banged) { int cnt = x->x_modearg; if (cnt > 0) @@ -312,6 +313,11 @@ static void zl_group(t_zl *x, int natoms, t_atom *buf) x->x_inbuf1.d_natoms = natoms; while (natoms--) *buf++ = *from++; } + if (banged && x->x_inbuf1.d_natoms) + { + zl_output(x, x->x_inbuf1.d_natoms, buf); + x->x_inbuf1.d_natoms = 0; + } } else x->x_inbuf1.d_natoms = 0; /* CHECKED */ } @@ -329,7 +335,7 @@ static int zl_iter_count(t_zl *x) : 0); } -static void zl_iter(t_zl *x, int natoms, t_atom *buf) +static void zl_iter(t_zl *x, int natoms, t_atom *buf, int banged) { int nremaining = x->x_inbuf1.d_natoms; t_atom *ptr = x->x_inbuf1.d_buf; @@ -361,7 +367,7 @@ static int zl_join_count(t_zl *x) return (x->x_inbuf1.d_natoms + x->x_inbuf2.d_natoms); } -static void zl_join(t_zl *x, int natoms, t_atom *buf) +static void zl_join(t_zl *x, int natoms, t_atom *buf, int banged) { if (buf) { @@ -379,9 +385,11 @@ static int zl_len_count(t_zl *x) return (0); } -static void zl_len(t_zl *x, int natoms, t_atom *buf) +static void zl_len(t_zl *x, int natoms, t_atom *buf, int banged) { - outlet_float(((t_object *)x)->ob_outlet, x->x_inbuf1.d_natoms); +/* CHECKED 'mode len, bang'->[zl]->[print] crashes max 4.0.7... */ + if (!banged) /* CHECKED bang is a nop in len mode */ + outlet_float(((t_object *)x)->ob_outlet, x->x_inbuf1.d_natoms); } static int zl_nth_intarg(t_zl *x, int i) @@ -408,7 +416,7 @@ static int zl_nth_count(t_zl *x) else return (-1); } -static void zl_nth(t_zl *x, int natoms, t_atom *buf) +static void zl_nth(t_zl *x, int natoms, t_atom *buf, int banged) { int ac1 = x->x_inbuf1.d_natoms, ndx = x->x_modearg - 1; /* CHECKED one-based */ @@ -462,7 +470,7 @@ static int zl_reg_count(t_zl *x) return (x->x_entered ? x->x_inbuf1.d_natoms : 0); } -static void zl_reg(t_zl *x, int natoms, t_atom *buf) +static void zl_reg(t_zl *x, int natoms, t_atom *buf, int banged) { if (buf) memcpy(buf, x->x_inbuf1.d_buf, natoms * sizeof(*buf)); else @@ -480,7 +488,7 @@ static int zl_rev_count(t_zl *x) return (x->x_inbuf1.d_natoms); } -static void zl_rev(t_zl *x, int natoms, t_atom *buf) +static void zl_rev(t_zl *x, int natoms, t_atom *buf, int banged) { if (buf) { @@ -501,7 +509,7 @@ static int zl_rot_count(t_zl *x) return (x->x_inbuf1.d_natoms); } -static void zl_rot(t_zl *x, int natoms, t_atom *buf) +static void zl_rot(t_zl *x, int natoms, t_atom *buf, int banged) { if (buf) { @@ -554,7 +562,7 @@ static int zl_sect_count(t_zl *x) } /* CHECKED in-buffer duplicates are skipped */ -static void zl_sect(t_zl *x, int natoms, t_atom *buf) +static void zl_sect(t_zl *x, int natoms, t_atom *buf, int banged) { if (buf) { @@ -591,7 +599,7 @@ static int zl_slice_count(t_zl *x) return (x->x_entered ? -1 : 0); } -static void zl_slice(t_zl *x, int natoms, t_atom *buf) +static void zl_slice(t_zl *x, int natoms, t_atom *buf, int banged) { int cnt1 = x->x_modearg, cnt2; natoms = x->x_inbuf1.d_natoms; @@ -612,7 +620,7 @@ static int zl_sub_count(t_zl *x) return (0); } -static void zl_sub(t_zl *x, int natoms, t_atom *buf) +static void zl_sub(t_zl *x, int natoms, t_atom *buf, int banged) { int natoms2 = x->x_inbuf2.d_natoms; if (natoms2) @@ -656,7 +664,7 @@ static int zl_union_count(t_zl *x) } /* CHECKED in-buffer duplicates not skipped */ -static void zl_union(t_zl *x, int natoms, t_atom *buf) +static void zl_union(t_zl *x, int natoms, t_atom *buf, int banged) { if (buf) { @@ -682,7 +690,7 @@ static void zl_union(t_zl *x, int natoms, t_atom *buf) } } -static void zl_doit(t_zl *x) +static void zl_doit(t_zl *x, int banged) { int reentered = x->x_entered; int prealloc = !reentered; @@ -711,21 +719,19 @@ static void zl_doit(t_zl *x) /* LATER consider using the stack if !prealloc && natoms <= MAXSTACK */ if (buf = (prealloc ? d->d_buf : getbytes(natoms * sizeof(*buf)))) { - (*zl_doitfn[x->x_mode])(x, natoms, buf); + (*zl_doitfn[x->x_mode])(x, natoms, buf, banged); if (buf != d->d_buf) freebytes(buf, natoms * sizeof(*buf)); } } - else (*zl_doitfn[x->x_mode])(x, 0, 0); + else (*zl_doitfn[x->x_mode])(x, 0, 0, banged); if (!reentered) x->x_entered = x->x_locked = 0; } static void zl_bang(t_zl *x) { - /* CHECKED bang is a nop in len mode, LATER consider emulating this */ - /* CHECKED 'mode len, bang'->[zl]->[print] crashes max 4.0.7... */ - zl_doit(x); + zl_doit(x, 1); } static void zl_float(t_zl *x, t_float f) @@ -737,7 +743,7 @@ static void zl_float(t_zl *x, t_float f) else zldata_setfloat(&x->x_inbuf1, f); } - zl_doit(x); + zl_doit(x, 0); } static void zl_symbol(t_zl *x, t_symbol *s) @@ -749,7 +755,7 @@ static void zl_symbol(t_zl *x, t_symbol *s) else zldata_setsymbol(&x->x_inbuf1, s); } - zl_doit(x); + zl_doit(x, 0); } /* LATER gpointer */ @@ -763,7 +769,7 @@ static void zl_list(t_zl *x, t_symbol *s, int ac, t_atom *av) else zldata_setlist(&x->x_inbuf1, ac, av); } - zl_doit(x); + zl_doit(x, 0); } static void zl_anything(t_zl *x, t_symbol *s, int ac, t_atom *av) @@ -775,7 +781,7 @@ static void zl_anything(t_zl *x, t_symbol *s, int ac, t_atom *av) else zldata_set(&x->x_inbuf1, s, ac, av); } - zl_doit(x); + zl_doit(x, 0); } static int zl_modeargfn(t_zl *x) @@ -944,7 +950,7 @@ static void zl_setupallmodes(void) zl_setupmode("nth", 0, zl_nth_intarg, zl_nth_anyarg, zl_nth_count, zl_nth); zl_setupmode("reg", 0, 0, zl_reg_anyarg, zl_reg_count, zl_reg); zl_setupmode("rev", 0, 0, 0, zl_rev_count, zl_rev); - zl_setupmode("rot", /* CHECKED (refman error) */ + zl_setupmode("rot", /* CHECKED (refman's error) */ 0, zl_rot_intarg, 0, zl_rot_count, zl_rot); zl_setupmode("sect", 0, 0, 0, zl_sect_count, zl_sect); zl_setupmode("slice", 0, zl_slice_intarg, 0, zl_slice_count, zl_slice); diff --git a/cyclone/shadow/cyclone.c b/cyclone/shadow/cyclone.c index 10ae142..f6c5e8c 100644 --- a/cyclone/shadow/cyclone.c +++ b/cyclone/shadow/cyclone.c @@ -4,6 +4,9 @@ /* Never use forked calls in shadow code... */ +/* LATER support multi-atom dir (creation args), and fn ('import' message) + (same in hammer and sickle) */ + #include #include "m_pd.h" #include "common/loud.h" @@ -35,21 +38,24 @@ static void cyclone_readhook(t_pd *z, t_symbol *fn, int ac, t_atom *av) import_max(fn->s_name, ""); } -static void cyclone_import(t_cyclone *x, t_symbol *fn, t_symbol *dir) +static void cyclone_doimport(t_cyclone *x, t_symbol *fn, t_symbol *dir) { + if (!dir || dir == &s_) dir = x->x_dir; if (fn && fn != &s_) - { - if (!dir || dir == &s_) dir = x->x_dir; import_max(fn->s_name, (dir && dir != &s_) ? dir->s_name : ""); - } else - hammerpanel_open(x->x_filehandle); + hammerpanel_open(x->x_filehandle, dir); } static void cyclone_click(t_cyclone *x, t_floatarg xpos, t_floatarg ypos, t_floatarg shift, t_floatarg ctrl, t_floatarg alt) { - cyclone_import(x, 0, 0); + cyclone_doimport(x, 0, 0); +} + +static void cyclone_import(t_cyclone *x, t_symbol *fn) +{ + cyclone_doimport(x, fn, 0); } static void cyclone_bang(t_cyclone *x) @@ -127,7 +133,7 @@ void cyclone_setup(void) class_addmethod(cyclone_class, (t_method)cyclone_dummies, gensym("dummies"), 0); class_addmethod(cyclone_class, (t_method)cyclone_import, - gensym("import"), A_DEFSYM, A_DEFSYM, 0); + gensym("import"), A_DEFSYM, 0); class_addmethod(cyclone_class, (t_method)cyclone_click, gensym("click"), A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0); diff --git a/cyclone/sickle/peek.c b/cyclone/sickle/peek.c index 534cc49..333f427 100644 --- a/cyclone/sickle/peek.c +++ b/cyclone/sickle/peek.c @@ -31,7 +31,7 @@ static void peek_tick(t_peek *x) { arsic_redraw((t_arsic *)x); /* LATER redraw only dirty channel(s!) */ x->x_clockset = 0; - x->x_clocklasttick = clock_getsystime(); + x->x_clocklasttick = clock_getlogicaltime(); } static void peek_set(t_peek *x, t_symbol *s) @@ -41,7 +41,7 @@ static void peek_set(t_peek *x, t_symbol *s) #define peek_doclip(f) (f < -1. ? -1. : (f > 1. ? 1. : f)) -/* CHECKED refman error: ``if the number received in the left inlet +/* CHECKED refman's error: ``if the number received in the left inlet specifies a sample index that does not exist in the buffer~ object's currently allocated memory, nothing happens.'' This is plainly wrong, at least for max/msp 4.0.7 bundle: the index is clipped (just like @@ -115,14 +115,14 @@ static void *peek_new(t_symbol *s, t_floatarg f1, t_floatarg f2) ch = PEEK_MAXCHANNELS; x->x_maxchannels = (ch ? PEEK_MAXCHANNELS : 1); x->x_effchannel = x->x_reqchannel = (ch ? ch - 1 : 0); - /* CHECKED (refman error) clipping is disabled by default */ + /* CHECKED (refman's error) clipping is disabled by default */ x->x_clipmode = ((int)f2 != 0); x->x_pokemode = 0; inlet_new((t_object *)x, (t_pd *)x, &s_float, gensym("ft1")); inlet_new((t_object *)x, (t_pd *)x, &s_float, gensym("ft2")); outlet_new((t_object *)x, &s_float); x->x_clock = clock_new(x, (t_method)peek_tick); - x->x_clocklasttick = clock_getsystime(); + x->x_clocklasttick = clock_getlogicaltime(); x->x_clockset = 0; } return (x); diff --git a/cyclone/sickle/poke.c b/cyclone/sickle/poke.c index d0fb22a..7e45558 100644 --- a/cyclone/sickle/poke.c +++ b/cyclone/sickle/poke.c @@ -29,7 +29,7 @@ static void poke_tick(t_poke *x) { arsic_redraw((t_arsic *)x); /* LATER redraw only dirty channel(s!) */ x->x_clockset = 0; - x->x_clocklasttick = clock_getsystime(); + x->x_clocklasttick = clock_getlogicaltime(); } static void poke_set(t_poke *x, t_symbol *s) @@ -132,7 +132,7 @@ static void *poke_new(t_symbol *s, t_floatarg f) x->x_indexptr = fragile_inlet_signalscalar(in2); inlet_new((t_object *)x, (t_pd *)x, &s_float, gensym("ft2")); x->x_clock = clock_new(x, (t_method)poke_tick); - x->x_clocklasttick = clock_getsystime(); + x->x_clocklasttick = clock_getlogicaltime(); x->x_clockset = 0; } return (x); diff --git a/cyclone/sickle/record.c b/cyclone/sickle/record.c index ba2e3b5..f03e784 100644 --- a/cyclone/sickle/record.c +++ b/cyclone/sickle/record.c @@ -8,6 +8,8 @@ #include "sickle/sic.h" #include "sickle/arsic.h" +#define RECORD_REDRAWPAUSE 1000. /* refractory period */ + typedef struct _record { t_arsic x_arsic; @@ -23,13 +25,20 @@ typedef struct _record float x_syncincr; int x_isrunning; /* to know if sync should be 0.0 or 1.0 */ t_clock *x_clock; + double x_clocklasttick; } t_record; static t_class *record_class; static void record_tick(t_record *x) { - arsic_redraw((t_arsic *)x); + double timesince = clock_gettimesince(x->x_clocklasttick); + if (timesince >= RECORD_REDRAWPAUSE) + { + arsic_redraw((t_arsic *)x); + x->x_clocklasttick = clock_getlogicaltime(); + } + else clock_delay(x->x_clock, RECORD_REDRAWPAUSE - timesince); } static void record_setsync(t_record *x) @@ -37,15 +46,15 @@ static void record_setsync(t_record *x) /* CHECKED: clipped to array size -- using indices, not points */ float range = (float)(x->x_endindex - x->x_startindex); int phase = x->x_phase; - if (phase == SHARED_INT_MAX || range < 1.0) + if (phase == SHARED_INT_MAX || range < 1.) { - x->x_sync = (x->x_isrunning ? 1.0 : 0); /* CHECKED */ - x->x_syncincr = 0; + x->x_sync = (x->x_isrunning ? 1. : 0.); /* CHECKED */ + x->x_syncincr = 0.; } else { x->x_sync = (float)(phase - x->x_startindex) / range; - x->x_syncincr = 1.0 / range; + x->x_syncincr = 1. / range; } } @@ -68,6 +77,15 @@ static void record_set(t_record *x, t_symbol *s) record_mstoindex(x); } +static void record_reset(t_record *x) +{ + x->x_startpoint = x->x_endpoint = 0.; + x->x_pauseindex = SHARED_INT_MAX; + x->x_phase = SHARED_INT_MAX; + x->x_isrunning = 0; + record_mstoindex(x); +} + static void record_startpoint(t_record *x, t_floatarg f) { x->x_startpoint = f; @@ -91,7 +109,7 @@ static void record_float(t_record *x, t_float f) } else if (x->x_phase != SHARED_INT_MAX) /* CHECKED: no rewind */ { - record_tick(x); + clock_delay(x->x_clock, 10.); x->x_pauseindex = x->x_phase; x->x_phase = SHARED_INT_MAX; } @@ -126,7 +144,7 @@ static t_int *record_perform(t_int *w) { int vecsize = sic->s_vecsize; float syncincr = x->x_syncincr; - int ch, over, i, nxfer; + int ch, over, i, nxfer, ndone = 0; loopover: if ((nxfer = endphase - phase) > nblock) { @@ -140,7 +158,7 @@ loopover: t_float *vp = sic->s_vectors[ch]; if (vp) { - t_float *ip = (t_float *)(w[3 + ch]); + t_float *ip = (t_float *)(w[3 + ch]) + ndone; vp += phase; i = nxfer; /* LATER consider handling under and overflows */ @@ -148,6 +166,10 @@ loopover: } } i = nxfer; + + sync = phase; + syncincr = 1.; + while (i--) { *out++ = sync; @@ -155,31 +177,35 @@ loopover: } if (over) { + clock_delay(x->x_clock, 0); nblock -= nxfer; if (x->x_loopmode && (phase = x->x_startindex) < endphase) { x->x_phase = phase; x->x_sync = sync = 0; - if (nblock > 0) goto loopover; - goto done; + if (nblock > 0) + { + ndone += nxfer; + goto loopover; + } + goto alldone; } - clock_delay(x->x_clock, 0); /* CHECKED: no restart in append mode */ x->x_pauseindex = SHARED_INT_MAX; x->x_phase = SHARED_INT_MAX; - x->x_sync = 1.0; - x->x_syncincr = 0; + x->x_sync = 1.; + x->x_syncincr = 0.; } else { x->x_phase += nxfer; x->x_sync = sync; - goto done; + goto alldone; } } - while (nblock--) *out++ = sync; -done: + while (nblock--) *out++ = -1; //sync; +alldone: return (w + sic->s_nperfargs + 1); } @@ -203,15 +229,11 @@ static void *record_new(t_symbol *s, t_floatarg f) { int nch = arsic_getnchannels((t_arsic *)x); arsic_setminsize((t_arsic *)x, 2); - x->x_startpoint = 0; - x->x_endpoint = 0; x->x_appendmode = 0; x->x_loopmode = 0; - x->x_pauseindex = SHARED_INT_MAX; - x->x_phase = SHARED_INT_MAX; - x->x_isrunning = 0; - record_mstoindex(x); + record_reset(x); x->x_clock = clock_new(x, (t_method)record_tick); + x->x_clocklasttick = clock_getlogicaltime(); while (--nch) inlet_new((t_object *)x, (t_pd *)x, &s_signal, &s_signal); inlet_new((t_object *)x, (t_pd *)x, &s_float, gensym("ft-2")); @@ -239,4 +261,6 @@ void record_tilde_setup(void) gensym("loop"), A_FLOAT, 0); class_addmethod(record_class, (t_method)record_set, gensym("set"), A_SYMBOL, 0); + class_addmethod(record_class, (t_method)record_reset, + gensym("reset"), 0); } diff --git a/cyclone/sickle/sickle.c b/cyclone/sickle/sickle.c index 765209a..8df7974 100644 --- a/cyclone/sickle/sickle.c +++ b/cyclone/sickle/sickle.c @@ -27,21 +27,24 @@ static void sickle_readhook(t_pd *z, t_symbol *fn, int ac, t_atom *av) import_max(fn->s_name, ""); } -static void sickle_import(t_sickle *x, t_symbol *fn, t_symbol *dir) +static void sickle_doimport(t_sickle *x, t_symbol *fn, t_symbol *dir) { + if (!dir || dir == &s_) dir = x->x_dir; if (fn && fn != &s_) - { - if (!dir || dir == &s_) dir = x->x_dir; import_max(fn->s_name, (dir && dir != &s_) ? dir->s_name : ""); - } else - hammerpanel_open(x->x_filehandle); + hammerpanel_open(x->x_filehandle, dir); } static void sickle_click(t_sickle *x, t_floatarg xpos, t_floatarg ypos, - t_floatarg shift, t_floatarg ctrl, t_floatarg alt) + t_floatarg shift, t_floatarg ctrl, t_floatarg alt) +{ + sickle_doimport(x, 0, 0); +} + +static void sickle_import(t_sickle *x, t_symbol *fn) { - sickle_import(x, 0, 0); + sickle_doimport(x, fn, 0); } static void sickle_bang(t_sickle *x) @@ -82,7 +85,7 @@ void sickle_setup(void) sizeof(t_sickle), 0, A_DEFSYM, 0); class_addbang(sickle_class, sickle_bang); class_addmethod(sickle_class, (t_method)sickle_import, - gensym("import"), A_DEFSYM, A_DEFSYM, 0); + gensym("import"), A_DEFSYM, 0); class_addmethod(sickle_class, (t_method)sickle_click, gensym("click"), A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0); diff --git a/shared/common/loud.c b/shared/common/loud.c index 638f431..d5afada 100644 --- a/shared/common/loud.c +++ b/shared/common/loud.c @@ -24,6 +24,19 @@ char *loud_symbolname(t_symbol *s, char *nullname) return (s && s != &s_ ? s->s_name : nullname); } +/* LATER move it somewhere else */ +int loud_matchignorecase(char *test, char *pattern) +{ + char ct, cp; + for (ct = *test, cp = *pattern; ct && cp; ct = *++test, cp = *++pattern) + if (ct != cp + && ((ct < 'A' || ct > 'z') + || ((ct > 'Z' || ct + 32 != cp) + && (ct < 'a' || ct - 32 != cp)))) + return (0); + return (ct == cp); +} + /* LATER move it somewhere else */ char *loud_ordinal(int n) { diff --git a/shared/common/loud.h b/shared/common/loud.h index 17c02bf..eebb2c0 100644 --- a/shared/common/loud.h +++ b/shared/common/loud.h @@ -12,6 +12,7 @@ enum { LOUD_ARGOK, LOUD_ARGUNDER, LOUD_ARGOVER, LOUD_ARGTYPE, LOUD_ARGMISSING }; t_symbol *loud_floatsym(void); char *loud_symbolname(t_symbol *s, char *nullname); +int loud_matchignorecase(char *test, char *pattern); char *loud_ordinal(int n); void loud_error(t_pd *x, char *fmt, ...); void loud_errand(t_pd *x, char *fmt, ...); diff --git a/shared/common/port.c b/shared/common/port.c index fb22163..c737ab8 100644 --- a/shared/common/port.c +++ b/shared/common/port.c @@ -113,14 +113,26 @@ static void port_setxy(t_port *x, int ndx, t_atom *ap) SETFLOAT(ap, f); } +/* LATER bash inatom to lowercase (CHECKME first) */ +static void import_addclassname(t_binbuf *bb, char *outname, t_atom *inatom) +{ + t_atom at; + if (outname) + { + inatom = &at; + SETSYMBOL(inatom, gensym(outname)); + } + binbuf_add(bb, 1, inatom); +} + static int import_obj(t_port *x, char *name) { int ndx = (x->x_inmess[1].a_w.w_symbol == gensym("user") ? 3 : 2); - binbuf_addv(x->x_newbb, "ssffs;", + binbuf_addv(x->x_newbb, "ssff", gensym("#X"), gensym("obj"), - port_xarg(x, ndx), port_yarg(x, ndx + 1), - (name ? gensym(name) : - x->x_inmess[ndx == 2 ? 6 : 2].a_w.w_symbol)); + port_xarg(x, ndx), port_yarg(x, ndx + 1)); + import_addclassname(x->x_newbb, name, &x->x_inmess[ndx == 2 ? 6 : 2]); + binbuf_addsemi(x->x_newbb); x->x_nobj++; return (PORT_NEXT); } @@ -130,21 +142,18 @@ static int import_objarg(t_port *x, char *name) int ndx = (x->x_inmess[1].a_w.w_symbol == gensym("user") ? 3 : 2); if (x->x_inatoms > 6) { - t_atom *in = x->x_inmess + ndx + 4; + t_atom *in = x->x_inmess + 7; t_atom *out = x->x_outmess; SETSYMBOL(out, gensym("#X")); out++; SETSYMBOL(out, gensym("obj")); out++; - port_setxy(x, ndx, out); out++; out++; - if (name) - { - SETSYMBOL(out, gensym(name)); out++; - if (ndx == 2) in++; - } - else *out++ = (ndx == 2 ? *in++ : x->x_inmess[2]); + port_setxy(x, ndx, out); + binbuf_add(x->x_newbb, 4, x->x_outmess); + import_addclassname(x->x_newbb, name, &x->x_inmess[ndx == 2 ? 6 : 2]); + out = x->x_outmess; for (ndx = 7; ndx < x->x_inatoms; ndx++) *out++ = *in++; SETSEMI(out); - binbuf_add(x->x_newbb, x->x_inatoms - 1, x->x_outmess); + binbuf_add(x->x_newbb, x->x_inatoms - 6, x->x_outmess); x->x_nobj++; return (PORT_NEXT); } @@ -212,19 +221,17 @@ static int imaction_scope(t_port *x, char *name) SETSYMBOL(out, gensym("obj")); out++; port_setxy(x, 3, out); xpix = (int)out++->a_w.w_float; - ypix = (int)out++->a_w.w_float; - if (name) - { - SETSYMBOL(out, gensym(name)); out++; - } - else *out++ = x->x_inmess[2]; + ypix = (int)out->a_w.w_float; + binbuf_add(x->x_newbb, 4, x->x_outmess); + import_addclassname(x->x_newbb, name, &x->x_inmess[2]); + out = x->x_outmess; port_setxy(x, 5, out); out++->a_w.w_float -= xpix; out++->a_w.w_float -= ypix; for (i = 7; i < x->x_inatoms; i++) *out++ = *in++; SETSEMI(out); - binbuf_add(x->x_newbb, x->x_inatoms + 1, x->x_outmess); + binbuf_add(x->x_newbb, x->x_inatoms - 4, x->x_outmess); x->x_nobj++; return (PORT_NEXT); } @@ -320,7 +327,6 @@ typedef int (*t_portaction)(t_port *, char *arg); typedef struct _portslot { char *s_name; - int s_index; t_portaction s_action; char *s_actionarg; struct _portnode *s_subtree; @@ -331,90 +337,102 @@ typedef struct _portnode /* a parser's symbol definition, sort of... */ { t_portslot *n_table; int n_nslots; + int n_index; } t_portnode; #define PORT_NSLOTS(slots) (sizeof(slots)/sizeof(*(slots))) static t_portslot imslots__N[] = { - { "vpatcher", 1, imaction_vpatcher, 0, 0, 0 } + { "vpatcher", imaction_vpatcher, 0, 0, 0 } }; -static t_portnode imnode__N = { imslots__N, PORT_NSLOTS(imslots__N) }; +static t_portnode imnode__N = { imslots__N, PORT_NSLOTS(imslots__N), 1 }; static t_portslot imslots_newobj[] = { - { "patcher", 6, imaction_patcher, 0, 0, 0 }, - { "p", 6, imaction_patcher, 0, 0, 0 }, + { "patcher", imaction_patcher, 0, 0, 0 }, + { "p", imaction_patcher, 0, 0, 0 }, /* state is embedded in #N vtable...; #T set...; */ - { "table", 6, import_obj, "Table", 0, 0 } + { "table", import_obj, "Table", 0, 0 } }; static t_portnode imnode_newobj = { imslots_newobj, - PORT_NSLOTS(imslots_newobj) }; + PORT_NSLOTS(imslots_newobj), 6 }; /* LATER consider merging newobj and newex */ static t_portslot imslots_newex[] = { - { "append", 6, import_objarg, "Append", 0, 0 }, - { "biquad~", 6, import_objarg, "Biquad~", 0, 0 }, - { "change", 6, import_objarg, "Change", 0, 0 }, - { "clip", 6, import_objarg, "Clip", 0, 0 }, - { "clip~", 6, import_objarg, "Clip~", 0, 0 }, - { "key", 6, import_obj, "Key", 0, 0 }, - { "keyup", 6, import_obj, "Keyup", 0, 0 }, - { "line", 6, import_objarg, "Line", 0, 0 }, - { "line~", 6, import_objarg, "Line~", 0, 0 }, - { "poly", 6, import_objarg, "Poly", 0, 0 }, - { "snapshot~", 6, import_objarg, "Snapshot~", 0, 0 }, - { "trigger", 6, imaction_trigger, 0, 0, 0 }, - { "t", 6, imaction_trigger, 0, 0, 0 } + { "append", import_objarg, "Append", 0, 0 }, + { "biquad~", import_objarg, "Biquad~", 0, 0 }, + { "change", import_objarg, "Change", 0, 0 }, + { "clip", import_objarg, "Clip", 0, 0 }, + { "clip~", import_objarg, "Clip~", 0, 0 }, + { "key", import_obj, "Key", 0, 0 }, + { "keyup", import_obj, "Keyup", 0, 0 }, + { "line", import_objarg, "Line", 0, 0 }, + { "line~", import_objarg, "Line~", 0, 0 }, + { "poly", import_objarg, "Poly", 0, 0 }, + { "snapshot~", import_objarg, "Snapshot~", 0, 0 }, + { "trigger", imaction_trigger, 0, 0, 0 }, + { "t", imaction_trigger, 0, 0, 0 }, + + /* LATER rethink */ + { "Borax", import_objarg, "Borax", 0, 0 }, + { "Bucket", import_objarg, "Bucket", 0, 0 }, + { "Decode", import_objarg, "Decode", 0, 0 }, + { "Histo", import_objarg, "Histo", 0, 0 }, + { "MouseState", import_objarg, "MouseState", 0, 0 }, + { "Peak", import_objarg, "Peak", 0, 0 }, + { "TogEdge", import_objarg, "TogEdge", 0, 0 }, + { "Trough", import_objarg, "Trough", 0, 0 }, + { "Uzi", import_objarg, "Uzi", 0, 0 } }; static t_portnode imnode_newex = { imslots_newex, - PORT_NSLOTS(imslots_newex) }; + PORT_NSLOTS(imslots_newex), 6 }; static t_portslot imslots_user[] = { - { "GSwitch", 2, import_objarg, "Gswitch", 0, 0 }, - { "GSwitch2", 2, import_objarg, "Ggate", 0, 0 }, - { "number~", 2, import_obj, 0, 0, 0 }, - { "scope~", 2, imaction_scope, "Scope~", 0, 0 }, - { "uslider", 2, import_obj, "vsl", 0, 0 } /* LATER range and offset */ + { "GSwitch", import_objarg, "Gswitch", 0, 0 }, + { "GSwitch2", import_objarg, "Ggate", 0, 0 }, + { "number~", import_obj, 0, 0, 0 }, + { "scope~", imaction_scope, "Scope~", 0, 0 }, + { "uslider", import_obj, "vsl", 0, 0 } /* LATER range and offset */ }; static t_portnode imnode_user = { imslots_user, - PORT_NSLOTS(imslots_user) }; + PORT_NSLOTS(imslots_user), 2 }; static t_portslot imslots__P[] = { - { "comment", 1, imaction_comment, 0, 0, 0 }, - { "message", 1, imaction_message, 0, 0, 0 }, - { "newobj", 1, import_objarg, 0, &imnode_newobj, 0 }, - { "newex", 1, import_objarg, 0, &imnode_newex, 0 }, - { "inlet", 1, imaction_inlet, 0, 0, 0 }, - { "inlet~", 1, imaction_inlet, 0, 0, 0 }, - { "outlet", 1, imaction_outlet, 0, 0, 0 }, - { "outlet~", 1, imaction_outlet, 0, 0, 0 }, - { "number", 1, imaction_number, 0, 0, 0 }, - { "flonum", 1, imaction_number, 0, 0, 0 }, - { "button", 1, import_obj, "bng", 0, 0 }, - { "slider" , 1, import_obj, "vsl", 0, 0 }, /* LATER range and offset */ - { "hslider", 1, import_obj, "hsl", 0, 0 }, /* LATER range and offset */ - { "toggle", 1, import_obj, "tgl", 0, 0 }, - { "user", 1, import_objarg, 0, &imnode_user, 0 }, + { "comment", imaction_comment, 0, 0, 0 }, + { "message", imaction_message, 0, 0, 0 }, + { "newobj", import_objarg, 0, &imnode_newobj, 0 }, + { "newex", import_objarg, 0, &imnode_newex, 0 }, + { "inlet", imaction_inlet, 0, 0, 0 }, + { "inlet~", imaction_inlet, 0, 0, 0 }, + { "outlet", imaction_outlet, 0, 0, 0 }, + { "outlet~", imaction_outlet, 0, 0, 0 }, + { "number", imaction_number, 0, 0, 0 }, + { "flonum", imaction_number, 0, 0, 0 }, + { "button", import_obj, "bng", 0, 0 }, + { "slider" , import_obj, "vsl", 0, 0 }, /* LATER range and offset */ + { "hslider", import_obj, "hsl", 0, 0 }, /* LATER range and offset */ + { "toggle", import_obj, "tgl", 0, 0 }, + { "user", import_objarg, 0, &imnode_user, 0 }, /* state is embedded in #N vpreset ; #X append... */ - { "preset", 1, import_obj, "preset", 0, 0 }, + { "preset", import_obj, "preset", 0, 0 }, /* an object created from the "Paste Picture" menu, state is embedded in #N picture; #K...; */ - { "vpicture", 1, import_obj, "vpicture", 0, 0 }, - { "connect", 1, imaction_connect, 0, 0, 0 }, - { "fasten", 1, imaction_connect, 0, 0, 0 } + { "vpicture", import_obj, "vpicture", 0, 0 }, + { "connect", imaction_connect, 0, 0, 0 }, + { "fasten", imaction_connect, 0, 0, 0 } }; -static t_portnode imnode__P = { imslots__P, PORT_NSLOTS(imslots__P) }; +static t_portnode imnode__P = { imslots__P, PORT_NSLOTS(imslots__P), 1 }; static t_portslot imslots_[] = { - { "#N", 0, 0, 0, &imnode__N, 0 }, - { "#P", 0, 0, 0, &imnode__P, 0 } + { "#N", 0, 0, &imnode__N, 0 }, + { "#P", 0, 0, &imnode__P, 0 } }; -static t_portnode imnode_ = { imslots_, PORT_NSLOTS(imslots_) }; +static t_portnode imnode_ = { imslots_, PORT_NSLOTS(imslots_), 0 }; static int port_doit(t_port *x, t_portnode *node) { @@ -422,10 +440,13 @@ static int port_doit(t_port *x, t_portnode *node) if (nslots > 0) { t_portslot *slot = node->n_table; - t_symbol *s = port_symbolarg(x, slot->s_index); + t_symbol *insym = port_symbolarg(x, node->n_index); + char *inname = 0; +secondpass: while (nslots--) { - if (slot->s_symbol == s) + if (slot->s_symbol == insym + || (inname && loud_matchignorecase(inname, slot->s_name))) { if (slot->s_subtree) { @@ -442,6 +463,13 @@ static int port_doit(t_port *x, t_portnode *node) } slot++; } + if (!inname) + { + inname = insym->s_name; + nslots = node->n_nslots; + slot = node->n_table; + goto secondpass; + } } else bug("port_doit"); return (PORT_UNKNOWN); diff --git a/shared/hammer/file.c b/shared/hammer/file.c index 635c9bc..1cd6bfc 100644 --- a/shared/hammer/file.c +++ b/shared/hammer/file.c @@ -14,7 +14,9 @@ access to the panels (like collcommon), then it passes nonzero readfn and/or writefn callback pointers to the constructor. A master which has an associated text editor, AND wants to update object's state after - edits, passes a nonzero updatefn callback in a call to the constructor. */ + edits, passes a nonzero updatefn callback in a call to the constructor. + + LATER extract the embedding stuff. */ #include #include @@ -173,6 +175,23 @@ static void hammereditor_end(t_hammerfile *f) static void hammerpanel_guidefs(void) { + sys_gui("proc hammerpanel_open {target inidir} {\n"); + sys_gui(" global pd_opendir\n"); + sys_gui(" if {$inidir == \"\"} {\n"); + sys_gui(" set $inidir $pd_opendir\n"); + sys_gui(" }\n"); + sys_gui(" set filename [tk_getOpenFile \\\n"); + sys_gui(" -initialdir $inidir]\n"); + sys_gui(" if {$filename != \"\"} {\n"); +#if 0 + sys_gui(" set directory [string range $filename 0 \\\n"); + sys_gui(" [expr [string last / $filename ] - 1]]\n"); + sys_gui(" set pd_opendir $directory\n"); +#endif + sys_gui(" pd [concat $target symbol [pdtk_enquote $filename] \\;]\n"); + sys_gui(" }\n"); + sys_gui("}\n"); + sys_gui("proc hammerpanel_save {target inidir inifile} {\n"); sys_gui(" if {$inifile != \"\"} {\n"); sys_gui(" set filename [tk_getSaveFile \\\n"); @@ -195,7 +214,8 @@ static void hammerpanel_symbol(t_hammerfile *f, t_symbol *s) static void hammerpanel_tick(t_hammerfile *f) { if (f->f_savepanel) - sys_vgui("pdtk_openpanel %s\n", f->f_bindname->s_name); + sys_vgui("hammerpanel_open %s {%s}\n", f->f_bindname->s_name, + f->f_inidir->s_name); else sys_vgui("hammerpanel_save %s {%s} {%s}\n", f->f_bindname->s_name, f->f_inidir->s_name, f->f_inifile->s_name); @@ -203,8 +223,9 @@ static void hammerpanel_tick(t_hammerfile *f) /* these are hacks: deferring modal dialog creation in order to allow for a message box redraw to happen -- LATER investigate */ -void hammerpanel_open(t_hammerfile *f) +void hammerpanel_open(t_hammerfile *f, t_symbol *inidir) { + f->f_inidir = (inidir ? inidir : &s_); clock_delay(f->f_panelclock, 0); } diff --git a/shared/hammer/file.h b/shared/hammer/file.h index d0f6526..fb87ed1 100644 --- a/shared/hammer/file.h +++ b/shared/hammer/file.h @@ -29,7 +29,7 @@ typedef struct _hammerfile void hammereditor_open(t_hammerfile *f, char *title); void hammereditor_close(t_hammerfile *f, int ask); void hammereditor_append(t_hammerfile *f, char *contents); -void hammerpanel_open(t_hammerfile *f); +void hammerpanel_open(t_hammerfile *f, t_symbol *inidir); void hammerpanel_save(t_hammerfile *f, t_symbol *inidir, t_symbol *inifile); int hammerfile_ismapped(t_hammerfile *f); int hammerfile_isloading(t_hammerfile *f); diff --git a/test/cyclone/buffir-test.pd b/test/cyclone/buffir-test.pd new file mode 100644 index 0000000..7fd65e1 --- /dev/null +++ b/test/cyclone/buffir-test.pd @@ -0,0 +1,66 @@ +#N canvas 163 60 571 448 12; +#N canvas 0 0 450 300 graph1 0; +#X array t 1027 float 0; +#X coords 0 1 1026 -1 200 140 1; +#X restore 351 15 graph; +#X obj 24 47 click~; +#X obj 118 170 record~ tout; +#N canvas 0 0 450 300 graph1 0; +#X array tout 1024 float 0; +#X coords 0 1 1023 -1 200 140 1; +#X restore 351 166 graph; +#X msg 118 15 bang; +#X msg 118 136 1; +#X obj 23 107 buffir~ t 0 128; +#X msg 153 47 set t 0 256; +#X msg 153 77 set t 0 1024; +#X obj 376 362 loadbang; +#X obj 116 407 record~ tout; +#X msg 116 216 bang; +#X msg 116 373 1; +#X obj 21 339 buffir~ t 0 128; +#X msg 191 248 set t 0 256; +#X msg 177 281 set t 0 1024; +#X msg 177 216 bang; +#X obj 21 297 *~ 0.05; +#X msg 30 248 0.05; +#X msg 275 327 \; t const 0; +#X msg 199 310 bang; +#X floatatom 267 107 5 0 0 0 - - -; +#X floatatom 267 170 5 0 0 0 - - -; +#X msg 376 392 \; t sinesum 1024 0.4; +#X obj 267 134 peek~ t; +#X obj 199 340 t b b; +#X obj 257 407 peek~ t; +#X msg 125 248 0; +#X msg 79 248 1; +#X obj 21 216 osc~ 44; +#X msg 199 370 127 1; +#X connect 1 0 6 0; +#X connect 4 0 1 0; +#X connect 4 0 5 0; +#X connect 5 0 2 0; +#X connect 6 0 2 0; +#X connect 7 0 6 0; +#X connect 8 0 6 0; +#X connect 9 0 23 0; +#X connect 11 0 12 0; +#X connect 12 0 10 0; +#X connect 13 0 10 0; +#X connect 14 0 13 0; +#X connect 15 0 13 0; +#X connect 16 0 15 0; +#X connect 16 0 12 0; +#X connect 16 0 27 0; +#X connect 17 0 13 0; +#X connect 18 0 17 1; +#X connect 20 0 25 0; +#X connect 20 0 28 0; +#X connect 21 0 24 0; +#X connect 24 0 22 0; +#X connect 25 0 30 0; +#X connect 25 1 19 0; +#X connect 27 0 17 1; +#X connect 28 0 17 1; +#X connect 29 0 17 0; +#X connect 30 0 26 0; diff --git a/test/cyclone/cyclone-test.pd b/test/cyclone/cyclone-test.pd index d2919c0..c563718 100644 --- a/test/cyclone/cyclone-test.pd +++ b/test/cyclone/cyclone-test.pd @@ -1,54 +1,31 @@ -#N canvas 430 63 531 442 12; +#N canvas 150 47 531 442 12; #X obj 39 399 cyclone; #X msg 39 19 bang; #X msg 244 19 import; -#X obj 42 212 forward texthelp; +#X obj 42 210 forward texthelp; #X obj 63 278 r texthelp; #X msg 56 245 send binhelp; #X msg 182 245 send texthelp; #X obj 90 309 r binhelp; -#X msg 148 112 pv; -#X msg 64 112 coll; -#X msg 207 83 triangle~; -#X msg 148 83 comb~; -#X msg 64 83 allpass~; -#X msg 207 112 message; -#X msg 207 141 line~; #X obj 90 338 sprintf import ../../../ref/c74help/bin/%s.help; #X obj 63 369 sprintf import ../../../ref/c74help/text/%s.help; #X msg 92 19 dummies; -#X obj 39 48 cyclone; -#X msg 274 141 groove~; -#X msg 207 170 scope~; -#X msg 306 83 trapezoid~; -#X msg 306 112 kink~; -#X msg 290 170 rate~; -#X msg 360 170 pong~; -#X msg 360 141 vectral~; #X msg 170 19 reps; -#X msg 378 112 bitand~; -#X connect 1 0 18 0; -#X connect 2 0 18 0; -#X connect 4 0 16 0; +#X msg 125 181 buffir~; +#X obj 244 56 cyclone; +#X msg 42 181 record~; +#X obj 39 94 cyclone ../../../ref; +#X msg 211 181 fffb~; +#X connect 1 0 15 0; +#X connect 2 0 13 0; +#X connect 4 0 9 0; #X connect 5 0 3 0; #X connect 6 0 3 0; -#X connect 7 0 15 0; -#X connect 8 0 3 0; -#X connect 9 0 3 0; -#X connect 10 0 3 0; -#X connect 11 0 3 0; +#X connect 7 0 8 0; +#X connect 8 0 0 0; +#X connect 9 0 0 0; +#X connect 10 0 15 0; +#X connect 11 0 15 0; #X connect 12 0 3 0; -#X connect 13 0 3 0; #X connect 14 0 3 0; -#X connect 15 0 0 0; -#X connect 16 0 0 0; -#X connect 17 0 18 0; -#X connect 19 0 3 0; -#X connect 20 0 3 0; -#X connect 21 0 3 0; -#X connect 22 0 3 0; -#X connect 23 0 3 0; -#X connect 24 0 3 0; -#X connect 25 0 3 0; -#X connect 26 0 18 0; -#X connect 27 0 3 0; +#X connect 16 0 3 0; -- cgit v1.2.1