-
Notifications
You must be signed in to change notification settings - Fork 4
/
pmpd2d~-help.pd
94 lines (94 loc) · 4.67 KB
/
pmpd2d~-help.pd
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
#N canvas 707 40 703 894 10;
#X text 153 6 pmpd2d~ : 2d particle-based physical modeling for audio synthesis, f 66;
#X msg 30 68 reset;
#X obj 30 803 dac~;
#X msg 93 450 posX \$1 \$2;
#X msg 98 472 forceX \$1 \$2;
#X obj 229 736 osc~ 444;
#X text 68 68 clear everything;
#X msg 179 537 setD \$1 \$2;
#X msg 106 537 setK \$1 \$2;
#X msg 101 505 setM \$1 \$2;
#X msg 74 233 inForceX \$1 \$2 \$3;
#X msg 79 281 inPosX \$1 \$2 \$3;
#X msg 189 233 inForceY \$1 \$2 \$3;
#X msg 182 281 inPosY \$1 \$2 \$3;
#X msg 83 338 outPosX \$1 \$2 \$3;
#X msg 193 338 outPosY \$1 \$2 \$3;
#X msg 93 389 outSpeed \$1 \$2 \$3;
#X msg 87 367 outSpeedX \$1 \$2 \$3;
#X msg 208 367 outSpeedY \$1 \$2 \$3;
#X msg 168 450 posY \$1 \$2;
#X msg 183 472 forceY \$1 \$2;
#X msg 253 537 setL \$1 \$2;
#X msg 174 505 setDEnv \$1 \$2;
#X msg 265 505 setDEnvOffset \$1 \$2;
#X msg 52 133 link \$1 \$2 \$3 \$4 \$5;
#X msg 169 712 bang;
#X msg 64 164 NLlink \$1 \$2 \$3 \$4 \$5 \$6 \$7 \$8;
#X text 19 32 all these messages need to be sent only once to create the structure of a physical model:;
#X text 181 127 connect two masses (\$1 and \$2) with link rigidity \$3 \, damping \$4 and length \$5;
#X text 256 163 like the link message \, but with extra arguments :;
#X text 277 178 \$5 is the exponent for the non-linear rigidity;
#X text 277 192 \$6 is the length of the link;
#X text 277 206 \$7 and \$8 are the min and max length of the link;
#X text 98 301 the same inlet can be used to move several masses and send forces to them through multiple inForce and inPos messages for this inlet, f 90;
#X text 89 253 you can send many forces to a single mass \, the resulting force will be the sum of all forces, f 92;
#X text 113 408 the output of an outlet is the sum of the contributions of all out* messages, f 76;
#X text 95 430 these messages interact with the simulation in real time:;
#X text 240 449 change the position \$2 of a fixed mass \$1;
#X text 265 472 send force \$2 to mass \$1;
#X text 202 711 print the current state of the model in the console;
#X text 284 735 interaction with the simulation at audio rate;
#X msg 124 636 setNLD \$1 \$2;
#X msg 130 658 setNLL \$1 \$2;
#X msg 216 658 setNLLMin \$1 \$2;
#X msg 321 658 setNLLMax \$1 \$2;
#X text 305 227 signal on inlet \$1 sends force in X or Y direction to mass \$2 with amplitude \$3, f 43;
#X text 288 274 signal on inlet \$1 controls the X or Y position of mass \$2 with amplitude \$3, f 41;
#X text 302 331 connect the X or Y position of mass \$2 to outlet \$1 with amplitude \$3, f 38;
#X text 331 363 connect the velocity of mass \$2 to outlet \$1 with amplitude \$3 (for X or Y direction or overall velocity), f 36;
#X msg 41 97 mass \$1 \$2 \$3 \$4;
#X text 150 86 create a mass with arguments : weight of the mass (\$1) \, initial position X Y (\$2 and \$3) and velocity damping (\$4). A mass with weight 0 will not move., f 65;
#X text 394 499 change mass settings: mass \, damping and offset of the damping (to impose a velocity), f 44;
#X msg 121 614 setNLKPow \$1 \$2;
#X msg 116 592 setNLK \$1 \$2 (\$3);
#X msg 134 680 setNLLCurrent \$1 (\$2);
#X msg 112 559 setLCurrent \$1 (\$2);
#X text 325 536 change link settings: rigidity \, damping \, length;
#X text 227 591 change NLlink settings: rigidity and (optional) rigidity exponent, f 65;
#X text 272 676 mix between set length and current length (0..1) (defaults to 1 if no second argument given), f 49;
#X text 237 554 mix between set length and current length (0..1) (defaults to 1 if no second argument given), f 48;
#X text 421 658 change length \, min length and max length;
#X text 205 636 change NLlink damping;
#X text 219 613 change rigidity exponent (similar to third argument above);
#X text 124 779 arg1 : number of audio inlets (default: 1);
#X text 124 793 arg2 : number of audio outlets (default: 1);
#X text 124 821 arg4 : max. number of masses (default: 10000);
#X text 124 835 arg5 : max. number of links (default: 10000);
#X text 124 807 arg3 : oversample factor (useful to run the simulation faster than audio rate - default: 1), f 91;
#X text 124 849 arg6 : max. number inlet assignments (default: 1000);
#X text 124 863 arg7 : max. number outlet assignments (default: 1000);
#X text 124 765 optional leading -m flag to switch inputs and outputs to multichannel mode, f 74;
#X obj 30 765 pmpd2d~ -m 2 3;
#X connect 1 0 71 0;
#X connect 3 0 71 0;
#X connect 4 0 71 0;
#X connect 5 0 71 0;
#X connect 8 0 71 0;
#X connect 9 0 71 0;
#X connect 10 0 71 0;
#X connect 11 0 71 0;
#X connect 14 0 71 0;
#X connect 16 0 71 0;
#X connect 17 0 71 0;
#X connect 24 0 71 0;
#X connect 25 0 71 0;
#X connect 26 0 71 0;
#X connect 41 0 71 0;
#X connect 49 0 71 0;
#X connect 53 0 71 0;
#X connect 54 0 71 0;
#X connect 55 0 71 0;
#X connect 71 0 2 0;
#X connect 71 0 2 1;