aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autoscale.pd211
-rw-r--r--help/autoscale-help.pd58
2 files changed, 167 insertions, 102 deletions
diff --git a/autoscale.pd b/autoscale.pd
index 5e1563c..c04649c 100644
--- a/autoscale.pd
+++ b/autoscale.pd
@@ -1,82 +1,143 @@
-#N canvas 348 266 816 509 10;
+#N canvas 133 257 749 460 10;
#X obj 5 20 inlet;
-#X obj 77 433 outlet;
-#X text 135 318 min;
-#X text 262 319 max;
-#X obj 97 295 moses 0;
-#X obj 222 295 moses 0;
-#X obj 77 92 trigger float float float bang bang;
-#X obj 77 380 expr (($f1 - $f2) * (($f5 - $f4) / ($f3 - $f2))) + $f4
+#X obj 77 373 outlet;
+#X obj 77 152 trigger float float float bang bang;
+#X obj 77 320 expr (($f1 - $f2) * (($f5 - $f4) / ($f3 - $f2))) + $f4
;
-#X obj 286 319 + 1e-09;
-#X obj 408 78 loadbang;
-#X text 2 456 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at>
+#X text 2 406 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at>
;
-#X text 219 471 released under the GNU GPL;
-#X text 417 455 $Revision: 1.3 $$Date: 2006-07-07 04:08:55 $;
-#X text 417 468 $Author: eighthave $;
+#X text 219 421 released under the GNU GPL;
+#X text 417 405 $Revision: 1.4 $$Date: 2006-12-23 06:24:58 $;
+#X text 417 418 $Author: eighthave $;
#X obj 5 60 route reset;
-#X obj 17 156 bang;
-#X msg 17 219 0;
-#X obj 356 319 expr if ($f1 == $f2 \, 0 \, $f1) \; if ($f1 == $f2 \,
-1 \, $f2);
-#X obj 266 276 float;
-#X obj 97 318 float;
-#X obj 141 276 float;
-#X obj 356 20 inlet;
-#X obj 555 20 inlet;
-#X text 396 21 output min;
-#X text 601 20 output max;
+#X obj 355 20 inlet;
+#X obj 456 20 inlet;
+#X text 362 36 output min;
+#X text 463 36 output max;
#X text 44 21 data to be scaled;
-#X obj 228 216 purepd/once;
-#X obj 103 216 purepd/once;
-#X obj 222 156 trigger 0 bang 0;
-#X obj 97 156 trigger 0 bang 0;
-#X text 195 407 ^-- these [purepd/once] bits are just here to get the
+#X obj 589 20 inlet reset;
+#N canvas 0 22 454 304 output 0;
+#X obj 32 24 inlet;
+#X obj 334 24 inlet;
+#X obj 22 273 outlet;
+#X obj 338 274 outlet;
+#X text 78 273 min;
+#X text 74 25 min;
+#X text 380 26 max;
+#X text 386 274 max;
+#X obj 69 54 loadbang;
+#X obj 37 167 expr if ($f1 == $f2 \, 0 \, $f1) \; if ($f1 == $f2 \,
+1 \, $f2);
+#X obj 235 135 purepd/float_argument \$2 1;
+#X obj 69 77 trigger 0 bang;
+#X text 183 76 [float_argument] doesn't output 0 on;
+#X text 183 88 bang \, so send the 0 here.;
+#X obj 37 135 purepd/float_argument \$1 0;
+#X connect 0 0 14 0;
+#X connect 1 0 10 0;
+#X connect 8 0 11 0;
+#X connect 9 0 2 0;
+#X connect 9 1 3 0;
+#X connect 10 0 9 1;
+#X connect 11 0 14 0;
+#X connect 11 1 10 0;
+#X connect 14 0 9 0;
+#X restore 356 292 pd output range;
+#N canvas 463 201 461 355 track 0;
+#X obj 161 31 inlet;
+#X obj 38 285 outlet;
+#X text 75 239 min;
+#X text 202 240 max;
+#X obj 37 216 moses 0;
+#X obj 162 216 moses 0;
+#X obj 226 240 + 1e-09;
+#X obj 317 76 bang;
+#X msg 317 139 0;
+#X obj 206 197 float;
+#X obj 37 239 float;
+#X obj 81 197 float;
+#X obj 168 137 purepd/once;
+#X obj 43 137 purepd/once;
+#X obj 162 77 trigger 0 bang 0;
+#X obj 37 77 trigger 0 bang 0;
+#X obj 369 24 inlet;
+#X obj 225 284 outlet;
+#X obj 34 31 inlet;
+#X text 25 309 ^-- these [purepd/once] bits are just here to get the
max/min tracking started;
-#X obj 695 20 inlet reset;
-#X obj 554 157 purepd/float_argument \$2 1;
-#X obj 408 101 trigger 0 bang;
-#X text 522 100 [float_argument] doesn't output 0 on;
-#X text 522 112 bang \, so send the 0 here.;
-#X obj 356 157 purepd/float_argument \$1 0;
#X connect 0 0 14 0;
-#X connect 4 0 19 0;
-#X connect 5 1 8 0;
-#X connect 6 0 7 0;
-#X connect 6 1 29 0;
-#X connect 6 2 28 0;
-#X connect 6 3 36 0;
-#X connect 6 4 32 0;
-#X connect 7 0 1 0;
-#X connect 8 0 5 1;
-#X connect 8 0 7 2;
-#X connect 9 0 33 0;
-#X connect 14 0 15 0;
-#X connect 14 1 6 0;
-#X connect 15 0 16 0;
-#X connect 15 0 26 1;
-#X connect 15 0 27 1;
-#X connect 16 0 18 0;
-#X connect 16 0 19 0;
-#X connect 17 0 7 3;
-#X connect 17 1 7 4;
-#X connect 18 0 5 1;
-#X connect 19 0 4 1;
-#X connect 19 0 7 1;
-#X connect 20 0 4 1;
-#X connect 21 0 36 0;
-#X connect 22 0 32 0;
-#X connect 26 0 18 0;
-#X connect 27 0 20 0;
-#X connect 28 0 5 0;
-#X connect 28 1 26 0;
-#X connect 28 2 18 1;
-#X connect 29 0 4 0;
-#X connect 29 1 27 0;
-#X connect 29 2 20 1;
-#X connect 31 0 15 0;
-#X connect 32 0 17 1;
-#X connect 33 0 36 0;
-#X connect 33 1 32 0;
-#X connect 36 0 17 0;
+#X connect 4 0 10 0;
+#X connect 5 1 6 0;
+#X connect 6 0 5 1;
+#X connect 6 0 17 0;
+#X connect 7 0 8 0;
+#X connect 7 0 12 1;
+#X connect 7 0 13 1;
+#X connect 8 0 9 0;
+#X connect 8 0 10 0;
+#X connect 9 0 5 1;
+#X connect 10 0 4 1;
+#X connect 10 0 1 0;
+#X connect 11 0 4 1;
+#X connect 12 0 9 0;
+#X connect 13 0 11 0;
+#X connect 14 0 5 0;
+#X connect 14 1 12 0;
+#X connect 14 2 9 1;
+#X connect 15 0 4 0;
+#X connect 15 1 13 0;
+#X connect 15 2 11 1;
+#X connect 16 0 7 0;
+#X connect 18 0 15 0;
+#X restore 156 292 pd track changes;
+#X obj 335 152 trigger float bang bang;
+#N canvas 634 182 462 312 gate 0;
+#X obj 76 39 inlet;
+#X obj 74 268 outlet;
+#X obj 316 266 outlet;
+#X obj 323 37 inlet;
+#X msg 345 175 0;
+#X msg 374 175 1;
+#X obj 77 204 spigot 1;
+#X obj 316 204 spigot 0;
+#X msg 105 175 0;
+#X msg 134 175 1;
+#X obj 243 70 select 1 0;
+#X connect 0 0 6 0;
+#X connect 0 0 7 0;
+#X connect 3 0 10 0;
+#X connect 4 0 7 1;
+#X connect 5 0 7 1;
+#X connect 6 0 1 0;
+#X connect 7 0 2 0;
+#X connect 8 0 6 1;
+#X connect 9 0 6 1;
+#X connect 10 0 4 0;
+#X connect 10 0 9 0;
+#X connect 10 1 5 0;
+#X connect 10 1 8 0;
+#X restore 77 110 pd gate;
+#X obj 589 39 route float bang;
+#X connect 0 0 8 0;
+#X connect 2 0 3 0;
+#X connect 2 1 16 0;
+#X connect 2 2 16 1;
+#X connect 2 3 15 0;
+#X connect 2 4 15 1;
+#X connect 3 0 1 0;
+#X connect 8 0 16 2;
+#X connect 8 1 18 0;
+#X connect 9 0 15 0;
+#X connect 10 0 15 1;
+#X connect 14 0 19 0;
+#X connect 15 0 3 3;
+#X connect 15 1 3 4;
+#X connect 16 0 3 1;
+#X connect 16 1 3 2;
+#X connect 17 0 3 0;
+#X connect 17 1 15 0;
+#X connect 17 2 15 1;
+#X connect 18 0 2 0;
+#X connect 18 1 17 0;
+#X connect 19 0 18 1;
+#X connect 19 1 16 2;
diff --git a/help/autoscale-help.pd b/help/autoscale-help.pd
index 7a8a80d..9e6e7b3 100644
--- a/help/autoscale-help.pd
+++ b/help/autoscale-help.pd
@@ -1,4 +1,4 @@
-#N canvas 229 80 464 532 10;
+#N canvas 229 80 470 526 10;
#X floatatom 26 76 5 0 0 0 - - -;
#X floatatom 26 140 0 0 0 0 - - -;
#X obj 2 -10 cnv 15 450 20 empty empty [autoscale] 2 11 1 18 -233017
@@ -9,44 +9,48 @@ range set as arguments \, and an input range which is set dynamically.
#X floatatom 177 244 5 0 0 1 min - -;
#X obj 161 301 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 0 1;
-#X text 17 441 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at>
-;
-#X text 234 455 released under the GNU GPL;
+#X text 221 465 released under the GNU GPL;
#X floatatom 150 140 0 0 0 0 - - -;
#X floatatom 297 140 0 0 0 0 - - -;
#X obj 213 71 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 0 1;
-#X text 17 474 $Revision: 1.3 $$Date: 2006-07-07 04:08:55 $;
-#X text 18 487 $Author: eighthave $;
+#X text 4 484 $Revision: 1.4 $$Date: 2006-12-23 06:24:59 $;
+#X text 316 484 $Author: eighthave $;
#X floatatom 136 363 5 0 0 0 - - -;
#X obj 161 416 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144
--1 -1 12700 1;
+-1 -1 9358 1;
#X msg 186 361 reset;
#X text 13 181 If you use [autoscale] with no arguments \, then the
output range defaults to 0-1.;
-#X text 25 329 The [reset( message or banging the 4th inlet resets
-the stored max and min to zero.;
#X msg 239 361 bang;
-#X obj 26 110 autoscale;
#X obj 158 393 autoscale;
-#X obj 158 278 autoscale;
-#X obj 150 110 autoscale -0.01 0.01;
-#X obj 297 110 autoscale -4095 4095;
#X text 14 211 You can also set the output min and max using the 2nd
and 3rd inlets:;
#X floatatom 195 260 5 0 0 1 max - -;
#X floatatom 117 250 5 0 0 0 - - -;
-#X connect 0 0 19 0;
-#X connect 4 0 21 1;
-#X connect 10 0 22 0;
-#X connect 10 0 23 0;
-#X connect 13 0 20 0;
-#X connect 15 0 20 0;
-#X connect 18 0 20 3;
-#X connect 19 0 1 0;
-#X connect 20 0 14 0;
-#X connect 21 0 5 0;
-#X connect 22 0 8 0;
-#X connect 23 0 9 0;
-#X connect 25 0 21 2;
-#X connect 26 0 21 0;
+#X obj 295 361 tgl 15 1 empty empty empty 0 -6 0 8 -262144 -1 -1 1
+1;
+#X obj 26 110 autoscale;
+#X obj 158 278 autoscale;
+#X obj 150 110 autoscale -0.01 0.01;
+#X obj 297 110 autoscale -4095 4095;
+#X text 4 451 (C) Copyright 2006 Hans-Christoph Steiner <hans@at.or.at>
+;
+#X text 14 322 The [reset( message or banging the 4th inlet resets
+the stored max and min to zero. 0 disables the auto-tracking \, 1 re-enables
+it:;
+#X connect 0 0 22 0;
+#X connect 4 0 23 1;
+#X connect 9 0 24 0;
+#X connect 9 0 25 0;
+#X connect 12 0 17 0;
+#X connect 14 0 17 0;
+#X connect 16 0 17 3;
+#X connect 17 0 13 0;
+#X connect 19 0 23 2;
+#X connect 20 0 23 0;
+#X connect 21 0 17 3;
+#X connect 22 0 1 0;
+#X connect 23 0 5 0;
+#X connect 24 0 7 0;
+#X connect 25 0 8 0;