From a53764a12f0c463e5e19ea62daefdbbaf2ca0d69 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 17 Jul 2007 14:10:28 +0000 Subject: object to make center point with two ranges, to mimic the feel in a centered joystick svn path=/trunk/externals/mapping/; revision=8103 --- center_point.pd | 16 ++++++++++++++++ help/center_point-help.pd | 24 ++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 center_point.pd create mode 100644 help/center_point-help.pd diff --git a/center_point.pd b/center_point.pd new file mode 100644 index 0000000..86921e9 --- /dev/null +++ b/center_point.pd @@ -0,0 +1,16 @@ +#N canvas 440 226 411 335 10; +#X obj 65 27 inlet; +#X obj 65 276 outlet; +#X obj 212 276 outlet; +#X obj 217 27 inlet; +#X obj 217 89 purepd/float_argument \$1 0.5; +#X obj 232 59 loadbang; +#X obj 65 205 mapping/reverse; +#X obj 65 178 mapping/disjoin; +#X connect 0 0 7 0; +#X connect 3 0 4 0; +#X connect 4 0 7 1; +#X connect 5 0 4 0; +#X connect 6 0 1 0; +#X connect 7 0 6 0; +#X connect 7 1 2 0; diff --git a/help/center_point-help.pd b/help/center_point-help.pd new file mode 100644 index 0000000..db78b87 --- /dev/null +++ b/help/center_point-help.pd @@ -0,0 +1,24 @@ +#N canvas 330 367 490 337 10; +#X obj 232 227 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 7500 1; +#X obj 133 110 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 10100 0; +#X obj 82 227 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 0 1; +#X obj 130 165 center_point; +#X obj 9 -4 cnv 15 450 20 empty empty center_point 2 11 1 18 -233017 +-66577 0; +#X text 285 306 released under the GNU GPL; +#X text 16 306 (C) Copyright 2007 Free Software Foundation; +#X text 22 39 Convert normal 0-to-1 data like you'd get from a joystick +into a center point with two 0-to-1 ranges for either side of that +center point.; +#X floatatom 230 247 5 0 0 0 - - -; +#X floatatom 79 248 5 0 0 0 - - -; +#X floatatom 140 129 5 0 0 0 - - -; +#X connect 0 0 8 0; +#X connect 1 0 3 0; +#X connect 1 0 10 0; +#X connect 2 0 9 0; +#X connect 3 0 2 0; +#X connect 3 1 0 0; -- cgit v1.2.1