aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--msd2D/editor/expr_scale.pd53
-rw-r--r--msd2D/editor/scale4gem.pd22
2 files changed, 53 insertions, 22 deletions
diff --git a/msd2D/editor/expr_scale.pd b/msd2D/editor/expr_scale.pd
new file mode 100644
index 0000000..fe55fa5
--- /dev/null
+++ b/msd2D/editor/expr_scale.pd
@@ -0,0 +1,53 @@
+#N canvas 236 224 1026 642 10;
+#X obj 166 328 expr ($f1-$f2)*($f4-$f5)/($f2-$f3)+$f4;
+#X obj 252 286 f \$1;
+#X obj 402 288 f \$4;
+#X obj 352 284 f \$3;
+#X obj 302 284 f \$2;
+#X obj 252 197 inlet;
+#X obj 302 197 inlet;
+#X obj 352 197 inlet;
+#X obj 402 197 inlet;
+#X obj 166 129 inlet;
+#X obj 166 369 outlet;
+#X text 510 173 ARGS;
+#X text 520 197 1: input_low_border;
+#X text 520 219 2: input_high_border;
+#X text 520 245 3: output_low_border;
+#X text 520 267 4: output_high_border;
+#X text 229 149 scale [from_low \, from_hi] to [to_low \, to_hi];
+#X obj 273 243 t b;
+#X obj 298 171 loadbang;
+#X obj 166 156 t f b;
+#N canvas 0 0 1090 810 once 0;
+#X obj 86 53 inlet;
+#X obj 92 185 outlet;
+#X obj 81 146 spigot 1;
+#X obj 112 91 t b a;
+#X msg 131 123 0;
+#X connect 0 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 4 0;
+#X connect 3 1 2 0;
+#X connect 4 0 2 1;
+#X restore 196 186 pd once;
+#X text 174 391 [pc once] is only used \, because autogenerated objects
+don't receive loadbangs;
+#X connect 0 0 10 0;
+#X connect 1 0 0 1;
+#X connect 2 0 0 4;
+#X connect 3 0 0 3;
+#X connect 4 0 0 2;
+#X connect 5 0 1 0;
+#X connect 6 0 4 0;
+#X connect 7 0 3 0;
+#X connect 8 0 2 0;
+#X connect 9 0 19 0;
+#X connect 17 0 1 0;
+#X connect 17 0 3 0;
+#X connect 17 0 4 0;
+#X connect 17 0 2 0;
+#X connect 18 0 17 0;
+#X connect 19 0 0 0;
+#X connect 19 1 20 0;
+#X connect 20 0 17 0;
diff --git a/msd2D/editor/scale4gem.pd b/msd2D/editor/scale4gem.pd
deleted file mode 100644
index 6cab873..0000000
--- a/msd2D/editor/scale4gem.pd
+++ /dev/null
@@ -1,22 +0,0 @@
-#N canvas 0 0 458 426 10;
-#X obj 231 131 * 0.0066666;
-#X text 325 132 == [/ 150];
-#X obj 200 184 * -0.0066666;
-#X obj 169 232 * 0.0066666;
-#X obj 169 331 outlet;
-#X obj 200 204 outlet;
-#X obj 231 153 outlet;
-#X obj 169 27 inlet;
-#X text 265 245 out: scaled for gemwin;
-#X text 198 11 x y z;
-#X obj 200 59 inlet;
-#X obj 231 91 inlet;
-#X obj 169 287 - 3;
-#X text 203 288 shift left \, found empirically;
-#X connect 0 0 6 0;
-#X connect 2 0 5 0;
-#X connect 3 0 12 0;
-#X connect 7 0 3 0;
-#X connect 10 0 2 0;
-#X connect 11 0 0 0;
-#X connect 12 0 4 0;