aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debounce-help.pd45
-rw-r--r--debounce.pd28
2 files changed, 73 insertions, 0 deletions
diff --git a/debounce-help.pd b/debounce-help.pd
new file mode 100644
index 0000000..8f86f91
--- /dev/null
+++ b/debounce-help.pd
@@ -0,0 +1,45 @@
+#N canvas 429 170 470 540 10;
+#X obj 2 2 cnv 15 450 20 empty empty [debounce] 2 11 1 18 -233017 -66577
+0;
+#X obj 418 3 pddp;
+#X text 234 467 released under the GNU GPL;
+#X text 17 486 $Revision: 1.1 $$Date: 2006-01-17 05:07:45 $;
+#X text 18 499 $Author: eighthave $;
+#X text 17 453 (C) Copyright 2005 Hans-Christoph Steiner <hans@at.or.at>
+;
+#X obj 122 78 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
+-1;
+#X obj 123 102 t b b;
+#X obj 123 142 delay;
+#X obj 63 121 bang;
+#X obj 122 202 tgl 35 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
+1;
+#X floatatom 166 203 5 0 0 0 - - -;
+#X obj 122 271 tgl 35 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
+1;
+#X obj 123 166 random 2;
+#X msg 85 78 stop;
+#X obj 244 211 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 240 277 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X text 26 387 Right now \, it handles "floats" and "bangs". Everything
+else is converted to a "bang".;
+#X obj 152 122 random 1000;
+#X obj 237 247 debounce 900;
+#X obj 122 246 debounce 900;
+#X connect 6 0 7 0;
+#X connect 7 0 8 0;
+#X connect 7 1 18 0;
+#X connect 8 0 9 0;
+#X connect 8 0 13 0;
+#X connect 8 0 15 0;
+#X connect 9 0 7 0;
+#X connect 10 0 20 0;
+#X connect 13 0 10 0;
+#X connect 13 0 11 0;
+#X connect 14 0 8 0;
+#X connect 15 0 19 0;
+#X connect 18 0 8 1;
+#X connect 19 0 16 0;
+#X connect 20 0 12 0;
diff --git a/debounce.pd b/debounce.pd
new file mode 100644
index 0000000..09092c3
--- /dev/null
+++ b/debounce.pd
@@ -0,0 +1,28 @@
+#N canvas 132 316 478 432 10;
+#X obj 38 43 inlet;
+#X obj 252 108 f \$1;
+#X obj 252 85 loadbang;
+#X obj 226 33 inlet;
+#X obj 251 132 select 0;
+#X text 274 34 delay between state change;
+#X obj 62 381 outlet;
+#X obj 61 325 f;
+#X text 298 152 set default;
+#X obj 246 189 send \$0-delay;
+#X obj 157 271 delay;
+#X obj 187 248 receive \$0-delay;
+#X text 80 31 float input;
+#X text 120 378 debounced float output;
+#X msg 250 152 10;
+#X obj 100 103 change;
+#X connect 0 0 7 1;
+#X connect 0 0 15 0;
+#X connect 1 0 4 0;
+#X connect 2 0 1 0;
+#X connect 3 0 9 0;
+#X connect 4 0 14 0;
+#X connect 4 1 9 0;
+#X connect 7 0 6 0;
+#X connect 10 0 7 0;
+#X connect 11 0 10 1;
+#X connect 14 0 9 0;