/usr/lib/pd/extra/jmmmp/bezier-help.pd is in pd-jmmmp 0.1.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | #N struct 1026-bez-array float x float y array 1026-bez-c-arr 1026-bez-c
float p0x float p0y float p0x. float p0y. float p1x float p1y float
p1x. float p1y. float p2x float p2y float p2x. float p2y. float p3x
float p3y float p3x. float p3y. float rpx float rpy float rpx. float
rpy.;
#N struct 1026-bez-c float x float y;
#N canvas 280 17 921 908 10;
#X floatatom 415 741 5 0 0 0 - - -;
#X obj 418 727 hsl 50 10 0 1 0 0 empty empty empty -2 -8 0 10 -228856
-1 -1 4900 0;
#X floatatom 135 195 5 0 0 0 - - -;
#X msg 125 134 canvas \$1;
#X floatatom 135 114 5 0 0 0 - - -;
#X obj 415 707 line;
#X msg 415 687 0 \, 1 3000;
#X obj 135 504 pack;
#X obj 145 484 t b f;
#X obj 125 820 unpack;
#X msg 228 820 p0 0.25 0.34 \, p1 0.34 0.88 \, p2 0.9 0.4 \, p3 0.85
0.73;
#X text 543 84 Arguments;
#X obj 148 457 hsl 50 10 0 1 0 0 empty empty X -16 6 0 12 -228856 -1
-1 0 1;
#X obj 148 471 hsl 50 10 0 1 0 0 empty empty Y -16 6 0 12 -228856 -1
-1 0 1;
#X obj 128 840 hsl 50 10 0 1 0 0 empty empty X -16 6 0 12 -228856 -1
-1 4165 1;
#X obj 128 854 hsl 50 10 0 1 0 0 empty empty Y -16 6 0 12 -228856 -1
-1 3577 1;
#X text 135 297 default values;
#X text 135 337 also first and last points can take any value;
#X text 222 154 Two values define x and y coordinates;
#X text 131 265 p[0-3] \$1 \$2 - Control one handle point's coordinates
between 0 and 1 Send either a message with all points...;
#X text 115 80 canvas \$1 [\$2] - Change canvas size. One value creates
a square ...;
#X text 172 194 size \$1 - Define array size (minimum 2 points);
#X text 240 789 Dump outlet: connect to a message box \, which you
can later copy-paste.;
#X text 105 869 Output: list with scaled x and y values;
#X text 545 163 If no arguments are given \, the default values are
110 100 100 When no y argument is present \, a square with dimensions
of x is created.;
#X text 542 385 But \, even with the points outside of the box \, the
calculations will still work. You only loose mouse control of the graphic
handles.;
#X obj 135 564 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X obj 125 697 bezier;
#X text 165 624 dump - Dump the coordinates of the control points through
the right outlet. Connect the outlet to a message box \, and it will
get formatted.;
#X text 541 465 Released under the BSD License;
#X text 541 445 (C) 2010 João Pais - jmmmpais@googlemail.com;
#X text 20 84 Object size:;
#X text 20 194 Array size:;
#X text 20 264 Control points:;
#X text 20 564 Readpoint:;
#X text 20 624 Dump parameters:;
#X text 546 102 - Array size;
#X text 546 122 - Canvas size x (+ y);
#X text 546 142 - Canvas size y;
#X text 543 214 Inlets;
#X text 543 254 Outlets;
#X text 546 272 - float pair with x / y values;
#X text 546 292 - control point dump;
#X text 21 9 [bezier] - Transfer function with one cubic bézier curve
;
#X text 153 554 readpoint \$1 - Turn readpoint (red) display on or
off. Readpoint shows the curent place in the buffer.;
#X text 22 29 Create a transfer function between 0 and 1 \, using the
four control points of a cubic bézier curve.;
#X text 546 232 - floats [0 to 1] / commands (with parameters);
#X text 542 326 BUG ALERT: if the control points get out of the GOP
box \, these won't react when you click on them. You'll have to right-click
\, open \, and then inside the abstraction place the points again inside
the red boundaries. Or send pX coordinates.;
#X text 20 64 CONTROL OPTIONS;
#X text 70 694 INPUT;
#X text 70 814 OUTPUT;
#X obj 415 761 s \$0-input;
#X obj 135 677 r \$0-input;
#X text 320 667 Send your input values between 0 and 1 here:;
#X msg 125 317 p0 0 0 \, p1 0.1 0.6 \, p2 0.9 0.4 \, p3 1 1;
#X msg 125 357 p0 0.25 0.34 \, p1 0.34 0.88 \, p2 0.9 0.4 \, p3 0.85
0.73;
#X msg 125 417 p0 0 0 \, p1 0.34 1.3 \, p2 1.4 0.4 \, p3 1 1;
#X msg 125 524 p0 \$1 \$2;
#X text 144 436 Or move the points separately:;
#X msg 125 214 size \$1;
#X msg 125 235 size 100;
#X msg 125 154 canvas 300 100;
#X text 135 377 values outside the 0-1 boundaries will be outside of
the box - you won't be able to grab the graphic (see bug description)
;
#X msg 125 583 readpoint \$1;
#X msg 125 624 dump;
#X connect 0 0 51 0;
#X connect 1 0 0 0;
#X connect 2 0 59 0;
#X connect 3 0 27 0;
#X connect 4 0 3 0;
#X connect 5 0 1 0;
#X connect 6 0 5 0;
#X connect 7 0 57 0;
#X connect 8 0 7 0;
#X connect 8 1 7 1;
#X connect 9 0 14 0;
#X connect 9 1 15 0;
#X connect 12 0 7 0;
#X connect 13 0 8 0;
#X connect 26 0 63 0;
#X connect 27 0 9 0;
#X connect 27 1 10 0;
#X connect 52 0 27 0;
#X connect 54 0 27 0;
#X connect 55 0 27 0;
#X connect 56 0 27 0;
#X connect 57 0 27 0;
#X connect 59 0 27 0;
#X connect 60 0 27 0;
#X connect 61 0 27 0;
#X connect 63 0 27 0;
#X connect 64 0 27 0;
|