From 03a2ad8d2830491307abfdbf8fde1b4f2e4ab7ff Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 15 Nov 2004 21:16:56 +0000 Subject: added a [reset( message so you can recalibrate svn path=/trunk/externals/hcs/; revision=2280 --- autoscale-help.pd | 32 +++++++++++++++--------- autoscale.pd | 74 +++++++++++++++++++++++++++++++++---------------------- 2 files changed, 65 insertions(+), 41 deletions(-) diff --git a/autoscale-help.pd b/autoscale-help.pd index 4376bf6..3f61b13 100644 --- a/autoscale-help.pd +++ b/autoscale-help.pd @@ -1,4 +1,4 @@ -#N canvas 470 47 473 417 10; +#N canvas 48 99 479 531 10; #X floatatom 26 88 5 0 0 0 - - -; #X floatatom 26 152 0 0 0 0 - - -; #X obj 68 270 autoscale; @@ -13,23 +13,33 @@ output range defaults to 0-127.; #X floatatom 68 249 5 0 0 0 - - -; #X obj 71 293 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; -#X text 17 343 (C) Copyright 2004 Hans-Christoph Steiner +#X text 17 453 (C) Copyright 2004 Hans-Christoph Steiner ; -#X text 234 357 released under the GNU GPL; +#X text 234 467 released under the GNU GPL; #X floatatom 150 152 0 0 0 0 - - -; #X floatatom 297 152 0 0 0 0 - - -; #X obj 213 83 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144 -1 -1 0 1; -#X text 17 376 $Revision: 1.2 $$Date: 2004-11-02 06:39:29 $; -#X text 18 389 $Author: eighthave $; +#X text 17 486 $Revision: 1.3 $$Date: 2004-11-15 21:16:56 $; +#X text 18 499 $Author: eighthave $; +#X text 25 336 The [reset( message resets the stored max and min to +zero.; +#X floatatom 46 360 5 0 0 0 - - -; +#X obj 71 413 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 11112 1; +#X msg 96 358 reset; #X obj 26 122 autoscale 0 1; #X obj 150 122 autoscale -0.01 0.01; #X obj 297 122 autoscale -4095 4095; -#X connect 0 0 16 0; +#X obj 68 390 autoscale; +#X connect 0 0 20 0; #X connect 2 0 8 0; #X connect 7 0 2 0; -#X connect 13 0 17 0; -#X connect 13 0 18 0; -#X connect 16 0 1 0; -#X connect 17 0 11 0; -#X connect 18 0 12 0; +#X connect 13 0 21 0; +#X connect 13 0 22 0; +#X connect 17 0 23 0; +#X connect 19 0 23 0; +#X connect 20 0 1 0; +#X connect 21 0 11 0; +#X connect 22 0 12 0; +#X connect 23 0 18 0; diff --git a/autoscale.pd b/autoscale.pd index 72b4a78..096ce4e 100644 --- a/autoscale.pd +++ b/autoscale.pd @@ -1,39 +1,45 @@ -#N canvas 254 119 641 537 10; +#N canvas 206 226 769 538 10; #X obj 45 20 inlet; -#X obj 45 453 outlet; -#X obj 105 233 f; -#X text 132 233 min; -#X text 230 234 max; -#X obj 324 167 f \$1; -#X obj 522 167 f \$2; -#X obj 105 210 moses 0; -#X obj 190 210 moses 0; -#X obj 45 102 trigger float float float bang bang; -#X obj 45 390 expr (($f1 - $f2) * (($f5 - $f4) / ($f3 - $f2))) + $f4 +#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 ; -#X obj 196 170 oneshot; -#X obj 234 191 f; -#X obj 190 143 t f b f; -#X obj 111 170 oneshot; -#X obj 149 191 f; -#X obj 105 143 t f b f; -#X obj 254 234 + 1e-09; -#X obj 348 213 ==; -#X obj 348 233 sel 1; -#X obj 415 77 loadbang; -#X obj 348 299 print [autocal]; -#X floatatom 342 189 5 0 0 0 - - -; -#X obj 415 100 t b b; -#X obj 324 329 expr if ($f1 == $f2 \, 0 \, $f1) \; if ($f1 == $f2 \, +#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 [autocal]; +#X floatatom 472 189 5 0 0 0 - - -; +#X obj 545 100 t b b; +#X obj 454 329 expr if ($f1 == $f2 \, 0 \, $f1) \; if ($f1 == $f2 \, 127 \, $f2); -#X msg 348 278 using default range (0-127); -#X obj 348 256 oneshot; +#X msg 478 278 using default range (0-127); +#X obj 478 256 oneshot; #X text 2 476 (C) Copyright 2004 Hans-Christoph Steiner ; #X text 219 491 released under the GNU GPL; -#X text 11 512 $Revision: 1.2 $$Date: 2004-11-02 06:39:29 $; -#X text 349 512 $Author: eighthave $; -#X connect 0 0 9 0; +#X text 417 475 $Revision: 1.3 $$Date: 2004-11-15 21:16:56 $; +#X text 417 488 $Author: eighthave $; +#X obj 45 54 route reset; +#X obj 45 81 bang; +#X msg 45 129 0; +#X text 150 41 these [oneshot] bits are just here to get the ball rolling +; +#X msg 114 102 clear; +#X connect 0 0 31 0; #X connect 2 0 7 1; #X connect 2 0 10 1; #X connect 5 0 18 0; @@ -70,3 +76,11 @@ #X connect 24 1 10 4; #X connect 25 0 21 0; #X connect 26 0 25 0; +#X connect 31 0 32 0; +#X connect 31 1 9 0; +#X connect 32 0 33 0; +#X connect 32 0 35 0; +#X connect 33 0 2 0; +#X connect 33 0 12 0; +#X connect 35 0 14 0; +#X connect 35 0 11 0; -- cgit v1.2.1