[PD] tight syncing of two pd machines...

Marc Lavallée odradek at videotron.ca
Thu Dec 18 14:59:01 CET 2003


Here's a new scalenum abstraction, based on Josh's abstraction and
Martin's comment. I added inlets to change the input and output
boundaries. It doesn't use "expr", but only "native" objects. When the
boundaries are set, it works with one addition, one multiplication, and
one substraction. I though about adding a min-max filter, but it would
involve more calculation, so I'll leave that part as an exercise. :-)

Ben bogart wrote:

> I think a handly abstraction would be one that scales the incoming range
> to a specified range automatically... has 4 args, the min and max of the 
> input and the desired min and max.

Josh Steiner wrote:

> i made one called [scalenum] that i use all the time.

Martin Peach wrote:

> It will run faster if you work out 720/127 yourself at the beginning
> instead of forcing pd to compute it every time:
...
> I am NaN (I am a free man!)

Be seing you!
--
Marc
-------------- next part --------------
#N canvas 168 47 390 440 10;
#X obj 79 245 \$1;
#X obj 132 243 \$2;
#X obj 214 244 \$3;
#X obj 270 244 \$4;
#X obj 37 212 inlet;
#X obj 146 211 loadbang;
#X obj 63 277 -;
#X obj 116 276 -;
#X obj 214 273 -;
#X obj 84 375 +;
#X obj 84 402 outlet;
#X obj 79 184 inlet;
#X obj 132 184 inlet;
#X obj 214 184 inlet;
#X obj 270 184 inlet;
#X obj 84 342 *;
#X obj 100 318 /;
#X text 76 167 in min;
#X text 130 167 in max;
#X text 208 167 out min;
#X text 266 167 out max;
#X text 35 195 input;
#X text 59 25 args: from input min/max to output min/max;
#X text 59 9 Scale number range;
#X text 60 93 Marc Lavallee \, 2003;
#X text 59 43 first inlet: input number;
#X text 59 58 inlets 2-5: same as args;
#X text 59 111 (based on abstraction from Josh Steiner;
#X text 67 124 and comment from Martin Peach);
#X text 60 73 outlet: scaled number;
#X connect 0 0 7 0;
#X connect 0 0 6 1;
#X connect 1 0 7 1;
#X connect 2 0 8 0;
#X connect 2 0 9 1;
#X connect 3 0 8 1;
#X connect 4 0 6 0;
#X connect 5 0 3 0;
#X connect 5 0 2 0;
#X connect 5 0 1 0;
#X connect 5 0 0 0;
#X connect 6 0 15 0;
#X connect 7 0 16 1;
#X connect 8 0 16 0;
#X connect 9 0 10 0;
#X connect 11 0 0 0;
#X connect 12 0 1 0;
#X connect 13 0 2 0;
#X connect 14 0 3 0;
#X connect 15 0 9 0;
#X connect 16 0 15 1;


More information about the Pd-list mailing list