From 043dfe0ae677c018cde28cb84e1abe5ae1fe5205 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Sun, 29 Jan 2006 05:43:33 +0000 Subject: this is the first checkin for the new mapping lib, which is a join effort of Cyrille and Hans. We are combining Cyrille's ds_/datastream classes with my hid_* classes, and I think Cyrille has drawn on the La-Kitchen classes for working with sensors. svn path=/trunk/externals/mapping/; revision=4514 --- pd/autoscale.pd | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 pd/autoscale.pd (limited to 'pd/autoscale.pd') diff --git a/pd/autoscale.pd b/pd/autoscale.pd new file mode 100644 index 0000000..ddd295e --- /dev/null +++ b/pd/autoscale.pd @@ -0,0 +1,87 @@ +#N canvas 206 226 777 546 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 +; +#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 floatatom 472 189 5 0 0 0 - - -; +#X obj 545 100 t b b; +#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 417 475 $Revision: 1.1 $$Date: 2006-01-29 05:43:33 $; +#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 \, +1 \, $f2); +#X connect 0 0 29 0; +#X connect 2 0 7 1; +#X connect 2 0 10 1; +#X connect 5 0 18 0; +#X connect 5 0 22 0; +#X connect 5 0 36 0; +#X connect 6 0 18 1; +#X connect 6 0 36 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 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 24 0; +#X connect 20 0 23 0; +#X connect 23 0 5 0; +#X connect 23 1 6 0; +#X connect 24 0 35 0; +#X connect 29 0 30 0; +#X connect 29 1 9 0; +#X connect 30 0 31 0; +#X connect 30 0 32 0; +#X connect 31 0 2 0; +#X connect 31 0 12 0; +#X connect 32 0 14 0; +#X connect 32 0 11 0; +#X connect 35 0 21 0; +#X connect 36 0 10 3; +#X connect 36 1 10 4; -- cgit v1.2.1