aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile45
-rw-r--r--src/list_accum-help.pd27
-rw-r--r--src/param.c4
-rw-r--r--src/param.h23
-rw-r--r--src/paramDump.h10
-rw-r--r--src/paramGui.h380
-rw-r--r--src/tof.h47
-rw-r--r--tof/gemwin+.pd87
-rw-r--r--tof/listUnfold-help.pd42
-rw-r--r--tof/list_accum-help.pd32
-rw-r--r--tof/list_unfold-help.pd40
-rw-r--r--tof/openHelp-help.pd6
-rw-r--r--tof/open_help-help.pd15
-rw-r--r--tof/sample.pd152
-rw-r--r--tof/sample_play~.pd100
15 files changed, 610 insertions, 400 deletions
diff --git a/src/Makefile b/src/Makefile
index bd98bf8..9e3647e 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,18 +1,21 @@
#
# SETUP
#
+
# Points to the folder that contains pd's /src dir
PD_SRC = ../../../pd
-# Points to the folder that contains pd's compiled /bin dir
+
+# Points to the folder that contains pd's compiled /bin dir (for OS X)
PD_BIN = /Applications/Pd-extended.app/Contents/Resources
-# Points to the folder to which you want to put the built file
-OUTPUT = ~/Make/pd/tof
+# Points to the folder to which you want to move the built file
+OUTPUT = ~/Make/pd/tof
#
# FIND OS
#
+
UNAME := $(shell uname -s)
ifeq ($(UNAME),Linux)
OS_NAME = linux
@@ -111,18 +114,46 @@ endif
CXXFLAGS = $(CFLAGS)
+### C++ files
+%.$(EXTENSION): %.cpp
+%.$(EXTENSION): %.cc
+ $(CXX) $(OPT_CFLAGS) $(CXXFLAGS) -o "$*.o" -c "$<"
+ $(CXX) $(LDFLAGS) -o "$*.$(EXTENSION)" "$*.o" $(LIBS)
+ chmod a-x "$*.$(EXTENSION)"
+# $(STRIP) $*.$(EXTENSION)
+# rm -f -- $*.o
+ mv $*.$(EXTENSION) $(OUTPUT)
-### C files
+%.o: %.cpp
+%.o: %.cc
+ $(CXX) $(OPT_CFLAGS) $(CXXFLAGS) -o "$*.o" -c "$<"
-.c:
- $(CC) $(OPT_CFLAGS) $(CFLAGS) -o "$*.o" -c "$*.c"
- $(CC) $(LDFLAGS) -o "$*.$(EXTENSION)" "$*.o" $(LIBS)
+### C files
+%.o: %.c
+ $(CC) $(OPT_CFLAGS) $(CFLAGS) -o "$*.o" -c "$*.c"
+
+%.$(EXTENSION): %.o
+ $(CC) $(LDFLAGS) -o "$*.$(EXTENSION)" "$*.o" $(LIBS) \
+ `test -f $*.libs && cat $*.libs` \
+ `my_dylib=$(patsubst $(externals_src)/%,%,$(@D)); test -f $(@D)/lib$${my_dylib}.$(DYLIB_EXTENSION) && echo -L$(@D) -l$$my_dylib` \
+ `my_obj=$(patsubst $(externals_src)/%,%,$(@D)); test -f $(@D)/shared/$${my_obj}.o && echo $(@D)/shared/$${my_obj}.o` \
+ `test -f $(dir $*)../$(BUILDSRC_OS_NAME)/$(notdir $*).libs && \
+ cat $(dir $*)../$(BUILDSRC_OS_NAME)/$(notdir $*).libs`
chmod a-x "$*.$(EXTENSION)"
$(STRIP) $*.$(EXTENSION)
rm -f -- $*.o
mv $*.$(EXTENSION) $(OUTPUT)
+### C files
+#.c:
+# $(CC) $(OPT_CFLAGS) $(CFLAGS) -o "$*.o" -c "$*.c"
+# $(CC) $(LDFLAGS) -o "$*.$(EXTENSION)" "$*.o" $(LIBS)
+# chmod a-x "$*.$(EXTENSION)"
+# $(STRIP) $*.$(EXTENSION)
+# rm -f -- $*.o
+# mv $*.$(EXTENSION) $(OUTPUT)
+
diff --git a/src/list_accum-help.pd b/src/list_accum-help.pd
deleted file mode 100644
index e7795ba..0000000
--- a/src/list_accum-help.pd
+++ /dev/null
@@ -1,27 +0,0 @@
-#N canvas 1298 133 478 349 10;
-#X obj 56 223 tof/list_accum;
-#X msg 77 158 1 2 3 4 5 6;
-#X obj 55 86 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
--1;
-#X obj 54 288 print;
-#X floatatom 69 131 5 0 0 0 - - -;
-#X msg 159 158 a b c d;
-#X obj 171 194 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
--1 -1;
-#X obj 140 256 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
--1 -1;
-#X text 35 36 Tags: lists;
-#X text 36 5 Description: Accumulates incomming atoms into one big
-list;
-#X text 113 135 Inlet 1 \, anything: Accumulate atoms;
-#X text 192 194 Inlet 2 \, bang: Clear accumulated atoms;
-#X text 76 85 Inlet 1 \, bang: Output and clear accumulated atoms;
-#X text 160 254 Outlet 2 \, bang: Nothing accumulated (empty);
-#X text 93 288 Outlet 1 \, list: Accumulated atoms;
-#X connect 0 0 3 0;
-#X connect 0 1 7 0;
-#X connect 1 0 0 0;
-#X connect 2 0 0 0;
-#X connect 4 0 0 0;
-#X connect 5 0 0 0;
-#X connect 6 0 0 1;
diff --git a/src/param.c b/src/param.c
index a0779f2..fc8a152 100644
--- a/src/param.c
+++ b/src/param.c
@@ -314,7 +314,7 @@ static void* paramClass_new(t_symbol *s, int ac, t_atom *av)
// Create memory space
t_symbol* selector;
- tof_set_selector(&selector,&ac_p,&av_p);
+ param_set_selector(&selector,&ac_p,&av_p);
x->selector = selector;
x->alloc = ac_p + 10;
x->ac = ac_p;
@@ -334,7 +334,7 @@ static void* paramClass_new(t_symbol *s, int ac, t_atom *av)
inlet_new((t_object *)x, (t_pd *)p, 0, 0);
x->outlet = outlet_new(&x->x_obj, &s_list);
-
+ //post("Selector: %s",x->selector->s_name);
return (x);
diff --git a/src/param.h b/src/param.h
index 46daca6..ff1c89d 100644
--- a/src/param.h
+++ b/src/param.h
@@ -42,6 +42,29 @@ typedef struct _paramroot {
static t_paramroot* PARAMROOTS;
+// set selector
+// CHANGES
+// USUALLY THE SELECTED SELECTOR WOULD ONLY BE BANG, ANYTHING OR LIST.
+// I ADDED FLOAT
+static void param_set_selector(t_symbol** selector_sym_p,int* ac_p, t_atom** av_p ) {
+ if(!(*ac_p)) {
+ *selector_sym_p = &s_bang;
+ } else if( IS_A_SYMBOL(*av_p, 0 )) {
+
+ *selector_sym_p = atom_getsymbol(*av_p);
+ *ac_p = (*ac_p)-1;
+ *av_p = (*av_p)+1;
+
+ } else if ( IS_A_FLOAT(*av_p, 0 ) && *ac_p == 1 ) {
+ *selector_sym_p = &s_float;
+ *ac_p = 1;
+
+ } else {
+ *selector_sym_p = &s_list;
+ }
+}
+
+
static t_paramroot* param_get_root(t_symbol* root) {
if (PARAMROOTS == NULL) {
diff --git a/src/paramDump.h b/src/paramDump.h
index 878b8c5..d6684e5 100644
--- a/src/paramDump.h
+++ b/src/paramDump.h
@@ -51,7 +51,8 @@ static void paramDump_guis(t_paramDump *x, t_symbol* s) {
while (p) {
if (p->GUI ) {
p->GUI(p->x,&ac,&av,&send,&receive);
- outlet_anything(x->outlet,p->path,ac,av);
+ tof_outlet_list_prepend(x->outlet,&s_list,ac,av,p->path);
+ //outlet_anything(x->outlet,p->path,ac,av);
}
p = p->next;
@@ -61,7 +62,8 @@ static void paramDump_guis(t_paramDump *x, t_symbol* s) {
while (p) {
if (p->GUI && (strncmp(p->path->s_name,s->s_name,length)==0) ) {
p->GUI(p->x,&ac,&av,&send,&receive);
- outlet_anything(x->outlet,p->path,ac,av);
+ tof_outlet_list_prepend(x->outlet,&s_list,ac,av,p->path);
+ //outlet_anything(x->outlet,p->path,ac,av);
}
p = p->next;
@@ -93,7 +95,7 @@ static void paramDump_symbol(t_paramDump *x, t_symbol* s) {
while (p) {
if ( p->get && (strncmp(p->path->s_name,s->s_name,length)==0) ) {
p->get(p->x, &selector, &ac, &av);
- tof_outlet_anything_prepend(x->outlet,selector,ac,av,p->path);
+ tof_outlet_list_prepend(x->outlet,selector,ac,av,p->path);
}
p = p->next;
}
@@ -120,7 +122,7 @@ static void paramDump_bang(t_paramDump *x) {
while (p) {
if ( p->get ) {
p->get(p->x, &selector, &ac, &av);
- tof_outlet_anything_prepend(x->outlet,selector,ac,av,p->path);
+ tof_outlet_list_prepend(x->outlet,selector,ac,av,p->path);
}
p = p->next;
}
diff --git a/src/paramGui.h b/src/paramGui.h
index 2cef335..be33f0a 100644
--- a/src/paramGui.h
+++ b/src/paramGui.h
@@ -4,6 +4,17 @@ static t_class *paramGui_class;
#define GUI_X_STEP 200
#define GUI_Y_STEP 18
+ /*
+ CHANGES
+
+ Added a symbol message handler and a subpath variable
+
+ Banging inlet 2 only resets the gui but does not recreate it
+
+
+ */
+
+
typedef struct _paramGui
@@ -14,7 +25,12 @@ typedef struct _paramGui
t_canvas* childcanvas;
//t_symbol* fullpath;
t_symbol* path;
+
+
int path_l;
+
+ t_symbol* subpath;
+ int subpath_l;
int build;
t_symbol* root;
@@ -68,7 +84,7 @@ static void paramGui_buildCanvas(t_paramGui* x,int x_position,int y_position) {
int i;
t_symbol* shortpath;
- int gui_built = 1;
+ int gui_update = 0;
// ac & av for updating the values of the gui (p->get())
// after it is created
@@ -79,175 +95,190 @@ static void paramGui_buildCanvas(t_paramGui* x,int x_position,int y_position) {
t_param* p = get_param_list(x->root);
+
+
+
while (p) {
- gui_built = 1;
+ gui_update = 0;
if (p->GUI && (strncmp(p->path->s_name,x->path->s_name,x->path_l)==0)) {
- p->GUI(p->x,&ac,&av,&send,&receive);
- if ( send == NULL ) send = s_empty;
- if ( receive == NULL ) receive = s_empty;
-
- /*
- // This code alows the positioning of the guis, but creates
- // too many problems
- if ( IS_A_FLOAT(av,0) ) {
- pos_x = GUI_X_STEP * atom_getfloat(av);
- av++;
- ac--;
- }
-
- if ( IS_A_FLOAT(av,0) ) {
- pos_y = GUI_Y_STEP * atom_getfloat(av);
- av++;
- ac--;
- }
- */
- if ( IS_A_SYMBOL(av,0)) {
-
- // Make shortpath (removes what is common between paths)
- // Do not make shortpath if we are at the root (x->path_l==1)
- if ( x->path_l < 2) {
- shortpath = p->path;
- } else {
- shortpath = gensym(p->path->s_name + x->path_l);
+
+ if ( x->subpath==NULL || (x->path_l > 0 && strncmp((p->path->s_name)+(x->path_l-1),x->subpath->s_name,x->subpath_l)==0)) {
+
+
+ p->GUI(p->x,&ac,&av,&send,&receive);
+ if ( send == NULL ) send = s_empty;
+ if ( receive == NULL ) receive = s_empty;
+
+ /*
+ // This code alows the positioning of the guis, but creates
+ // too many problems
+ if ( IS_A_FLOAT(av,0) ) {
+ pos_x = GUI_X_STEP * atom_getfloat(av);
+ av++;
+ ac--;
}
-
-
-
- type = atom_getsymbol(av);
- if ( type == s_nbx ) {
- SETSYMBOL(&atoms[0],s_obj);
- SETFLOAT(&atoms[1],pos_x);
- SETFLOAT(&atoms[2],pos_y);
- SETSYMBOL(&atoms[3],s_nbx);
- SETFLOAT(&atoms[4],5);
- SETFLOAT(&atoms[5],14);
- SETFLOAT(&atoms[6],-1.0e+37);
- SETFLOAT(&atoms[7],1.0e+37);
- SETFLOAT(&atoms[8],0);
- SETFLOAT(&atoms[9],0);
- SETSYMBOL(&atoms[10],send);
- SETSYMBOL(&atoms[11],receive);
- SETSYMBOL(&atoms[12],shortpath);
- SETFLOAT(&atoms[13],50);
- SETFLOAT(&atoms[14],8);
- SETFLOAT(&atoms[15],0);
- SETFLOAT(&atoms[16],8);
- SETFLOAT(&atoms[17],-262144);
- SETFLOAT(&atoms[18],-1);
- SETFLOAT(&atoms[19],-1);
- SETFLOAT(&atoms[20],0);
- SETFLOAT(&atoms[21],256);
- pd_forwardmess((t_pd*)x->childcanvas, 22, atoms);
- pos_y = pos_y + GUI_Y_STEP;
-
- } else if (type == s_bng) {
- SETSYMBOL(&atoms[0],s_obj);
- SETFLOAT(&atoms[1],pos_x);
- SETFLOAT(&atoms[2],pos_y);
- SETSYMBOL(&atoms[3],s_bng);
- SETFLOAT(&atoms[4],15);
- SETFLOAT(&atoms[5],250);
- SETFLOAT(&atoms[6],50);
- SETFLOAT(&atoms[7],0);
- SETSYMBOL(&atoms[8],send);
- SETSYMBOL(&atoms[9],receive);
- SETSYMBOL(&atoms[10],shortpath);
- SETFLOAT(&atoms[11],17);
- SETFLOAT(&atoms[12],7);
- SETFLOAT(&atoms[13],0);
- SETFLOAT(&atoms[14],8);
- SETFLOAT(&atoms[15],-262144);
- SETFLOAT(&atoms[16],-1);
- SETFLOAT(&atoms[17],-1);
- pd_forwardmess((t_pd*)x->childcanvas, 18, atoms);
- pos_y = pos_y + GUI_Y_STEP;
- } else if ( (type == s_slider) || (type == s_knob) || (type == s_hsl) ) {
- SETSYMBOL(&atoms[0],s_obj);
- SETFLOAT(&atoms[1],pos_x);
- SETFLOAT(&atoms[2],pos_y);
- SETSYMBOL(&atoms[3],s_hsl);
- SETFLOAT(&atoms[4],100);
- SETFLOAT(&atoms[5],15);
- if (ac > 1 && IS_A_FLOAT(av,1) ) {
- SETFLOAT(&atoms[6],atom_getfloat(av+1));
- } else {
- SETFLOAT(&atoms[6],0);
- }
- if (ac > 2 && IS_A_FLOAT(av,2) ) {
- SETFLOAT(&atoms[7],atom_getfloat(av+2));
- } else {
- SETFLOAT(&atoms[7],1);
- }
- SETFLOAT(&atoms[8],0);
- SETFLOAT(&atoms[9],0);
- SETSYMBOL(&atoms[10],send);
- SETSYMBOL(&atoms[11],receive);
- SETSYMBOL(&atoms[12],shortpath);
- SETFLOAT(&atoms[13],105);
- SETFLOAT(&atoms[14],7);
- SETFLOAT(&atoms[15],0);
- SETFLOAT(&atoms[16],8);
- SETFLOAT(&atoms[17],-262144);
- SETFLOAT(&atoms[18],-1);
- SETFLOAT(&atoms[19],-1);
- SETFLOAT(&atoms[20],0);
- SETFLOAT(&atoms[21],1);
- pd_forwardmess((t_pd*)x->childcanvas, 22, atoms);
- pos_y = pos_y + GUI_Y_STEP;
-
- } else if (type == s_tgl) {
- SETSYMBOL(&atoms[0],s_obj);
- SETFLOAT(&atoms[1],pos_x);
- SETFLOAT(&atoms[2],pos_y);
- SETSYMBOL(&atoms[3],s_tgl);
- SETFLOAT(&atoms[4],15);
- SETFLOAT(&atoms[5],0);
- SETSYMBOL(&atoms[6],send);
- SETSYMBOL(&atoms[7],receive);
- SETSYMBOL(&atoms[8],shortpath);
- SETFLOAT(&atoms[9],17);
- SETFLOAT(&atoms[10],7);
- SETFLOAT(&atoms[11],0);
- SETFLOAT(&atoms[12],8);
- SETFLOAT(&atoms[13],-262144);
- SETFLOAT(&atoms[14],1);
- SETFLOAT(&atoms[15],-1);
- SETFLOAT(&atoms[16],0);
- SETFLOAT(&atoms[17],1);
- pd_forwardmess((t_pd*)x->childcanvas, 18, atoms);
- pos_y = pos_y + GUI_Y_STEP;
-
-
- } else if ( type == s_symbolatom || type == s_sym) {
- SETSYMBOL(&atoms[0],s_symbolatom);
- SETFLOAT(&atoms[1],pos_x);
- SETFLOAT(&atoms[2],pos_y);
- SETFLOAT(&atoms[3],17);
- SETFLOAT(&atoms[4],0);
- SETFLOAT(&atoms[5],0);
- SETFLOAT(&atoms[6],1);
- SETSYMBOL(&atoms[7],shortpath);
- SETSYMBOL(&atoms[8],receive);
- SETSYMBOL(&atoms[9],send);
- pd_forwardmess((t_pd*)x->childcanvas, 10,atoms);
- pos_y = pos_y + GUI_Y_STEP;
- } else {
- SETSYMBOL(&atoms[0],s_text);
- SETFLOAT(&atoms[1],pos_x);
- SETFLOAT(&atoms[2],pos_y);
- SETSYMBOL(&atoms[3],shortpath);
- pd_forwardmess((t_pd*)x->childcanvas, 4,atoms);
- pos_y = pos_y + GUI_Y_STEP;
- gui_built = 0;
- }
-
- if ((gui_built) && (receive != s_empty) && (p->get)) {
- p->get(p->x,&s_got,&ac_got,&av_got);
- tof_send_anything_prepend(receive,s_got,ac_got,av_got,s_set);
- }
- }
+ if ( IS_A_FLOAT(av,0) ) {
+ pos_y = GUI_Y_STEP * atom_getfloat(av);
+ av++;
+ ac--;
+ }
+ */
+ if ( IS_A_SYMBOL(av,0)) {
+
+ // Make shortpath (removes what is common between paths)
+ // Do not make shortpath if we are at the root (x->path_l==1)
+ if ( x->path_l < 2) {
+ shortpath = p->path;
+ } else {
+ shortpath = gensym(p->path->s_name + x->path_l);
+ }
+
+
+
+
+ type = atom_getsymbol(av);
+ if ( type == s_nbx ) {
+ SETSYMBOL(&atoms[0],s_obj);
+ SETFLOAT(&atoms[1],pos_x);
+ SETFLOAT(&atoms[2],pos_y);
+ SETSYMBOL(&atoms[3],s_nbx);
+ SETFLOAT(&atoms[4],5);
+ SETFLOAT(&atoms[5],14);
+ SETFLOAT(&atoms[6],-1.0e+37);
+ SETFLOAT(&atoms[7],1.0e+37);
+ SETFLOAT(&atoms[8],0);
+ SETFLOAT(&atoms[9],0);
+ SETSYMBOL(&atoms[10],send);
+ SETSYMBOL(&atoms[11],receive);
+ SETSYMBOL(&atoms[12],shortpath);
+ SETFLOAT(&atoms[13],50);
+ SETFLOAT(&atoms[14],8);
+ SETFLOAT(&atoms[15],0);
+ SETFLOAT(&atoms[16],8);
+ SETFLOAT(&atoms[17],-262144);
+ SETFLOAT(&atoms[18],-1);
+ SETFLOAT(&atoms[19],-1);
+ SETFLOAT(&atoms[20],0);
+ SETFLOAT(&atoms[21],256);
+ pd_forwardmess((t_pd*)x->childcanvas, 22, atoms);
+ pos_y = pos_y + GUI_Y_STEP;
+ gui_update = 1;
+
+ } else if (type == s_bng) {
+
+ SETSYMBOL(&atoms[0],s_obj);
+ SETFLOAT(&atoms[1],pos_x);
+ SETFLOAT(&atoms[2],pos_y);
+ SETSYMBOL(&atoms[3],s_bng);
+ SETFLOAT(&atoms[4],15);
+ SETFLOAT(&atoms[5],250);
+ SETFLOAT(&atoms[6],50);
+ SETFLOAT(&atoms[7],0);
+ SETSYMBOL(&atoms[8],send);
+ SETSYMBOL(&atoms[9],receive);
+ SETSYMBOL(&atoms[10],shortpath);
+ SETFLOAT(&atoms[11],17);
+ SETFLOAT(&atoms[12],7);
+ SETFLOAT(&atoms[13],0);
+ SETFLOAT(&atoms[14],8);
+ SETFLOAT(&atoms[15],-262144);
+ SETFLOAT(&atoms[16],-1);
+ SETFLOAT(&atoms[17],-1);
+ pd_forwardmess((t_pd*)x->childcanvas, 18, atoms);
+ pos_y = pos_y + GUI_Y_STEP;
+
+ } else if ( (type == s_slider) || (type == s_knob) || (type == s_hsl) ) {
+ SETSYMBOL(&atoms[0],s_obj);
+ SETFLOAT(&atoms[1],pos_x);
+ SETFLOAT(&atoms[2],pos_y);
+ SETSYMBOL(&atoms[3],s_hsl);
+ SETFLOAT(&atoms[4],100);
+ SETFLOAT(&atoms[5],15);
+ if (ac > 1 && IS_A_FLOAT(av,1) ) {
+ SETFLOAT(&atoms[6],atom_getfloat(av+1));
+ } else {
+ SETFLOAT(&atoms[6],0);
+ }
+ if (ac > 2 && IS_A_FLOAT(av,2) ) {
+ SETFLOAT(&atoms[7],atom_getfloat(av+2));
+ } else {
+ SETFLOAT(&atoms[7],1);
+ }
+ SETFLOAT(&atoms[8],0);
+ SETFLOAT(&atoms[9],0);
+ SETSYMBOL(&atoms[10],send);
+ SETSYMBOL(&atoms[11],receive);
+ SETSYMBOL(&atoms[12],shortpath);
+ SETFLOAT(&atoms[13],105);
+ SETFLOAT(&atoms[14],7);
+ SETFLOAT(&atoms[15],0);
+ SETFLOAT(&atoms[16],8);
+ SETFLOAT(&atoms[17],-262144);
+ SETFLOAT(&atoms[18],-1);
+ SETFLOAT(&atoms[19],-1);
+ SETFLOAT(&atoms[20],0);
+ SETFLOAT(&atoms[21],1);
+ pd_forwardmess((t_pd*)x->childcanvas, 22, atoms);
+ pos_y = pos_y + GUI_Y_STEP;
+ gui_update = 1;
+ } else if (type == s_tgl) {
+ SETSYMBOL(&atoms[0],s_obj);
+ SETFLOAT(&atoms[1],pos_x);
+ SETFLOAT(&atoms[2],pos_y);
+ SETSYMBOL(&atoms[3],s_tgl);
+ SETFLOAT(&atoms[4],15);
+ SETFLOAT(&atoms[5],0);
+ SETSYMBOL(&atoms[6],send);
+ SETSYMBOL(&atoms[7],receive);
+ SETSYMBOL(&atoms[8],shortpath);
+ SETFLOAT(&atoms[9],17);
+ SETFLOAT(&atoms[10],7);
+ SETFLOAT(&atoms[11],0);
+ SETFLOAT(&atoms[12],8);
+ SETFLOAT(&atoms[13],-262144);
+ SETFLOAT(&atoms[14],1);
+ SETFLOAT(&atoms[15],-1);
+ SETFLOAT(&atoms[16],0);
+ SETFLOAT(&atoms[17],1);
+ pd_forwardmess((t_pd*)x->childcanvas, 18, atoms);
+ pos_y = pos_y + GUI_Y_STEP;
+ gui_update = 1;
+
+ } else if ( type == s_symbolatom || type == s_sym) {
+ SETSYMBOL(&atoms[0],s_symbolatom);
+ SETFLOAT(&atoms[1],pos_x);
+ SETFLOAT(&atoms[2],pos_y);
+ SETFLOAT(&atoms[3],17);
+ SETFLOAT(&atoms[4],0);
+ SETFLOAT(&atoms[5],0);
+ SETFLOAT(&atoms[6],1);
+ SETSYMBOL(&atoms[7],shortpath);
+ SETSYMBOL(&atoms[8],receive);
+ SETSYMBOL(&atoms[9],send);
+ pd_forwardmess((t_pd*)x->childcanvas, 10,atoms);
+ pos_y = pos_y + GUI_Y_STEP;
+ gui_update = 1;
+ } else {
+ SETSYMBOL(&atoms[0],s_text);
+ SETFLOAT(&atoms[1],pos_x);
+ SETFLOAT(&atoms[2],pos_y);
+ SETSYMBOL(&atoms[3],shortpath);
+ pd_forwardmess((t_pd*)x->childcanvas, 4,atoms);
+ pos_y = pos_y + GUI_Y_STEP;
+ gui_update = 0;
+ }
+
+ if ((gui_update) && (receive != s_empty) && (p->get) && (ac_got)) {
+ p->get(p->x,&s_got,&ac_got,&av_got);
+ //post("path: %s selector: %s ac: %i",p->path->s_name,s_got->s_name,ac_got);
+
+ if ( s_got != &s_bang) tof_send_anything_prepend(receive,s_got,ac_got,av_got,s_set);
+ }
+
+ }
+ }
}
p = p->next;
@@ -263,6 +294,7 @@ static void paramGui_buildCanvas(t_paramGui* x,int x_position,int y_position) {
// Change the build flag
x->build = 0;
+ x->subpath=NULL;
// Show canvas
t_atom a;
@@ -281,6 +313,9 @@ static void paramGui_motion_callback(t_paramGui *x, t_float x_position, t_float
}
+
+
+
static void paramGui_bang(t_paramGui *x) {
if (x->childcanvas && !x->waiting) {
@@ -308,9 +343,20 @@ static void paramGui_bang(t_paramGui *x) {
}
}
+static void paramGui_symbol(t_paramGui *x, t_symbol* s) {
+ if ( x->subpath != NULL && x->subpath != s) x->build = 1;
+ x->subpath = s;
+ x->subpath_l = strlen(x->subpath->s_name);
+ paramGui_bang(x);
+}
+
static void paramGui_reset(t_paramGui *x) {
x->build = 1;
- paramGui_bang(x);
+ //paramGui_bang(x);
+ // Hide canvas
+ t_atom a;
+ SETFLOAT(&a,0);
+ pd_typedmess((t_pd*)x->childcanvas,s_vis,1,&a);
}
@@ -424,7 +470,7 @@ void paramGui_setup(void) {
sizeof(t_paramGui), 0, A_GIMME, 0);
class_addbang(paramGui_class, paramGui_bang);
- //class_addsymbol(paramGui_class, paramGui_symbol);
+ class_addsymbol(paramGui_class, paramGui_symbol);
// The mouse position callback
class_addmethod(paramGui_class, (t_method)paramGui_motion_callback,\
diff --git a/src/tof.h b/src/tof.h
index 80c5e0a..7adf800 100644
--- a/src/tof.h
+++ b/src/tof.h
@@ -148,18 +148,7 @@ static void tof_get_canvas_arguments(t_canvas *canvas, int *ac_p, t_atom **av_p)
-// set selector
-static void tof_set_selector(t_symbol** selector_sym_p,int* ac_p, t_atom** av_p ) {
- if(!(*ac_p)) {
- *selector_sym_p = &s_bang;
- } else if(IS_A_SYMBOL(*av_p, 0)) {
- *selector_sym_p = atom_getsymbol(*av_p);
- *ac_p = (*ac_p)-1,
- *av_p = (*av_p)+1;
- } else{
- *selector_sym_p = &s_list;
- }
-}
+
/*
static int tof_get_tagged_argument(char tag, int ac, t_atom *av, int *start, int *count) {
@@ -257,6 +246,33 @@ static int tof_find_tagged_argument(char tag,t_symbol *name, int ac, t_atom *av,
+static void tof_outlet_list_prepend(t_outlet* outlet, t_symbol* s, int argc, t_atom* argv, t_symbol* pp) {
+
+ if (s == &s_list || s == &s_float || s == &s_symbol ) {
+ int ac = argc + 1;
+ t_atom *av = (t_atom *)getbytes(ac*sizeof(t_atom));
+ tof_copy_atoms(argv,av+1,argc);
+ SETSYMBOL(av, pp);
+ outlet_list(outlet,&s_list,ac,av);
+ freebytes(av, ac*sizeof(t_atom));
+
+ //outlet_list(outlet,&s_list,argc,argv);
+ } else if (s == &s_bang ) {
+ t_atom a;
+ SETSYMBOL(&a,pp);
+ outlet_list(outlet,&s_list,1,&a);
+ } else {
+ int ac = argc + 2;
+ t_atom *av = (t_atom *)getbytes(ac*sizeof(t_atom));
+ tof_copy_atoms(argv,av+2,argc);
+ SETSYMBOL(av+1, s);
+ SETSYMBOL(av, pp);
+ outlet_list(outlet,&s_list,ac,av);
+ freebytes(av, ac*sizeof(t_atom));
+ //outlet_symbol(outlet,pp);
+ }
+}
+
static void tof_outlet_anything_prepend(t_outlet* outlet, t_symbol* s, int argc, t_atom* argv, t_symbol* pp) {
if (s == &s_list || s == &s_float || s == &s_symbol) {
@@ -269,7 +285,9 @@ static void tof_outlet_anything_prepend(t_outlet* outlet, t_symbol* s, int argc,
outlet_anything(outlet,pp,ac,av);
freebytes(av, ac*sizeof(t_atom));
} else {
- outlet_bang(outlet);
+ //t_atom a;
+ outlet_anything(outlet,pp,0,NULL);
+ //outlet_symbol(outlet,pp);
}
}
@@ -279,6 +297,9 @@ static void tof_send_anything_prepend(t_symbol* target,t_symbol* selector, int a
if (target->s_thing) {
if ( selector == &s_list || selector == &s_float || selector == &s_symbol ) {
typedmess(target->s_thing, prepend, ac, av);
+ } else if ( selector == &s_bang) {
+
+ typedmess(target->s_thing, prepend, 0, NULL);
} else {
int new_ac = ac + 1;
t_atom *new_av = getbytes(new_ac*sizeof(*new_av));
diff --git a/tof/gemwin+.pd b/tof/gemwin+.pd
index 11d6226..10540a6 100644
--- a/tof/gemwin+.pd
+++ b/tof/gemwin+.pd
@@ -31,12 +31,12 @@
#X connect 7 1 1 0;
#X restore -1 -203 pd CREATE&DESTROY;
#X obj -53 106 t b b b;
-#N canvas 5 95 1019 673 SETTINGS 0;
+#N canvas 1805 118 1097 759 SETTINGS 0;
#X obj 144 -139 inlet;
-#X obj 69 461 outlet;
-#X msg 274 199 frame \$1;
-#X msg 509 118 border \$1;
-#X msg 723 156 lighting \$1;
+#X obj 65 482 outlet;
+#X msg 270 220 frame \$1;
+#X msg 505 139 border \$1;
+#X msg 646 180 lighting \$1;
#N canvas 2 27 1022 686 dimen 0;
#X msg 73 494 dimen \$1 \$2;
#X obj 58 391 pack;
@@ -78,7 +78,7 @@
#X connect 17 0 19 1;
#X connect 18 0 2 0;
#X connect 19 0 3 0;
-#X restore 47 102 pd dimen;
+#X restore 43 123 pd dimen;
#N canvas 1096 133 1022 686 offset 0;
#X obj 102 258 pack;
#X obj 60 20 inlet;
@@ -99,46 +99,63 @@
#X connect 7 0 0 1;
#X connect 8 0 6 1;
#X connect 8 1 7 1;
-#X restore 178 113 pd offset;
-#X obj 218 -39 t b b b b b b;
-#X msg 620 319 FSAA \$1;
-#X obj 621 294 * 2;
-#X obj 563 -149 inlet;
-#X obj 505 85 f 1;
-#X obj 564 -96 route dimen offset fps border anti-aliasing lighting
-;
-#X obj 723 120 f 0;
-#X obj 623 269 f 0;
-#X obj 308 460 outlet w;
-#X obj 520 449 outlet h;
-#X obj 299 140 f 20;
+#X restore 174 134 pd offset;
+#X obj 214 -18 t b b b b b b;
+#X msg 616 340 FSAA \$1;
+#X obj 617 315 * 2;
+#X obj 693 -126 inlet;
+#X obj 501 106 f 1;
+#X obj 646 144 f 0;
+#X obj 619 290 f 0;
+#X obj 304 481 outlet w;
+#X obj 516 470 outlet h;
+#X obj 295 161 f 20;
+#X obj 694 -73 route dimen offset fps border anti-aliasing lighting
+color;
+#X obj 383 -137 inlet;
+#X obj 344 -53 route dimen offset fps border anti-aliasing lighting
+color;
+#X msg 814 181 color \$1 \$2 \$3;
+#X obj 814 145 list;
#X connect 0 0 7 0;
#X connect 2 0 1 0;
#X connect 3 0 1 0;
#X connect 4 0 1 0;
#X connect 5 0 1 0;
-#X connect 5 1 15 0;
-#X connect 5 2 16 0;
+#X connect 5 1 14 0;
+#X connect 5 2 15 0;
#X connect 6 0 1 0;
#X connect 7 0 5 0;
#X connect 7 1 6 0;
-#X connect 7 2 17 0;
+#X connect 7 2 16 0;
#X connect 7 3 11 0;
-#X connect 7 4 13 0;
-#X connect 7 5 14 0;
+#X connect 7 4 12 0;
+#X connect 7 5 13 0;
+#X connect 7 5 21 0;
#X connect 8 0 1 0;
#X connect 9 0 8 0;
-#X connect 10 0 12 0;
+#X connect 10 0 17 0;
#X connect 11 0 3 0;
-#X connect 12 0 5 1;
-#X connect 12 1 6 1;
-#X connect 12 2 17 1;
-#X connect 12 3 11 1;
-#X connect 12 4 14 1;
-#X connect 12 5 13 1;
-#X connect 13 0 4 0;
-#X connect 14 0 9 0;
-#X connect 17 0 2 0;
+#X connect 12 0 4 0;
+#X connect 13 0 9 0;
+#X connect 16 0 2 0;
+#X connect 17 0 5 1;
+#X connect 17 1 6 1;
+#X connect 17 2 16 1;
+#X connect 17 3 11 1;
+#X connect 17 4 13 1;
+#X connect 17 5 12 1;
+#X connect 17 6 21 1;
+#X connect 18 0 19 0;
+#X connect 19 0 5 1;
+#X connect 19 1 6 1;
+#X connect 19 2 16 0;
+#X connect 19 3 11 1;
+#X connect 19 4 13 1;
+#X connect 19 5 12 0;
+#X connect 19 6 21 0;
+#X connect 20 0 1 0;
+#X connect 21 0 20 0;
#X restore 217 81 pd SETTINGS;
#X obj -1 -305 route float bang;
#X msg 45 -273 1;
@@ -247,6 +264,6 @@
#X connect 22 0 0 0;
#X connect 23 0 4 0;
#X connect 24 0 14 3;
-#X connect 25 0 10 1;
+#X connect 25 0 10 2;
#X connect 26 0 19 0;
#X connect 26 1 14 0;
diff --git a/tof/listUnfold-help.pd b/tof/listUnfold-help.pd
index ba2085c..6ea93c9 100644
--- a/tof/listUnfold-help.pd
+++ b/tof/listUnfold-help.pd
@@ -1,33 +1,37 @@
-#N canvas 82 115 833 496 10;
-#X msg 103 285 anything works too;
-#X msg 91 258 symbol test;
+#N canvas 652 370 833 496 10;
+#X msg 103 315 anything works too;
+#X msg 91 288 symbol test;
#X obj 62 27 cnv 15 400 100 empty empty empty 20 12 0 14 -249661 -66577
0;
#X text 67 77 author: mrtoftrash@gmail.com;
-#X obj 100 362 tof/listUnfold;
-#X obj 464 358 tof/listUnfold wait;
-#X obj 493 309 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+#X obj 100 392 tof/listUnfold;
+#X obj 464 388 tof/listUnfold wait;
+#X obj 493 339 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X text 67 66 tags: lists;
-#X obj 100 388 print ATOM;
-#X obj 181 389 print INDEX;
-#X obj 464 384 print ATOM;
-#X obj 575 381 print INDEX;
-#X msg 60 229 list a b c d e f g;
-#X msg 464 282 list m n o p q r s t u v;
-#X text 468 263 step 1: add list;
-#X text 513 307 step 2: bang to output each element;
-#X obj 122 313 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+#X obj 100 418 print ATOM;
+#X obj 181 419 print INDEX;
+#X obj 464 414 print ATOM;
+#X obj 575 411 print INDEX;
+#X msg 60 259 list a b c d e f g;
+#X msg 464 312 list m n o p q r s t u v;
+#X text 468 293 step 1: add list;
+#X text 513 337 step 2: bang to output each element;
+#X obj 122 343 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
-#X text 147 312 bang to interrupt output;
-#X text 67 145 listUnfold has two modes:;
+#X text 147 342 bang to interrupt output;
+#X text 52 206 listUnfold has two modes:;
#X text 68 27 description: output the individual elements of a list
and their indices \, either immediately or on bangs.;
#X text 67 88 version: 2009-10-06 (added the second mode);
-#X text 56 199 default mode: output everything once it is received.
+#X text 56 229 default mode: output everything once it is received.
;
-#X text 428 196 "wait" or "manually" mode: output one element for every
+#X text 428 226 "wait" or "manually" mode: output one element for every
bang .;
+#X obj 61 133 cnv 15 400 30 empty empty empty 20 12 0 14 -261234 -66577
+0;
+#X text 69 139 listUnfold is depracated. Please use list_unfold instead.
+;
#X connect 0 0 4 0;
#X connect 1 0 4 0;
#X connect 4 0 8 0;
diff --git a/tof/list_accum-help.pd b/tof/list_accum-help.pd
new file mode 100644
index 0000000..9e912db
--- /dev/null
+++ b/tof/list_accum-help.pd
@@ -0,0 +1,32 @@
+#N canvas 341 299 626 427 10;
+#X obj 62 27 cnv 15 400 100 empty empty empty 20 12 0 14 -249661 -66577
+0;
+#X text 67 77 author: mrtoftrash@gmail.com;
+#X text 67 66 tags: lists;
+#X text 67 88 version: 2009-10-06 (added the second mode);
+#X text 68 27 description: accumulates anything into a big list. Outputs
+the list on a bang.;
+#X obj 91 283 tof/list_accum;
+#X msg 112 218 1 2 3 4 5 6;
+#X obj 90 146 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 89 348 print;
+#X floatatom 104 191 5 0 0 0 - - -;
+#X msg 194 218 a b c d;
+#X obj 206 254 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 175 316 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X text 148 195 Inlet 1 \, anything: Accumulate atoms;
+#X text 227 254 Inlet 2 \, bang: Clear accumulated atoms;
+#X text 111 145 Inlet 1 \, bang: Output and clear accumulated atoms
+;
+#X text 195 314 Outlet 2 \, bang: Nothing accumulated (empty);
+#X text 128 348 Outlet 1 \, list: Accumulated atoms;
+#X connect 5 0 8 0;
+#X connect 5 1 12 0;
+#X connect 6 0 5 0;
+#X connect 7 0 5 0;
+#X connect 9 0 5 0;
+#X connect 10 0 5 0;
+#X connect 11 0 5 1;
diff --git a/tof/list_unfold-help.pd b/tof/list_unfold-help.pd
new file mode 100644
index 0000000..c8393bc
--- /dev/null
+++ b/tof/list_unfold-help.pd
@@ -0,0 +1,40 @@
+#N canvas 523 229 833 496 10;
+#X msg 103 285 anything works too;
+#X msg 91 258 symbol test;
+#X obj 62 27 cnv 15 400 100 empty empty empty 20 12 0 14 -249661 -66577
+0;
+#X text 67 77 author: mrtoftrash@gmail.com;
+#X obj 493 309 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X text 67 66 tags: lists;
+#X obj 100 388 print ATOM;
+#X obj 181 389 print INDEX;
+#X obj 464 384 print ATOM;
+#X obj 575 381 print INDEX;
+#X msg 60 229 list a b c d e f g;
+#X msg 464 282 list m n o p q r s t u v;
+#X text 468 263 step 1: add list;
+#X text 513 307 step 2: bang to output each element;
+#X obj 122 313 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X text 147 312 bang to interrupt output;
+#X text 68 27 description: output the individual elements of a list
+and their indices \, either immediately or on bangs.;
+#X text 67 88 version: 2009-10-06 (added the second mode);
+#X text 56 199 default mode: output everything once it is received.
+;
+#X text 428 196 "wait" or "manually" mode: output one element for every
+bang .;
+#X text 67 145 list_unfold has two modes:;
+#X obj 100 362 tof/list_unfold;
+#X obj 464 358 tof/list_unfold wait;
+#X connect 0 0 21 0;
+#X connect 1 0 21 0;
+#X connect 4 0 22 0;
+#X connect 10 0 21 0;
+#X connect 11 0 22 0;
+#X connect 14 0 21 0;
+#X connect 21 0 6 0;
+#X connect 21 1 7 0;
+#X connect 22 0 8 0;
+#X connect 22 1 9 0;
diff --git a/tof/openHelp-help.pd b/tof/openHelp-help.pd
index a040736..192db1e 100644
--- a/tof/openHelp-help.pd
+++ b/tof/openHelp-help.pd
@@ -1,4 +1,4 @@
-#N canvas 125 137 619 503 10;
+#N canvas 829 167 619 503 10;
#X msg 77 213 symbol list;
#X msg 157 247 symbol until;
#X obj -1 29 cnv 15 400 100 empty empty empty 20 12 0 14 -249661 -66577
@@ -10,6 +10,10 @@ help file and tries to open it.;
#X text 4 106 version: 2009-09-25;
#X text 3 65 tags: file patch;
#X obj 77 340 tof/openHelp;
+#X obj 2 135 cnv 15 400 30 empty empty empty 20 12 0 14 -261234 -66577
+0;
+#X text 10 141 openHelp is depracated. Please use open_help instead.
+;
#X connect 0 0 8 0;
#X connect 1 0 8 0;
#X connect 4 0 8 0;
diff --git a/tof/open_help-help.pd b/tof/open_help-help.pd
new file mode 100644
index 0000000..991d5c8
--- /dev/null
+++ b/tof/open_help-help.pd
@@ -0,0 +1,15 @@
+#N canvas 125 137 619 503 10;
+#X msg 77 213 symbol list;
+#X msg 157 247 symbol until;
+#X obj -1 29 cnv 15 400 100 empty empty empty 20 12 0 14 -249661 -66577
+0;
+#X text 4 85 author: mrtoftrash@gmail.com;
+#X msg 178 298 symbol zexy/list2symbol;
+#X text 4 28 description: searches for an external's or an abstraction's
+help file and tries to open it.;
+#X text 4 106 version: 2009-09-25;
+#X text 3 65 tags: file patch;
+#X obj 77 340 tof/open_help;
+#X connect 0 0 8 0;
+#X connect 1 0 8 0;
+#X connect 4 0 8 0;
diff --git a/tof/sample.pd b/tof/sample.pd
index 0c8f9b9..345a1c3 100644
--- a/tof/sample.pd
+++ b/tof/sample.pd
@@ -1,7 +1,6 @@
-#N canvas 1213 378 467 220 10;
-#N canvas 809 168 871 665 guts 0;
-#X obj 182 257 soundfiler;
-#X msg 139 232 read -resize \$1 0-\$2 1-\$2;
+#N canvas 1212 405 467 220 10;
+#N canvas 808 195 871 665 guts 0;
+#X obj 189 294 soundfiler;
#X obj 138 180 list append \$1;
#X obj 104 117 iemlib/soundfile_info;
#X obj 25 -33 inlet;
@@ -15,7 +14,6 @@
#X obj 305 -44 loadbang;
#X obj 266 168 == 1;
#X obj 138 205 zexy/demultiplex 0 1;
-#X msg 307 233 read -resize \$1 0-\$2;
#X obj 287 193 t f f;
#X obj 73 241 t b f b;
#X obj 126 331 symbol \$1;
@@ -88,77 +86,81 @@
#X obj 25 5 route return read bang;
#X obj 170 -34 openpanel;
#X msg 176 -9 read \$1;
-#X connect 0 0 41 4;
-#X connect 0 0 41 6;
-#X connect 1 0 0 0;
-#X connect 2 0 14 0;
-#X connect 3 0 6 0;
-#X connect 4 0 48 0;
-#X connect 5 0 48 0;
-#X connect 6 0 17 0;
-#X connect 6 1 2 0;
-#X connect 6 1 41 1;
-#X connect 6 4 13 0;
-#X connect 6 4 41 3;
-#X connect 7 0 10 0;
-#X connect 8 0 3 0;
-#X connect 9 0 7 0;
-#X connect 9 1 10 1;
-#X connect 11 0 9 0;
-#X connect 12 0 31 0;
-#X connect 13 0 16 0;
-#X connect 14 0 1 0;
-#X connect 14 1 15 0;
-#X connect 15 0 0 0;
-#X connect 16 0 14 1;
-#X connect 17 1 41 0;
-#X connect 17 2 18 0;
-#X connect 18 0 41 2;
-#X connect 23 0 24 0;
-#X connect 24 0 46 0;
-#X connect 24 1 29 0;
-#X connect 25 0 30 0;
-#X connect 26 0 25 1;
-#X connect 26 0 33 2;
-#X connect 28 0 33 0;
-#X connect 29 0 25 0;
-#X connect 29 1 33 1;
-#X connect 30 0 28 0;
-#X connect 30 1 34 0;
-#X connect 31 0 23 0;
-#X connect 31 1 26 0;
-#X connect 31 2 32 0;
-#X connect 32 0 33 3;
-#X connect 32 0 35 0;
-#X connect 33 0 42 0;
-#X connect 34 0 36 0;
-#X connect 34 1 27 0;
-#X connect 35 0 34 1;
+#X obj 189 263 cyclone/prepend read -resize -maxsize 2e+09;
+#X msg 145 232 \$1 0-\$2 1-\$2;
+#X msg 307 233 \$1 0-\$2;
+#X connect 0 0 39 4;
+#X connect 0 0 39 6;
+#X connect 1 0 13 0;
+#X connect 2 0 5 0;
+#X connect 3 0 46 0;
+#X connect 4 0 46 0;
+#X connect 5 0 15 0;
+#X connect 5 1 1 0;
+#X connect 5 1 39 1;
+#X connect 5 4 12 0;
+#X connect 5 4 39 3;
+#X connect 6 0 9 0;
+#X connect 7 0 2 0;
+#X connect 8 0 6 0;
+#X connect 8 1 9 1;
+#X connect 10 0 8 0;
+#X connect 11 0 29 0;
+#X connect 12 0 14 0;
+#X connect 13 0 50 0;
+#X connect 13 1 51 0;
+#X connect 14 0 13 1;
+#X connect 15 1 39 0;
+#X connect 15 2 16 0;
+#X connect 16 0 39 2;
+#X connect 21 0 22 0;
+#X connect 22 0 44 0;
+#X connect 22 1 27 0;
+#X connect 23 0 28 0;
+#X connect 24 0 23 1;
+#X connect 24 0 31 2;
+#X connect 26 0 31 0;
+#X connect 27 0 23 0;
+#X connect 27 1 31 1;
+#X connect 28 0 26 0;
+#X connect 28 1 32 0;
+#X connect 29 0 21 0;
+#X connect 29 1 24 0;
+#X connect 29 2 30 0;
+#X connect 30 0 31 3;
+#X connect 30 0 33 0;
+#X connect 31 0 40 0;
+#X connect 32 0 34 0;
+#X connect 32 1 25 0;
+#X connect 33 0 32 1;
+#X connect 37 0 39 0;
+#X connect 37 1 39 1;
+#X connect 37 2 39 2;
+#X connect 37 3 39 3;
+#X connect 37 4 39 4;
+#X connect 37 5 39 5;
+#X connect 37 6 39 6;
+#X connect 39 0 6 1;
#X connect 39 0 41 0;
-#X connect 39 1 41 1;
-#X connect 39 2 41 2;
-#X connect 39 3 41 3;
-#X connect 39 4 41 4;
-#X connect 39 5 41 5;
-#X connect 39 6 41 6;
-#X connect 41 0 7 1;
-#X connect 41 0 43 0;
-#X connect 42 0 41 0;
-#X connect 43 0 19 0;
-#X connect 43 1 20 0;
-#X connect 43 2 21 0;
-#X connect 43 3 44 0;
-#X connect 43 4 22 0;
-#X connect 43 5 37 0;
-#X connect 43 6 38 0;
-#X connect 46 0 8 0;
-#X connect 47 0 46 0;
-#X connect 48 0 11 0;
-#X connect 48 1 47 0;
-#X connect 48 2 49 0;
-#X connect 48 3 39 0;
-#X connect 49 0 50 0;
-#X connect 50 0 48 0;
+#X connect 40 0 39 0;
+#X connect 41 0 17 0;
+#X connect 41 1 18 0;
+#X connect 41 2 19 0;
+#X connect 41 3 42 0;
+#X connect 41 4 20 0;
+#X connect 41 5 35 0;
+#X connect 41 6 36 0;
+#X connect 44 0 7 0;
+#X connect 45 0 44 0;
+#X connect 46 0 10 0;
+#X connect 46 1 45 0;
+#X connect 46 2 47 0;
+#X connect 46 3 37 0;
+#X connect 47 0 48 0;
+#X connect 48 0 46 0;
+#X connect 49 0 0 0;
+#X connect 50 0 49 0;
+#X connect 51 0 49 0;
#X restore 23 -20 pd guts;
#X obj 23 -45 inlet;
#X text 302 -15 Tables (click to view);
diff --git a/tof/sample_play~.pd b/tof/sample_play~.pd
index ad61917..97fd07b 100644
--- a/tof/sample_play~.pd
+++ b/tof/sample_play~.pd
@@ -6,14 +6,14 @@
#X obj 456 639 outlet~ progress;
#X obj 578 624 outlet done;
#X obj 46 247 zexy/demultiplex;
-#N canvas 749 239 931 714 voice 0;
+#N canvas 749 170 931 714 voice 1;
#X obj 111 254 *~ 0;
#X obj 106 373 tabread4~;
-#X obj 207 388 tabread4~;
+#X obj 226 377 tabread4~;
#X obj 101 434 *~;
#X obj 217 441 *~;
#X obj 112 309 +~ 0;
-#N canvas 326 193 914 687 player 0;
+#N canvas 326 193 914 687 player 1;
#X obj 91 29 inlet bang;
#X obj 253 38 inlet float;
#X obj 388 34 inlet pitch;
@@ -60,7 +60,6 @@
#X obj 378 178 t b b b;
#X obj 94 107 t b b b;
#X obj 72 211 f 0;
-#X obj 75 249 sig~ 0;
#X obj 354 336 delay 5;
#X obj 432 243 t b b b;
#X msg 450 289 stop;
@@ -70,6 +69,7 @@
#X obj 254 414 t b b b;
#X msg 345 416 0;
#X msg 651 267 256 \$1;
+#X obj 75 250 f;
#X connect 0 0 34 0;
#X connect 1 0 10 0;
#X connect 2 0 11 1;
@@ -81,11 +81,11 @@
#X connect 6 0 14 0;
#X connect 7 0 14 0;
#X connect 8 0 17 0;
-#X connect 9 0 36 0;
-#X connect 10 0 40 0;
+#X connect 9 0 45 0;
+#X connect 10 0 39 0;
#X connect 10 1 33 0;
#X connect 11 0 5 1;
-#X connect 12 0 43 0;
+#X connect 12 0 42 0;
#X connect 13 0 12 1;
#X connect 14 0 5 2;
#X connect 14 1 13 0;
@@ -97,7 +97,7 @@
#X connect 21 0 23 0;
#X connect 22 0 21 0;
#X connect 22 1 23 1;
-#X connect 23 0 45 0;
+#X connect 23 0 44 0;
#X connect 24 1 25 0;
#X connect 25 0 22 0;
#X connect 26 0 27 0;
@@ -110,26 +110,26 @@
#X connect 32 0 18 0;
#X connect 33 0 4 0;
#X connect 33 1 6 0;
-#X connect 33 2 38 0;
+#X connect 33 2 37 0;
#X connect 34 0 11 0;
#X connect 34 1 7 0;
-#X connect 34 2 38 0;
-#X connect 35 0 36 0;
-#X connect 36 0 5 0;
-#X connect 37 0 9 0;
-#X connect 38 0 35 0;
-#X connect 38 1 39 0;
-#X connect 38 2 8 0;
-#X connect 39 0 37 0;
-#X connect 40 0 37 0;
-#X connect 40 1 41 0;
-#X connect 41 0 17 0;
-#X connect 42 0 16 0;
-#X connect 43 0 19 0;
-#X connect 43 1 42 0;
-#X connect 43 2 44 0;
-#X connect 44 0 36 0;
-#X connect 45 0 26 0;
+#X connect 34 2 37 0;
+#X connect 35 0 45 0;
+#X connect 36 0 9 0;
+#X connect 37 0 35 0;
+#X connect 37 1 38 0;
+#X connect 37 2 8 0;
+#X connect 38 0 36 0;
+#X connect 39 0 36 0;
+#X connect 39 1 40 0;
+#X connect 40 0 17 0;
+#X connect 41 0 16 0;
+#X connect 42 0 19 0;
+#X connect 42 1 41 0;
+#X connect 42 2 43 0;
+#X connect 43 0 45 0;
+#X connect 44 0 26 0;
+#X connect 45 0 5 0;
#X restore 149 146 pd player;
#X msg 361 290 set \$1;
#X msg 426 295 set \$1;
@@ -210,7 +210,7 @@
#X obj 119 124 sel 0;
#X msg 81 221 0;
#X obj 77 187 s \$0voice;
-#X obj 75 166 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
+#X obj 75 166 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 138 224 r \$0voice;
#X obj 513 554 r \$0voice;
@@ -374,7 +374,6 @@
#X obj 378 178 t b b b;
#X obj 94 107 t b b b;
#X obj 72 211 f 0;
-#X obj 75 249 sig~ 0;
#X obj 354 336 delay 5;
#X obj 432 243 t b b b;
#X msg 450 289 stop;
@@ -384,6 +383,7 @@
#X obj 254 414 t b b b;
#X msg 345 416 0;
#X msg 651 267 256 \$1;
+#X obj 75 249 f;
#X connect 0 0 34 0;
#X connect 1 0 10 0;
#X connect 2 0 11 1;
@@ -395,11 +395,11 @@
#X connect 6 0 14 0;
#X connect 7 0 14 0;
#X connect 8 0 17 0;
-#X connect 9 0 36 0;
-#X connect 10 0 40 0;
+#X connect 9 0 45 0;
+#X connect 10 0 39 0;
#X connect 10 1 33 0;
#X connect 11 0 5 1;
-#X connect 12 0 43 0;
+#X connect 12 0 42 0;
#X connect 13 0 12 1;
#X connect 14 0 5 2;
#X connect 14 1 13 0;
@@ -411,7 +411,7 @@
#X connect 21 0 23 0;
#X connect 22 0 21 0;
#X connect 22 1 23 1;
-#X connect 23 0 45 0;
+#X connect 23 0 44 0;
#X connect 24 1 25 0;
#X connect 25 0 22 0;
#X connect 26 0 27 0;
@@ -424,26 +424,26 @@
#X connect 32 0 18 0;
#X connect 33 0 4 0;
#X connect 33 1 6 0;
-#X connect 33 2 38 0;
+#X connect 33 2 37 0;
#X connect 34 0 11 0;
#X connect 34 1 7 0;
-#X connect 34 2 38 0;
-#X connect 35 0 36 0;
-#X connect 36 0 5 0;
-#X connect 37 0 9 0;
-#X connect 38 0 35 0;
-#X connect 38 1 39 0;
-#X connect 38 2 8 0;
-#X connect 39 0 37 0;
-#X connect 40 0 37 0;
-#X connect 40 1 41 0;
-#X connect 41 0 17 0;
-#X connect 42 0 16 0;
-#X connect 43 0 19 0;
-#X connect 43 1 42 0;
-#X connect 43 2 44 0;
-#X connect 44 0 36 0;
-#X connect 45 0 26 0;
+#X connect 34 2 37 0;
+#X connect 35 0 45 0;
+#X connect 36 0 9 0;
+#X connect 37 0 35 0;
+#X connect 37 1 38 0;
+#X connect 37 2 8 0;
+#X connect 38 0 36 0;
+#X connect 39 0 36 0;
+#X connect 39 1 40 0;
+#X connect 40 0 17 0;
+#X connect 41 0 16 0;
+#X connect 42 0 19 0;
+#X connect 42 1 41 0;
+#X connect 42 2 43 0;
+#X connect 43 0 45 0;
+#X connect 44 0 26 0;
+#X connect 45 0 5 0;
#X restore 149 146 pd player;
#X msg 361 290 set \$1;
#X msg 426 295 set \$1;