aboutsummaryrefslogtreecommitdiff
path: root/autoscale.pd
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-07-07 04:08:55 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2006-07-07 04:08:55 +0000
commit57fb5b3025d63b4921a56f09a4a7d327ff8f6967 (patch)
treefa3dbc986fa3867d9ab65625856331f96a5f8b08 /autoscale.pd
parent6cb5e0d686c0767ea1d8b374aa5473425f666a0a (diff)
added three inlets: min, max and reset; replaced [oneshot] with [purepd/once] and switched to using [float_argument].
svn path=/trunk/externals/mapping/; revision=5360
Diffstat (limited to 'autoscale.pd')
-rw-r--r--autoscale.pd159
1 files changed, 78 insertions, 81 deletions
diff --git a/autoscale.pd b/autoscale.pd
index 3a0f92c..5e1563c 100644
--- a/autoscale.pd
+++ b/autoscale.pd
@@ -1,85 +1,82 @@
-#N canvas 206 226 781 550 10;
-#X obj 45 30 inlet;
-#X obj 175 453 outlet;
-#X obj 235 268 f;
-#X text 262 268 min;
-#X text 360 269 max;
-#X obj 454 167 f \$1;
-#X obj 652 167 f \$2;
-#X obj 235 245 moses 0;
-#X obj 320 245 moses 0;
-#X obj 175 102 trigger float float float bang bang;
-#X obj 175 390 expr (($f1 - $f2) * (($f5 - $f4) / ($f3 - $f2))) + $f4
+#N canvas 348 266 816 509 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 326 205 oneshot;
-#X obj 364 226 f;
-#X obj 320 178 t f b f;
-#X obj 241 205 oneshot;
-#X obj 279 226 f;
-#X obj 235 178 t f b f;
-#X obj 384 269 + 1e-09;
-#X obj 478 213 ==;
-#X obj 478 233 sel 1;
-#X obj 545 77 loadbang;
-#X obj 478 299 print [autoscale];
-#X obj 545 100 t b b;
-#X obj 478 256 oneshot;
-#X text 2 476 (C) Copyright 2004 Hans-Christoph Steiner <hans@at.or.at>
+#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 219 491 released under the GNU GPL;
-#X text 417 475 $Revision: 1.2 $$Date: 2006-02-03 22:34:17 $;
-#X text 417 488 $Author: eighthave $;
-#X obj 45 62 route reset;
-#X obj 45 81 bang;
-#X msg 45 129 0;
-#X msg 114 102 clear;
-#X text 172 47 these [oneshot] bits are just here to get the max/min
-tracking started;
-#X text 8 3 [autoscale];
-#X msg 478 278 using default range (0-1);
-#X obj 454 329 expr if ($f1 == $f2 \, 0 \, $f1) \; if ($f1 == $f2 \,
+#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 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 connect 0 0 28 0;
-#X connect 2 0 7 1;
-#X connect 2 0 10 1;
-#X connect 5 0 18 0;
-#X connect 5 0 35 0;
-#X connect 6 0 18 1;
-#X connect 6 0 35 1;
-#X connect 7 0 2 0;
-#X connect 8 1 17 0;
-#X connect 9 0 10 0;
-#X connect 9 1 16 0;
-#X connect 9 2 13 0;
-#X connect 9 3 5 0;
-#X connect 9 4 6 0;
-#X connect 10 0 1 0;
-#X connect 11 0 12 0;
-#X connect 12 0 8 1;
-#X connect 13 0 8 0;
-#X connect 13 1 11 0;
-#X connect 13 2 12 1;
+#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 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
+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 15 0 7 1;
-#X connect 16 0 7 0;
-#X connect 16 1 14 0;
-#X connect 16 2 15 1;
-#X connect 17 0 8 1;
-#X connect 17 0 10 2;
-#X connect 18 0 19 0;
-#X connect 19 0 23 0;
-#X connect 20 0 22 0;
-#X connect 22 0 5 0;
-#X connect 22 1 6 0;
-#X connect 23 0 34 0;
-#X connect 28 0 29 0;
-#X connect 28 1 9 0;
-#X connect 29 0 30 0;
-#X connect 29 0 31 0;
-#X connect 30 0 2 0;
-#X connect 30 0 12 0;
-#X connect 31 0 14 0;
-#X connect 31 0 11 0;
-#X connect 34 0 21 0;
-#X connect 35 0 10 3;
-#X connect 35 1 10 4;
+#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;