aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas O Fredericks <mrtof@users.sourceforge.net>2009-10-01 15:47:28 +0000
committerThomas O Fredericks <mrtof@users.sourceforge.net>2009-10-01 15:47:28 +0000
commit0efb9908a5930c4d3fb9aa796d79b0c4b4fde6a4 (patch)
treea56d3255a78487e0abd63b3d51b5be888150802c
parent1b0c060a98575bb8d1d793d49c4be8baa21608ff (diff)
Added a reset inlet to increment
svn path=/trunk/externals/tof/; revision=12507
-rw-r--r--help/increment-help.pd24
-rw-r--r--src/increment.c3
2 files changed, 17 insertions, 10 deletions
diff --git a/help/increment-help.pd b/help/increment-help.pd
index d7fb6ed..3efa96c 100644
--- a/help/increment-help.pd
+++ b/help/increment-help.pd
@@ -5,22 +5,22 @@
#X text 27 22 version: 2009-05-07 (initial release);
#X msg 101 166 3;
#X msg 62 166 6;
-#X obj 291 328 print;
+#X obj 306 347 print;
#X text 27 -24 description: increment a number.;
#X text 28 0 tags: flow counter;
-#X obj 27 216 increment;
-#X msg 147 199 1;
-#X msg 179 199 -1;
+#X obj 27 251 increment;
+#X msg 134 182 1;
+#X msg 166 182 -1;
#X obj 27 120 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
-#X obj 27 244 print;
-#X obj 290 268 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+#X obj 27 279 print;
+#X obj 305 287 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
-#X obj 291 297 increment 10 3;
+#X obj 306 316 increment 10 3;
#X text 22 89 First inlet:;
#X text 22 100 Bang: Outputs and increments the value.;
#X text 60 147 Second inlet: sets the value;
-#X text 148 179 Third inlet: sets the step(incrementation) amount;
+#X text 135 162 Third inlet: sets the step(incrementation) amount;
#X obj 49 479 print;
#X obj 49 321 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
@@ -28,12 +28,15 @@
#X msg 96 376 step 5;
#X msg 125 402 reset;
#X obj 49 448 increment 10 3;
-#X text 283 229 Argument 1: start value (defaults to 0);
-#X text 283 244 Argument 2: step(incrementation) value (defaults to
+#X text 298 248 Argument 1: start value (defaults to 0);
+#X text 298 263 Argument 2: step(incrementation) value (defaults to
1);
#X text 118 349 Set the start value;
#X text 144 376 Set the step value;
#X text 171 400 Reset to the start value;
+#X obj 166 211 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X text 188 205 Fourth inlet: resets;
#X connect 3 0 8 1;
#X connect 4 0 8 1;
#X connect 8 0 12 0;
@@ -47,3 +50,4 @@
#X connect 22 0 24 0;
#X connect 23 0 24 0;
#X connect 24 0 19 0;
+#X connect 30 0 8 3;
diff --git a/src/increment.c b/src/increment.c
index 25e7924..b5a8a59 100644
--- a/src/increment.c
+++ b/src/increment.c
@@ -119,6 +119,9 @@ void *increment_new(t_symbol *s, int argc, t_atom *argv)
floatinlet_new(&x->x_obj, &x->inc);
+ inlet_new(&x->x_obj, &x->x_obj.ob_pd,
+ gensym("bang"), gensym("reset"));
+
x->outlet1 = outlet_new(&x->x_obj, &s_float);
//x->outlet2 = outlet_new(&x->x_obj, &s_float);