From e974c8bfb41d40dd8377a4a939cffdbae62d2e54 Mon Sep 17 00:00:00 2001 From: Cyrille Henry Date: Mon, 28 Feb 2011 14:48:06 +0000 Subject: remove old exemple about pmpd that is now replace by a new pmpd object svn path=/trunk/externals/pmpd/; revision=14978 --- examples/48_pmpd.pd | 93 -------- examples/48_pmpd~.pd | 140 ++++++++++++ examples/49_pmpd~.pd | 140 ------------ examples/49_simple_oscilator~.pd | 212 +++++++++++++++++ examples/50_simple_oscilator~.pd | 212 ----------------- examples/50_string~.pd | 116 ++++++++++ examples/51_pmpd_test.pd | 92 ++++++++ examples/51_string~.pd | 116 ---------- examples/52_pmpd_string.pd | 336 +++++++++++++++++++++++++++ examples/52_pmpd_test.pd | 92 -------- examples/53_pmpd_string.pd | 336 --------------------------- examples/53_pmpd_wave.pd | 231 +++++++++++++++++++ examples/54_pmpd2d_test.pd | 167 ++++++++++++++ examples/54_pmpd_wave.pd | 231 ------------------- examples/55_pmpd2d_additive.pd | 463 ++++++++++++++++++++++++++++++++++++++ examples/55_pmpd2d_test.pd | 167 -------------- examples/56_pmpd2d_additive.pd | 463 -------------------------------------- examples/56_pmpd2d_ball.pd | 157 +++++++++++++ examples/57_pmpd2d_ball.pd | 157 ------------- examples/57_pmpd2d_gravitation.pd | 213 ++++++++++++++++++ examples/58_pmpd2d_gravitation.pd | 213 ------------------ examples/58_pmpd2d_sand.pd | 299 ++++++++++++++++++++++++ examples/59_pmpd2d_sand.pd | 299 ------------------------ examples/59_pmpd3d_test.pd | 191 ++++++++++++++++ examples/60_draw_link_force.pd | 137 +++++++++++ examples/60_pmpd3d_test.pd | 191 ---------------- examples/61_draw_link_force.pd | 137 ----------- examples/61_draw_link_force_2d.pd | 75 ++++++ examples/62_draw_link_force_2d.pd | 75 ------ 29 files changed, 2829 insertions(+), 2922 deletions(-) delete mode 100644 examples/48_pmpd.pd create mode 100644 examples/48_pmpd~.pd delete mode 100644 examples/49_pmpd~.pd create mode 100644 examples/49_simple_oscilator~.pd delete mode 100644 examples/50_simple_oscilator~.pd create mode 100644 examples/50_string~.pd create mode 100644 examples/51_pmpd_test.pd delete mode 100644 examples/51_string~.pd create mode 100644 examples/52_pmpd_string.pd delete mode 100644 examples/52_pmpd_test.pd delete mode 100644 examples/53_pmpd_string.pd create mode 100644 examples/53_pmpd_wave.pd create mode 100644 examples/54_pmpd2d_test.pd delete mode 100644 examples/54_pmpd_wave.pd create mode 100644 examples/55_pmpd2d_additive.pd delete mode 100644 examples/55_pmpd2d_test.pd delete mode 100644 examples/56_pmpd2d_additive.pd create mode 100644 examples/56_pmpd2d_ball.pd delete mode 100644 examples/57_pmpd2d_ball.pd create mode 100644 examples/57_pmpd2d_gravitation.pd delete mode 100644 examples/58_pmpd2d_gravitation.pd create mode 100644 examples/58_pmpd2d_sand.pd delete mode 100644 examples/59_pmpd2d_sand.pd create mode 100644 examples/59_pmpd3d_test.pd create mode 100644 examples/60_draw_link_force.pd delete mode 100644 examples/60_pmpd3d_test.pd delete mode 100644 examples/61_draw_link_force.pd create mode 100644 examples/61_draw_link_force_2d.pd delete mode 100644 examples/62_draw_link_force_2d.pd diff --git a/examples/48_pmpd.pd b/examples/48_pmpd.pd deleted file mode 100644 index 385fee1..0000000 --- a/examples/48_pmpd.pd +++ /dev/null @@ -1,93 +0,0 @@ -#N canvas 74 5 581 757 10; -#X msg 209 152 mass 2 10 \$1; -#X msg 223 105 mass -1 10 60; -#X msg 195 175 mass -1 10 60; -#X msg 209 128 2 \, 3 \, 4 \, 5 \, 6 \, 7 \, 8 \, 9 \, 10; -#X msg 181 200 0 1 \, 1 2 \, 2 3 \, 3 4 \, 4 5 \, 5 6 \, 6 7 \, 7 8 -\, 8 9 \, 9 10 \, 10 11; -#X obj 301 325 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144 --1 -1 4600 1; -#X obj 337 325 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144 --1 -1 7800 1; -#X msg 301 467 posX 1 \$1; -#X msg 337 496 posX 11 \$1; -#X obj 52 615 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144 --1 -1 4600 1; -#X obj 76 615 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144 --1 -1 4920 1; -#X obj 101 615 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144 --1 -1 5240 1; -#X obj 126 615 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144 --1 -1 5560 1; -#X obj 150 615 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144 --1 -1 5880 1; -#X obj 175 615 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144 --1 -1 6200 1; -#X obj 200 615 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144 --1 -1 6520 1; -#X obj 224 615 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144 --1 -1 6840 1; -#X obj 249 615 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144 --1 -1 7160 1; -#X obj 274 615 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144 --1 -1 7480 1; -#X obj 238 357 t a; -#X obj 52 260 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 -; -#X obj 153 36 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 299 615 vsl 15 128 0 127 0 0 empty empty empty 0 -8 0 8 -262144 --1 -1 7800 1; -#X msg 371 521 forceX 5 100; -#X obj 52 289 metro 20; -#X msg 181 222 link 1 \$1 \$2 1 0.5; -#X msg 238 84 reset; -#X obj 153 58 t b b b b b b b; -#X msg 153 268 0 1 \, 1 2 \, 2 3 \, 3 4 \, 4 5 \, 5 6 \, 6 7 \, 7 8 -\, 8 9 \, 9 10 \, 10 11; -#X msg 153 290 out 1 \$1 \$2 1; -#X text 257 290 id \, input \, mass \, imfluuence; -#X obj 52 15 loadbang; -#X msg 299 556 forceX 122; -#X msg 167 244 in 1 0 3 1; -#X obj 52 583 pmpd 1 11 --------------------------------; -#X connect 0 0 19 0; -#X connect 1 0 19 0; -#X connect 2 0 19 0; -#X connect 3 0 0 0; -#X connect 4 0 25 0; -#X connect 5 0 7 0; -#X connect 6 0 8 0; -#X connect 7 0 34 0; -#X connect 8 0 34 0; -#X connect 19 0 34 0; -#X connect 20 0 24 0; -#X connect 21 0 27 0; -#X connect 23 0 34 0; -#X connect 24 0 34 0; -#X connect 25 0 19 0; -#X connect 26 0 19 0; -#X connect 27 0 28 0; -#X connect 27 1 33 0; -#X connect 27 2 4 0; -#X connect 27 3 2 0; -#X connect 27 4 3 0; -#X connect 27 5 1 0; -#X connect 27 6 26 0; -#X connect 28 0 29 0; -#X connect 29 0 19 0; -#X connect 31 0 27 0; -#X connect 31 0 20 0; -#X connect 32 0 34 1; -#X connect 33 0 19 0; -#X connect 34 0 9 0; -#X connect 34 1 10 0; -#X connect 34 2 11 0; -#X connect 34 3 12 0; -#X connect 34 4 13 0; -#X connect 34 5 14 0; -#X connect 34 6 15 0; -#X connect 34 7 16 0; -#X connect 34 8 17 0; -#X connect 34 9 18 0; -#X connect 34 10 22 0; diff --git a/examples/48_pmpd~.pd b/examples/48_pmpd~.pd new file mode 100644 index 0000000..1628928 --- /dev/null +++ b/examples/48_pmpd~.pd @@ -0,0 +1,140 @@ +#N canvas 39 25 842 667 10; +#X obj 39 413 t a; +#X obj 134 11 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 52 647 tabwrite~ array99; +#X obj 424 497 metro 100; +#X obj 424 471 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X obj 190 647 tabwrite~ array98; +#N canvas 0 0 454 304 (subpatch) 0; +#X array array97 100 float 0; +#X coords 0 1 100 -1 150 100 1; +#X restore 662 269 graph; +#X msg 15 54 \; pd dsp 1 \;; +#X obj 15 29 loadbang; +#X obj 450 474 loadbang; +#X msg 299 402 forceX 2 1; +#X obj 197 498 phasor~ 1; +#X floatatom 77 479 5 0 0 0 - - -; +#X floatatom 197 477 5 0 0 0 - - -; +#X floatatom 320 478 5 0 0 0 - - -; +#N canvas 0 0 454 304 (subpatch) 0; +#X array array98 100 float 0; +#X coords 0 1 100 -1 150 100 1; +#X restore 662 165 graph; +#X obj 325 647 tabwrite~ array97; +#X obj 88 521 tabwrite~ array9; +#X obj 208 522 tabwrite~ array8; +#X obj 332 523 tabwrite~ array7; +#N canvas 0 0 450 300 (subpatch) 0; +#X array array9 100 float 0; +#X coords 0 1 100 -1 150 100 1; +#X restore 507 61 graph; +#N canvas 0 0 454 304 (subpatch) 0; +#X array array7 100 float 0; +#X coords 0 1 100 -1 150 100 1; +#X restore 507 269 graph; +#N canvas 0 0 454 304 (subpatch) 0; +#X array array8 100 float 0; +#X coords 0 1 100 -1 150 100 1; +#X restore 507 165 graph; +#X obj 38 734 dac~; +#N canvas 0 0 450 300 (subpatch) 0; +#X array array99 100 float 0; +#X coords 0 1 100 -1 150 100 1; +#X restore 662 61 graph; +#X obj 320 499 phasor~ 1.5; +#X obj 134 37 t b b b b b; +#X obj 325 623 metro 100; +#X obj 325 597 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X obj 351 600 loadbang; +#X text 159 10 <- create the network; +#X obj 39 709 *~ 0.5; +#X msg 181 256 link 0 2 0.5 0.001; +#X msg 182 277 link 0 3 0.3 0.001; +#X msg 202 324 mass 10 1; +#X msg 203 350 mass 10 1; +#X text 295 325 M \, X0; +#X text 312 256 mass1 \, mass2 \, K \, D; +#X text 281 168 outlet \, mass \, amplitude; +#X text 248 89 inlet \, mass \, amplitude; +#X msg 201 299 mass 10 1; +#X msg 221 378 reset \, mass 0 0; +#X msg 179 191 outPos 2 3 1; +#X msg 133 91 inForce 1 2 1; +#X obj 40 679 hip~ 20; +#X msg 134 116 inForce 2 3 1; +#X msg 162 171 outPos 1 2 1; +#X msg 133 68 inForce 0 1 1; +#X obj 77 498 phasor~ 1.33333; +#X msg 155 149 outPos 0 1 3; +#X text 212 236 mass1 \, mass2 \, K \, D \, Pow \, L0 \, Lmin \, Lmax +; +#X msg 176 218 NLlink 0 1 0.1 0.001 1.1 0 -10 10; +#X obj 77 543 /~ 250; +#X obj 197 544 /~ 10; +#X obj 319 554 /~ 30; +#X obj 39 583 pmpd~ 3 3; +#X connect 0 0 55 0; +#X connect 1 0 26 0; +#X connect 3 0 17 0; +#X connect 3 0 18 0; +#X connect 3 0 19 0; +#X connect 4 0 3 0; +#X connect 8 0 7 0; +#X connect 9 0 3 0; +#X connect 10 0 0 0; +#X connect 11 0 18 0; +#X connect 11 0 53 0; +#X connect 12 0 48 0; +#X connect 13 0 11 0; +#X connect 14 0 25 0; +#X connect 25 0 19 0; +#X connect 25 0 54 0; +#X connect 26 0 47 0; +#X connect 26 0 43 0; +#X connect 26 0 45 0; +#X connect 26 1 49 0; +#X connect 26 1 46 0; +#X connect 26 1 42 0; +#X connect 26 2 32 0; +#X connect 26 2 33 0; +#X connect 26 2 51 0; +#X connect 26 3 40 0; +#X connect 26 3 34 0; +#X connect 26 3 35 0; +#X connect 26 4 41 0; +#X connect 27 0 2 0; +#X connect 27 0 5 0; +#X connect 27 0 16 0; +#X connect 28 0 27 0; +#X connect 29 0 27 0; +#X connect 31 0 23 0; +#X connect 31 0 23 1; +#X connect 32 0 0 0; +#X connect 33 0 0 0; +#X connect 34 0 0 0; +#X connect 35 0 0 0; +#X connect 40 0 0 0; +#X connect 41 0 0 0; +#X connect 42 0 0 0; +#X connect 43 0 0 0; +#X connect 44 0 31 0; +#X connect 45 0 0 0; +#X connect 46 0 0 0; +#X connect 47 0 0 0; +#X connect 48 0 17 0; +#X connect 48 0 52 0; +#X connect 49 0 0 0; +#X connect 51 0 0 0; +#X connect 52 0 55 0; +#X connect 53 0 55 1; +#X connect 54 0 55 2; +#X connect 55 0 2 0; +#X connect 55 0 44 0; +#X connect 55 1 5 0; +#X connect 55 1 44 0; +#X connect 55 2 16 0; +#X connect 55 2 44 0; diff --git a/examples/49_pmpd~.pd b/examples/49_pmpd~.pd deleted file mode 100644 index 1628928..0000000 --- a/examples/49_pmpd~.pd +++ /dev/null @@ -1,140 +0,0 @@ -#N canvas 39 25 842 667 10; -#X obj 39 413 t a; -#X obj 134 11 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 52 647 tabwrite~ array99; -#X obj 424 497 metro 100; -#X obj 424 471 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X obj 190 647 tabwrite~ array98; -#N canvas 0 0 454 304 (subpatch) 0; -#X array array97 100 float 0; -#X coords 0 1 100 -1 150 100 1; -#X restore 662 269 graph; -#X msg 15 54 \; pd dsp 1 \;; -#X obj 15 29 loadbang; -#X obj 450 474 loadbang; -#X msg 299 402 forceX 2 1; -#X obj 197 498 phasor~ 1; -#X floatatom 77 479 5 0 0 0 - - -; -#X floatatom 197 477 5 0 0 0 - - -; -#X floatatom 320 478 5 0 0 0 - - -; -#N canvas 0 0 454 304 (subpatch) 0; -#X array array98 100 float 0; -#X coords 0 1 100 -1 150 100 1; -#X restore 662 165 graph; -#X obj 325 647 tabwrite~ array97; -#X obj 88 521 tabwrite~ array9; -#X obj 208 522 tabwrite~ array8; -#X obj 332 523 tabwrite~ array7; -#N canvas 0 0 450 300 (subpatch) 0; -#X array array9 100 float 0; -#X coords 0 1 100 -1 150 100 1; -#X restore 507 61 graph; -#N canvas 0 0 454 304 (subpatch) 0; -#X array array7 100 float 0; -#X coords 0 1 100 -1 150 100 1; -#X restore 507 269 graph; -#N canvas 0 0 454 304 (subpatch) 0; -#X array array8 100 float 0; -#X coords 0 1 100 -1 150 100 1; -#X restore 507 165 graph; -#X obj 38 734 dac~; -#N canvas 0 0 450 300 (subpatch) 0; -#X array array99 100 float 0; -#X coords 0 1 100 -1 150 100 1; -#X restore 662 61 graph; -#X obj 320 499 phasor~ 1.5; -#X obj 134 37 t b b b b b; -#X obj 325 623 metro 100; -#X obj 325 597 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X obj 351 600 loadbang; -#X text 159 10 <- create the network; -#X obj 39 709 *~ 0.5; -#X msg 181 256 link 0 2 0.5 0.001; -#X msg 182 277 link 0 3 0.3 0.001; -#X msg 202 324 mass 10 1; -#X msg 203 350 mass 10 1; -#X text 295 325 M \, X0; -#X text 312 256 mass1 \, mass2 \, K \, D; -#X text 281 168 outlet \, mass \, amplitude; -#X text 248 89 inlet \, mass \, amplitude; -#X msg 201 299 mass 10 1; -#X msg 221 378 reset \, mass 0 0; -#X msg 179 191 outPos 2 3 1; -#X msg 133 91 inForce 1 2 1; -#X obj 40 679 hip~ 20; -#X msg 134 116 inForce 2 3 1; -#X msg 162 171 outPos 1 2 1; -#X msg 133 68 inForce 0 1 1; -#X obj 77 498 phasor~ 1.33333; -#X msg 155 149 outPos 0 1 3; -#X text 212 236 mass1 \, mass2 \, K \, D \, Pow \, L0 \, Lmin \, Lmax -; -#X msg 176 218 NLlink 0 1 0.1 0.001 1.1 0 -10 10; -#X obj 77 543 /~ 250; -#X obj 197 544 /~ 10; -#X obj 319 554 /~ 30; -#X obj 39 583 pmpd~ 3 3; -#X connect 0 0 55 0; -#X connect 1 0 26 0; -#X connect 3 0 17 0; -#X connect 3 0 18 0; -#X connect 3 0 19 0; -#X connect 4 0 3 0; -#X connect 8 0 7 0; -#X connect 9 0 3 0; -#X connect 10 0 0 0; -#X connect 11 0 18 0; -#X connect 11 0 53 0; -#X connect 12 0 48 0; -#X connect 13 0 11 0; -#X connect 14 0 25 0; -#X connect 25 0 19 0; -#X connect 25 0 54 0; -#X connect 26 0 47 0; -#X connect 26 0 43 0; -#X connect 26 0 45 0; -#X connect 26 1 49 0; -#X connect 26 1 46 0; -#X connect 26 1 42 0; -#X connect 26 2 32 0; -#X connect 26 2 33 0; -#X connect 26 2 51 0; -#X connect 26 3 40 0; -#X connect 26 3 34 0; -#X connect 26 3 35 0; -#X connect 26 4 41 0; -#X connect 27 0 2 0; -#X connect 27 0 5 0; -#X connect 27 0 16 0; -#X connect 28 0 27 0; -#X connect 29 0 27 0; -#X connect 31 0 23 0; -#X connect 31 0 23 1; -#X connect 32 0 0 0; -#X connect 33 0 0 0; -#X connect 34 0 0 0; -#X connect 35 0 0 0; -#X connect 40 0 0 0; -#X connect 41 0 0 0; -#X connect 42 0 0 0; -#X connect 43 0 0 0; -#X connect 44 0 31 0; -#X connect 45 0 0 0; -#X connect 46 0 0 0; -#X connect 47 0 0 0; -#X connect 48 0 17 0; -#X connect 48 0 52 0; -#X connect 49 0 0 0; -#X connect 51 0 0 0; -#X connect 52 0 55 0; -#X connect 53 0 55 1; -#X connect 54 0 55 2; -#X connect 55 0 2 0; -#X connect 55 0 44 0; -#X connect 55 1 5 0; -#X connect 55 1 44 0; -#X connect 55 2 16 0; -#X connect 55 2 44 0; diff --git a/examples/49_simple_oscilator~.pd b/examples/49_simple_oscilator~.pd new file mode 100644 index 0000000..6abe3d9 --- /dev/null +++ b/examples/49_simple_oscilator~.pd @@ -0,0 +1,212 @@ +#N canvas 249 92 539 463 10; +#X obj 118 40 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 168 422 dac~; +#X obj 334 243 tabplay~ dirac; +#X obj 391 42 loadbang; +#X obj 168 314 pmpd~ 3 1; +#X obj 256 243 phasor~ 2; +#X obj 130 278 r pm; +#X floatatom 168 206 5 0 0 0 - - -; +#X obj 168 224 mtof; +#X obj 168 243 phasor~ 123; +#X obj 168 363 hip~ 22; +#X obj 118 60 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 118 100 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 168 338 *~ 0.5; +#X obj 118 120 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 118 80 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 168 387 clip~ -1 1; +#X obj 118 140 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 334 205 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 +1; +#X obj 334 223 metro 500; +#X obj 334 185 loadbang; +#X obj 391 117 table dirac 2; +#N canvas 766 197 459 463 double_non_linear_oscilator 0; +#X obj 35 29 inlet; +#X obj 35 55 t b b b b b; +#X msg 109 77 reset; +#X obj 35 316 s pm; +#X obj 87 27 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X msg 53 187 inForce 0 1 0; +#X msg 35 210 outPos 0 2 1; +#X msg 90 99 mass 0 0 \, mass 1 0 \, mass 1 1; +#X msg 72 129 NLlink 0 1 0.0003 0 2 0 -100 100; +#X msg 59 153 NLlink 1 2 0.0003 0 0.5 0.1 -100 100; +#X connect 0 0 1 0; +#X connect 1 0 6 0; +#X connect 1 1 5 0; +#X connect 1 2 8 0; +#X connect 1 2 9 0; +#X connect 1 3 7 0; +#X connect 1 4 2 0; +#X connect 2 0 3 0; +#X connect 4 0 1 0; +#X connect 5 0 3 0; +#X connect 6 0 3 0; +#X connect 7 0 3 0; +#X connect 8 0 3 0; +#X connect 9 0 3 0; +#X restore 137 100 pd double_non_linear_oscilator _; +#N canvas 76 106 491 563 very_non_linear_oscilator 0; +#X obj 35 29 inlet; +#X obj 38 54 t b b b b b; +#X msg 109 77 reset; +#X obj 35 456 s pm; +#X msg 90 99 mass 0 0 \, mass 1 0; +#X obj 87 27 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X msg 52 370 inForce 2 1 0.01; +#X msg 114 153 NLlink 0 1 0.001 0.001 1 0 1 100; +#X msg 74 124 NLlink 0 1 0.1 0 0.1 0 -0.01 0.01; +#X msg 134 186 NLlink 0 1 0.0001 0.001 1 0 -100 -1; +#X msg 35 400 outPos 0 1 0.1; +#X connect 0 0 1 0; +#X connect 1 0 10 0; +#X connect 1 1 6 0; +#X connect 1 2 8 0; +#X connect 1 2 7 0; +#X connect 1 2 9 0; +#X connect 1 3 4 0; +#X connect 1 4 2 0; +#X connect 2 0 3 0; +#X connect 4 0 3 0; +#X connect 5 0 1 0; +#X connect 6 0 3 0; +#X connect 7 0 3 0; +#X connect 8 0 3 0; +#X connect 9 0 3 0; +#X connect 10 0 3 0; +#X restore 137 120 pd very_non_linear_oscilator ___; +#N canvas 76 106 491 563 very_non_linear_oscilator2 0; +#X obj 35 29 inlet; +#X obj 38 54 t b b b b b; +#X msg 109 77 reset; +#X obj 35 456 s pm; +#X msg 90 99 mass 0 0 \, mass 1 0; +#X obj 87 27 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X msg 52 370 inForce 2 1 0.01; +#X msg 35 400 outPos 0 1 1; +#X msg 74 124 NLlink 0 1 -0.001 0 1 0 -0.5 0.5; +#X msg 113 152 NLlink 0 1 0.01 0.0001 1 0 0.5 100; +#X msg 135 186 NLlink 0 1 0.01 0.001 1 0 -100 -0.5; +#X connect 0 0 1 0; +#X connect 1 0 7 0; +#X connect 1 1 6 0; +#X connect 1 2 8 0; +#X connect 1 2 9 0; +#X connect 1 2 10 0; +#X connect 1 3 4 0; +#X connect 1 4 2 0; +#X connect 2 0 3 0; +#X connect 4 0 3 0; +#X connect 5 0 1 0; +#X connect 6 0 3 0; +#X connect 7 0 3 0; +#X connect 8 0 3 0; +#X connect 9 0 3 0; +#X connect 10 0 3 0; +#X restore 137 140 pd very_non_linear_oscilator2 __; +#N canvas 0 254 491 438 bass 0; +#X obj 35 29 inlet; +#X obj 35 55 t b b b b b; +#X msg 109 77 reset; +#X obj 35 236 s pm; +#X msg 90 99 mass 0 0 \, mass 1 0; +#X obj 87 27 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X msg 35 180 outPos 0 1 1; +#X msg 53 157 inForce 2 1 0.05; +#X msg 73 125 NLlink 0 1 0.001 0.0012 4 0 -100 100; +#X connect 0 0 1 0; +#X connect 1 0 6 0; +#X connect 1 1 7 0; +#X connect 1 2 8 0; +#X connect 1 3 4 0; +#X connect 1 4 2 0; +#X connect 2 0 3 0; +#X connect 4 0 3 0; +#X connect 5 0 1 0; +#X connect 6 0 3 0; +#X connect 7 0 3 0; +#X connect 8 0 3 0; +#X restore 137 80 pd bass ________________________; +#N canvas 42 355 316 300 damped_oscilator 0; +#X obj 35 29 inlet; +#X obj 35 55 t b b b b b; +#X msg 109 77 reset; +#X obj 35 266 s pm; +#X msg 90 99 mass 0 0 \, mass 1 0; +#X obj 87 27 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X msg 53 147 inPos 1 0 1; +#X msg 70 125 link 0 1 0.001 0.001; +#X msg 35 170 outPos 0 1 0.5; +#X connect 0 0 1 0; +#X connect 1 0 8 0; +#X connect 1 1 6 0; +#X connect 1 2 7 0; +#X connect 1 3 4 0; +#X connect 1 4 2 0; +#X connect 2 0 3 0; +#X connect 4 0 3 0; +#X connect 5 0 1 0; +#X connect 6 0 3 0; +#X connect 7 0 3 0; +#X connect 8 0 3 0; +#X restore 137 60 pd damped_oscilator ____________; +#N canvas 42 355 316 300 phasor_filtered 0; +#X obj 35 29 inlet; +#X obj 35 55 t b b b b b; +#X msg 109 77 reset; +#X obj 35 266 s pm; +#X msg 90 99 mass 0 0 \, mass 1 0; +#X obj 87 27 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X msg 53 147 inPos 0 0 1; +#X msg 35 170 outPos 0 1 1; +#X msg 72 125 link 0 1 0.005 0.02; +#X connect 0 0 1 0; +#X connect 1 0 7 0; +#X connect 1 1 6 0; +#X connect 1 2 8 0; +#X connect 1 3 4 0; +#X connect 1 4 2 0; +#X connect 2 0 3 0; +#X connect 4 0 3 0; +#X connect 5 0 1 0; +#X connect 6 0 3 0; +#X connect 7 0 3 0; +#X connect 8 0 3 0; +#X restore 137 40 pd phasor_filtered _____________; +#X text 31 41 to test ->; +#X msg 391 64 \; dirac 0 1 \; pd dsp 1; +#X connect 0 0 27 0; +#X connect 2 0 4 2; +#X connect 3 0 29 0; +#X connect 4 0 13 0; +#X connect 5 0 4 1; +#X connect 6 0 4 0; +#X connect 7 0 8 0; +#X connect 8 0 9 0; +#X connect 9 0 4 0; +#X connect 10 0 16 0; +#X connect 11 0 26 0; +#X connect 12 0 22 0; +#X connect 13 0 10 0; +#X connect 14 0 23 0; +#X connect 15 0 25 0; +#X connect 16 0 1 0; +#X connect 16 0 1 1; +#X connect 17 0 24 0; +#X connect 18 0 19 0; +#X connect 19 0 2 0; +#X connect 20 0 18 0; diff --git a/examples/50_simple_oscilator~.pd b/examples/50_simple_oscilator~.pd deleted file mode 100644 index 6abe3d9..0000000 --- a/examples/50_simple_oscilator~.pd +++ /dev/null @@ -1,212 +0,0 @@ -#N canvas 249 92 539 463 10; -#X obj 118 40 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#X obj 168 422 dac~; -#X obj 334 243 tabplay~ dirac; -#X obj 391 42 loadbang; -#X obj 168 314 pmpd~ 3 1; -#X obj 256 243 phasor~ 2; -#X obj 130 278 r pm; -#X floatatom 168 206 5 0 0 0 - - -; -#X obj 168 224 mtof; -#X obj 168 243 phasor~ 123; -#X obj 168 363 hip~ 22; -#X obj 118 60 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#X obj 118 100 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; -#X obj 168 338 *~ 0.5; -#X obj 118 120 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; -#X obj 118 80 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#X obj 168 387 clip~ -1 1; -#X obj 118 140 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; -#X obj 334 205 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 -1; -#X obj 334 223 metro 500; -#X obj 334 185 loadbang; -#X obj 391 117 table dirac 2; -#N canvas 766 197 459 463 double_non_linear_oscilator 0; -#X obj 35 29 inlet; -#X obj 35 55 t b b b b b; -#X msg 109 77 reset; -#X obj 35 316 s pm; -#X obj 87 27 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#X msg 53 187 inForce 0 1 0; -#X msg 35 210 outPos 0 2 1; -#X msg 90 99 mass 0 0 \, mass 1 0 \, mass 1 1; -#X msg 72 129 NLlink 0 1 0.0003 0 2 0 -100 100; -#X msg 59 153 NLlink 1 2 0.0003 0 0.5 0.1 -100 100; -#X connect 0 0 1 0; -#X connect 1 0 6 0; -#X connect 1 1 5 0; -#X connect 1 2 8 0; -#X connect 1 2 9 0; -#X connect 1 3 7 0; -#X connect 1 4 2 0; -#X connect 2 0 3 0; -#X connect 4 0 1 0; -#X connect 5 0 3 0; -#X connect 6 0 3 0; -#X connect 7 0 3 0; -#X connect 8 0 3 0; -#X connect 9 0 3 0; -#X restore 137 100 pd double_non_linear_oscilator _; -#N canvas 76 106 491 563 very_non_linear_oscilator 0; -#X obj 35 29 inlet; -#X obj 38 54 t b b b b b; -#X msg 109 77 reset; -#X obj 35 456 s pm; -#X msg 90 99 mass 0 0 \, mass 1 0; -#X obj 87 27 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#X msg 52 370 inForce 2 1 0.01; -#X msg 114 153 NLlink 0 1 0.001 0.001 1 0 1 100; -#X msg 74 124 NLlink 0 1 0.1 0 0.1 0 -0.01 0.01; -#X msg 134 186 NLlink 0 1 0.0001 0.001 1 0 -100 -1; -#X msg 35 400 outPos 0 1 0.1; -#X connect 0 0 1 0; -#X connect 1 0 10 0; -#X connect 1 1 6 0; -#X connect 1 2 8 0; -#X connect 1 2 7 0; -#X connect 1 2 9 0; -#X connect 1 3 4 0; -#X connect 1 4 2 0; -#X connect 2 0 3 0; -#X connect 4 0 3 0; -#X connect 5 0 1 0; -#X connect 6 0 3 0; -#X connect 7 0 3 0; -#X connect 8 0 3 0; -#X connect 9 0 3 0; -#X connect 10 0 3 0; -#X restore 137 120 pd very_non_linear_oscilator ___; -#N canvas 76 106 491 563 very_non_linear_oscilator2 0; -#X obj 35 29 inlet; -#X obj 38 54 t b b b b b; -#X msg 109 77 reset; -#X obj 35 456 s pm; -#X msg 90 99 mass 0 0 \, mass 1 0; -#X obj 87 27 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#X msg 52 370 inForce 2 1 0.01; -#X msg 35 400 outPos 0 1 1; -#X msg 74 124 NLlink 0 1 -0.001 0 1 0 -0.5 0.5; -#X msg 113 152 NLlink 0 1 0.01 0.0001 1 0 0.5 100; -#X msg 135 186 NLlink 0 1 0.01 0.001 1 0 -100 -0.5; -#X connect 0 0 1 0; -#X connect 1 0 7 0; -#X connect 1 1 6 0; -#X connect 1 2 8 0; -#X connect 1 2 9 0; -#X connect 1 2 10 0; -#X connect 1 3 4 0; -#X connect 1 4 2 0; -#X connect 2 0 3 0; -#X connect 4 0 3 0; -#X connect 5 0 1 0; -#X connect 6 0 3 0; -#X connect 7 0 3 0; -#X connect 8 0 3 0; -#X connect 9 0 3 0; -#X connect 10 0 3 0; -#X restore 137 140 pd very_non_linear_oscilator2 __; -#N canvas 0 254 491 438 bass 0; -#X obj 35 29 inlet; -#X obj 35 55 t b b b b b; -#X msg 109 77 reset; -#X obj 35 236 s pm; -#X msg 90 99 mass 0 0 \, mass 1 0; -#X obj 87 27 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#X msg 35 180 outPos 0 1 1; -#X msg 53 157 inForce 2 1 0.05; -#X msg 73 125 NLlink 0 1 0.001 0.0012 4 0 -100 100; -#X connect 0 0 1 0; -#X connect 1 0 6 0; -#X connect 1 1 7 0; -#X connect 1 2 8 0; -#X connect 1 3 4 0; -#X connect 1 4 2 0; -#X connect 2 0 3 0; -#X connect 4 0 3 0; -#X connect 5 0 1 0; -#X connect 6 0 3 0; -#X connect 7 0 3 0; -#X connect 8 0 3 0; -#X restore 137 80 pd bass ________________________; -#N canvas 42 355 316 300 damped_oscilator 0; -#X obj 35 29 inlet; -#X obj 35 55 t b b b b b; -#X msg 109 77 reset; -#X obj 35 266 s pm; -#X msg 90 99 mass 0 0 \, mass 1 0; -#X obj 87 27 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#X msg 53 147 inPos 1 0 1; -#X msg 70 125 link 0 1 0.001 0.001; -#X msg 35 170 outPos 0 1 0.5; -#X connect 0 0 1 0; -#X connect 1 0 8 0; -#X connect 1 1 6 0; -#X connect 1 2 7 0; -#X connect 1 3 4 0; -#X connect 1 4 2 0; -#X connect 2 0 3 0; -#X connect 4 0 3 0; -#X connect 5 0 1 0; -#X connect 6 0 3 0; -#X connect 7 0 3 0; -#X connect 8 0 3 0; -#X restore 137 60 pd damped_oscilator ____________; -#N canvas 42 355 316 300 phasor_filtered 0; -#X obj 35 29 inlet; -#X obj 35 55 t b b b b b; -#X msg 109 77 reset; -#X obj 35 266 s pm; -#X msg 90 99 mass 0 0 \, mass 1 0; -#X obj 87 27 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#X msg 53 147 inPos 0 0 1; -#X msg 35 170 outPos 0 1 1; -#X msg 72 125 link 0 1 0.005 0.02; -#X connect 0 0 1 0; -#X connect 1 0 7 0; -#X connect 1 1 6 0; -#X connect 1 2 8 0; -#X connect 1 3 4 0; -#X connect 1 4 2 0; -#X connect 2 0 3 0; -#X connect 4 0 3 0; -#X connect 5 0 1 0; -#X connect 6 0 3 0; -#X connect 7 0 3 0; -#X connect 8 0 3 0; -#X restore 137 40 pd phasor_filtered _____________; -#X text 31 41 to test ->; -#X msg 391 64 \; dirac 0 1 \; pd dsp 1; -#X connect 0 0 27 0; -#X connect 2 0 4 2; -#X connect 3 0 29 0; -#X connect 4 0 13 0; -#X connect 5 0 4 1; -#X connect 6 0 4 0; -#X connect 7 0 8 0; -#X connect 8 0 9 0; -#X connect 9 0 4 0; -#X connect 10 0 16 0; -#X connect 11 0 26 0; -#X connect 12 0 22 0; -#X connect 13 0 10 0; -#X connect 14 0 23 0; -#X connect 15 0 25 0; -#X connect 16 0 1 0; -#X connect 16 0 1 1; -#X connect 17 0 24 0; -#X connect 18 0 19 0; -#X connect 19 0 2 0; -#X connect 20 0 18 0; diff --git a/examples/50_string~.pd b/examples/50_string~.pd new file mode 100644 index 0000000..89411f1 --- /dev/null +++ b/examples/50_string~.pd @@ -0,0 +1,116 @@ +#N canvas 421 245 487 445 10; +#X floatatom 32 12 0 0 0 0 - - -; +#N canvas 0 0 454 304 cpu 0; +#X obj 61 159 cputime; +#X obj 61 19 loadbang; +#X obj 61 103 metro 1000; +#X msg 61 47 1; +#X floatatom 61 75 0 0 0 0 - - -; +#X obj 61 131 t b b; +#X obj 61 219 * 0.1; +#X obj 61 188 int; +#X text 106 75 <-- on/off; +#X obj 61 246 outlet; +#X connect 0 0 7 0; +#X connect 1 0 3 0; +#X connect 2 0 5 0; +#X connect 3 0 4 0; +#X connect 4 0 2 0; +#X connect 5 0 0 0; +#X connect 5 1 0 1; +#X connect 6 0 9 0; +#X connect 7 0 6 0; +#X restore 32 -14 pd cpu; +#X obj 89 219 tabwrite~ array99; +#X msg 80 14 \; pd dsp 1 \;; +#X obj 80 -14 loadbang; +#X obj 26 221 dac~; +#X obj 27 171 hip~ 20; +#N canvas 0 0 450 300 (subpatch) 0; +#X array array99 3000 float 0; +#X coords 0 1 2999 -1 150 100 1; +#X restore 49 257 graph; +#N canvas 1 82 531 530 corde 0; +#X obj 86 32 t b b b b; +#X msg 143 71 reset; +#X obj 92 4 inlet; +#X obj 155 479 outlet; +#X obj 82 347 pack f f; +#X obj 93 277 t f f; +#X obj 118 300 + 1; +#X text 254 75 number of masss on the string; +#X obj 158 290 + 1; +#X obj 104 112 + 1; +#X obj 137 127 20; +#X obj 86 136 21; +#X obj 119 321 % 21; +#X msg 221 78 50; +#X msg 149 181 mass 20 1; +#X msg 83 367 link \$1 \$2 0.1 0.03; +#X msg 218 430 inForce 0 3 1; +#X msg 220 402 outPos 0 7 1; +#X obj 138 156 until; +#X obj 83 160 t f b; +#X msg 108 180 0; +#X obj 82 207 until; +#X obj 80 233 f; +#X obj 108 233 + 1; +#X connect 0 0 17 0; +#X connect 0 0 16 0; +#X connect 0 1 11 0; +#X connect 0 2 10 0; +#X connect 0 3 1 0; +#X connect 1 0 3 0; +#X connect 2 0 0 0; +#X connect 4 0 15 0; +#X connect 5 0 4 0; +#X connect 5 1 6 0; +#X connect 6 0 12 0; +#X connect 8 0 12 1; +#X connect 9 0 11 1; +#X connect 10 0 18 0; +#X connect 11 0 19 0; +#X connect 12 0 4 1; +#X connect 13 0 8 0; +#X connect 13 0 9 0; +#X connect 13 0 10 1; +#X connect 14 0 3 0; +#X connect 15 0 3 0; +#X connect 16 0 3 0; +#X connect 17 0 3 0; +#X connect 18 0 14 0; +#X connect 19 0 21 0; +#X connect 19 1 20 0; +#X connect 20 0 22 1; +#X connect 21 0 22 0; +#X connect 22 0 23 0; +#X connect 22 0 5 0; +#X connect 23 0 22 1; +#X restore 28 96 pd corde; +#X obj 28 74 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 89 193 metro 100; +#X obj 89 167 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 +; +#X obj 115 170 loadbang; +#X obj 28 122 pmpd~ 1 1; +#X obj 45 74 loadbang; +#X obj 111 97 line~; +#X msg 111 71 0.05 \, 0 1; +#X obj 28 146 *~ 0.7; +#X text 190 70 <- send a force to a point of the string; +#X connect 1 0 0 0; +#X connect 4 0 3 0; +#X connect 6 0 2 0; +#X connect 6 0 5 0; +#X connect 6 0 5 1; +#X connect 8 0 13 0; +#X connect 9 0 8 0; +#X connect 10 0 2 0; +#X connect 11 0 10 0; +#X connect 12 0 10 0; +#X connect 13 0 17 0; +#X connect 14 0 8 0; +#X connect 15 0 13 0; +#X connect 16 0 15 0; +#X connect 17 0 6 0; diff --git a/examples/51_pmpd_test.pd b/examples/51_pmpd_test.pd new file mode 100644 index 0000000..c231d97 --- /dev/null +++ b/examples/51_pmpd_test.pd @@ -0,0 +1,92 @@ +#N canvas 392 22 616 594 10; +#X obj 20 33 loadbang; +#X obj 401 197 print msd; +#X obj 309 58 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 +; +#X text 329 56 ON / OFF; +#X obj 33 55 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X msg 83 113 reset; +#X msg 35 229 Xmax 100 \, Xmin 0; +#X msg 128 372 setD souple 0.01; +#X msg 18 371 setK souple 1; +#X msg 128 394 setD souple 1; +#X msg 18 393 setK souple 2; +#X obj 331 392 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 6350 1; +#X obj 354 392 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 6350 1; +#X obj 308 392 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 6350 1; +#X msg 308 538 posX fix \$1; +#X obj 401 392 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 6350 1; +#X obj 377 392 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 6350 1; +#X msg 20 256 0 1 \, 1 2 \, 2 3 \, 3 4; +#X obj 308 347 unpack f f f f f; +#X obj 308 325 route massesPosL; +#X msg 309 103 bang \, massesPosL; +#X msg 20 278 link souple \$1 \$2 10 10; +#X obj 309 31 loadbang; +#X obj 20 77 t b b b b b; +#X text 50 55 reset; +#X text 18 10 creation : 5 masses and 4 links; +#X text 308 10 compute and get masses positions; +#X text 16 349 set rigidity and viscosity of links; +#X text 17 452 add force on all mobile masses; +#X text 443 440 move first slider; +#X text 429 453 to move the fixed mass; +#X msg 19 503 forceX mob 300; +#X msg 19 479 forceX mob -300; +#X text 307 279 display and interaction; +#X msg 51 201 mass mob 1 100 50; +#X msg 51 159 4; +#X obj 51 180 until; +#X msg 67 139 mass fix 0 100 50; +#X obj 309 167 pmpd; +#X obj 83 314 s \$0-pmpdin; +#X obj 19 421 s \$0-pmpdin; +#X obj 18 530 s \$0-pmpdin; +#X obj 319 138 r \$0-pmpdin; +#X obj 309 197 s \$0-pmpdout; +#X obj 308 302 r \$0-pmpdout; +#X obj 308 560 s \$0-pmpdin; +#X obj 309 80 metro 20; +#X text 23 566 COPYRIGHT : Nicolas Montgermont 2010; +#X connect 0 0 23 0; +#X connect 2 0 46 0; +#X connect 4 0 23 0; +#X connect 5 0 39 0; +#X connect 6 0 39 0; +#X connect 7 0 40 0; +#X connect 8 0 40 0; +#X connect 9 0 40 0; +#X connect 10 0 40 0; +#X connect 13 0 14 0; +#X connect 14 0 45 0; +#X connect 17 0 21 0; +#X connect 18 0 13 0; +#X connect 18 1 11 0; +#X connect 18 2 12 0; +#X connect 18 3 16 0; +#X connect 18 4 15 0; +#X connect 19 0 18 0; +#X connect 20 0 38 0; +#X connect 21 0 39 0; +#X connect 22 0 2 0; +#X connect 23 0 17 0; +#X connect 23 1 6 0; +#X connect 23 2 35 0; +#X connect 23 3 37 0; +#X connect 23 4 5 0; +#X connect 31 0 41 0; +#X connect 32 0 41 0; +#X connect 34 0 39 0; +#X connect 35 0 36 0; +#X connect 36 0 34 0; +#X connect 37 0 39 0; +#X connect 38 0 43 0; +#X connect 42 0 38 0; +#X connect 44 0 19 0; +#X connect 46 0 20 0; diff --git a/examples/51_string~.pd b/examples/51_string~.pd deleted file mode 100644 index 89411f1..0000000 --- a/examples/51_string~.pd +++ /dev/null @@ -1,116 +0,0 @@ -#N canvas 421 245 487 445 10; -#X floatatom 32 12 0 0 0 0 - - -; -#N canvas 0 0 454 304 cpu 0; -#X obj 61 159 cputime; -#X obj 61 19 loadbang; -#X obj 61 103 metro 1000; -#X msg 61 47 1; -#X floatatom 61 75 0 0 0 0 - - -; -#X obj 61 131 t b b; -#X obj 61 219 * 0.1; -#X obj 61 188 int; -#X text 106 75 <-- on/off; -#X obj 61 246 outlet; -#X connect 0 0 7 0; -#X connect 1 0 3 0; -#X connect 2 0 5 0; -#X connect 3 0 4 0; -#X connect 4 0 2 0; -#X connect 5 0 0 0; -#X connect 5 1 0 1; -#X connect 6 0 9 0; -#X connect 7 0 6 0; -#X restore 32 -14 pd cpu; -#X obj 89 219 tabwrite~ array99; -#X msg 80 14 \; pd dsp 1 \;; -#X obj 80 -14 loadbang; -#X obj 26 221 dac~; -#X obj 27 171 hip~ 20; -#N canvas 0 0 450 300 (subpatch) 0; -#X array array99 3000 float 0; -#X coords 0 1 2999 -1 150 100 1; -#X restore 49 257 graph; -#N canvas 1 82 531 530 corde 0; -#X obj 86 32 t b b b b; -#X msg 143 71 reset; -#X obj 92 4 inlet; -#X obj 155 479 outlet; -#X obj 82 347 pack f f; -#X obj 93 277 t f f; -#X obj 118 300 + 1; -#X text 254 75 number of masss on the string; -#X obj 158 290 + 1; -#X obj 104 112 + 1; -#X obj 137 127 20; -#X obj 86 136 21; -#X obj 119 321 % 21; -#X msg 221 78 50; -#X msg 149 181 mass 20 1; -#X msg 83 367 link \$1 \$2 0.1 0.03; -#X msg 218 430 inForce 0 3 1; -#X msg 220 402 outPos 0 7 1; -#X obj 138 156 until; -#X obj 83 160 t f b; -#X msg 108 180 0; -#X obj 82 207 until; -#X obj 80 233 f; -#X obj 108 233 + 1; -#X connect 0 0 17 0; -#X connect 0 0 16 0; -#X connect 0 1 11 0; -#X connect 0 2 10 0; -#X connect 0 3 1 0; -#X connect 1 0 3 0; -#X connect 2 0 0 0; -#X connect 4 0 15 0; -#X connect 5 0 4 0; -#X connect 5 1 6 0; -#X connect 6 0 12 0; -#X connect 8 0 12 1; -#X connect 9 0 11 1; -#X connect 10 0 18 0; -#X connect 11 0 19 0; -#X connect 12 0 4 1; -#X connect 13 0 8 0; -#X connect 13 0 9 0; -#X connect 13 0 10 1; -#X connect 14 0 3 0; -#X connect 15 0 3 0; -#X connect 16 0 3 0; -#X connect 17 0 3 0; -#X connect 18 0 14 0; -#X connect 19 0 21 0; -#X connect 19 1 20 0; -#X connect 20 0 22 1; -#X connect 21 0 22 0; -#X connect 22 0 23 0; -#X connect 22 0 5 0; -#X connect 23 0 22 1; -#X restore 28 96 pd corde; -#X obj 28 74 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 89 193 metro 100; -#X obj 89 167 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; -#X obj 115 170 loadbang; -#X obj 28 122 pmpd~ 1 1; -#X obj 45 74 loadbang; -#X obj 111 97 line~; -#X msg 111 71 0.05 \, 0 1; -#X obj 28 146 *~ 0.7; -#X text 190 70 <- send a force to a point of the string; -#X connect 1 0 0 0; -#X connect 4 0 3 0; -#X connect 6 0 2 0; -#X connect 6 0 5 0; -#X connect 6 0 5 1; -#X connect 8 0 13 0; -#X connect 9 0 8 0; -#X connect 10 0 2 0; -#X connect 11 0 10 0; -#X connect 12 0 10 0; -#X connect 13 0 17 0; -#X connect 14 0 8 0; -#X connect 15 0 13 0; -#X connect 16 0 15 0; -#X connect 17 0 6 0; diff --git a/examples/52_pmpd_string.pd b/examples/52_pmpd_string.pd new file mode 100644 index 0000000..59c5a50 --- /dev/null +++ b/examples/52_pmpd_string.pd @@ -0,0 +1,336 @@ +#N canvas 518 31 620 260 10; +#X obj 24 54 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262131 -1 +-1; +#X text 49 54 reset; +#N canvas 0 22 610 333 creation_structure 0; +#X obj 52 15 loadbang; +#X obj 135 20 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262131 -1 +-1; +#X msg 193 65 reset; +#X text 173 21 reset; +#N canvas 77 152 608 525 masses 0; +#X obj 109 15 inlet; +#X obj 112 338 outlet; +#X obj 200 343 print; +#X obj 112 64 t b b b b; +#X obj 150 158 until 17; +#X msg 150 184 mass corde 1 50 0; +#X msg 112 276 mass zero 0 1 0; +#X msg 150 134 80; +#X text 232 275 masse nulle pour l'amortissement general; +#X text 302 90 extremite gauche no 0; +#X text 283 184 masses mobiles no 1->80; +#X text 278 220 extremite droite no 81; +#X msg 170 89 mass corde 0 100 0; +#X msg 131 218 mass corde 0 100 0; +#X connect 0 0 3 0; +#X connect 3 0 6 0; +#X connect 3 1 13 0; +#X connect 3 2 7 0; +#X connect 3 3 12 0; +#X connect 4 0 5 0; +#X connect 5 0 1 0; +#X connect 6 0 1 0; +#X connect 7 0 4 0; +#X connect 12 0 1 0; +#X connect 13 0 1 0; +#X restore 173 87 pd masses; +#N canvas 579 114 813 597 link 0; +#X obj 157 35 inlet; +#X obj 185 490 outlet; +#X msg 176 320 link souple \$1 \$2 10 10; +#X obj 236 210 + 1; +#X obj 176 293 pack f f; +#X obj 253 493 print; +#X obj 176 241 t f f f; +#X obj 176 212 f 0; +#X obj 157 64 t b b b b; +#X text 305 254 liens entre les masses mobiles; +#X text 384 406 tlink qui fait un amortissement vertical general; +#X obj 386 323 s rigidite; +#X msg 386 300 10; +#X msg 157 403 link D2 zero corde 0 0; +#X msg 266 169 0; +#X obj 203 269 + 1; +#X obj 176 188 until; +#X floatatom 267 251 5 0 0 0 - - -; +#X msg 176 165 81; +#X obj 467 324 s amort; +#X connect 0 0 8 0; +#X connect 2 0 1 0; +#X connect 3 0 7 1; +#X connect 4 0 2 0; +#X connect 6 0 4 0; +#X connect 6 1 15 0; +#X connect 6 2 3 0; +#X connect 7 0 6 0; +#X connect 7 0 17 0; +#X connect 8 0 12 0; +#X connect 8 0 13 0; +#X connect 8 1 18 0; +#X connect 8 2 14 0; +#X connect 12 0 11 0; +#X connect 12 0 19 0; +#X connect 13 0 1 0; +#X connect 14 0 7 1; +#X connect 15 0 4 1; +#X connect 16 0 7 0; +#X connect 18 0 16 0; +#X restore 154 111 pd link; +#X obj 135 42 t b b b b; +#X text 252 82 CREATION : 2 masses fixes (fix) \, 80 mobiles (corde) +\, 80 liens (souple) \, 78 tLink (D2); +#X msg 135 132 Xmax 100 \, Xmin -100; +#X obj 247 23 inlet; +#X obj 121 213 loadbang; +#X obj 121 237 s load; +#X obj 135 160 s \$0-pmpdin; +#X connect 0 0 6 0; +#X connect 1 0 6 0; +#X connect 2 0 12 0; +#X connect 4 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 8 0; +#X connect 6 1 5 0; +#X connect 6 2 4 0; +#X connect 6 3 2 0; +#X connect 8 0 12 0; +#X connect 9 0 6 0; +#X connect 10 0 11 0; +#X restore 24 76 pd creation_structure; +#N canvas 508 227 516 328 compute 0; +#X obj 27 30 gemhead; +#N canvas 735 244 537 479 corde 0; +#X obj 139 41 inlet; +#X obj 81 333 translateXYZ; +#X obj 139 167 / 12.5; +#X obj 139 190 - 4; +#X obj 81 307 separator; +#X obj 139 238 t b f; +#X obj 81 273 gemhead 45; +#X obj 204 188 / 0.2; +#X obj 139 106 unpack f f; +#X msg 81 238 0; +#X obj 81 213 loadbang; +#X obj 81 369 color 1 1 1; +#X obj 139 139 + 10; +#X obj 81 398 cube 0.02; +#X obj 139 80 route 82; +#X connect 0 0 14 0; +#X connect 1 0 11 0; +#X connect 2 0 3 0; +#X connect 3 0 5 0; +#X connect 4 0 1 0; +#X connect 5 0 6 0; +#X connect 5 1 1 1; +#X connect 6 0 4 0; +#X connect 7 0 1 2; +#X connect 8 0 12 0; +#X connect 8 1 7 0; +#X connect 9 0 6 0; +#X connect 10 0 9 0; +#X connect 11 0 13 0; +#X connect 12 0 2 0; +#X connect 14 1 8 0; +#X restore 27 252 pd corde; +#N canvas 643 123 605 590 vitesse 0; +#X obj 127 22 inlet; +#X obj 62 333 translateXYZ; +#X obj 129 200 / 12.5; +#X obj 129 223 - 4; +#X obj 62 307 separator; +#X obj 129 250 t b f; +#X obj 62 280 gemhead 45; +#X obj 62 398 cube 0.01; +#X obj 431 25 inlet; +#X obj 236 46 spigot; +#X obj 195 216 + 2; +#X obj 78 81 route 82; +#X obj 129 107 unpack f f; +#X obj 62 232 loadbang; +#X msg 62 256 0; +#X obj 129 172 + 10; +#X obj 195 193 * 200; +#X obj 62 369 color 1 0 0; +#X connect 0 0 9 0; +#X connect 1 0 17 0; +#X connect 2 0 3 0; +#X connect 3 0 5 0; +#X connect 4 0 1 0; +#X connect 5 0 6 0; +#X connect 5 1 1 1; +#X connect 6 0 4 0; +#X connect 8 0 9 1; +#X connect 9 0 11 0; +#X connect 10 0 1 2; +#X connect 11 1 12 0; +#X connect 12 0 15 0; +#X connect 12 1 16 0; +#X connect 13 0 14 0; +#X connect 14 0 6 0; +#X connect 15 0 2 0; +#X connect 16 0 10 0; +#X connect 17 0 7 0; +#X restore 121 239 pd vitesse; +#X obj 186 219 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X obj 27 53 t b b b b b b b; +#X obj 27 195 route massesPos massesSpeeds massesForces; +#X text 208 240 Afficher les vitesses en haut; +#X text 310 279 Afficher les forces en bas; +#X obj 379 185 inlet; +#X obj 355 119 gemhead; +#X obj 355 142 world_light; +#N canvas 643 123 605 590 forces 0; +#X obj 53 99 inlet; +#X obj 60 377 translateXYZ; +#X obj 139 260 / 12.5; +#X obj 139 283 - 4; +#X obj 204 261 / 12.5; +#X obj 60 351 separator; +#X obj 137 310 t b f; +#X obj 60 325 gemhead 45; +#X obj 60 434 cube 0.02; +#X obj 111 99 inlet; +#X obj 53 129 spigot; +#X obj 60 284 loadbang; +#X msg 60 306 0; +#X obj 139 207 unpack f f; +#X obj 139 232 + 10; +#X obj 204 284 - 2; +#X obj 53 180 route 0 81 82; +#X obj 204 239 * 400; +#X obj 60 405 color 0 1 0; +#X connect 0 0 10 0; +#X connect 1 0 18 0; +#X connect 2 0 3 0; +#X connect 3 0 6 0; +#X connect 4 0 15 0; +#X connect 5 0 1 0; +#X connect 6 0 7 0; +#X connect 6 1 1 1; +#X connect 7 0 5 0; +#X connect 9 0 10 1; +#X connect 10 0 16 0; +#X connect 11 0 12 0; +#X connect 12 0 7 0; +#X connect 13 0 14 0; +#X connect 13 1 17 0; +#X connect 14 0 2 0; +#X connect 15 0 1 2; +#X connect 16 3 13 0; +#X connect 17 0 4 0; +#X connect 18 0 8 0; +#X restore 215 278 pd forces; +#X msg 27 75 bang \, get massesPos \, get massesSpeeds \, get massesForces +; +#X obj 95 100 r \$0-pmpdin; +#X obj 27 136 pmpd --------------------------------; +#X connect 0 0 4 0; +#X connect 3 0 2 1; +#X connect 4 0 12 0; +#X connect 4 1 14 0; +#X connect 4 2 14 0; +#X connect 4 3 14 0; +#X connect 4 4 14 0; +#X connect 4 5 14 0; +#X connect 4 6 14 0; +#X connect 5 0 1 0; +#X connect 5 1 2 0; +#X connect 5 2 11 0; +#X connect 8 0 11 1; +#X connect 8 0 2 1; +#X connect 9 0 10 0; +#X connect 12 0 14 0; +#X connect 13 0 14 0; +#X connect 14 0 5 0; +#X restore 24 165 pd compute; +#X obj 24 143 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 328 167 hsl 128 15 0 30 0 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 0 1; +#X obj 331 94 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 0 1; +#N canvas 0 22 450 300 gem 0; +#X obj 179 135 gemwin; +#X msg 198 113 0 \, destroy; +#X msg 179 90 reset \, create \, lighting 1 \, 1; +#X obj 179 39 inlet; +#X obj 179 68 sel 1 0; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 3 0 4 0; +#X connect 4 0 2 0; +#X connect 4 1 1 0; +#X restore 24 118 pd gem; +#X obj 24 99 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 +; +#X text 44 142 display forces (green) and speeds (red); +#N canvas 0 22 450 300 forces 0; +#X msg 167 134 forceX corde \$1; +#X obj 167 89 inlet; +#X obj 167 112 / 300; +#X obj 167 157 s \$0-pmpdin; +#X connect 0 0 3 0; +#X connect 1 0 2 0; +#X connect 2 0 0 0; +#X restore 328 57 pd forces; +#X obj 331 35 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 0 1; +#N canvas 0 22 450 300 general_damping 0; +#X msg 172 143 setD D2 \$1; +#X obj 172 121 / 5; +#X obj 173 100 inlet; +#X obj 172 166 s \$0-pmpdin; +#X connect 0 0 3 0; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X restore 325 187 pd general_damping; +#X text 324 22 Send forces; +#X text 45 98 gem on/off; +#X text 24 20 1D string model; +#N canvas 873 311 611 439 force2 0; +#X obj 174 147 / 120; +#X obj 171 43 inlet; +#X msg 174 175 41 \$1 \, 42 \$1; +#X obj 191 201 / 1.5; +#X msg 191 225 39 \$1 \, 40 \$1 \, 43 \$1 \, 44 \$1; +#X msg 206 271 36 \$1 \, 37 \$1 \, 38 \$1 \, 45 \$1 \, 46 \$1 \, 47 +\$1; +#X obj 206 247 / 3; +#X obj 175 398 s \$0-pmpdin; +#X obj 171 69 t f f; +#X obj 174 100 -; +#X obj 173 124 * 10; +#X msg 174 377 forceX \$1 \$2; +#X obj 177 346 pack f f; +#X obj 176 301 unpack f f; +#X obj 176 325 + 8; +#X connect 0 0 2 0; +#X connect 0 0 3 0; +#X connect 0 0 6 0; +#X connect 1 0 8 0; +#X connect 2 0 13 0; +#X connect 3 0 4 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 5 0; +#X connect 8 0 9 1; +#X connect 8 1 9 0; +#X connect 9 0 10 0; +#X connect 10 0 0 0; +#X connect 11 0 7 0; +#X connect 12 0 11 0; +#X connect 13 0 14 0; +#X connect 13 1 12 1; +#X connect 14 0 12 0; +#X restore 328 117 pd force2; +#X text 324 79 Send forces; +#X text 323 150 global damping; +#X text 23 196 COPYRIGHT : Nicolas Montgermont 2010; +#X connect 0 0 2 0; +#X connect 4 0 3 0; +#X connect 5 0 12 0; +#X connect 6 0 16 0; +#X connect 8 0 7 0; +#X connect 11 0 10 0; diff --git a/examples/52_pmpd_test.pd b/examples/52_pmpd_test.pd deleted file mode 100644 index c231d97..0000000 --- a/examples/52_pmpd_test.pd +++ /dev/null @@ -1,92 +0,0 @@ -#N canvas 392 22 616 594 10; -#X obj 20 33 loadbang; -#X obj 401 197 print msd; -#X obj 309 58 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 -; -#X text 329 56 ON / OFF; -#X obj 33 55 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 83 113 reset; -#X msg 35 229 Xmax 100 \, Xmin 0; -#X msg 128 372 setD souple 0.01; -#X msg 18 371 setK souple 1; -#X msg 128 394 setD souple 1; -#X msg 18 393 setK souple 2; -#X obj 331 392 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -262144 --1 -1 6350 1; -#X obj 354 392 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -262144 --1 -1 6350 1; -#X obj 308 392 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -262144 --1 -1 6350 1; -#X msg 308 538 posX fix \$1; -#X obj 401 392 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -262144 --1 -1 6350 1; -#X obj 377 392 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -262144 --1 -1 6350 1; -#X msg 20 256 0 1 \, 1 2 \, 2 3 \, 3 4; -#X obj 308 347 unpack f f f f f; -#X obj 308 325 route massesPosL; -#X msg 309 103 bang \, massesPosL; -#X msg 20 278 link souple \$1 \$2 10 10; -#X obj 309 31 loadbang; -#X obj 20 77 t b b b b b; -#X text 50 55 reset; -#X text 18 10 creation : 5 masses and 4 links; -#X text 308 10 compute and get masses positions; -#X text 16 349 set rigidity and viscosity of links; -#X text 17 452 add force on all mobile masses; -#X text 443 440 move first slider; -#X text 429 453 to move the fixed mass; -#X msg 19 503 forceX mob 300; -#X msg 19 479 forceX mob -300; -#X text 307 279 display and interaction; -#X msg 51 201 mass mob 1 100 50; -#X msg 51 159 4; -#X obj 51 180 until; -#X msg 67 139 mass fix 0 100 50; -#X obj 309 167 pmpd; -#X obj 83 314 s \$0-pmpdin; -#X obj 19 421 s \$0-pmpdin; -#X obj 18 530 s \$0-pmpdin; -#X obj 319 138 r \$0-pmpdin; -#X obj 309 197 s \$0-pmpdout; -#X obj 308 302 r \$0-pmpdout; -#X obj 308 560 s \$0-pmpdin; -#X obj 309 80 metro 20; -#X text 23 566 COPYRIGHT : Nicolas Montgermont 2010; -#X connect 0 0 23 0; -#X connect 2 0 46 0; -#X connect 4 0 23 0; -#X connect 5 0 39 0; -#X connect 6 0 39 0; -#X connect 7 0 40 0; -#X connect 8 0 40 0; -#X connect 9 0 40 0; -#X connect 10 0 40 0; -#X connect 13 0 14 0; -#X connect 14 0 45 0; -#X connect 17 0 21 0; -#X connect 18 0 13 0; -#X connect 18 1 11 0; -#X connect 18 2 12 0; -#X connect 18 3 16 0; -#X connect 18 4 15 0; -#X connect 19 0 18 0; -#X connect 20 0 38 0; -#X connect 21 0 39 0; -#X connect 22 0 2 0; -#X connect 23 0 17 0; -#X connect 23 1 6 0; -#X connect 23 2 35 0; -#X connect 23 3 37 0; -#X connect 23 4 5 0; -#X connect 31 0 41 0; -#X connect 32 0 41 0; -#X connect 34 0 39 0; -#X connect 35 0 36 0; -#X connect 36 0 34 0; -#X connect 37 0 39 0; -#X connect 38 0 43 0; -#X connect 42 0 38 0; -#X connect 44 0 19 0; -#X connect 46 0 20 0; diff --git a/examples/53_pmpd_string.pd b/examples/53_pmpd_string.pd deleted file mode 100644 index 59c5a50..0000000 --- a/examples/53_pmpd_string.pd +++ /dev/null @@ -1,336 +0,0 @@ -#N canvas 518 31 620 260 10; -#X obj 24 54 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262131 -1 --1; -#X text 49 54 reset; -#N canvas 0 22 610 333 creation_structure 0; -#X obj 52 15 loadbang; -#X obj 135 20 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262131 -1 --1; -#X msg 193 65 reset; -#X text 173 21 reset; -#N canvas 77 152 608 525 masses 0; -#X obj 109 15 inlet; -#X obj 112 338 outlet; -#X obj 200 343 print; -#X obj 112 64 t b b b b; -#X obj 150 158 until 17; -#X msg 150 184 mass corde 1 50 0; -#X msg 112 276 mass zero 0 1 0; -#X msg 150 134 80; -#X text 232 275 masse nulle pour l'amortissement general; -#X text 302 90 extremite gauche no 0; -#X text 283 184 masses mobiles no 1->80; -#X text 278 220 extremite droite no 81; -#X msg 170 89 mass corde 0 100 0; -#X msg 131 218 mass corde 0 100 0; -#X connect 0 0 3 0; -#X connect 3 0 6 0; -#X connect 3 1 13 0; -#X connect 3 2 7 0; -#X connect 3 3 12 0; -#X connect 4 0 5 0; -#X connect 5 0 1 0; -#X connect 6 0 1 0; -#X connect 7 0 4 0; -#X connect 12 0 1 0; -#X connect 13 0 1 0; -#X restore 173 87 pd masses; -#N canvas 579 114 813 597 link 0; -#X obj 157 35 inlet; -#X obj 185 490 outlet; -#X msg 176 320 link souple \$1 \$2 10 10; -#X obj 236 210 + 1; -#X obj 176 293 pack f f; -#X obj 253 493 print; -#X obj 176 241 t f f f; -#X obj 176 212 f 0; -#X obj 157 64 t b b b b; -#X text 305 254 liens entre les masses mobiles; -#X text 384 406 tlink qui fait un amortissement vertical general; -#X obj 386 323 s rigidite; -#X msg 386 300 10; -#X msg 157 403 link D2 zero corde 0 0; -#X msg 266 169 0; -#X obj 203 269 + 1; -#X obj 176 188 until; -#X floatatom 267 251 5 0 0 0 - - -; -#X msg 176 165 81; -#X obj 467 324 s amort; -#X connect 0 0 8 0; -#X connect 2 0 1 0; -#X connect 3 0 7 1; -#X connect 4 0 2 0; -#X connect 6 0 4 0; -#X connect 6 1 15 0; -#X connect 6 2 3 0; -#X connect 7 0 6 0; -#X connect 7 0 17 0; -#X connect 8 0 12 0; -#X connect 8 0 13 0; -#X connect 8 1 18 0; -#X connect 8 2 14 0; -#X connect 12 0 11 0; -#X connect 12 0 19 0; -#X connect 13 0 1 0; -#X connect 14 0 7 1; -#X connect 15 0 4 1; -#X connect 16 0 7 0; -#X connect 18 0 16 0; -#X restore 154 111 pd link; -#X obj 135 42 t b b b b; -#X text 252 82 CREATION : 2 masses fixes (fix) \, 80 mobiles (corde) -\, 80 liens (souple) \, 78 tLink (D2); -#X msg 135 132 Xmax 100 \, Xmin -100; -#X obj 247 23 inlet; -#X obj 121 213 loadbang; -#X obj 121 237 s load; -#X obj 135 160 s \$0-pmpdin; -#X connect 0 0 6 0; -#X connect 1 0 6 0; -#X connect 2 0 12 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 8 0; -#X connect 6 1 5 0; -#X connect 6 2 4 0; -#X connect 6 3 2 0; -#X connect 8 0 12 0; -#X connect 9 0 6 0; -#X connect 10 0 11 0; -#X restore 24 76 pd creation_structure; -#N canvas 508 227 516 328 compute 0; -#X obj 27 30 gemhead; -#N canvas 735 244 537 479 corde 0; -#X obj 139 41 inlet; -#X obj 81 333 translateXYZ; -#X obj 139 167 / 12.5; -#X obj 139 190 - 4; -#X obj 81 307 separator; -#X obj 139 238 t b f; -#X obj 81 273 gemhead 45; -#X obj 204 188 / 0.2; -#X obj 139 106 unpack f f; -#X msg 81 238 0; -#X obj 81 213 loadbang; -#X obj 81 369 color 1 1 1; -#X obj 139 139 + 10; -#X obj 81 398 cube 0.02; -#X obj 139 80 route 82; -#X connect 0 0 14 0; -#X connect 1 0 11 0; -#X connect 2 0 3 0; -#X connect 3 0 5 0; -#X connect 4 0 1 0; -#X connect 5 0 6 0; -#X connect 5 1 1 1; -#X connect 6 0 4 0; -#X connect 7 0 1 2; -#X connect 8 0 12 0; -#X connect 8 1 7 0; -#X connect 9 0 6 0; -#X connect 10 0 9 0; -#X connect 11 0 13 0; -#X connect 12 0 2 0; -#X connect 14 1 8 0; -#X restore 27 252 pd corde; -#N canvas 643 123 605 590 vitesse 0; -#X obj 127 22 inlet; -#X obj 62 333 translateXYZ; -#X obj 129 200 / 12.5; -#X obj 129 223 - 4; -#X obj 62 307 separator; -#X obj 129 250 t b f; -#X obj 62 280 gemhead 45; -#X obj 62 398 cube 0.01; -#X obj 431 25 inlet; -#X obj 236 46 spigot; -#X obj 195 216 + 2; -#X obj 78 81 route 82; -#X obj 129 107 unpack f f; -#X obj 62 232 loadbang; -#X msg 62 256 0; -#X obj 129 172 + 10; -#X obj 195 193 * 200; -#X obj 62 369 color 1 0 0; -#X connect 0 0 9 0; -#X connect 1 0 17 0; -#X connect 2 0 3 0; -#X connect 3 0 5 0; -#X connect 4 0 1 0; -#X connect 5 0 6 0; -#X connect 5 1 1 1; -#X connect 6 0 4 0; -#X connect 8 0 9 1; -#X connect 9 0 11 0; -#X connect 10 0 1 2; -#X connect 11 1 12 0; -#X connect 12 0 15 0; -#X connect 12 1 16 0; -#X connect 13 0 14 0; -#X connect 14 0 6 0; -#X connect 15 0 2 0; -#X connect 16 0 10 0; -#X connect 17 0 7 0; -#X restore 121 239 pd vitesse; -#X obj 186 219 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 -1; -#X obj 27 53 t b b b b b b b; -#X obj 27 195 route massesPos massesSpeeds massesForces; -#X text 208 240 Afficher les vitesses en haut; -#X text 310 279 Afficher les forces en bas; -#X obj 379 185 inlet; -#X obj 355 119 gemhead; -#X obj 355 142 world_light; -#N canvas 643 123 605 590 forces 0; -#X obj 53 99 inlet; -#X obj 60 377 translateXYZ; -#X obj 139 260 / 12.5; -#X obj 139 283 - 4; -#X obj 204 261 / 12.5; -#X obj 60 351 separator; -#X obj 137 310 t b f; -#X obj 60 325 gemhead 45; -#X obj 60 434 cube 0.02; -#X obj 111 99 inlet; -#X obj 53 129 spigot; -#X obj 60 284 loadbang; -#X msg 60 306 0; -#X obj 139 207 unpack f f; -#X obj 139 232 + 10; -#X obj 204 284 - 2; -#X obj 53 180 route 0 81 82; -#X obj 204 239 * 400; -#X obj 60 405 color 0 1 0; -#X connect 0 0 10 0; -#X connect 1 0 18 0; -#X connect 2 0 3 0; -#X connect 3 0 6 0; -#X connect 4 0 15 0; -#X connect 5 0 1 0; -#X connect 6 0 7 0; -#X connect 6 1 1 1; -#X connect 7 0 5 0; -#X connect 9 0 10 1; -#X connect 10 0 16 0; -#X connect 11 0 12 0; -#X connect 12 0 7 0; -#X connect 13 0 14 0; -#X connect 13 1 17 0; -#X connect 14 0 2 0; -#X connect 15 0 1 2; -#X connect 16 3 13 0; -#X connect 17 0 4 0; -#X connect 18 0 8 0; -#X restore 215 278 pd forces; -#X msg 27 75 bang \, get massesPos \, get massesSpeeds \, get massesForces -; -#X obj 95 100 r \$0-pmpdin; -#X obj 27 136 pmpd --------------------------------; -#X connect 0 0 4 0; -#X connect 3 0 2 1; -#X connect 4 0 12 0; -#X connect 4 1 14 0; -#X connect 4 2 14 0; -#X connect 4 3 14 0; -#X connect 4 4 14 0; -#X connect 4 5 14 0; -#X connect 4 6 14 0; -#X connect 5 0 1 0; -#X connect 5 1 2 0; -#X connect 5 2 11 0; -#X connect 8 0 11 1; -#X connect 8 0 2 1; -#X connect 9 0 10 0; -#X connect 12 0 14 0; -#X connect 13 0 14 0; -#X connect 14 0 5 0; -#X restore 24 165 pd compute; -#X obj 24 143 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 -1; -#X obj 328 167 hsl 128 15 0 30 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 0 1; -#X obj 331 94 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 0 1; -#N canvas 0 22 450 300 gem 0; -#X obj 179 135 gemwin; -#X msg 198 113 0 \, destroy; -#X msg 179 90 reset \, create \, lighting 1 \, 1; -#X obj 179 39 inlet; -#X obj 179 68 sel 1 0; -#X connect 1 0 0 0; -#X connect 2 0 0 0; -#X connect 3 0 4 0; -#X connect 4 0 2 0; -#X connect 4 1 1 0; -#X restore 24 118 pd gem; -#X obj 24 99 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 -; -#X text 44 142 display forces (green) and speeds (red); -#N canvas 0 22 450 300 forces 0; -#X msg 167 134 forceX corde \$1; -#X obj 167 89 inlet; -#X obj 167 112 / 300; -#X obj 167 157 s \$0-pmpdin; -#X connect 0 0 3 0; -#X connect 1 0 2 0; -#X connect 2 0 0 0; -#X restore 328 57 pd forces; -#X obj 331 35 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144 --1 -1 0 1; -#N canvas 0 22 450 300 general_damping 0; -#X msg 172 143 setD D2 \$1; -#X obj 172 121 / 5; -#X obj 173 100 inlet; -#X obj 172 166 s \$0-pmpdin; -#X connect 0 0 3 0; -#X connect 1 0 0 0; -#X connect 2 0 1 0; -#X restore 325 187 pd general_damping; -#X text 324 22 Send forces; -#X text 45 98 gem on/off; -#X text 24 20 1D string model; -#N canvas 873 311 611 439 force2 0; -#X obj 174 147 / 120; -#X obj 171 43 inlet; -#X msg 174 175 41 \$1 \, 42 \$1; -#X obj 191 201 / 1.5; -#X msg 191 225 39 \$1 \, 40 \$1 \, 43 \$1 \, 44 \$1; -#X msg 206 271 36 \$1 \, 37 \$1 \, 38 \$1 \, 45 \$1 \, 46 \$1 \, 47 -\$1; -#X obj 206 247 / 3; -#X obj 175 398 s \$0-pmpdin; -#X obj 171 69 t f f; -#X obj 174 100 -; -#X obj 173 124 * 10; -#X msg 174 377 forceX \$1 \$2; -#X obj 177 346 pack f f; -#X obj 176 301 unpack f f; -#X obj 176 325 + 8; -#X connect 0 0 2 0; -#X connect 0 0 3 0; -#X connect 0 0 6 0; -#X connect 1 0 8 0; -#X connect 2 0 13 0; -#X connect 3 0 4 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 5 0; -#X connect 8 0 9 1; -#X connect 8 1 9 0; -#X connect 9 0 10 0; -#X connect 10 0 0 0; -#X connect 11 0 7 0; -#X connect 12 0 11 0; -#X connect 13 0 14 0; -#X connect 13 1 12 1; -#X connect 14 0 12 0; -#X restore 328 117 pd force2; -#X text 324 79 Send forces; -#X text 323 150 global damping; -#X text 23 196 COPYRIGHT : Nicolas Montgermont 2010; -#X connect 0 0 2 0; -#X connect 4 0 3 0; -#X connect 5 0 12 0; -#X connect 6 0 16 0; -#X connect 8 0 7 0; -#X connect 11 0 10 0; diff --git a/examples/53_pmpd_wave.pd b/examples/53_pmpd_wave.pd new file mode 100644 index 0000000..90a9426 --- /dev/null +++ b/examples/53_pmpd_wave.pd @@ -0,0 +1,231 @@ +#N canvas 617 175 594 188 10; +#X obj 29 20 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X text 49 19 Reset; +#X obj 202 27 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#N canvas 0 22 981 585 structure_creation 0; +#X msg 681 243 mass filet 1 100 0; +#X msg 663 64 reset; +#X obj 418 25 t b b b b b b b b b b b b; +#X obj 681 201 until; +#X msg 681 170 400; +#X msg 561 378 link fil \$1 \$2 10 1; +#X msg 561 174 380; +#X obj 561 206 until; +#X obj 561 245 f 0; +#X obj 609 261 + 1; +#X msg 618 226 0; +#X obj 636 312 + 20; +#X obj 561 339 pack f f; +#X obj 561 288 t f f; +#X msg 397 151 400; +#X obj 397 189 until; +#X obj 397 231 f 0; +#X obj 445 247 + 1; +#X msg 454 212 0; +#X obj 397 292 t f f; +#X obj 452 325 mod 20; +#X obj 452 355 != 19; +#X obj 397 393 spigot; +#X obj 397 475 pack f f; +#X obj 397 424 t f f; +#X obj 472 448 + 1; +#X msg 397 505 link fil \$1 \$2 10 1; +#X msg 403 107 setFixed 0 \, setFixed 19 \, setFixed 380 \, setFixed +399; +#X obj 418 -8 inlet; +#X obj 326 61 loadbang; +#X obj 690 527 s \$0-pmpdin; +#X connect 0 0 30 0; +#X connect 1 0 30 0; +#X connect 2 5 27 0; +#X connect 2 6 14 0; +#X connect 2 7 18 0; +#X connect 2 8 6 0; +#X connect 2 9 10 0; +#X connect 2 10 4 0; +#X connect 2 11 1 0; +#X connect 3 0 0 0; +#X connect 4 0 3 0; +#X connect 5 0 30 0; +#X connect 6 0 7 0; +#X connect 7 0 8 0; +#X connect 8 0 9 0; +#X connect 8 0 13 0; +#X connect 9 0 8 1; +#X connect 10 0 8 1; +#X connect 11 0 12 1; +#X connect 12 0 5 0; +#X connect 13 0 12 0; +#X connect 13 1 11 0; +#X connect 14 0 15 0; +#X connect 15 0 16 0; +#X connect 16 0 17 0; +#X connect 16 0 19 0; +#X connect 17 0 16 1; +#X connect 18 0 16 1; +#X connect 19 0 22 0; +#X connect 19 1 20 0; +#X connect 20 0 21 0; +#X connect 21 0 22 1; +#X connect 22 0 24 0; +#X connect 23 0 26 0; +#X connect 24 0 23 0; +#X connect 24 1 25 0; +#X connect 25 0 23 1; +#X connect 26 0 30 0; +#X connect 27 0 30 0; +#X connect 28 0 2 0; +#X connect 29 0 2 0; +#X restore 29 39 pd structure_creation; +#N canvas 813 63 450 300 gem 0; +#X obj 114 171 gemwin; +#X msg 134 149 0 \, destroy; +#X msg 114 125 reset \, create \, 1 \, lighting 1; +#X obj 114 71 inlet; +#X obj 114 97 sel 1 0; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 3 0 4 0; +#X connect 4 0 2 0; +#X connect 4 1 1 0; +#X restore 30 85 pd gem; +#X obj 30 63 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1 +; +#X text 200 -6 send forces; +#X text 200 7 on a row; +#N canvas 0 22 450 300 damping 0; +#X msg 151 90 setD fil \$1; +#X obj 151 70 / 8; +#X obj 151 47 inlet; +#X obj 151 113 s \$0-pmpdin; +#X connect 0 0 3 0; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X restore 301 119 pd damping; +#X obj 304 100 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144 +-1 -1 800 1; +#X text 300 79 change viscosity; +#N canvas 0 22 450 300 row 0; +#X msg 149 87 20; +#X obj 149 132 f 6; +#X obj 149 112 until; +#X obj 192 133 + 20; +#X msg 208 113 6; +#X obj 149 63 t b b; +#X msg 149 153 forceX \$1 30; +#X obj 149 38 inlet; +#X obj 149 183 s \$0-pmpdin; +#X connect 0 0 2 0; +#X connect 1 0 3 0; +#X connect 1 0 6 0; +#X connect 2 0 1 0; +#X connect 3 0 1 1; +#X connect 4 0 1 1; +#X connect 5 0 0 0; +#X connect 5 1 4 0; +#X connect 6 0 8 0; +#X connect 7 0 5 0; +#X restore 202 51 pd row; +#X obj 201 105 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X text 199 70 send forces; +#X text 50 63 Gem on/off; +#X obj 305 38 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144 +-1 -1 3100 1; +#X text 300 17 change rigidity; +#N canvas 0 22 450 300 rigi 0; +#X obj 151 47 inlet; +#X obj 151 70 / 4; +#X msg 151 90 setK fil \$1; +#X obj 151 113 s \$0-pmpdin; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X restore 302 57 pd rigi; +#X text 199 83 on a point; +#N canvas 0 22 450 300 point 0; +#X msg 192 123 forceX 10 100; +#X obj 193 95 inlet; +#X obj 192 156 s \$0-pmpdin; +#X connect 0 0 2 0; +#X connect 1 0 0 0; +#X restore 201 126 pd point; +#X text 469 -2 move a corner; +#N canvas 0 22 450 300 corner 0; +#X msg 222 89 posX 0 \$1; +#X obj 222 65 / 30; +#X obj 223 32 inlet; +#X obj 222 115 s \$0-pmpdin; +#X connect 0 0 3 0; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X restore 471 155 pd corner; +#X obj 471 17 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 +-1 -1 2700 1; +#N canvas 696 124 709 588 compute 0; +#X msg 126 130 bang \, get massesPos; +#X obj 126 27 gemhead; +#X obj 126 224 route massesPos; +#X obj 126 290 unpack f f; +#X obj 34 539 translateXYZ; +#X obj 126 334 mod 20; +#X obj 126 389 - 3; +#X obj 126 363 * 0.3; +#X obj 126 257 t b a; +#X obj 197 326 / 20; +#X obj 197 356 int; +#X obj 197 383 * -0.3; +#X obj 197 410 + 3; +#X obj 439 286 gemhead; +#X obj 439 349 light; +#X obj 439 318 translateXYZ 0 0 1; +#X obj 33 572 cube 0.08; +#X obj 126 58 t b b; +#X msg 171 97 bang \, bang \, bang \, bang \, bang \, bang \, bang +; +#X obj 34 443 translateXYZ 0 0 -2; +#X obj 34 477 rotateXYZ 0 20 0; +#X obj 141 153 r \$0-pmpdin; +#X obj 126 184 pmpd --------------; +#X obj 34 365 gemlist; +#X obj 45 327 gemhead; +#X obj 34 402 separator; +#X connect 0 0 22 0; +#X connect 1 0 17 0; +#X connect 2 0 8 0; +#X connect 3 0 5 0; +#X connect 3 0 9 0; +#X connect 3 1 4 3; +#X connect 4 0 16 0; +#X connect 5 0 7 0; +#X connect 6 0 4 1; +#X connect 7 0 6 0; +#X connect 8 0 23 0; +#X connect 8 1 3 0; +#X connect 9 0 10 0; +#X connect 10 0 11 0; +#X connect 11 0 12 0; +#X connect 12 0 4 2; +#X connect 13 0 15 0; +#X connect 15 0 14 0; +#X connect 17 0 0 0; +#X connect 17 1 18 0; +#X connect 18 0 22 0; +#X connect 19 0 20 0; +#X connect 20 0 4 0; +#X connect 21 0 22 0; +#X connect 22 0 2 0; +#X connect 23 0 25 0; +#X connect 24 0 23 1; +#X connect 25 0 19 0; +#X restore 30 109 pd compute; +#X text 29 151 COPYRIGHT : Nicolas Montgermont 2010; +#X connect 0 0 3 0; +#X connect 2 0 11 0; +#X connect 5 0 4 0; +#X connect 9 0 8 0; +#X connect 12 0 19 0; +#X connect 15 0 17 0; +#X connect 22 0 21 0; diff --git a/examples/54_pmpd2d_test.pd b/examples/54_pmpd2d_test.pd new file mode 100644 index 0000000..521e3e4 --- /dev/null +++ b/examples/54_pmpd2d_test.pd @@ -0,0 +1,167 @@ +#N canvas 780 54 626 507 10; +#X obj 27 26 loadbang; +#X obj 369 155 gemwin; +#X msg 384 132 0 \, destroy; +#X text 260 26 2 DRAG THE STRUCTURE WITH THE MOUSE; +#X obj 87 27 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X msg 90 76 reset; +#X obj 27 47 t b b b b b; +#X msg 42 186 Xmax 100 \, Xmin 0 \, Ymax 100 \, Ymin 0; +#X obj 53 300 gemhead; +#X obj 53 323 t b; +#X msg 53 345 bang \, get massesPos \, get linksPos; +#N canvas 643 123 609 594 massrender 0; +#X obj 127 22 inlet; +#X obj 48 203 translateXYZ; +#X obj 127 86 / 12.5; +#X obj 127 109 - 4; +#X obj 192 87 / 12.5; +#X obj 192 110 - 4; +#X obj 48 177 separator; +#X obj 125 136 t b f; +#X obj 127 57 unpack f f f; +#X obj 48 141 gemhead 45; +#X msg 48 104 0; +#X obj 47 58 loadbang; +#X obj 48 229 circle 0.1; +#X connect 0 0 8 0; +#X connect 1 0 12 0; +#X connect 2 0 3 0; +#X connect 3 0 7 0; +#X connect 4 0 5 0; +#X connect 5 0 1 2; +#X connect 6 0 1 0; +#X connect 7 0 9 0; +#X connect 7 1 1 1; +#X connect 8 1 2 0; +#X connect 8 2 4 0; +#X connect 9 0 6 0; +#X connect 10 0 9 0; +#X connect 11 0 10 0; +#X restore 436 267 pd massrender; +#N canvas 731 296 458 308 gemmouse 0; +#X obj 189 77 gemmouse; +#X obj 189 184 pack f f; +#X obj 189 218 spigot; +#X obj 103 244 outlet; +#X obj 189 131 - 0; +#X obj 216 131 + 100; +#X obj 189 108 / 5; +#X obj 216 108 / -5; +#X obj 79 51 inlet; +#X obj 109 98 t b; +#X obj 141 120 list; +#X obj 141 41 r mouse_init; +#X connect 0 0 6 0; +#X connect 0 1 7 0; +#X connect 0 2 2 1; +#X connect 1 0 2 0; +#X connect 2 0 10 1; +#X connect 4 0 1 0; +#X connect 5 0 1 1; +#X connect 6 0 4 0; +#X connect 7 0 5 0; +#X connect 8 0 9 0; +#X connect 9 0 10 0; +#X connect 10 0 3 0; +#X connect 11 0 10 1; +#X restore 366 356 pd gemmouse; +#X obj 366 335 gemhead; +#X msg 366 377 posX fix \$1; +#X msg 366 398 posY fix \$2; +#N canvas 0 22 454 304 linkrender 0; +#X obj 127 22 inlet; +#X obj 127 86 / 12.5; +#X obj 127 109 - 4; +#X obj 187 87 / 12.5; +#X obj 187 110 - 4; +#X obj 48 177 separator; +#X obj 125 136 t b f; +#X obj 241 86 / 12.5; +#X obj 241 109 - 4; +#X obj 308 87 / 12.5; +#X obj 308 110 - 4; +#X obj 48 222 curve 2; +#X obj 155 189 pack f f 0; +#X obj 241 190 pack f f 0; +#X obj 127 57 unpack f f f f f; +#X obj 46 130 gemhead 45; +#X obj 45 44 loadbang; +#X msg 45 68 0; +#X connect 0 0 14 0; +#X connect 1 0 2 0; +#X connect 2 0 6 0; +#X connect 3 0 4 0; +#X connect 4 0 12 1; +#X connect 5 0 11 0; +#X connect 6 0 15 0; +#X connect 6 1 12 0; +#X connect 7 0 8 0; +#X connect 8 0 13 0; +#X connect 9 0 10 0; +#X connect 10 0 13 1; +#X connect 12 0 11 1; +#X connect 13 0 11 2; +#X connect 14 1 1 0; +#X connect 14 2 3 0; +#X connect 14 3 7 0; +#X connect 14 4 9 0; +#X connect 15 0 5 0; +#X connect 16 0 17 0; +#X connect 17 0 15 0; +#X restore 366 289 pd linkrender; +#X msg 194 139 50 50; +#X msg 74 96 mass fix 0 100 50 50; +#X msg 58 139 mass mob 1 100 \$1 \$2; +#X msg 58 118 40 60 \, 60 60 \, 60 40 \, 40 40; +#X obj 194 162 s mouse_init; +#X msg 27 207 link souple mob mob 10 5; +#X msg 27 230 link souple fix mob 10 5; +#X text 25 1 creation : 5 masses and 20 links; +#X text 52 281 compute and get masses and links positions; +#X text 364 315 move mass to mouse position; +#X text 365 197 display masses with gem; +#X msg 369 109 reset \, create \, 1; +#X text 261 6 1 CREATE WINDOW; +#X text 108 26 reset struct; +#X obj 90 259 s \$0-pmpdin; +#X obj 84 373 r \$0-pmpdin; +#X obj 52 419 s \$0-pmpdout; +#X obj 365 423 s \$0-pmpdin; +#X obj 366 218 r \$0-pmpdout; +#X obj 53 397 pmpd2d; +#X obj 366 244 route linksPosNo massesPos; +#X text 53 452 copyright Nicolas Montgermont 2010; +#X connect 0 0 6 0; +#X connect 2 0 1 0; +#X connect 4 0 6 0; +#X connect 5 0 31 0; +#X connect 6 0 22 0; +#X connect 6 1 17 0; +#X connect 6 1 7 0; +#X connect 6 2 20 0; +#X connect 6 3 18 0; +#X connect 6 4 5 0; +#X connect 7 0 31 0; +#X connect 8 0 9 0; +#X connect 9 0 10 0; +#X connect 10 0 36 0; +#X connect 12 0 14 0; +#X connect 12 0 15 0; +#X connect 13 0 12 0; +#X connect 14 0 34 0; +#X connect 15 0 34 0; +#X connect 17 0 21 0; +#X connect 18 0 31 0; +#X connect 19 0 31 0; +#X connect 20 0 19 0; +#X connect 22 0 23 0; +#X connect 22 0 31 0; +#X connect 23 0 31 0; +#X connect 28 0 1 0; +#X connect 32 0 36 0; +#X connect 35 0 37 0; +#X connect 36 0 33 0; +#X connect 37 0 16 0; +#X connect 37 1 11 0; diff --git a/examples/54_pmpd_wave.pd b/examples/54_pmpd_wave.pd deleted file mode 100644 index 3ec1d63..0000000 --- a/examples/54_pmpd_wave.pd +++ /dev/null @@ -1,231 +0,0 @@ -#N canvas 617 175 594 188 10; -#X obj 29 20 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#X text 49 19 Reset; -#X obj 202 27 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#N canvas 0 22 981 585 structure_creation 0; -#X msg 681 243 mass filet 1 100 0; -#X msg 663 64 reset; -#X obj 418 25 t b b b b b b b b b b b b; -#X obj 681 201 until; -#X msg 681 170 400; -#X msg 561 378 link fil \$1 \$2 10 1; -#X msg 561 174 380; -#X obj 561 206 until; -#X obj 561 245 f 0; -#X obj 609 261 + 1; -#X msg 618 226 0; -#X obj 636 312 + 20; -#X obj 561 339 pack f f; -#X obj 561 288 t f f; -#X msg 397 151 400; -#X obj 397 189 until; -#X obj 397 231 f 0; -#X obj 445 247 + 1; -#X msg 454 212 0; -#X obj 397 292 t f f; -#X obj 452 325 mod 20; -#X obj 452 355 != 19; -#X obj 397 393 spigot; -#X obj 397 475 pack f f; -#X obj 397 424 t f f; -#X obj 472 448 + 1; -#X msg 397 505 link fil \$1 \$2 10 1; -#X msg 403 107 setFixed 0 \, setFixed 19 \, setFixed 380 \, setFixed -399; -#X obj 418 -8 inlet; -#X obj 326 61 loadbang; -#X obj 690 527 s \$0-pmpdin; -#X connect 0 0 30 0; -#X connect 1 0 30 0; -#X connect 2 5 27 0; -#X connect 2 6 14 0; -#X connect 2 7 18 0; -#X connect 2 8 6 0; -#X connect 2 9 10 0; -#X connect 2 10 4 0; -#X connect 2 11 1 0; -#X connect 3 0 0 0; -#X connect 4 0 3 0; -#X connect 5 0 30 0; -#X connect 6 0 7 0; -#X connect 7 0 8 0; -#X connect 8 0 9 0; -#X connect 8 0 13 0; -#X connect 9 0 8 1; -#X connect 10 0 8 1; -#X connect 11 0 12 1; -#X connect 12 0 5 0; -#X connect 13 0 12 0; -#X connect 13 1 11 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 17 0; -#X connect 16 0 19 0; -#X connect 17 0 16 1; -#X connect 18 0 16 1; -#X connect 19 0 22 0; -#X connect 19 1 20 0; -#X connect 20 0 21 0; -#X connect 21 0 22 1; -#X connect 22 0 24 0; -#X connect 23 0 26 0; -#X connect 24 0 23 0; -#X connect 24 1 25 0; -#X connect 25 0 23 1; -#X connect 26 0 30 0; -#X connect 27 0 30 0; -#X connect 28 0 2 0; -#X connect 29 0 2 0; -#X restore 29 39 pd structure_creation; -#N canvas 813 63 450 300 gem 0; -#X obj 114 171 gemwin; -#X msg 134 149 0 \, destroy; -#X msg 114 125 reset \, create \, 1 \, lighting 1; -#X obj 114 71 inlet; -#X obj 114 97 sel 1 0; -#X connect 1 0 0 0; -#X connect 2 0 0 0; -#X connect 3 0 4 0; -#X connect 4 0 2 0; -#X connect 4 1 1 0; -#X restore 30 85 pd gem; -#X obj 30 63 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 -; -#X text 200 -6 send forces; -#X text 200 7 on a row; -#N canvas 0 22 450 300 damping 0; -#X msg 151 90 setD fil \$1; -#X obj 151 70 / 8; -#X obj 151 47 inlet; -#X obj 151 113 s \$0-pmpdin; -#X connect 0 0 3 0; -#X connect 1 0 0 0; -#X connect 2 0 1 0; -#X restore 301 119 pd damping; -#X obj 304 100 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144 --1 -1 0 1; -#X text 300 79 change viscosity; -#N canvas 0 22 450 300 row 0; -#X msg 149 87 20; -#X obj 149 132 f 6; -#X obj 149 112 until; -#X obj 192 133 + 20; -#X msg 208 113 6; -#X obj 149 63 t b b; -#X msg 149 153 forceX \$1 30; -#X obj 149 38 inlet; -#X obj 149 183 s \$0-pmpdin; -#X connect 0 0 2 0; -#X connect 1 0 3 0; -#X connect 1 0 6 0; -#X connect 2 0 1 0; -#X connect 3 0 1 1; -#X connect 4 0 1 1; -#X connect 5 0 0 0; -#X connect 5 1 4 0; -#X connect 6 0 8 0; -#X connect 7 0 5 0; -#X restore 202 51 pd row; -#X obj 201 105 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; -#X text 199 70 send forces; -#X text 50 63 Gem on/off; -#X obj 305 38 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144 --1 -1 0 1; -#X text 300 17 change rigidity; -#N canvas 0 22 450 300 rigi 0; -#X obj 151 47 inlet; -#X obj 151 70 / 4; -#X msg 151 90 setK fil \$1; -#X obj 151 113 s \$0-pmpdin; -#X connect 0 0 1 0; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X restore 302 57 pd rigi; -#X text 199 83 on a point; -#N canvas 0 22 450 300 point 0; -#X msg 192 123 forceX 10 100; -#X obj 193 95 inlet; -#X obj 192 156 s \$0-pmpdin; -#X connect 0 0 2 0; -#X connect 1 0 0 0; -#X restore 201 126 pd point; -#X text 469 -2 move a corner; -#N canvas 0 22 450 300 corner 0; -#X msg 222 89 posX 0 \$1; -#X obj 222 65 / 30; -#X obj 223 32 inlet; -#X obj 222 115 s \$0-pmpdin; -#X connect 0 0 3 0; -#X connect 1 0 0 0; -#X connect 2 0 1 0; -#X restore 471 155 pd corner; -#X obj 471 17 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 --1 -1 0 1; -#N canvas 696 124 709 588 compute 0; -#X msg 126 130 bang \, get massesPos; -#X obj 126 27 gemhead; -#X obj 126 224 route massesPos; -#X obj 34 306 gemhead; -#X msg 34 268 0; -#X obj 126 290 unpack f f; -#X obj 34 539 translateXYZ; -#X obj 126 334 mod 20; -#X obj 126 389 - 3; -#X obj 126 363 * 0.3; -#X obj 126 257 t b a; -#X obj 197 326 / 20; -#X obj 197 356 int; -#X obj 197 383 * -0.3; -#X obj 197 410 + 3; -#X obj 34 238 loadbang; -#X obj 439 286 gemhead; -#X obj 439 349 light; -#X obj 439 318 translateXYZ 0 0 1; -#X obj 33 572 cube 0.08; -#X obj 126 58 t b b; -#X msg 171 97 bang \, bang \, bang \, bang \, bang \, bang \, bang -; -#X obj 34 443 translateXYZ 0 0 -2; -#X obj 34 477 rotateXYZ 0 20 0; -#X obj 141 153 r \$0-pmpdin; -#X obj 126 184 pmpd --------------; -#X connect 0 0 25 0; -#X connect 1 0 20 0; -#X connect 2 0 10 0; -#X connect 3 0 22 0; -#X connect 4 0 3 0; -#X connect 5 0 7 0; -#X connect 5 0 11 0; -#X connect 5 1 6 3; -#X connect 6 0 19 0; -#X connect 7 0 9 0; -#X connect 8 0 6 1; -#X connect 9 0 8 0; -#X connect 10 0 3 0; -#X connect 10 1 5 0; -#X connect 11 0 12 0; -#X connect 12 0 13 0; -#X connect 13 0 14 0; -#X connect 14 0 6 2; -#X connect 15 0 4 0; -#X connect 16 0 18 0; -#X connect 18 0 17 0; -#X connect 20 0 0 0; -#X connect 20 1 21 0; -#X connect 21 0 25 0; -#X connect 22 0 23 0; -#X connect 23 0 6 0; -#X connect 24 0 25 0; -#X connect 25 0 2 0; -#X restore 30 109 pd compute; -#X text 29 151 COPYRIGHT : Nicolas Montgermont 2010; -#X connect 0 0 3 0; -#X connect 2 0 11 0; -#X connect 5 0 4 0; -#X connect 9 0 8 0; -#X connect 12 0 19 0; -#X connect 15 0 17 0; -#X connect 22 0 21 0; diff --git a/examples/55_pmpd2d_additive.pd b/examples/55_pmpd2d_additive.pd new file mode 100644 index 0000000..e2d709c --- /dev/null +++ b/examples/55_pmpd2d_additive.pd @@ -0,0 +1,463 @@ +#N canvas 572 22 686 162 10; +#X obj 22 16 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#N canvas 596 150 954 737 synthese 0; +#X msg -35 254 \$1 50; +#X obj -35 276 line~; +#X obj -75 280 *~; +#X msg 60 254 \$1 50; +#X obj 60 276 line~; +#X obj 20 280 *~; +#X msg 153 256 \$1 50; +#X obj 153 278 line~; +#X obj 113 282 *~; +#X msg 245 254 \$1 50; +#X obj 245 276 line~; +#X obj 205 280 *~; +#X obj 62 328 dac~; +#X msg 346 257 \$1 50; +#X obj 346 279 line~; +#X obj 306 283 *~; +#X msg 441 257 \$1 50; +#X obj 441 279 line~; +#X obj 401 283 *~; +#X msg 534 259 \$1 50; +#X obj 534 281 line~; +#X obj 494 285 *~; +#X msg 626 257 \$1 50; +#X obj 626 279 line~; +#X obj 586 283 *~; +#X obj 443 331 dac~; +#X obj -77 224 osc~ 55; +#X obj 19 224 osc~ 110; +#X obj 204 225 osc~ 222; +#X obj -13 158 unpack f f; +#X obj 176 164 unpack f f; +#X obj 362 161 unpack f f; +#X obj 553 168 unpack f f; +#X msg -45 458 \$1 50; +#X obj -45 480 line~; +#X obj -85 484 *~; +#X msg 50 458 \$1 50; +#X obj 50 480 line~; +#X obj 10 484 *~; +#X msg 143 460 \$1 50; +#X obj 143 482 line~; +#X obj 103 486 *~; +#X msg 235 458 \$1 50; +#X obj 235 480 line~; +#X obj 195 484 *~; +#X obj 52 532 dac~; +#X msg 336 461 \$1 50; +#X obj 336 483 line~; +#X obj 296 487 *~; +#X msg 431 461 \$1 50; +#X obj 431 483 line~; +#X obj 391 487 *~; +#X msg 524 463 \$1 50; +#X obj 524 485 line~; +#X obj 484 489 *~; +#X msg 616 461 \$1 50; +#X obj 616 483 line~; +#X obj 576 487 *~; +#X obj 433 535 dac~; +#X obj 483 433 osc~ 1113; +#X obj 575 431 osc~ 2229; +#X obj -15 373 unpack f f; +#X obj 166 368 unpack f f; +#X obj 352 365 unpack f f; +#X obj 543 372 unpack f f; +#X obj 112 226 osc~ 165; +#X obj 305 227 osc~ 267; +#X obj 400 227 osc~ 311; +#X obj 268 74 route 1 5 9 13 17 21 25 29; +#X obj 493 229 osc~ 366; +#X obj 585 227 osc~ 421; +#X obj -87 428 osc~ 444; +#X obj 9 428 osc~ 554; +#X obj 102 430 osc~ 664; +#X obj 194 428 osc~ 776; +#X obj 295 431 osc~ 888; +#X obj 390 431 osc~ 1000; +#X obj -75 398 / 20; +#X obj 52 404 / 20; +#X obj 144 406 / 20; +#X obj 240 404 / 50; +#X obj 307 401 / 50; +#X obj 434 407 / 50; +#X obj 524 409 / 100; +#X obj 621 407 / 100; +#X obj 631 203 / 100; +#X obj 532 206 / 100; +#X obj 444 204 / 50; +#X obj 317 197 / 50; +#X obj 250 200 / 50; +#X obj 153 202 / 20; +#X obj 61 201 / 20; +#X obj -64 194 / 20; +#X obj 268 49 route massesSpeedsNo; +#X obj 268 27 r \$0-pmpdout; +#X connect 0 0 1 0; +#X connect 1 0 2 1; +#X connect 2 0 12 0; +#X connect 3 0 4 0; +#X connect 4 0 5 1; +#X connect 5 0 12 0; +#X connect 5 0 12 1; +#X connect 6 0 7 0; +#X connect 7 0 8 1; +#X connect 8 0 12 0; +#X connect 8 0 12 1; +#X connect 9 0 10 0; +#X connect 10 0 11 1; +#X connect 11 0 12 1; +#X connect 13 0 14 0; +#X connect 14 0 15 1; +#X connect 15 0 25 0; +#X connect 16 0 17 0; +#X connect 17 0 18 1; +#X connect 18 0 25 0; +#X connect 18 0 25 1; +#X connect 19 0 20 0; +#X connect 20 0 21 1; +#X connect 21 0 25 0; +#X connect 21 0 25 1; +#X connect 22 0 23 0; +#X connect 23 0 24 1; +#X connect 24 0 25 1; +#X connect 26 0 2 0; +#X connect 27 0 5 0; +#X connect 28 0 11 0; +#X connect 29 0 92 0; +#X connect 29 1 91 0; +#X connect 30 0 90 0; +#X connect 30 1 89 0; +#X connect 31 0 88 0; +#X connect 31 1 87 0; +#X connect 32 0 86 0; +#X connect 32 1 85 0; +#X connect 33 0 34 0; +#X connect 34 0 35 1; +#X connect 35 0 45 0; +#X connect 36 0 37 0; +#X connect 37 0 38 1; +#X connect 38 0 45 0; +#X connect 38 0 45 1; +#X connect 39 0 40 0; +#X connect 40 0 41 1; +#X connect 41 0 45 0; +#X connect 41 0 45 1; +#X connect 42 0 43 0; +#X connect 43 0 44 1; +#X connect 44 0 45 1; +#X connect 46 0 47 0; +#X connect 47 0 48 1; +#X connect 48 0 58 0; +#X connect 49 0 50 0; +#X connect 50 0 51 1; +#X connect 51 0 58 0; +#X connect 51 0 58 1; +#X connect 52 0 53 0; +#X connect 53 0 54 1; +#X connect 54 0 58 0; +#X connect 54 0 58 1; +#X connect 55 0 56 0; +#X connect 56 0 57 1; +#X connect 57 0 58 1; +#X connect 59 0 54 0; +#X connect 60 0 57 0; +#X connect 61 0 77 0; +#X connect 61 1 78 0; +#X connect 62 0 79 0; +#X connect 62 1 80 0; +#X connect 63 0 81 0; +#X connect 63 1 82 0; +#X connect 64 0 83 0; +#X connect 64 1 84 0; +#X connect 65 0 8 0; +#X connect 66 0 15 0; +#X connect 67 0 18 0; +#X connect 68 0 29 0; +#X connect 68 1 30 0; +#X connect 68 2 31 0; +#X connect 68 3 32 0; +#X connect 68 4 61 0; +#X connect 68 5 62 0; +#X connect 68 6 63 0; +#X connect 68 7 64 0; +#X connect 69 0 21 0; +#X connect 70 0 24 0; +#X connect 71 0 35 0; +#X connect 72 0 38 0; +#X connect 73 0 41 0; +#X connect 74 0 44 0; +#X connect 75 0 48 0; +#X connect 76 0 51 0; +#X connect 77 0 33 0; +#X connect 78 0 36 0; +#X connect 79 0 39 0; +#X connect 80 0 42 0; +#X connect 81 0 46 0; +#X connect 82 0 49 0; +#X connect 83 0 52 0; +#X connect 84 0 55 0; +#X connect 85 0 22 0; +#X connect 86 0 19 0; +#X connect 87 0 16 0; +#X connect 88 0 13 0; +#X connect 89 0 9 0; +#X connect 90 0 6 0; +#X connect 91 0 3 0; +#X connect 92 0 0 0; +#X connect 93 0 68 0; +#X connect 94 0 93 0; +#X restore 23 107 pd synthese; +#X text 40 16 Reset; +#N canvas 0 22 450 300 structure_creation 0; +#X msg 195 86 reset; +#X obj 52 15 loadbang; +#X msg 156 145 Xmax 100 \, Xmin 0 \, Ymax 100 \, Ymin 0; +#X text 238 112 Random positions and masses; +#N canvas 557 309 487 357 masses 0; +#X msg 245 215 mass mob 1 \$1 \$2 \$3; +#X obj 417 165 random 100; +#X msg 417 145 seed 1; +#X obj 342 165 random 100; +#X obj 239 146 random 100; +#X msg 342 144 seed 2; +#X msg 239 126 seed 3; +#X obj 239 166 + 100; +#X obj 245 194 pack f f f; +#X obj 42 14 inlet; +#X obj 246 283 outlet; +#X obj 268 47 loadbang; +#X text 284 101 M; +#X text 356 106 X; +#X text 437 106 Y; +#X obj 223 68 t b b; +#X obj 42 45 until; +#X obj 42 78 f; +#X obj 72 78 + 1; +#X obj 72 100 mod 30; +#X obj 90 45 sel 0; +#X connect 0 0 10 0; +#X connect 1 0 8 2; +#X connect 2 0 1 0; +#X connect 3 0 8 1; +#X connect 4 0 7 0; +#X connect 5 0 3 0; +#X connect 6 0 4 0; +#X connect 7 0 8 0; +#X connect 8 0 0 0; +#X connect 9 0 16 0; +#X connect 11 0 6 0; +#X connect 11 0 5 0; +#X connect 11 0 2 0; +#X connect 15 0 4 0; +#X connect 15 1 3 0; +#X connect 15 1 1 0; +#X connect 16 0 17 0; +#X connect 17 0 18 0; +#X connect 17 0 15 0; +#X connect 18 0 19 0; +#X connect 19 0 17 1; +#X connect 19 0 20 0; +#X connect 20 0 16 1; +#X restore 175 113 pd masses; +#N canvas 0 22 450 300 links 0; +#X obj 136 72 t b; +#X obj 136 116 + 1; +#X obj 130 191 f; +#X obj 92 171 t f b; +#X obj 91 211 pack f f; +#X msg 91 233 link souple \$1 \$2 10 0.5; +#X obj 136 23 inlet; +#X obj 91 260 outlet; +#X obj 136 48 until; +#X obj 202 112 sel 0; +#X obj 184 154 mod 29; +#X obj 136 93 f 0; +#X connect 0 0 11 0; +#X connect 1 0 10 0; +#X connect 1 0 2 1; +#X connect 2 0 4 1; +#X connect 3 0 4 0; +#X connect 3 1 2 0; +#X connect 4 0 5 0; +#X connect 5 0 7 0; +#X connect 6 0 8 0; +#X connect 8 0 0 0; +#X connect 9 0 8 1; +#X connect 10 0 9 0; +#X connect 10 0 11 1; +#X connect 11 0 1 0; +#X connect 11 0 3 0; +#X restore 137 176 pd links; +#X obj 137 62 t b b b b; +#X obj 137 15 inlet; +#X obj 137 211 s \$0-pmpdin; +#X connect 0 0 8 0; +#X connect 1 0 6 0; +#X connect 2 0 8 0; +#X connect 4 0 8 0; +#X connect 5 0 8 0; +#X connect 6 0 5 0; +#X connect 6 1 2 0; +#X connect 6 2 4 0; +#X connect 6 3 0 0; +#X connect 7 0 6 0; +#X restore 22 39 pd structure_creation; +#N canvas 0 22 763 327 gem_stuff 0; +#X msg 137 179 0 \, destroy; +#X obj 118 200 gemwin; +#X obj 118 104 inlet; +#X obj 118 129 sel 1 0; +#X msg 118 156 reset \, create \, 1; +#X obj 274 105 gemhead; +#N canvas 311 224 413 534 gemmouse2 0; +#X obj 114 29 gemmouse; +#X obj 96 266 outlet; +#X obj 114 83 - 0; +#X obj 165 97 + 100; +#X obj 114 60 / 5; +#X obj 165 74 / -5; +#X obj 32 81 t b; +#X obj 32 37 inlet; +#X obj 96 177 f; +#X obj 96 206 pack 0 0 0; +#X connect 0 0 4 0; +#X connect 0 1 5 0; +#X connect 0 2 9 2; +#X connect 2 0 8 1; +#X connect 3 0 9 1; +#X connect 4 0 2 0; +#X connect 5 0 3 0; +#X connect 6 0 8 0; +#X connect 7 0 6 0; +#X connect 8 0 9 0; +#X connect 9 0 1 0; +#X restore 274 127 pd gemmouse2; +#X msg 274 150 grabMass \$1 \$2 \$3; +#N canvas 643 123 617 602 massrender 0; +#X obj 127 22 inlet; +#X obj 62 267 translateXYZ; +#X obj 166 123 / 12.5; +#X obj 166 146 - 4; +#X obj 231 124 / 12.5; +#X obj 231 147 - 4; +#X obj 62 241 separator; +#X obj 127 57 unpack f f f; +#X msg 128 194 \$1; +#X obj 62 219 colorRGB 1 1 1; +#X obj 128 174 / 29; +#X obj 127 85 t b f; +#X obj 62 135 gemhead 45; +#X obj 62 63 loadbang; +#X msg 62 93 0; +#X obj 62 314 circle 0.1; +#X connect 0 0 7 0; +#X connect 1 0 15 0; +#X connect 2 0 3 0; +#X connect 3 0 1 1; +#X connect 4 0 5 0; +#X connect 5 0 1 2; +#X connect 6 0 1 0; +#X connect 7 0 11 0; +#X connect 7 1 2 0; +#X connect 7 2 4 0; +#X connect 8 0 9 2; +#X connect 8 0 9 3; +#X connect 9 0 6 0; +#X connect 10 0 8 0; +#X connect 11 0 12 0; +#X connect 11 1 10 0; +#X connect 12 0 9 0; +#X connect 13 0 14 0; +#X connect 14 0 12 0; +#X restore 502 153 pd massrender; +#N canvas 284 227 595 566 linkrender 0; +#X obj 261 87 inlet; +#X obj 261 179 / 12.5; +#X obj 261 202 - 4; +#X obj 315 180 / 12.5; +#X obj 315 203 - 4; +#X obj 189 288 separator; +#X obj 261 226 t b f; +#X obj 189 331 curve 2; +#X obj 375 183 / 12.5; +#X obj 375 206 - 4; +#X obj 429 184 / 12.5; +#X obj 429 207 - 4; +#X obj 291 256 pack f f; +#X msg 291 279 \$1 \$2 0; +#X obj 375 255 pack f f; +#X msg 375 278 \$1 \$2 0; +#X obj 261 131 unpack f f f f f; +#X obj 189 310 colorRGB 1 1 1; +#X obj 189 262 gemhead 45; +#X obj 189 180 loadbang; +#X msg 189 229 0; +#X connect 0 0 16 0; +#X connect 1 0 2 0; +#X connect 2 0 6 0; +#X connect 3 0 4 0; +#X connect 4 0 12 1; +#X connect 5 0 17 0; +#X connect 6 0 18 0; +#X connect 6 1 12 0; +#X connect 8 0 9 0; +#X connect 9 0 14 0; +#X connect 10 0 11 0; +#X connect 11 0 14 1; +#X connect 12 0 13 0; +#X connect 13 0 7 1; +#X connect 14 0 15 0; +#X connect 15 0 7 2; +#X connect 16 1 1 0; +#X connect 16 2 3 0; +#X connect 16 3 8 0; +#X connect 16 4 10 0; +#X connect 17 0 7 0; +#X connect 18 0 5 0; +#X connect 19 0 20 0; +#X connect 20 0 18 0; +#X restore 432 174 pd linkrender; +#X obj 273 174 s \$0-pmpdin; +#X obj 432 101 r \$0-pmpdout; +#X obj 432 124 route linksPosNo massesPos; +#X connect 0 0 1 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 3 1 0 0; +#X connect 4 0 1 0; +#X connect 5 0 6 0; +#X connect 6 0 7 0; +#X connect 7 0 10 0; +#X connect 11 0 12 0; +#X connect 12 0 9 0; +#X connect 12 1 8 0; +#X restore 23 86 pd gem_stuff; +#X obj 23 64 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1 +; +#X text 43 63 gem on/off; +#X text 196 54 1 Create window; +#X text 196 74 2 Set dsp on; +#N canvas 0 22 834 442 compute 0; +#X obj 52 69 gemhead; +#X obj 67 163 r \$0-pmpdin; +#X obj 52 216 s \$0-pmpdout; +#X obj 52 192 pmpd2d; +#X msg 50 95 bang \, get massesPos \, get linksPos \, get massesSpeeds +1 \, get massesSpeeds 5 \, get massesSpeeds 9 \, get massesSpeeds 13 +\, get massesSpeeds 17 \, get massesSpeeds 21 \, get massesSpeeds 25 +\, get massesSpeeds 29; +#X connect 0 0 4 0; +#X connect 1 0 3 0; +#X connect 3 0 2 0; +#X connect 4 0 3 0; +#X restore 23 129 pd compute; +#X text 196 94 Drag red masses for bass and white ones for high tones... +; +#X text 196 17 Additive synthesis example; +#X connect 0 0 3 0; +#X connect 5 0 4 0; diff --git a/examples/55_pmpd2d_test.pd b/examples/55_pmpd2d_test.pd deleted file mode 100644 index 521e3e4..0000000 --- a/examples/55_pmpd2d_test.pd +++ /dev/null @@ -1,167 +0,0 @@ -#N canvas 780 54 626 507 10; -#X obj 27 26 loadbang; -#X obj 369 155 gemwin; -#X msg 384 132 0 \, destroy; -#X text 260 26 2 DRAG THE STRUCTURE WITH THE MOUSE; -#X obj 87 27 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 90 76 reset; -#X obj 27 47 t b b b b b; -#X msg 42 186 Xmax 100 \, Xmin 0 \, Ymax 100 \, Ymin 0; -#X obj 53 300 gemhead; -#X obj 53 323 t b; -#X msg 53 345 bang \, get massesPos \, get linksPos; -#N canvas 643 123 609 594 massrender 0; -#X obj 127 22 inlet; -#X obj 48 203 translateXYZ; -#X obj 127 86 / 12.5; -#X obj 127 109 - 4; -#X obj 192 87 / 12.5; -#X obj 192 110 - 4; -#X obj 48 177 separator; -#X obj 125 136 t b f; -#X obj 127 57 unpack f f f; -#X obj 48 141 gemhead 45; -#X msg 48 104 0; -#X obj 47 58 loadbang; -#X obj 48 229 circle 0.1; -#X connect 0 0 8 0; -#X connect 1 0 12 0; -#X connect 2 0 3 0; -#X connect 3 0 7 0; -#X connect 4 0 5 0; -#X connect 5 0 1 2; -#X connect 6 0 1 0; -#X connect 7 0 9 0; -#X connect 7 1 1 1; -#X connect 8 1 2 0; -#X connect 8 2 4 0; -#X connect 9 0 6 0; -#X connect 10 0 9 0; -#X connect 11 0 10 0; -#X restore 436 267 pd massrender; -#N canvas 731 296 458 308 gemmouse 0; -#X obj 189 77 gemmouse; -#X obj 189 184 pack f f; -#X obj 189 218 spigot; -#X obj 103 244 outlet; -#X obj 189 131 - 0; -#X obj 216 131 + 100; -#X obj 189 108 / 5; -#X obj 216 108 / -5; -#X obj 79 51 inlet; -#X obj 109 98 t b; -#X obj 141 120 list; -#X obj 141 41 r mouse_init; -#X connect 0 0 6 0; -#X connect 0 1 7 0; -#X connect 0 2 2 1; -#X connect 1 0 2 0; -#X connect 2 0 10 1; -#X connect 4 0 1 0; -#X connect 5 0 1 1; -#X connect 6 0 4 0; -#X connect 7 0 5 0; -#X connect 8 0 9 0; -#X connect 9 0 10 0; -#X connect 10 0 3 0; -#X connect 11 0 10 1; -#X restore 366 356 pd gemmouse; -#X obj 366 335 gemhead; -#X msg 366 377 posX fix \$1; -#X msg 366 398 posY fix \$2; -#N canvas 0 22 454 304 linkrender 0; -#X obj 127 22 inlet; -#X obj 127 86 / 12.5; -#X obj 127 109 - 4; -#X obj 187 87 / 12.5; -#X obj 187 110 - 4; -#X obj 48 177 separator; -#X obj 125 136 t b f; -#X obj 241 86 / 12.5; -#X obj 241 109 - 4; -#X obj 308 87 / 12.5; -#X obj 308 110 - 4; -#X obj 48 222 curve 2; -#X obj 155 189 pack f f 0; -#X obj 241 190 pack f f 0; -#X obj 127 57 unpack f f f f f; -#X obj 46 130 gemhead 45; -#X obj 45 44 loadbang; -#X msg 45 68 0; -#X connect 0 0 14 0; -#X connect 1 0 2 0; -#X connect 2 0 6 0; -#X connect 3 0 4 0; -#X connect 4 0 12 1; -#X connect 5 0 11 0; -#X connect 6 0 15 0; -#X connect 6 1 12 0; -#X connect 7 0 8 0; -#X connect 8 0 13 0; -#X connect 9 0 10 0; -#X connect 10 0 13 1; -#X connect 12 0 11 1; -#X connect 13 0 11 2; -#X connect 14 1 1 0; -#X connect 14 2 3 0; -#X connect 14 3 7 0; -#X connect 14 4 9 0; -#X connect 15 0 5 0; -#X connect 16 0 17 0; -#X connect 17 0 15 0; -#X restore 366 289 pd linkrender; -#X msg 194 139 50 50; -#X msg 74 96 mass fix 0 100 50 50; -#X msg 58 139 mass mob 1 100 \$1 \$2; -#X msg 58 118 40 60 \, 60 60 \, 60 40 \, 40 40; -#X obj 194 162 s mouse_init; -#X msg 27 207 link souple mob mob 10 5; -#X msg 27 230 link souple fix mob 10 5; -#X text 25 1 creation : 5 masses and 20 links; -#X text 52 281 compute and get masses and links positions; -#X text 364 315 move mass to mouse position; -#X text 365 197 display masses with gem; -#X msg 369 109 reset \, create \, 1; -#X text 261 6 1 CREATE WINDOW; -#X text 108 26 reset struct; -#X obj 90 259 s \$0-pmpdin; -#X obj 84 373 r \$0-pmpdin; -#X obj 52 419 s \$0-pmpdout; -#X obj 365 423 s \$0-pmpdin; -#X obj 366 218 r \$0-pmpdout; -#X obj 53 397 pmpd2d; -#X obj 366 244 route linksPosNo massesPos; -#X text 53 452 copyright Nicolas Montgermont 2010; -#X connect 0 0 6 0; -#X connect 2 0 1 0; -#X connect 4 0 6 0; -#X connect 5 0 31 0; -#X connect 6 0 22 0; -#X connect 6 1 17 0; -#X connect 6 1 7 0; -#X connect 6 2 20 0; -#X connect 6 3 18 0; -#X connect 6 4 5 0; -#X connect 7 0 31 0; -#X connect 8 0 9 0; -#X connect 9 0 10 0; -#X connect 10 0 36 0; -#X connect 12 0 14 0; -#X connect 12 0 15 0; -#X connect 13 0 12 0; -#X connect 14 0 34 0; -#X connect 15 0 34 0; -#X connect 17 0 21 0; -#X connect 18 0 31 0; -#X connect 19 0 31 0; -#X connect 20 0 19 0; -#X connect 22 0 23 0; -#X connect 22 0 31 0; -#X connect 23 0 31 0; -#X connect 28 0 1 0; -#X connect 32 0 36 0; -#X connect 35 0 37 0; -#X connect 36 0 33 0; -#X connect 37 0 16 0; -#X connect 37 1 11 0; diff --git a/examples/56_pmpd2d_additive.pd b/examples/56_pmpd2d_additive.pd deleted file mode 100644 index e2d709c..0000000 --- a/examples/56_pmpd2d_additive.pd +++ /dev/null @@ -1,463 +0,0 @@ -#N canvas 572 22 686 162 10; -#X obj 22 16 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#N canvas 596 150 954 737 synthese 0; -#X msg -35 254 \$1 50; -#X obj -35 276 line~; -#X obj -75 280 *~; -#X msg 60 254 \$1 50; -#X obj 60 276 line~; -#X obj 20 280 *~; -#X msg 153 256 \$1 50; -#X obj 153 278 line~; -#X obj 113 282 *~; -#X msg 245 254 \$1 50; -#X obj 245 276 line~; -#X obj 205 280 *~; -#X obj 62 328 dac~; -#X msg 346 257 \$1 50; -#X obj 346 279 line~; -#X obj 306 283 *~; -#X msg 441 257 \$1 50; -#X obj 441 279 line~; -#X obj 401 283 *~; -#X msg 534 259 \$1 50; -#X obj 534 281 line~; -#X obj 494 285 *~; -#X msg 626 257 \$1 50; -#X obj 626 279 line~; -#X obj 586 283 *~; -#X obj 443 331 dac~; -#X obj -77 224 osc~ 55; -#X obj 19 224 osc~ 110; -#X obj 204 225 osc~ 222; -#X obj -13 158 unpack f f; -#X obj 176 164 unpack f f; -#X obj 362 161 unpack f f; -#X obj 553 168 unpack f f; -#X msg -45 458 \$1 50; -#X obj -45 480 line~; -#X obj -85 484 *~; -#X msg 50 458 \$1 50; -#X obj 50 480 line~; -#X obj 10 484 *~; -#X msg 143 460 \$1 50; -#X obj 143 482 line~; -#X obj 103 486 *~; -#X msg 235 458 \$1 50; -#X obj 235 480 line~; -#X obj 195 484 *~; -#X obj 52 532 dac~; -#X msg 336 461 \$1 50; -#X obj 336 483 line~; -#X obj 296 487 *~; -#X msg 431 461 \$1 50; -#X obj 431 483 line~; -#X obj 391 487 *~; -#X msg 524 463 \$1 50; -#X obj 524 485 line~; -#X obj 484 489 *~; -#X msg 616 461 \$1 50; -#X obj 616 483 line~; -#X obj 576 487 *~; -#X obj 433 535 dac~; -#X obj 483 433 osc~ 1113; -#X obj 575 431 osc~ 2229; -#X obj -15 373 unpack f f; -#X obj 166 368 unpack f f; -#X obj 352 365 unpack f f; -#X obj 543 372 unpack f f; -#X obj 112 226 osc~ 165; -#X obj 305 227 osc~ 267; -#X obj 400 227 osc~ 311; -#X obj 268 74 route 1 5 9 13 17 21 25 29; -#X obj 493 229 osc~ 366; -#X obj 585 227 osc~ 421; -#X obj -87 428 osc~ 444; -#X obj 9 428 osc~ 554; -#X obj 102 430 osc~ 664; -#X obj 194 428 osc~ 776; -#X obj 295 431 osc~ 888; -#X obj 390 431 osc~ 1000; -#X obj -75 398 / 20; -#X obj 52 404 / 20; -#X obj 144 406 / 20; -#X obj 240 404 / 50; -#X obj 307 401 / 50; -#X obj 434 407 / 50; -#X obj 524 409 / 100; -#X obj 621 407 / 100; -#X obj 631 203 / 100; -#X obj 532 206 / 100; -#X obj 444 204 / 50; -#X obj 317 197 / 50; -#X obj 250 200 / 50; -#X obj 153 202 / 20; -#X obj 61 201 / 20; -#X obj -64 194 / 20; -#X obj 268 49 route massesSpeedsNo; -#X obj 268 27 r \$0-pmpdout; -#X connect 0 0 1 0; -#X connect 1 0 2 1; -#X connect 2 0 12 0; -#X connect 3 0 4 0; -#X connect 4 0 5 1; -#X connect 5 0 12 0; -#X connect 5 0 12 1; -#X connect 6 0 7 0; -#X connect 7 0 8 1; -#X connect 8 0 12 0; -#X connect 8 0 12 1; -#X connect 9 0 10 0; -#X connect 10 0 11 1; -#X connect 11 0 12 1; -#X connect 13 0 14 0; -#X connect 14 0 15 1; -#X connect 15 0 25 0; -#X connect 16 0 17 0; -#X connect 17 0 18 1; -#X connect 18 0 25 0; -#X connect 18 0 25 1; -#X connect 19 0 20 0; -#X connect 20 0 21 1; -#X connect 21 0 25 0; -#X connect 21 0 25 1; -#X connect 22 0 23 0; -#X connect 23 0 24 1; -#X connect 24 0 25 1; -#X connect 26 0 2 0; -#X connect 27 0 5 0; -#X connect 28 0 11 0; -#X connect 29 0 92 0; -#X connect 29 1 91 0; -#X connect 30 0 90 0; -#X connect 30 1 89 0; -#X connect 31 0 88 0; -#X connect 31 1 87 0; -#X connect 32 0 86 0; -#X connect 32 1 85 0; -#X connect 33 0 34 0; -#X connect 34 0 35 1; -#X connect 35 0 45 0; -#X connect 36 0 37 0; -#X connect 37 0 38 1; -#X connect 38 0 45 0; -#X connect 38 0 45 1; -#X connect 39 0 40 0; -#X connect 40 0 41 1; -#X connect 41 0 45 0; -#X connect 41 0 45 1; -#X connect 42 0 43 0; -#X connect 43 0 44 1; -#X connect 44 0 45 1; -#X connect 46 0 47 0; -#X connect 47 0 48 1; -#X connect 48 0 58 0; -#X connect 49 0 50 0; -#X connect 50 0 51 1; -#X connect 51 0 58 0; -#X connect 51 0 58 1; -#X connect 52 0 53 0; -#X connect 53 0 54 1; -#X connect 54 0 58 0; -#X connect 54 0 58 1; -#X connect 55 0 56 0; -#X connect 56 0 57 1; -#X connect 57 0 58 1; -#X connect 59 0 54 0; -#X connect 60 0 57 0; -#X connect 61 0 77 0; -#X connect 61 1 78 0; -#X connect 62 0 79 0; -#X connect 62 1 80 0; -#X connect 63 0 81 0; -#X connect 63 1 82 0; -#X connect 64 0 83 0; -#X connect 64 1 84 0; -#X connect 65 0 8 0; -#X connect 66 0 15 0; -#X connect 67 0 18 0; -#X connect 68 0 29 0; -#X connect 68 1 30 0; -#X connect 68 2 31 0; -#X connect 68 3 32 0; -#X connect 68 4 61 0; -#X connect 68 5 62 0; -#X connect 68 6 63 0; -#X connect 68 7 64 0; -#X connect 69 0 21 0; -#X connect 70 0 24 0; -#X connect 71 0 35 0; -#X connect 72 0 38 0; -#X connect 73 0 41 0; -#X connect 74 0 44 0; -#X connect 75 0 48 0; -#X connect 76 0 51 0; -#X connect 77 0 33 0; -#X connect 78 0 36 0; -#X connect 79 0 39 0; -#X connect 80 0 42 0; -#X connect 81 0 46 0; -#X connect 82 0 49 0; -#X connect 83 0 52 0; -#X connect 84 0 55 0; -#X connect 85 0 22 0; -#X connect 86 0 19 0; -#X connect 87 0 16 0; -#X connect 88 0 13 0; -#X connect 89 0 9 0; -#X connect 90 0 6 0; -#X connect 91 0 3 0; -#X connect 92 0 0 0; -#X connect 93 0 68 0; -#X connect 94 0 93 0; -#X restore 23 107 pd synthese; -#X text 40 16 Reset; -#N canvas 0 22 450 300 structure_creation 0; -#X msg 195 86 reset; -#X obj 52 15 loadbang; -#X msg 156 145 Xmax 100 \, Xmin 0 \, Ymax 100 \, Ymin 0; -#X text 238 112 Random positions and masses; -#N canvas 557 309 487 357 masses 0; -#X msg 245 215 mass mob 1 \$1 \$2 \$3; -#X obj 417 165 random 100; -#X msg 417 145 seed 1; -#X obj 342 165 random 100; -#X obj 239 146 random 100; -#X msg 342 144 seed 2; -#X msg 239 126 seed 3; -#X obj 239 166 + 100; -#X obj 245 194 pack f f f; -#X obj 42 14 inlet; -#X obj 246 283 outlet; -#X obj 268 47 loadbang; -#X text 284 101 M; -#X text 356 106 X; -#X text 437 106 Y; -#X obj 223 68 t b b; -#X obj 42 45 until; -#X obj 42 78 f; -#X obj 72 78 + 1; -#X obj 72 100 mod 30; -#X obj 90 45 sel 0; -#X connect 0 0 10 0; -#X connect 1 0 8 2; -#X connect 2 0 1 0; -#X connect 3 0 8 1; -#X connect 4 0 7 0; -#X connect 5 0 3 0; -#X connect 6 0 4 0; -#X connect 7 0 8 0; -#X connect 8 0 0 0; -#X connect 9 0 16 0; -#X connect 11 0 6 0; -#X connect 11 0 5 0; -#X connect 11 0 2 0; -#X connect 15 0 4 0; -#X connect 15 1 3 0; -#X connect 15 1 1 0; -#X connect 16 0 17 0; -#X connect 17 0 18 0; -#X connect 17 0 15 0; -#X connect 18 0 19 0; -#X connect 19 0 17 1; -#X connect 19 0 20 0; -#X connect 20 0 16 1; -#X restore 175 113 pd masses; -#N canvas 0 22 450 300 links 0; -#X obj 136 72 t b; -#X obj 136 116 + 1; -#X obj 130 191 f; -#X obj 92 171 t f b; -#X obj 91 211 pack f f; -#X msg 91 233 link souple \$1 \$2 10 0.5; -#X obj 136 23 inlet; -#X obj 91 260 outlet; -#X obj 136 48 until; -#X obj 202 112 sel 0; -#X obj 184 154 mod 29; -#X obj 136 93 f 0; -#X connect 0 0 11 0; -#X connect 1 0 10 0; -#X connect 1 0 2 1; -#X connect 2 0 4 1; -#X connect 3 0 4 0; -#X connect 3 1 2 0; -#X connect 4 0 5 0; -#X connect 5 0 7 0; -#X connect 6 0 8 0; -#X connect 8 0 0 0; -#X connect 9 0 8 1; -#X connect 10 0 9 0; -#X connect 10 0 11 1; -#X connect 11 0 1 0; -#X connect 11 0 3 0; -#X restore 137 176 pd links; -#X obj 137 62 t b b b b; -#X obj 137 15 inlet; -#X obj 137 211 s \$0-pmpdin; -#X connect 0 0 8 0; -#X connect 1 0 6 0; -#X connect 2 0 8 0; -#X connect 4 0 8 0; -#X connect 5 0 8 0; -#X connect 6 0 5 0; -#X connect 6 1 2 0; -#X connect 6 2 4 0; -#X connect 6 3 0 0; -#X connect 7 0 6 0; -#X restore 22 39 pd structure_creation; -#N canvas 0 22 763 327 gem_stuff 0; -#X msg 137 179 0 \, destroy; -#X obj 118 200 gemwin; -#X obj 118 104 inlet; -#X obj 118 129 sel 1 0; -#X msg 118 156 reset \, create \, 1; -#X obj 274 105 gemhead; -#N canvas 311 224 413 534 gemmouse2 0; -#X obj 114 29 gemmouse; -#X obj 96 266 outlet; -#X obj 114 83 - 0; -#X obj 165 97 + 100; -#X obj 114 60 / 5; -#X obj 165 74 / -5; -#X obj 32 81 t b; -#X obj 32 37 inlet; -#X obj 96 177 f; -#X obj 96 206 pack 0 0 0; -#X connect 0 0 4 0; -#X connect 0 1 5 0; -#X connect 0 2 9 2; -#X connect 2 0 8 1; -#X connect 3 0 9 1; -#X connect 4 0 2 0; -#X connect 5 0 3 0; -#X connect 6 0 8 0; -#X connect 7 0 6 0; -#X connect 8 0 9 0; -#X connect 9 0 1 0; -#X restore 274 127 pd gemmouse2; -#X msg 274 150 grabMass \$1 \$2 \$3; -#N canvas 643 123 617 602 massrender 0; -#X obj 127 22 inlet; -#X obj 62 267 translateXYZ; -#X obj 166 123 / 12.5; -#X obj 166 146 - 4; -#X obj 231 124 / 12.5; -#X obj 231 147 - 4; -#X obj 62 241 separator; -#X obj 127 57 unpack f f f; -#X msg 128 194 \$1; -#X obj 62 219 colorRGB 1 1 1; -#X obj 128 174 / 29; -#X obj 127 85 t b f; -#X obj 62 135 gemhead 45; -#X obj 62 63 loadbang; -#X msg 62 93 0; -#X obj 62 314 circle 0.1; -#X connect 0 0 7 0; -#X connect 1 0 15 0; -#X connect 2 0 3 0; -#X connect 3 0 1 1; -#X connect 4 0 5 0; -#X connect 5 0 1 2; -#X connect 6 0 1 0; -#X connect 7 0 11 0; -#X connect 7 1 2 0; -#X connect 7 2 4 0; -#X connect 8 0 9 2; -#X connect 8 0 9 3; -#X connect 9 0 6 0; -#X connect 10 0 8 0; -#X connect 11 0 12 0; -#X connect 11 1 10 0; -#X connect 12 0 9 0; -#X connect 13 0 14 0; -#X connect 14 0 12 0; -#X restore 502 153 pd massrender; -#N canvas 284 227 595 566 linkrender 0; -#X obj 261 87 inlet; -#X obj 261 179 / 12.5; -#X obj 261 202 - 4; -#X obj 315 180 / 12.5; -#X obj 315 203 - 4; -#X obj 189 288 separator; -#X obj 261 226 t b f; -#X obj 189 331 curve 2; -#X obj 375 183 / 12.5; -#X obj 375 206 - 4; -#X obj 429 184 / 12.5; -#X obj 429 207 - 4; -#X obj 291 256 pack f f; -#X msg 291 279 \$1 \$2 0; -#X obj 375 255 pack f f; -#X msg 375 278 \$1 \$2 0; -#X obj 261 131 unpack f f f f f; -#X obj 189 310 colorRGB 1 1 1; -#X obj 189 262 gemhead 45; -#X obj 189 180 loadbang; -#X msg 189 229 0; -#X connect 0 0 16 0; -#X connect 1 0 2 0; -#X connect 2 0 6 0; -#X connect 3 0 4 0; -#X connect 4 0 12 1; -#X connect 5 0 17 0; -#X connect 6 0 18 0; -#X connect 6 1 12 0; -#X connect 8 0 9 0; -#X connect 9 0 14 0; -#X connect 10 0 11 0; -#X connect 11 0 14 1; -#X connect 12 0 13 0; -#X connect 13 0 7 1; -#X connect 14 0 15 0; -#X connect 15 0 7 2; -#X connect 16 1 1 0; -#X connect 16 2 3 0; -#X connect 16 3 8 0; -#X connect 16 4 10 0; -#X connect 17 0 7 0; -#X connect 18 0 5 0; -#X connect 19 0 20 0; -#X connect 20 0 18 0; -#X restore 432 174 pd linkrender; -#X obj 273 174 s \$0-pmpdin; -#X obj 432 101 r \$0-pmpdout; -#X obj 432 124 route linksPosNo massesPos; -#X connect 0 0 1 0; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 1 0 0; -#X connect 4 0 1 0; -#X connect 5 0 6 0; -#X connect 6 0 7 0; -#X connect 7 0 10 0; -#X connect 11 0 12 0; -#X connect 12 0 9 0; -#X connect 12 1 8 0; -#X restore 23 86 pd gem_stuff; -#X obj 23 64 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1 -; -#X text 43 63 gem on/off; -#X text 196 54 1 Create window; -#X text 196 74 2 Set dsp on; -#N canvas 0 22 834 442 compute 0; -#X obj 52 69 gemhead; -#X obj 67 163 r \$0-pmpdin; -#X obj 52 216 s \$0-pmpdout; -#X obj 52 192 pmpd2d; -#X msg 50 95 bang \, get massesPos \, get linksPos \, get massesSpeeds -1 \, get massesSpeeds 5 \, get massesSpeeds 9 \, get massesSpeeds 13 -\, get massesSpeeds 17 \, get massesSpeeds 21 \, get massesSpeeds 25 -\, get massesSpeeds 29; -#X connect 0 0 4 0; -#X connect 1 0 3 0; -#X connect 3 0 2 0; -#X connect 4 0 3 0; -#X restore 23 129 pd compute; -#X text 196 94 Drag red masses for bass and white ones for high tones... -; -#X text 196 17 Additive synthesis example; -#X connect 0 0 3 0; -#X connect 5 0 4 0; diff --git a/examples/56_pmpd2d_ball.pd b/examples/56_pmpd2d_ball.pd new file mode 100644 index 0000000..44b5727 --- /dev/null +++ b/examples/56_pmpd2d_ball.pd @@ -0,0 +1,157 @@ +#N canvas 792 237 452 151 10; +#X obj 23 17 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X text 43 16 reset; +#N canvas 665 446 763 327 gem_stuff 0; +#X msg 137 179 0 \, destroy; +#X obj 118 200 gemwin; +#X obj 118 104 inlet; +#X obj 118 129 sel 1 0; +#X msg 118 156 reset \, create \, 1; +#N canvas 284 227 591 562 linkrender 0; +#X obj 150 9 inlet; +#X obj 150 101 / 12.5; +#X obj 150 124 - 4; +#X obj 204 102 / 12.5; +#X obj 204 125 - 4; +#X obj 67 265 separator; +#X obj 150 148 t b f; +#X obj 67 308 curve 2; +#X obj 264 105 / 12.5; +#X obj 264 128 - 4; +#X obj 318 106 / 12.5; +#X obj 318 129 - 4; +#X obj 180 178 pack f f; +#X msg 180 201 \$1 \$2 0; +#X obj 264 177 pack f f; +#X msg 264 200 \$1 \$2 0; +#X obj 150 53 unpack f f f f f; +#X obj 67 224 gemhead 45; +#X obj 67 116 loadbang; +#X msg 67 174 0; +#X connect 0 0 16 0; +#X connect 1 0 2 0; +#X connect 2 0 6 0; +#X connect 3 0 4 0; +#X connect 4 0 12 1; +#X connect 5 0 7 0; +#X connect 6 0 17 0; +#X connect 6 1 12 0; +#X connect 8 0 9 0; +#X connect 9 0 14 0; +#X connect 10 0 11 0; +#X connect 11 0 14 1; +#X connect 12 0 13 0; +#X connect 13 0 7 1; +#X connect 14 0 15 0; +#X connect 15 0 7 2; +#X connect 16 1 1 0; +#X connect 16 2 3 0; +#X connect 16 3 8 0; +#X connect 16 4 10 0; +#X connect 17 0 5 0; +#X connect 18 0 19 0; +#X connect 19 0 17 0; +#X restore 262 171 pd linkrender; +#X obj 262 110 r \$0-pmpdout; +#N canvas 731 296 454 304 gemmouse 0; +#X obj 189 77 gemmouse; +#X obj 189 184 pack f f; +#X obj 189 218 spigot; +#X obj 103 244 outlet; +#X obj 189 131 - 0; +#X obj 216 131 + 100; +#X obj 189 108 / 5; +#X obj 216 108 / -5; +#X obj 79 51 inlet; +#X obj 109 98 t b; +#X obj 108 139 list; +#X obj 141 42 r mouse_init; +#X connect 0 0 6 0; +#X connect 0 1 7 0; +#X connect 0 2 2 1; +#X connect 1 0 2 0; +#X connect 2 0 10 1; +#X connect 4 0 1 0; +#X connect 5 0 1 1; +#X connect 6 0 4 0; +#X connect 7 0 5 0; +#X connect 8 0 9 0; +#X connect 9 0 10 0; +#X connect 10 0 3 0; +#X connect 11 0 10 1; +#X restore 404 127 pd gemmouse; +#X obj 404 106 gemhead; +#X msg 405 147 posX fix \$1; +#X msg 406 168 posY fix \$2; +#X obj 405 194 s \$0-pmpdin; +#X obj 262 133 route linksPosNo; +#X connect 0 0 1 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 3 1 0 0; +#X connect 4 0 1 0; +#X connect 6 0 12 0; +#X connect 7 0 9 0; +#X connect 7 0 10 0; +#X connect 8 0 7 0; +#X connect 9 0 11 0; +#X connect 10 0 11 0; +#X connect 12 0 5 0; +#X restore 23 86 pd gem_stuff; +#X obj 23 64 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 +; +#X text 43 63 gem on/off; +#N canvas 487 334 635 333 creation 0; +#X obj 52 15 loadbang; +#X msg 221 71 reset; +#X msg 153 170 50 50; +#X msg 203 91 mass fix 0 100 50 50; +#X msg 169 192 Xmax 100 \, Xmin 0 \, Ymax 100 \, Ymin 0; +#X msg 186 150 mass mob 1 100 \$1 \$2; +#X obj 135 42 t b b b b b b; +#X msg 186 116 20 50 \, 23 61 \, 29 71 \, 39 77 \, 50 80 \, 61 77 \, +71 71 \, 77 61 \, 80 50 \, 77 39 \, 71 29 \, 61 23 \, 50 20 \, 39 23 +\, 29 29 \, 23 39; +#X msg 144 211 link intf mob 0 10 2.5; +#X msg 135 234 link inter mob mob 1 2.5; +#X obj 192 270 s mouse_init; +#X obj 135 261 s \$0-pmpdin; +#X obj 239 25 inlet; +#X text 303 226 all links are created with these two messages; +#X connect 0 0 6 0; +#X connect 1 0 11 0; +#X connect 2 0 10 0; +#X connect 3 0 11 0; +#X connect 4 0 11 0; +#X connect 5 0 11 0; +#X connect 6 0 9 0; +#X connect 6 1 8 0; +#X connect 6 2 2 0; +#X connect 6 2 4 0; +#X connect 6 3 7 0; +#X connect 6 4 3 0; +#X connect 6 5 1 0; +#X connect 7 0 5 0; +#X connect 8 0 11 0; +#X connect 9 0 11 0; +#X connect 12 0 6 0; +#X restore 23 40 pd creation; +#N canvas 0 22 450 300 compute 0; +#X obj 53 100 gemhead; +#X obj 53 123 t b; +#X msg 53 145 bang \, get linksPos; +#X obj 53 224 s \$0-pmpdout; +#X obj 63 174 r \$0-pmpdin; +#X obj 53 198 pmpd2d; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 3 0; +#X restore 23 111 pd compute; +#X text 164 54 create window; +#X text 164 69 and drag the structure with the mouse; +#X text 161 117 copyright Nicolas Montgermont 2010; +#X connect 0 0 5 0; +#X connect 3 0 2 0; diff --git a/examples/57_pmpd2d_ball.pd b/examples/57_pmpd2d_ball.pd deleted file mode 100644 index 44b5727..0000000 --- a/examples/57_pmpd2d_ball.pd +++ /dev/null @@ -1,157 +0,0 @@ -#N canvas 792 237 452 151 10; -#X obj 23 17 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X text 43 16 reset; -#N canvas 665 446 763 327 gem_stuff 0; -#X msg 137 179 0 \, destroy; -#X obj 118 200 gemwin; -#X obj 118 104 inlet; -#X obj 118 129 sel 1 0; -#X msg 118 156 reset \, create \, 1; -#N canvas 284 227 591 562 linkrender 0; -#X obj 150 9 inlet; -#X obj 150 101 / 12.5; -#X obj 150 124 - 4; -#X obj 204 102 / 12.5; -#X obj 204 125 - 4; -#X obj 67 265 separator; -#X obj 150 148 t b f; -#X obj 67 308 curve 2; -#X obj 264 105 / 12.5; -#X obj 264 128 - 4; -#X obj 318 106 / 12.5; -#X obj 318 129 - 4; -#X obj 180 178 pack f f; -#X msg 180 201 \$1 \$2 0; -#X obj 264 177 pack f f; -#X msg 264 200 \$1 \$2 0; -#X obj 150 53 unpack f f f f f; -#X obj 67 224 gemhead 45; -#X obj 67 116 loadbang; -#X msg 67 174 0; -#X connect 0 0 16 0; -#X connect 1 0 2 0; -#X connect 2 0 6 0; -#X connect 3 0 4 0; -#X connect 4 0 12 1; -#X connect 5 0 7 0; -#X connect 6 0 17 0; -#X connect 6 1 12 0; -#X connect 8 0 9 0; -#X connect 9 0 14 0; -#X connect 10 0 11 0; -#X connect 11 0 14 1; -#X connect 12 0 13 0; -#X connect 13 0 7 1; -#X connect 14 0 15 0; -#X connect 15 0 7 2; -#X connect 16 1 1 0; -#X connect 16 2 3 0; -#X connect 16 3 8 0; -#X connect 16 4 10 0; -#X connect 17 0 5 0; -#X connect 18 0 19 0; -#X connect 19 0 17 0; -#X restore 262 171 pd linkrender; -#X obj 262 110 r \$0-pmpdout; -#N canvas 731 296 454 304 gemmouse 0; -#X obj 189 77 gemmouse; -#X obj 189 184 pack f f; -#X obj 189 218 spigot; -#X obj 103 244 outlet; -#X obj 189 131 - 0; -#X obj 216 131 + 100; -#X obj 189 108 / 5; -#X obj 216 108 / -5; -#X obj 79 51 inlet; -#X obj 109 98 t b; -#X obj 108 139 list; -#X obj 141 42 r mouse_init; -#X connect 0 0 6 0; -#X connect 0 1 7 0; -#X connect 0 2 2 1; -#X connect 1 0 2 0; -#X connect 2 0 10 1; -#X connect 4 0 1 0; -#X connect 5 0 1 1; -#X connect 6 0 4 0; -#X connect 7 0 5 0; -#X connect 8 0 9 0; -#X connect 9 0 10 0; -#X connect 10 0 3 0; -#X connect 11 0 10 1; -#X restore 404 127 pd gemmouse; -#X obj 404 106 gemhead; -#X msg 405 147 posX fix \$1; -#X msg 406 168 posY fix \$2; -#X obj 405 194 s \$0-pmpdin; -#X obj 262 133 route linksPosNo; -#X connect 0 0 1 0; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 1 0 0; -#X connect 4 0 1 0; -#X connect 6 0 12 0; -#X connect 7 0 9 0; -#X connect 7 0 10 0; -#X connect 8 0 7 0; -#X connect 9 0 11 0; -#X connect 10 0 11 0; -#X connect 12 0 5 0; -#X restore 23 86 pd gem_stuff; -#X obj 23 64 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 -; -#X text 43 63 gem on/off; -#N canvas 487 334 635 333 creation 0; -#X obj 52 15 loadbang; -#X msg 221 71 reset; -#X msg 153 170 50 50; -#X msg 203 91 mass fix 0 100 50 50; -#X msg 169 192 Xmax 100 \, Xmin 0 \, Ymax 100 \, Ymin 0; -#X msg 186 150 mass mob 1 100 \$1 \$2; -#X obj 135 42 t b b b b b b; -#X msg 186 116 20 50 \, 23 61 \, 29 71 \, 39 77 \, 50 80 \, 61 77 \, -71 71 \, 77 61 \, 80 50 \, 77 39 \, 71 29 \, 61 23 \, 50 20 \, 39 23 -\, 29 29 \, 23 39; -#X msg 144 211 link intf mob 0 10 2.5; -#X msg 135 234 link inter mob mob 1 2.5; -#X obj 192 270 s mouse_init; -#X obj 135 261 s \$0-pmpdin; -#X obj 239 25 inlet; -#X text 303 226 all links are created with these two messages; -#X connect 0 0 6 0; -#X connect 1 0 11 0; -#X connect 2 0 10 0; -#X connect 3 0 11 0; -#X connect 4 0 11 0; -#X connect 5 0 11 0; -#X connect 6 0 9 0; -#X connect 6 1 8 0; -#X connect 6 2 2 0; -#X connect 6 2 4 0; -#X connect 6 3 7 0; -#X connect 6 4 3 0; -#X connect 6 5 1 0; -#X connect 7 0 5 0; -#X connect 8 0 11 0; -#X connect 9 0 11 0; -#X connect 12 0 6 0; -#X restore 23 40 pd creation; -#N canvas 0 22 450 300 compute 0; -#X obj 53 100 gemhead; -#X obj 53 123 t b; -#X msg 53 145 bang \, get linksPos; -#X obj 53 224 s \$0-pmpdout; -#X obj 63 174 r \$0-pmpdin; -#X obj 53 198 pmpd2d; -#X connect 0 0 1 0; -#X connect 1 0 2 0; -#X connect 2 0 5 0; -#X connect 4 0 5 0; -#X connect 5 0 3 0; -#X restore 23 111 pd compute; -#X text 164 54 create window; -#X text 164 69 and drag the structure with the mouse; -#X text 161 117 copyright Nicolas Montgermont 2010; -#X connect 0 0 5 0; -#X connect 3 0 2 0; diff --git a/examples/57_pmpd2d_gravitation.pd b/examples/57_pmpd2d_gravitation.pd new file mode 100644 index 0000000..ffc217a --- /dev/null +++ b/examples/57_pmpd2d_gravitation.pd @@ -0,0 +1,213 @@ +#N canvas 676 303 541 161 10; +#X obj 18 21 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X text 39 18 reset; +#N canvas 0 22 450 300 gem_stuff 0; +#X msg 30 89 0 \, destroy; +#X obj 30 185 gemhead; +#X obj 30 238 world_light; +#X obj 30 148 gemwin; +#X msg 30 66 reset \, dimen 800 800 \, create \, lighting 1 \, 1; +#X obj 30 212 rotateXYZ 30 20 0; +#X obj 32 10 inlet; +#X obj 32 37 sel 1 0; +#X connect 0 0 3 0; +#X connect 1 0 5 0; +#X connect 4 0 3 0; +#X connect 5 0 2 0; +#X connect 6 0 7 0; +#X connect 7 0 4 0; +#X connect 7 1 0 0; +#X restore 18 87 pd gem_stuff; +#X obj 18 69 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1 +; +#N canvas 0 22 804 395 creation 0; +#X obj 42 28 bng 20 250 50 0 empty empty empty 0 -6 0 8 -258699 -1 +-1; +#X msg 239 84 reset; +#X obj 245 32 loadbang; +#X text 68 30 reset; +#X obj 167 55 t b b b b b; +#X text 501 28 change number of mass to test performance; +#X text 501 41 (and reset afterwards); +#X obj 441 34 nbx 5 14 1 2000 1 1 empty empty empty 0 -6 0 10 -262144 +-1 -1 1681.79 256; +#X msg 185 241 Xmax 4 \, Xmin -4 \, Ymax 4 \, Ymin -4; +#X msg 167 215 setL sun 0; +#X msg 221 107 mass fix 0 100 0 0; +#X text 409 270 0.2 : rigidity \, 0 : damping \, -2 : power \, 0.4 +: Lmin; +#X text 363 109 Sun; +#X text 288 181 Initial speed; +#N canvas 900 169 769 663 masses 0; +#X obj 151 16 inlet; +#X obj 232 28 inlet; +#X obj 151 616 outlet; +#X msg 151 551 mass mob 1 \$1 \$2 \$3; +#X msg 151 307 seed 3; +#X obj 151 519 pack f f f; +#X obj 151 228 t b b b; +#X msg 243 306 seed 20; +#X msg 331 308 seed 10; +#X obj 151 327 random 10000; +#X obj 243 371 - 1; +#X obj 331 370 - 1; +#X obj 151 47 t b; +#X obj 333 52 loadbang; +#X text 263 277 X; +#X text 166 276 M; +#X text 372 278 Y; +#X obj 151 67 until; +#X obj 151 86 f; +#X obj 177 87 + 1; +#X obj 177 118 mod 1000; +#X obj 206 87 sel 0; +#X obj 243 327 random 1000; +#X obj 331 328 random 1000; +#X obj 243 348 / 50000; +#X obj 331 349 / 50000; +#X obj 151 349 / 250; +#X obj 151 371 + 185; +#X connect 0 0 12 0; +#X connect 1 0 20 1; +#X connect 3 0 2 0; +#X connect 4 0 9 0; +#X connect 5 0 3 0; +#X connect 6 0 9 0; +#X connect 6 1 22 0; +#X connect 6 2 23 0; +#X connect 7 0 22 0; +#X connect 8 0 23 0; +#X connect 9 0 26 0; +#X connect 10 0 5 1; +#X connect 11 0 5 2; +#X connect 12 0 17 0; +#X connect 13 0 7 0; +#X connect 13 0 8 0; +#X connect 13 0 4 0; +#X connect 17 0 18 0; +#X connect 18 0 19 0; +#X connect 18 0 6 0; +#X connect 19 0 20 0; +#X connect 20 0 21 0; +#X connect 20 0 18 1; +#X connect 21 0 17 1; +#X connect 22 0 24 0; +#X connect 23 0 25 0; +#X connect 24 0 10 0; +#X connect 25 0 11 0; +#X connect 26 0 27 0; +#X connect 27 0 5 0; +#X restore 203 144 pd masses; +#X text 410 289 The power of the link is -2 to simulate a gravity field +in 1/R^2; +#X text 292 146 Particules; +#X msg 185 268 link sun fix mob 0.2 0 -2 0.4; +#X msg 167 178 forceX mob 5.9; +#X obj 167 310 s \$0-pmpdin; +#X obj 166 25 inlet; +#X connect 0 0 4 0; +#X connect 1 0 19 0; +#X connect 2 0 4 0; +#X connect 4 0 9 0; +#X connect 4 0 18 0; +#X connect 4 1 8 0; +#X connect 4 1 17 0; +#X connect 4 2 14 0; +#X connect 4 3 10 0; +#X connect 4 4 1 0; +#X connect 7 0 14 1; +#X connect 8 0 19 0; +#X connect 9 0 19 0; +#X connect 10 0 19 0; +#X connect 14 0 19 0; +#X connect 17 0 19 0; +#X connect 18 0 19 0; +#X connect 20 0 4 0; +#X restore 18 43 pd creation; +#X text 116 58 gravity field simulation; +#X text 116 74 if you have cpu problem \, you can reduce the mass number +in "creation"; +#N canvas 0 22 450 300 compute 0; +#X obj 52 64 t b; +#X obj 52 41 gemhead; +#X msg 197 123 forceX mob 0.051; +#X msg 197 149 forceY mob 0.1; +#X msg 52 98 bang \, bang \, get massesPos; +#N canvas 587 210 609 429 massrender 0; +#X obj 124 5 inlet; +#X obj 317 249 translateXYZ; +#X obj 319 223 separator; +#X obj 292 63 unpack f f f; +#X obj 59 262 translateXYZ; +#X obj 123 31 route 0 1; +#X obj 290 93 t b; +#X obj 64 71 unpack f f; +#X obj 60 155 t b f; +#X obj 194 266 translateXYZ; +#X obj 175 76 unpack f f; +#X obj 191 154 t b f; +#X obj 195 294 color 1 0 0; +#X obj 318 323 square 0.015; +#X obj 194 324 square 0.04; +#X text 63 356 Sun; +#X text 195 359 Red particule; +#X text 333 359 Particule; +#X obj 58 320 sphere 0.3 30; +#X obj 59 294 color 0.3 0.3 0.3; +#X obj 318 295 color 0.3 0.3 0.3; +#X obj 314 193 gemlist; +#X obj 362 170 gemhead 45; +#X obj 102 177 gemhead 45; +#X obj 191 197 gemlist; +#X obj 60 202 gemlist; +#X obj 238 172 gemhead 40; +#X obj 191 231 separator; +#X obj 58 232 separator; +#X connect 0 0 5 0; +#X connect 1 0 20 0; +#X connect 2 0 1 0; +#X connect 3 0 6 0; +#X connect 3 1 1 1; +#X connect 3 2 1 2; +#X connect 4 0 19 0; +#X connect 5 0 7 0; +#X connect 5 1 10 0; +#X connect 5 2 3 0; +#X connect 6 0 21 0; +#X connect 7 0 8 0; +#X connect 7 1 4 2; +#X connect 8 0 25 0; +#X connect 8 1 4 1; +#X connect 9 0 12 0; +#X connect 10 0 11 0; +#X connect 10 1 9 2; +#X connect 11 0 24 0; +#X connect 11 1 9 1; +#X connect 12 0 14 0; +#X connect 19 0 18 0; +#X connect 20 0 13 0; +#X connect 21 0 2 0; +#X connect 22 0 21 1; +#X connect 23 0 25 1; +#X connect 24 0 27 0; +#X connect 25 0 28 0; +#X connect 26 0 24 1; +#X connect 27 0 9 0; +#X connect 28 0 4 0; +#X restore 52 239 pd massrender; +#X obj 52 212 route massesPos; +#X obj 63 147 r \$0-pmpdin; +#X obj 52 182 pmpd2d; +#X connect 0 0 4 0; +#X connect 1 0 0 0; +#X connect 2 0 8 0; +#X connect 3 0 8 0; +#X connect 4 0 8 0; +#X connect 6 0 5 0; +#X connect 7 0 8 0; +#X connect 8 0 6 0; +#X restore 18 107 pd compute; +#X text 120 121 copyright Nicolas Montgermont 2010; +#X connect 0 0 4 0; +#X connect 3 0 2 0; diff --git a/examples/58_pmpd2d_gravitation.pd b/examples/58_pmpd2d_gravitation.pd deleted file mode 100644 index ffc217a..0000000 --- a/examples/58_pmpd2d_gravitation.pd +++ /dev/null @@ -1,213 +0,0 @@ -#N canvas 676 303 541 161 10; -#X obj 18 21 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X text 39 18 reset; -#N canvas 0 22 450 300 gem_stuff 0; -#X msg 30 89 0 \, destroy; -#X obj 30 185 gemhead; -#X obj 30 238 world_light; -#X obj 30 148 gemwin; -#X msg 30 66 reset \, dimen 800 800 \, create \, lighting 1 \, 1; -#X obj 30 212 rotateXYZ 30 20 0; -#X obj 32 10 inlet; -#X obj 32 37 sel 1 0; -#X connect 0 0 3 0; -#X connect 1 0 5 0; -#X connect 4 0 3 0; -#X connect 5 0 2 0; -#X connect 6 0 7 0; -#X connect 7 0 4 0; -#X connect 7 1 0 0; -#X restore 18 87 pd gem_stuff; -#X obj 18 69 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1 -; -#N canvas 0 22 804 395 creation 0; -#X obj 42 28 bng 20 250 50 0 empty empty empty 0 -6 0 8 -258699 -1 --1; -#X msg 239 84 reset; -#X obj 245 32 loadbang; -#X text 68 30 reset; -#X obj 167 55 t b b b b b; -#X text 501 28 change number of mass to test performance; -#X text 501 41 (and reset afterwards); -#X obj 441 34 nbx 5 14 1 2000 1 1 empty empty empty 0 -6 0 10 -262144 --1 -1 1681.79 256; -#X msg 185 241 Xmax 4 \, Xmin -4 \, Ymax 4 \, Ymin -4; -#X msg 167 215 setL sun 0; -#X msg 221 107 mass fix 0 100 0 0; -#X text 409 270 0.2 : rigidity \, 0 : damping \, -2 : power \, 0.4 -: Lmin; -#X text 363 109 Sun; -#X text 288 181 Initial speed; -#N canvas 900 169 769 663 masses 0; -#X obj 151 16 inlet; -#X obj 232 28 inlet; -#X obj 151 616 outlet; -#X msg 151 551 mass mob 1 \$1 \$2 \$3; -#X msg 151 307 seed 3; -#X obj 151 519 pack f f f; -#X obj 151 228 t b b b; -#X msg 243 306 seed 20; -#X msg 331 308 seed 10; -#X obj 151 327 random 10000; -#X obj 243 371 - 1; -#X obj 331 370 - 1; -#X obj 151 47 t b; -#X obj 333 52 loadbang; -#X text 263 277 X; -#X text 166 276 M; -#X text 372 278 Y; -#X obj 151 67 until; -#X obj 151 86 f; -#X obj 177 87 + 1; -#X obj 177 118 mod 1000; -#X obj 206 87 sel 0; -#X obj 243 327 random 1000; -#X obj 331 328 random 1000; -#X obj 243 348 / 50000; -#X obj 331 349 / 50000; -#X obj 151 349 / 250; -#X obj 151 371 + 185; -#X connect 0 0 12 0; -#X connect 1 0 20 1; -#X connect 3 0 2 0; -#X connect 4 0 9 0; -#X connect 5 0 3 0; -#X connect 6 0 9 0; -#X connect 6 1 22 0; -#X connect 6 2 23 0; -#X connect 7 0 22 0; -#X connect 8 0 23 0; -#X connect 9 0 26 0; -#X connect 10 0 5 1; -#X connect 11 0 5 2; -#X connect 12 0 17 0; -#X connect 13 0 7 0; -#X connect 13 0 8 0; -#X connect 13 0 4 0; -#X connect 17 0 18 0; -#X connect 18 0 19 0; -#X connect 18 0 6 0; -#X connect 19 0 20 0; -#X connect 20 0 21 0; -#X connect 20 0 18 1; -#X connect 21 0 17 1; -#X connect 22 0 24 0; -#X connect 23 0 25 0; -#X connect 24 0 10 0; -#X connect 25 0 11 0; -#X connect 26 0 27 0; -#X connect 27 0 5 0; -#X restore 203 144 pd masses; -#X text 410 289 The power of the link is -2 to simulate a gravity field -in 1/R^2; -#X text 292 146 Particules; -#X msg 185 268 link sun fix mob 0.2 0 -2 0.4; -#X msg 167 178 forceX mob 5.9; -#X obj 167 310 s \$0-pmpdin; -#X obj 166 25 inlet; -#X connect 0 0 4 0; -#X connect 1 0 19 0; -#X connect 2 0 4 0; -#X connect 4 0 9 0; -#X connect 4 0 18 0; -#X connect 4 1 8 0; -#X connect 4 1 17 0; -#X connect 4 2 14 0; -#X connect 4 3 10 0; -#X connect 4 4 1 0; -#X connect 7 0 14 1; -#X connect 8 0 19 0; -#X connect 9 0 19 0; -#X connect 10 0 19 0; -#X connect 14 0 19 0; -#X connect 17 0 19 0; -#X connect 18 0 19 0; -#X connect 20 0 4 0; -#X restore 18 43 pd creation; -#X text 116 58 gravity field simulation; -#X text 116 74 if you have cpu problem \, you can reduce the mass number -in "creation"; -#N canvas 0 22 450 300 compute 0; -#X obj 52 64 t b; -#X obj 52 41 gemhead; -#X msg 197 123 forceX mob 0.051; -#X msg 197 149 forceY mob 0.1; -#X msg 52 98 bang \, bang \, get massesPos; -#N canvas 587 210 609 429 massrender 0; -#X obj 124 5 inlet; -#X obj 317 249 translateXYZ; -#X obj 319 223 separator; -#X obj 292 63 unpack f f f; -#X obj 59 262 translateXYZ; -#X obj 123 31 route 0 1; -#X obj 290 93 t b; -#X obj 64 71 unpack f f; -#X obj 60 155 t b f; -#X obj 194 266 translateXYZ; -#X obj 175 76 unpack f f; -#X obj 191 154 t b f; -#X obj 195 294 color 1 0 0; -#X obj 318 323 square 0.015; -#X obj 194 324 square 0.04; -#X text 63 356 Sun; -#X text 195 359 Red particule; -#X text 333 359 Particule; -#X obj 58 320 sphere 0.3 30; -#X obj 59 294 color 0.3 0.3 0.3; -#X obj 318 295 color 0.3 0.3 0.3; -#X obj 314 193 gemlist; -#X obj 362 170 gemhead 45; -#X obj 102 177 gemhead 45; -#X obj 191 197 gemlist; -#X obj 60 202 gemlist; -#X obj 238 172 gemhead 40; -#X obj 191 231 separator; -#X obj 58 232 separator; -#X connect 0 0 5 0; -#X connect 1 0 20 0; -#X connect 2 0 1 0; -#X connect 3 0 6 0; -#X connect 3 1 1 1; -#X connect 3 2 1 2; -#X connect 4 0 19 0; -#X connect 5 0 7 0; -#X connect 5 1 10 0; -#X connect 5 2 3 0; -#X connect 6 0 21 0; -#X connect 7 0 8 0; -#X connect 7 1 4 2; -#X connect 8 0 25 0; -#X connect 8 1 4 1; -#X connect 9 0 12 0; -#X connect 10 0 11 0; -#X connect 10 1 9 2; -#X connect 11 0 24 0; -#X connect 11 1 9 1; -#X connect 12 0 14 0; -#X connect 19 0 18 0; -#X connect 20 0 13 0; -#X connect 21 0 2 0; -#X connect 22 0 21 1; -#X connect 23 0 25 1; -#X connect 24 0 27 0; -#X connect 25 0 28 0; -#X connect 26 0 24 1; -#X connect 27 0 9 0; -#X connect 28 0 4 0; -#X restore 52 239 pd massrender; -#X obj 52 212 route massesPos; -#X obj 63 147 r \$0-pmpdin; -#X obj 52 182 pmpd2d; -#X connect 0 0 4 0; -#X connect 1 0 0 0; -#X connect 2 0 8 0; -#X connect 3 0 8 0; -#X connect 4 0 8 0; -#X connect 6 0 5 0; -#X connect 7 0 8 0; -#X connect 8 0 6 0; -#X restore 18 107 pd compute; -#X text 120 121 copyright Nicolas Montgermont 2010; -#X connect 0 0 4 0; -#X connect 3 0 2 0; diff --git a/examples/58_pmpd2d_sand.pd b/examples/58_pmpd2d_sand.pd new file mode 100644 index 0000000..60ba102 --- /dev/null +++ b/examples/58_pmpd2d_sand.pd @@ -0,0 +1,299 @@ +#N canvas 915 160 636 696 10; +#X obj 363 187 gemhead; +#X obj 363 234 world_light; +#X msg 364 141 \; pd dsp 1; +#X msg 136 184 FSAA 4; +#N canvas 1144 73 300 425 massrender 0; +#X obj 112 80 inlet; +#X obj 62 311 translateXYZ; +#X obj 62 285 separator; +#X obj 62 244 gemhead 45; +#X obj 62 337 sphere 0.2 20; +#X obj 114 168 t b b; +#X obj 64 364 color; +#X msg 207 229 1 1 1; +#X obj 232 61 inlet; +#X msg 231 255 1 0 0; +#X obj 62 54 loadbang; +#X msg 62 194 0; +#X obj 112 115 unpack f f f; +#X obj 249 130 route 0; +#X connect 0 0 12 0; +#X connect 1 0 4 0; +#X connect 2 0 1 0; +#X connect 3 0 2 0; +#X connect 4 0 6 0; +#X connect 5 0 7 0; +#X connect 5 1 3 0; +#X connect 7 0 6 1; +#X connect 8 0 9 0; +#X connect 9 0 6 1; +#X connect 10 0 11 0; +#X connect 11 0 3 0; +#X connect 12 0 13 0; +#X connect 12 1 1 1; +#X connect 12 2 1 2; +#X connect 13 1 5 0; +#X restore 51 627 pd massrender; +#X obj 51 350 gemhead; +#X obj 51 328 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 +; +#X msg 51 373 get massesPos sable; +#N canvas 754 153 608 476 creation 0; +#X obj 198 405 t a; +#X obj 196 30 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X msg 207 72 reset; +#X obj 128 28 loadbang; +#X text 234 32 Reset; +#X text 263 89 Random positions and masses; +#N canvas 826 356 716 390 masses 0; +#X msg 417 145 seed 1; +#X msg 342 144 seed 2; +#X obj 43 15 inlet; +#X obj 238 362 outlet; +#X obj 419 97 loadbang; +#X obj 223 68 t b b; +#X obj 43 78 f; +#X obj 73 78 + 1; +#X msg 43 41 0; +#X msg 237 294 mass sable 1 1 \$1 \$2; +#X obj 237 274 pack f f; +#X obj 254 218 - 3; +#X obj 336 223 - 3; +#X obj 253 170 random 30; +#X obj 339 172 random 30; +#X obj 336 201 / 5; +#X obj 254 196 / 5; +#X obj 74 101 moses 32.5; +#X connect 0 0 14 0; +#X connect 1 0 13 0; +#X connect 2 0 8 0; +#X connect 4 0 1 0; +#X connect 4 0 0 0; +#X connect 5 0 13 0; +#X connect 5 1 14 0; +#X connect 6 0 7 0; +#X connect 6 0 5 0; +#X connect 7 0 17 0; +#X connect 8 0 6 0; +#X connect 9 0 3 0; +#X connect 10 0 9 0; +#X connect 11 0 10 0; +#X connect 12 0 10 1; +#X connect 13 0 16 0; +#X connect 14 0 15 0; +#X connect 15 0 12 0; +#X connect 16 0 11 0; +#X connect 17 0 6 0; +#X restore 185 93 pd masses; +#X obj 128 49 t b b b b; +#X obj 40 149 t b b b b; +#X msg 155 133 mass fixe 0 1 0 0; +#X obj 197 434 outlet; +#X obj 94 7 inlet; +#X msg 36 375 Xmax 1111 \, Xmin -1111 \, Ymax 1111 \, Ymin -1111; +#X msg 48 338 setL linkD 1000 \, setL linkG 1000 \, setL linkH 1000 +\, setL linkB 1000; +#X msg 108 256 link linkD MlinkD sable 0.01 0 1 1000 100000; +#X msg 103 276 link linkG MlinkG sable 0.01 0 1 1000 100000; +#X msg 90 295 link linkH MlinkH sable 0.01 0 1 1000 100000; +#X msg 78 315 link linkB MlinkB sable 0.01 0 1 1000 100000; +#X msg 167 113 link rebond sable sable 0.003 0.005 1 0 0.4; +#X msg 146 153 setL rebond 0.4; +#X msg 120 221 mass MlinkD 0 1 -993.8 0 \, mass MlinkG 0 1 993.8 0 +\, mass MlinkH 0 1 0 996.2 \, mass MlinkB 0 1 0 -996.2; +#X msg 129 194 setDEnv sable 0.0001; +#X connect 0 0 10 0; +#X connect 1 0 7 0; +#X connect 2 0 0 0; +#X connect 3 0 7 0; +#X connect 6 0 0 0; +#X connect 7 0 8 0; +#X connect 7 0 19 0; +#X connect 7 1 18 0; +#X connect 7 1 9 0; +#X connect 7 2 6 0; +#X connect 7 3 2 0; +#X connect 8 1 13 0; +#X connect 8 2 14 0; +#X connect 8 2 16 0; +#X connect 8 2 17 0; +#X connect 8 2 15 0; +#X connect 8 3 20 0; +#X connect 8 3 21 0; +#X connect 9 0 0 0; +#X connect 11 0 7 0; +#X connect 12 0 0 0; +#X connect 13 0 0 0; +#X connect 14 0 0 0; +#X connect 15 0 0 0; +#X connect 16 0 0 0; +#X connect 17 0 0 0; +#X connect 18 0 0 0; +#X connect 19 0 0 0; +#X connect 20 0 0 0; +#X connect 21 0 0 0; +#X restore 68 494 pd creation; +#X obj 89 515 bang~; +#X msg 89 539 get massesForces; +#N canvas 0 22 450 300 simulation_gravite 0; +#X msg 28 224 forceX sable \$1; +#X msg 142 224 forceY sable \$1; +#X obj 29 60 min 80; +#X obj 28 82 max 0; +#X obj 28 107 - 40; +#X obj 142 60 min 80; +#X obj 141 82 max 0; +#X obj 143 151 - 40; +#X obj 142 102 * -1; +#X obj 143 126 + 80; +#X obj 48 132 bang~; +#X obj 30 39 inlet; +#X obj 140 38 inlet; +#X obj 25 257 outlet; +#X obj 125 179 f; +#X obj 36 178 f; +#X obj 31 201 / 2e+06; +#X obj 145 200 / 2e+06; +#X connect 0 0 13 0; +#X connect 1 0 13 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 4 0 15 1; +#X connect 5 0 6 0; +#X connect 6 0 8 0; +#X connect 7 0 14 1; +#X connect 8 0 9 0; +#X connect 9 0 7 0; +#X connect 10 0 14 0; +#X connect 10 0 15 0; +#X connect 11 0 2 0; +#X connect 12 0 5 0; +#X connect 14 0 17 0; +#X connect 15 0 16 0; +#X connect 16 0 0 0; +#X connect 17 0 1 0; +#X restore 212 496 pd simulation_gravite; +#X obj 68 475 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 65 417 metro 1; +#X obj 65 396 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 +; +#X msg 109 145 view 0 0 40 0 0 0 0 1 0; +#X msg 119 165 perspec -0.1 0.1 -0.1 0.1 1 100; +#X obj 116 119 b; +#X obj 135 96 loadbang; +#X obj 116 95 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 363 212 rotateXYZ -30 -20 0; +#X obj 65 444 t b b; +#X msg 209 242 destroy; +#X obj 209 197 key; +#X obj 209 218 sel 27; +#X msg 90 396 1; +#X msg 88 61 dimen 1680 1050 \, cursor 0; +#X obj 52 282 gemwin 58; +#X msg 51 13 dimen 672 420; +#X msg 69 38 create \, lighting 1 \, 1; +#N canvas 0 22 450 300 sound 0; +#X obj 19 279 dac~; +#X obj 202 220 *~ 1; +#X obj 268 191 sound_sable 28 29; +#X obj 43 101 sound_sable 12 13; +#X obj 20 61 sound_sable 4 5; +#X obj 79 164 sound_sable 24 25; +#X obj 33 80 sound_sable 8 9; +#X obj 56 123 sound_sable 16 17; +#X obj 66 144 sound_sable 20 21; +#X obj 191 43 sound_sable 2 3; +#X obj 201 64 sound_sable 6 7; +#X obj 214 83 sound_sable 10 11; +#X obj 224 104 sound_sable 14 15; +#X obj 237 126 sound_sable 18 19; +#X obj 247 148 sound_sable 22 23; +#X obj 260 167 sound_sable 26 27; +#X obj 277 212 sound_sable 30 31; +#X obj 19 246 *~ 0.2; +#X obj 13 11 inlet; +#X obj 10 40 sound_sable 0 1; +#X connect 1 0 17 0; +#X connect 2 0 1 0; +#X connect 2 1 16 0; +#X connect 3 0 17 0; +#X connect 3 1 7 0; +#X connect 4 0 17 0; +#X connect 4 1 6 0; +#X connect 5 0 17 0; +#X connect 5 1 9 0; +#X connect 6 0 17 0; +#X connect 6 1 3 0; +#X connect 7 0 17 0; +#X connect 7 1 8 0; +#X connect 8 0 17 0; +#X connect 8 1 5 0; +#X connect 9 0 1 0; +#X connect 9 1 10 0; +#X connect 10 0 1 0; +#X connect 10 1 11 0; +#X connect 11 0 1 0; +#X connect 11 1 12 0; +#X connect 12 0 1 0; +#X connect 12 1 13 0; +#X connect 13 0 1 0; +#X connect 13 1 14 0; +#X connect 14 0 1 0; +#X connect 14 1 15 0; +#X connect 15 0 1 0; +#X connect 15 1 2 0; +#X connect 16 0 1 0; +#X connect 17 0 0 0; +#X connect 17 0 0 1; +#X connect 18 0 19 0; +#X connect 19 0 17 0; +#X connect 19 1 4 0; +#X restore 153 626 pd sound; +#X obj 51 596 route massesPosId massesForces; +#X msg 149 427 infosL; +#X obj 51 575 pmpd2d --------------------------------; +#X obj 126 395 loadbang; +#X obj 364 120 loadbang; +#X obj 213 462 gemmouse 80 80; +#X text 124 661 moove the mouse on the screen to simulate gravity; +#X connect 0 0 20 0; +#X connect 3 0 27 0; +#X connect 5 0 7 0; +#X connect 6 0 5 0; +#X connect 7 0 33 0; +#X connect 8 0 33 0; +#X connect 9 0 10 0; +#X connect 10 0 33 0; +#X connect 11 0 33 0; +#X connect 12 0 8 0; +#X connect 13 0 21 0; +#X connect 14 0 13 0; +#X connect 15 0 27 0; +#X connect 16 0 27 0; +#X connect 17 0 15 0; +#X connect 17 0 16 0; +#X connect 17 0 3 0; +#X connect 18 0 17 0; +#X connect 19 0 17 0; +#X connect 20 0 1 0; +#X connect 21 0 33 0; +#X connect 21 1 4 1; +#X connect 22 0 27 0; +#X connect 23 0 24 0; +#X connect 24 0 22 0; +#X connect 25 0 14 0; +#X connect 26 0 27 0; +#X connect 28 0 27 0; +#X connect 29 0 27 0; +#X connect 31 0 4 0; +#X connect 31 1 30 0; +#X connect 32 0 33 0; +#X connect 33 0 31 0; +#X connect 34 0 25 0; +#X connect 35 0 2 0; +#X connect 36 0 11 0; +#X connect 36 1 11 1; diff --git a/examples/59_pmpd2d_sand.pd b/examples/59_pmpd2d_sand.pd deleted file mode 100644 index 60ba102..0000000 --- a/examples/59_pmpd2d_sand.pd +++ /dev/null @@ -1,299 +0,0 @@ -#N canvas 915 160 636 696 10; -#X obj 363 187 gemhead; -#X obj 363 234 world_light; -#X msg 364 141 \; pd dsp 1; -#X msg 136 184 FSAA 4; -#N canvas 1144 73 300 425 massrender 0; -#X obj 112 80 inlet; -#X obj 62 311 translateXYZ; -#X obj 62 285 separator; -#X obj 62 244 gemhead 45; -#X obj 62 337 sphere 0.2 20; -#X obj 114 168 t b b; -#X obj 64 364 color; -#X msg 207 229 1 1 1; -#X obj 232 61 inlet; -#X msg 231 255 1 0 0; -#X obj 62 54 loadbang; -#X msg 62 194 0; -#X obj 112 115 unpack f f f; -#X obj 249 130 route 0; -#X connect 0 0 12 0; -#X connect 1 0 4 0; -#X connect 2 0 1 0; -#X connect 3 0 2 0; -#X connect 4 0 6 0; -#X connect 5 0 7 0; -#X connect 5 1 3 0; -#X connect 7 0 6 1; -#X connect 8 0 9 0; -#X connect 9 0 6 1; -#X connect 10 0 11 0; -#X connect 11 0 3 0; -#X connect 12 0 13 0; -#X connect 12 1 1 1; -#X connect 12 2 1 2; -#X connect 13 1 5 0; -#X restore 51 627 pd massrender; -#X obj 51 350 gemhead; -#X obj 51 328 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 -; -#X msg 51 373 get massesPos sable; -#N canvas 754 153 608 476 creation 0; -#X obj 198 405 t a; -#X obj 196 30 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 207 72 reset; -#X obj 128 28 loadbang; -#X text 234 32 Reset; -#X text 263 89 Random positions and masses; -#N canvas 826 356 716 390 masses 0; -#X msg 417 145 seed 1; -#X msg 342 144 seed 2; -#X obj 43 15 inlet; -#X obj 238 362 outlet; -#X obj 419 97 loadbang; -#X obj 223 68 t b b; -#X obj 43 78 f; -#X obj 73 78 + 1; -#X msg 43 41 0; -#X msg 237 294 mass sable 1 1 \$1 \$2; -#X obj 237 274 pack f f; -#X obj 254 218 - 3; -#X obj 336 223 - 3; -#X obj 253 170 random 30; -#X obj 339 172 random 30; -#X obj 336 201 / 5; -#X obj 254 196 / 5; -#X obj 74 101 moses 32.5; -#X connect 0 0 14 0; -#X connect 1 0 13 0; -#X connect 2 0 8 0; -#X connect 4 0 1 0; -#X connect 4 0 0 0; -#X connect 5 0 13 0; -#X connect 5 1 14 0; -#X connect 6 0 7 0; -#X connect 6 0 5 0; -#X connect 7 0 17 0; -#X connect 8 0 6 0; -#X connect 9 0 3 0; -#X connect 10 0 9 0; -#X connect 11 0 10 0; -#X connect 12 0 10 1; -#X connect 13 0 16 0; -#X connect 14 0 15 0; -#X connect 15 0 12 0; -#X connect 16 0 11 0; -#X connect 17 0 6 0; -#X restore 185 93 pd masses; -#X obj 128 49 t b b b b; -#X obj 40 149 t b b b b; -#X msg 155 133 mass fixe 0 1 0 0; -#X obj 197 434 outlet; -#X obj 94 7 inlet; -#X msg 36 375 Xmax 1111 \, Xmin -1111 \, Ymax 1111 \, Ymin -1111; -#X msg 48 338 setL linkD 1000 \, setL linkG 1000 \, setL linkH 1000 -\, setL linkB 1000; -#X msg 108 256 link linkD MlinkD sable 0.01 0 1 1000 100000; -#X msg 103 276 link linkG MlinkG sable 0.01 0 1 1000 100000; -#X msg 90 295 link linkH MlinkH sable 0.01 0 1 1000 100000; -#X msg 78 315 link linkB MlinkB sable 0.01 0 1 1000 100000; -#X msg 167 113 link rebond sable sable 0.003 0.005 1 0 0.4; -#X msg 146 153 setL rebond 0.4; -#X msg 120 221 mass MlinkD 0 1 -993.8 0 \, mass MlinkG 0 1 993.8 0 -\, mass MlinkH 0 1 0 996.2 \, mass MlinkB 0 1 0 -996.2; -#X msg 129 194 setDEnv sable 0.0001; -#X connect 0 0 10 0; -#X connect 1 0 7 0; -#X connect 2 0 0 0; -#X connect 3 0 7 0; -#X connect 6 0 0 0; -#X connect 7 0 8 0; -#X connect 7 0 19 0; -#X connect 7 1 18 0; -#X connect 7 1 9 0; -#X connect 7 2 6 0; -#X connect 7 3 2 0; -#X connect 8 1 13 0; -#X connect 8 2 14 0; -#X connect 8 2 16 0; -#X connect 8 2 17 0; -#X connect 8 2 15 0; -#X connect 8 3 20 0; -#X connect 8 3 21 0; -#X connect 9 0 0 0; -#X connect 11 0 7 0; -#X connect 12 0 0 0; -#X connect 13 0 0 0; -#X connect 14 0 0 0; -#X connect 15 0 0 0; -#X connect 16 0 0 0; -#X connect 17 0 0 0; -#X connect 18 0 0 0; -#X connect 19 0 0 0; -#X connect 20 0 0 0; -#X connect 21 0 0 0; -#X restore 68 494 pd creation; -#X obj 89 515 bang~; -#X msg 89 539 get massesForces; -#N canvas 0 22 450 300 simulation_gravite 0; -#X msg 28 224 forceX sable \$1; -#X msg 142 224 forceY sable \$1; -#X obj 29 60 min 80; -#X obj 28 82 max 0; -#X obj 28 107 - 40; -#X obj 142 60 min 80; -#X obj 141 82 max 0; -#X obj 143 151 - 40; -#X obj 142 102 * -1; -#X obj 143 126 + 80; -#X obj 48 132 bang~; -#X obj 30 39 inlet; -#X obj 140 38 inlet; -#X obj 25 257 outlet; -#X obj 125 179 f; -#X obj 36 178 f; -#X obj 31 201 / 2e+06; -#X obj 145 200 / 2e+06; -#X connect 0 0 13 0; -#X connect 1 0 13 0; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 4 0 15 1; -#X connect 5 0 6 0; -#X connect 6 0 8 0; -#X connect 7 0 14 1; -#X connect 8 0 9 0; -#X connect 9 0 7 0; -#X connect 10 0 14 0; -#X connect 10 0 15 0; -#X connect 11 0 2 0; -#X connect 12 0 5 0; -#X connect 14 0 17 0; -#X connect 15 0 16 0; -#X connect 16 0 0 0; -#X connect 17 0 1 0; -#X restore 212 496 pd simulation_gravite; -#X obj 68 475 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 65 417 metro 1; -#X obj 65 396 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 -; -#X msg 109 145 view 0 0 40 0 0 0 0 1 0; -#X msg 119 165 perspec -0.1 0.1 -0.1 0.1 1 100; -#X obj 116 119 b; -#X obj 135 96 loadbang; -#X obj 116 95 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X obj 363 212 rotateXYZ -30 -20 0; -#X obj 65 444 t b b; -#X msg 209 242 destroy; -#X obj 209 197 key; -#X obj 209 218 sel 27; -#X msg 90 396 1; -#X msg 88 61 dimen 1680 1050 \, cursor 0; -#X obj 52 282 gemwin 58; -#X msg 51 13 dimen 672 420; -#X msg 69 38 create \, lighting 1 \, 1; -#N canvas 0 22 450 300 sound 0; -#X obj 19 279 dac~; -#X obj 202 220 *~ 1; -#X obj 268 191 sound_sable 28 29; -#X obj 43 101 sound_sable 12 13; -#X obj 20 61 sound_sable 4 5; -#X obj 79 164 sound_sable 24 25; -#X obj 33 80 sound_sable 8 9; -#X obj 56 123 sound_sable 16 17; -#X obj 66 144 sound_sable 20 21; -#X obj 191 43 sound_sable 2 3; -#X obj 201 64 sound_sable 6 7; -#X obj 214 83 sound_sable 10 11; -#X obj 224 104 sound_sable 14 15; -#X obj 237 126 sound_sable 18 19; -#X obj 247 148 sound_sable 22 23; -#X obj 260 167 sound_sable 26 27; -#X obj 277 212 sound_sable 30 31; -#X obj 19 246 *~ 0.2; -#X obj 13 11 inlet; -#X obj 10 40 sound_sable 0 1; -#X connect 1 0 17 0; -#X connect 2 0 1 0; -#X connect 2 1 16 0; -#X connect 3 0 17 0; -#X connect 3 1 7 0; -#X connect 4 0 17 0; -#X connect 4 1 6 0; -#X connect 5 0 17 0; -#X connect 5 1 9 0; -#X connect 6 0 17 0; -#X connect 6 1 3 0; -#X connect 7 0 17 0; -#X connect 7 1 8 0; -#X connect 8 0 17 0; -#X connect 8 1 5 0; -#X connect 9 0 1 0; -#X connect 9 1 10 0; -#X connect 10 0 1 0; -#X connect 10 1 11 0; -#X connect 11 0 1 0; -#X connect 11 1 12 0; -#X connect 12 0 1 0; -#X connect 12 1 13 0; -#X connect 13 0 1 0; -#X connect 13 1 14 0; -#X connect 14 0 1 0; -#X connect 14 1 15 0; -#X connect 15 0 1 0; -#X connect 15 1 2 0; -#X connect 16 0 1 0; -#X connect 17 0 0 0; -#X connect 17 0 0 1; -#X connect 18 0 19 0; -#X connect 19 0 17 0; -#X connect 19 1 4 0; -#X restore 153 626 pd sound; -#X obj 51 596 route massesPosId massesForces; -#X msg 149 427 infosL; -#X obj 51 575 pmpd2d --------------------------------; -#X obj 126 395 loadbang; -#X obj 364 120 loadbang; -#X obj 213 462 gemmouse 80 80; -#X text 124 661 moove the mouse on the screen to simulate gravity; -#X connect 0 0 20 0; -#X connect 3 0 27 0; -#X connect 5 0 7 0; -#X connect 6 0 5 0; -#X connect 7 0 33 0; -#X connect 8 0 33 0; -#X connect 9 0 10 0; -#X connect 10 0 33 0; -#X connect 11 0 33 0; -#X connect 12 0 8 0; -#X connect 13 0 21 0; -#X connect 14 0 13 0; -#X connect 15 0 27 0; -#X connect 16 0 27 0; -#X connect 17 0 15 0; -#X connect 17 0 16 0; -#X connect 17 0 3 0; -#X connect 18 0 17 0; -#X connect 19 0 17 0; -#X connect 20 0 1 0; -#X connect 21 0 33 0; -#X connect 21 1 4 1; -#X connect 22 0 27 0; -#X connect 23 0 24 0; -#X connect 24 0 22 0; -#X connect 25 0 14 0; -#X connect 26 0 27 0; -#X connect 28 0 27 0; -#X connect 29 0 27 0; -#X connect 31 0 4 0; -#X connect 31 1 30 0; -#X connect 32 0 33 0; -#X connect 33 0 31 0; -#X connect 34 0 25 0; -#X connect 35 0 2 0; -#X connect 36 0 11 0; -#X connect 36 1 11 1; diff --git a/examples/59_pmpd3d_test.pd b/examples/59_pmpd3d_test.pd new file mode 100644 index 0000000..f487106 --- /dev/null +++ b/examples/59_pmpd3d_test.pd @@ -0,0 +1,191 @@ +#N canvas 677 130 653 522 10; +#X obj 27 26 loadbang; +#X obj 263 104 gemwin; +#X msg 278 81 0 \, destroy; +#X text 260 26 2 DRAG THE STRUCTURE WITH THE MOUSE; +#X obj 87 27 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X msg 90 76 reset; +#X obj 27 47 t b b b b b; +#X msg 42 186 Xmax 100 \, Xmin 0 \, Ymax 100 \, Ymin 0; +#X obj 53 300 gemhead; +#X obj 53 323 t b; +#X msg 53 345 bang \, get massesPos \, get linksPos; +#N canvas 643 123 308 285 massrender 0; +#X obj 127 22 inlet; +#X obj 48 203 translateXYZ; +#X obj 127 86 / 12.5; +#X obj 127 109 - 4; +#X obj 192 87 / 12.5; +#X obj 192 110 - 4; +#X obj 48 177 separator; +#X obj 125 136 t b f; +#X obj 48 141 gemhead 45; +#X msg 48 104 0; +#X obj 47 58 loadbang; +#X obj 127 57 unpack f f f f; +#X obj 238 88 / 12.5; +#X obj 238 111 - 4; +#X obj 48 229 sphere 0.1; +#X connect 0 0 11 0; +#X connect 1 0 14 0; +#X connect 2 0 3 0; +#X connect 3 0 7 0; +#X connect 4 0 5 0; +#X connect 5 0 1 2; +#X connect 6 0 1 0; +#X connect 7 0 8 0; +#X connect 7 1 1 1; +#X connect 8 0 6 0; +#X connect 9 0 8 0; +#X connect 10 0 9 0; +#X connect 11 1 2 0; +#X connect 11 2 4 0; +#X connect 11 3 12 0; +#X connect 12 0 13 0; +#X connect 13 0 1 3; +#X restore 436 267 pd massrender; +#N canvas 731 296 458 308 gemmouse 0; +#X obj 189 77 gemmouse; +#X obj 189 184 pack f f; +#X obj 189 218 spigot; +#X obj 103 244 outlet; +#X obj 189 131 - 0; +#X obj 216 131 + 100; +#X obj 189 108 / 5; +#X obj 216 108 / -5; +#X obj 79 51 inlet; +#X obj 109 98 t b; +#X obj 141 120 list; +#X obj 141 41 r mouse_init; +#X connect 0 0 6 0; +#X connect 0 1 7 0; +#X connect 0 2 2 1; +#X connect 1 0 2 0; +#X connect 2 0 10 1; +#X connect 4 0 1 0; +#X connect 5 0 1 1; +#X connect 6 0 4 0; +#X connect 7 0 5 0; +#X connect 8 0 9 0; +#X connect 9 0 10 0; +#X connect 10 0 3 0; +#X connect 11 0 10 1; +#X restore 366 356 pd gemmouse; +#X obj 366 335 gemhead; +#X msg 366 377 posX fix \$1; +#X msg 366 398 posY fix \$2; +#N canvas 0 22 454 304 linkrender 0; +#X obj 127 22 inlet; +#X obj 128 86 / 12.5; +#X obj 128 109 - 4; +#X obj 183 87 / 12.5; +#X obj 183 110 - 4; +#X obj 48 177 separator; +#X obj 128 136 t b f; +#X obj 262 88 / 12.5; +#X obj 262 111 - 4; +#X obj 290 112 / 12.5; +#X obj 290 135 - 4; +#X obj 48 222 curve 2; +#X obj 155 189 pack f f 0; +#X obj 262 192 pack f f 0; +#X obj 48 130 gemhead 45; +#X obj 47 44 loadbang; +#X msg 47 68 0; +#X obj 127 57 unpack f f f f f f f; +#X obj 212 112 / 12.5; +#X obj 212 135 - 4; +#X obj 319 135 / 12.5; +#X obj 319 158 - 4; +#X connect 0 0 17 0; +#X connect 1 0 2 0; +#X connect 2 0 6 0; +#X connect 3 0 4 0; +#X connect 4 0 12 1; +#X connect 5 0 11 0; +#X connect 6 0 14 0; +#X connect 6 1 12 0; +#X connect 7 0 8 0; +#X connect 8 0 13 0; +#X connect 9 0 10 0; +#X connect 10 0 13 1; +#X connect 12 0 11 1; +#X connect 13 0 11 2; +#X connect 14 0 5 0; +#X connect 15 0 16 0; +#X connect 16 0 14 0; +#X connect 17 1 1 0; +#X connect 17 2 3 0; +#X connect 17 3 18 0; +#X connect 17 4 7 0; +#X connect 17 5 9 0; +#X connect 17 6 20 0; +#X connect 18 0 19 0; +#X connect 19 0 12 2; +#X connect 20 0 21 0; +#X connect 21 0 13 2; +#X restore 366 289 pd linkrender; +#X msg 206 139 50 50; +#X msg 58 118 40 60 \, 60 60 \, 60 40 \, 40 40; +#X obj 206 162 s mouse_init; +#X msg 27 207 link souple mob mob 10 5; +#X msg 27 230 link souple fix mob 10 5; +#X text 25 1 creation : 5 masses and 20 links; +#X text 52 281 compute and get masses and links positions; +#X text 364 315 move mass to mouse position; +#X text 365 197 display masses with gem; +#X text 261 6 1 CREATE WINDOW; +#X text 108 26 reset struct; +#X obj 90 259 s \$0-pmpdin; +#X obj 84 373 r \$0-pmpdin; +#X obj 52 419 s \$0-pmpdout; +#X obj 365 423 s \$0-pmpdin; +#X obj 366 218 r \$0-pmpdout; +#X msg 74 96 mass fix 0 100 50 50 50; +#X msg 58 139 mass mob 1 100 \$1 \$2 50; +#X obj 368 177 s \$0-pmpdin; +#X msg 369 129 forceZ mob 200; +#X msg 368 153 forceZ mob 200; +#X text 367 108 send vertical forces; +#X msg 263 58 reset \, create \, lighting 1 \, 1; +#X obj 51 454 gemhead; +#X obj 51 476 world_light; +#X obj 53 397 pmpd3d; +#X obj 366 244 route linksPosNo massesPos; +#X text 190 476 copyright Nicolas Montgermont 2010; +#X connect 0 0 6 0; +#X connect 2 0 1 0; +#X connect 4 0 6 0; +#X connect 5 0 28 0; +#X connect 6 0 20 0; +#X connect 6 1 17 0; +#X connect 6 1 7 0; +#X connect 6 2 18 0; +#X connect 6 3 33 0; +#X connect 6 4 5 0; +#X connect 7 0 28 0; +#X connect 8 0 9 0; +#X connect 9 0 10 0; +#X connect 10 0 42 0; +#X connect 12 0 14 0; +#X connect 12 0 15 0; +#X connect 13 0 12 0; +#X connect 14 0 31 0; +#X connect 15 0 31 0; +#X connect 17 0 19 0; +#X connect 18 0 34 0; +#X connect 20 0 21 0; +#X connect 20 0 28 0; +#X connect 21 0 28 0; +#X connect 29 0 42 0; +#X connect 32 0 43 0; +#X connect 33 0 28 0; +#X connect 34 0 28 0; +#X connect 36 0 35 0; +#X connect 37 0 35 0; +#X connect 39 0 1 0; +#X connect 40 0 41 0; +#X connect 42 0 30 0; +#X connect 43 0 16 0; +#X connect 43 1 11 0; diff --git a/examples/60_draw_link_force.pd b/examples/60_draw_link_force.pd new file mode 100644 index 0000000..c8f3d27 --- /dev/null +++ b/examples/60_draw_link_force.pd @@ -0,0 +1,137 @@ +#N canvas 520 143 745 681 10; +#X obj 30 174 until; +#X obj 30 244 - 100; +#X obj 30 198 f; +#X obj 58 198 + 1; +#X obj 30 152 t f b; +#X msg 74 174 0; +#X msg 373 168 reset; +#X obj 334 148 t b b b; +#X obj 29 388 msd; +#X obj 334 282 s \$0-msd; +#X obj 84 338 r \$0-msd; +#X obj 334 129 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 30 264 / 100; +#X floatatom 128 152 5 0 0 0 - - -; +#X obj 30 218 t f f; +#X obj 29 451 tabwrite force; +#X msg 353 194 mass M1 0 1 0; +#X obj 29 409 route massesForcesId; +#X obj 29 431 route M2; +#N canvas 0 0 450 300 (subpatch) 0; +#X array force 200 float 3; +#A 0 0.123457 0.126247 0.129132 0.132118 0.135208 0.138408 0.141723 +0.145159 0.148721 0.152416 0.15625 0.160231 0.164366 0.168663 0.17313 +0.177778 0.182615 0.187652 0.192901 0.198373 0.204082 0.21004 0.216263 +0.222767 0.229568 0.236686 0.244141 0.251953 0.260146 0.268745 0.277778 +0.287274 0.297265 0.307787 0.318878 0.330579 0.342936 0.355999 0.369823 +0.384468 0.4 0.416493 0.434028 0.452694 0.47259 0.493827 0.516529 0.540833 +0.566893 0.594884 0.745 0.1083 0.0972 0.0867 0.0768 0.0675 0.0588 0.0507 +0.0432 0.0363 0.03 0.0243 0.0192 0.0147 0.0108 0.00749999 0.0048 0.0027 +0.0012 0.000299999 0 -0.000300001 -0.0012 -0.0027 -0.00480001 -0.0075 +-0.0108 -0.0147 -0.0192 -0.0243 -0.03 -0.0363 -0.0432 -0.0507 -0.0588 +-0.0675 -0.0768 -0.0867 -0.0972 -0.1083 -0.12 -0.1323 -0.1452 -0.1587 +-0.1728 -0.1875 -0.2028 -0.2187 -0.2352 -0.2523 0 0.2523 0.2352 0.2187 +0.2028 0.1875 0.1728 0.1587 0.1452 0.1323 0.12 0.1083 0.0972 0.0867 +0.0768 0.0675 0.0588 0.0507 0.0432 0.0363 0.03 0.0243 0.0192 0.0147 +0.0108 0.0075 0.00480001 0.0027 0.0012 0.000300001 0 -0.000299999 -0.0012 +-0.0027 -0.0048 -0.00749999 -0.0108 -0.0147 -0.0192 -0.0243 -0.03 -0.0363 +-0.0432 -0.0507 -0.0588 -0.0675 -0.0768 -0.0867 -0.0972 -0.1083 -0.745 +-0.594884 -0.566893 -0.540833 -0.516529 -0.493827 -0.47259 -0.452694 +-0.434028 -0.416493 -0.4 -0.384468 -0.369823 -0.355999 -0.342936 -0.330579 +-0.318878 -0.307787 -0.297265 -0.287274 -0.277778 -0.268745 -0.260146 +-0.251953 -0.244141 -0.236686 -0.229568 -0.222767 -0.216263 -0.21004 +-0.204082 -0.198373 -0.192901 -0.187652 -0.182615 -0.177778 -0.17313 +-0.168663 -0.164366 -0.160231 -0.15625 -0.152416 -0.148721 -0.145159 +-0.141723 -0.138408 -0.135208 -0.132118 -0.129132 -0.126247; +#X coords 0 1 200 -1 200 140 1; +#X restore 327 368 graph; +#X obj 30 284 * 1; +#X text 167 152 link length; +#X text 359 127 reset; +#X text 65 133 draw; +#X msg 362 213 mass M2 1 1 0; +#X obj 30 75 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 30 98 t b b; +#X msg 30 132 200; +#X text 31 9 This abstraction help to draw link forces regarding to +it's elongation; +#N canvas 0 0 450 300 (subpatch) 0; +#X array force2 200 float 3; +#A 0 0.123457 0.126247 0.129132 0.132118 0.135208 0.138408 0.141723 +0.145159 0.148721 0.152416 0.15625 0.160231 0.164366 0.168663 0.17313 +0.177778 0.182615 0.187652 0.192901 0.198373 0.204082 0.21004 0.216263 +0.222767 0.229568 0.236686 0.244141 0.251953 0.260146 0.268745 0.277778 +0.287274 0.297265 0.307787 0.318878 0.330579 0.342936 0.355999 0.369823 +0.384468 0.4 0.416493 0.434028 0.452694 0.47259 0.493827 0.516529 0.540833 +0.566894 0.594884 0.625 0.1083 0.0972 0.0867 0.0768 0.0675 0.0588 0.0507 +0.0432 0.0363 0.03 0.0243 0.0192 0.0147 0.0108 0.00749999 0.0048 0.0027 +0.0012 0.000299999 0 -0.000300001 -0.0012 -0.0027 -0.0048 -0.0075 -0.0108 +-0.0147 -0.0192 -0.0243 -0.03 -0.0363 -0.0432 -0.0507 -0.0588 -0.0675 +-0.0768 -0.0867 -0.0972 -0.1083 -0.12 -0.1323 -0.1452 -0.1587 -0.1728 +-0.1875 -0.2028 -0.2187 -0.2352 -0.2523 -0 0.2523 0.2352 0.2187 0.2028 +0.1875 0.1728 0.1587 0.1452 0.1323 0.12 0.1083 0.0972 0.0867 0.0768 +0.0675 0.0588 0.0507 0.0432 0.0363 0.03 0.0243 0.0192 0.0147 0.0108 +0.0075 0.0048 0.0027 0.0012 0.000300001 0 -0.000299999 -0.0012 -0.0027 +-0.0048 -0.00749999 -0.0108 -0.0147 -0.0192 -0.0243 -0.03 -0.0363 -0.0432 +-0.0507 -0.0588 -0.0675 -0.0768 -0.0867 -0.0972 -0.1083 -0.625 -0.594884 +-0.566894 -0.540833 -0.516529 -0.493827 -0.47259 -0.452694 -0.434028 +-0.416493 -0.4 -0.384468 -0.369823 -0.355999 -0.342936 -0.330579 -0.318878 +-0.307787 -0.297265 -0.287274 -0.277778 -0.268745 -0.260146 -0.251953 +-0.244141 -0.236686 -0.229568 -0.222767 -0.216263 -0.21004 -0.204082 +-0.198373 -0.192901 -0.187652 -0.182615 -0.177778 -0.17313 -0.168663 +-0.164366 -0.160231 -0.15625 -0.152416 -0.148721 -0.145159 -0.141723 +-0.138408 -0.135208 -0.132118 -0.129132 -0.126247; +#X coords 0 1 200 -1 200 140 1; +#X restore 326 529 graph; +#X obj 64 564 route massesForcesId; +#X obj 64 543 pmpd; +#X obj 64 606 tabwrite force2; +#X obj 64 586 route 1; +#X msg 334 240 link test M1 M2 0.1 0 -2 0.5 10 \, setL test 0.1; +#X msg 354 260 link test2 M1 M2 3 0 2 0 0.5 \, setL test2 0.3; +#X msg 30 304 posX M2 0 \, bang \, posX M2 \$1 \, bang \, get massesForces +M2; +#X msg 191 474 print; +#X connect 0 0 2 0; +#X connect 1 0 12 0; +#X connect 2 0 3 0; +#X connect 2 0 14 0; +#X connect 3 0 2 1; +#X connect 4 0 0 0; +#X connect 4 1 5 0; +#X connect 5 0 2 1; +#X connect 6 0 9 0; +#X connect 7 0 34 0; +#X connect 7 0 35 0; +#X connect 7 1 16 0; +#X connect 7 1 24 0; +#X connect 7 2 6 0; +#X connect 8 0 17 0; +#X connect 10 0 8 0; +#X connect 10 0 31 0; +#X connect 11 0 7 0; +#X connect 12 0 20 0; +#X connect 13 0 20 1; +#X connect 14 0 1 0; +#X connect 14 1 15 1; +#X connect 14 1 32 1; +#X connect 16 0 9 0; +#X connect 17 0 18 0; +#X connect 18 0 15 0; +#X connect 20 0 36 0; +#X connect 24 0 9 0; +#X connect 25 0 26 0; +#X connect 26 0 27 0; +#X connect 26 1 11 0; +#X connect 27 0 4 0; +#X connect 30 0 33 0; +#X connect 31 0 30 0; +#X connect 33 0 32 0; +#X connect 34 0 9 0; +#X connect 35 0 9 0; +#X connect 36 0 8 0; +#X connect 36 0 31 0; +#X connect 37 0 31 0; diff --git a/examples/60_pmpd3d_test.pd b/examples/60_pmpd3d_test.pd deleted file mode 100644 index f487106..0000000 --- a/examples/60_pmpd3d_test.pd +++ /dev/null @@ -1,191 +0,0 @@ -#N canvas 677 130 653 522 10; -#X obj 27 26 loadbang; -#X obj 263 104 gemwin; -#X msg 278 81 0 \, destroy; -#X text 260 26 2 DRAG THE STRUCTURE WITH THE MOUSE; -#X obj 87 27 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 --1; -#X msg 90 76 reset; -#X obj 27 47 t b b b b b; -#X msg 42 186 Xmax 100 \, Xmin 0 \, Ymax 100 \, Ymin 0; -#X obj 53 300 gemhead; -#X obj 53 323 t b; -#X msg 53 345 bang \, get massesPos \, get linksPos; -#N canvas 643 123 308 285 massrender 0; -#X obj 127 22 inlet; -#X obj 48 203 translateXYZ; -#X obj 127 86 / 12.5; -#X obj 127 109 - 4; -#X obj 192 87 / 12.5; -#X obj 192 110 - 4; -#X obj 48 177 separator; -#X obj 125 136 t b f; -#X obj 48 141 gemhead 45; -#X msg 48 104 0; -#X obj 47 58 loadbang; -#X obj 127 57 unpack f f f f; -#X obj 238 88 / 12.5; -#X obj 238 111 - 4; -#X obj 48 229 sphere 0.1; -#X connect 0 0 11 0; -#X connect 1 0 14 0; -#X connect 2 0 3 0; -#X connect 3 0 7 0; -#X connect 4 0 5 0; -#X connect 5 0 1 2; -#X connect 6 0 1 0; -#X connect 7 0 8 0; -#X connect 7 1 1 1; -#X connect 8 0 6 0; -#X connect 9 0 8 0; -#X connect 10 0 9 0; -#X connect 11 1 2 0; -#X connect 11 2 4 0; -#X connect 11 3 12 0; -#X connect 12 0 13 0; -#X connect 13 0 1 3; -#X restore 436 267 pd massrender; -#N canvas 731 296 458 308 gemmouse 0; -#X obj 189 77 gemmouse; -#X obj 189 184 pack f f; -#X obj 189 218 spigot; -#X obj 103 244 outlet; -#X obj 189 131 - 0; -#X obj 216 131 + 100; -#X obj 189 108 / 5; -#X obj 216 108 / -5; -#X obj 79 51 inlet; -#X obj 109 98 t b; -#X obj 141 120 list; -#X obj 141 41 r mouse_init; -#X connect 0 0 6 0; -#X connect 0 1 7 0; -#X connect 0 2 2 1; -#X connect 1 0 2 0; -#X connect 2 0 10 1; -#X connect 4 0 1 0; -#X connect 5 0 1 1; -#X connect 6 0 4 0; -#X connect 7 0 5 0; -#X connect 8 0 9 0; -#X connect 9 0 10 0; -#X connect 10 0 3 0; -#X connect 11 0 10 1; -#X restore 366 356 pd gemmouse; -#X obj 366 335 gemhead; -#X msg 366 377 posX fix \$1; -#X msg 366 398 posY fix \$2; -#N canvas 0 22 454 304 linkrender 0; -#X obj 127 22 inlet; -#X obj 128 86 / 12.5; -#X obj 128 109 - 4; -#X obj 183 87 / 12.5; -#X obj 183 110 - 4; -#X obj 48 177 separator; -#X obj 128 136 t b f; -#X obj 262 88 / 12.5; -#X obj 262 111 - 4; -#X obj 290 112 / 12.5; -#X obj 290 135 - 4; -#X obj 48 222 curve 2; -#X obj 155 189 pack f f 0; -#X obj 262 192 pack f f 0; -#X obj 48 130 gemhead 45; -#X obj 47 44 loadbang; -#X msg 47 68 0; -#X obj 127 57 unpack f f f f f f f; -#X obj 212 112 / 12.5; -#X obj 212 135 - 4; -#X obj 319 135 / 12.5; -#X obj 319 158 - 4; -#X connect 0 0 17 0; -#X connect 1 0 2 0; -#X connect 2 0 6 0; -#X connect 3 0 4 0; -#X connect 4 0 12 1; -#X connect 5 0 11 0; -#X connect 6 0 14 0; -#X connect 6 1 12 0; -#X connect 7 0 8 0; -#X connect 8 0 13 0; -#X connect 9 0 10 0; -#X connect 10 0 13 1; -#X connect 12 0 11 1; -#X connect 13 0 11 2; -#X connect 14 0 5 0; -#X connect 15 0 16 0; -#X connect 16 0 14 0; -#X connect 17 1 1 0; -#X connect 17 2 3 0; -#X connect 17 3 18 0; -#X connect 17 4 7 0; -#X connect 17 5 9 0; -#X connect 17 6 20 0; -#X connect 18 0 19 0; -#X connect 19 0 12 2; -#X connect 20 0 21 0; -#X connect 21 0 13 2; -#X restore 366 289 pd linkrender; -#X msg 206 139 50 50; -#X msg 58 118 40 60 \, 60 60 \, 60 40 \, 40 40; -#X obj 206 162 s mouse_init; -#X msg 27 207 link souple mob mob 10 5; -#X msg 27 230 link souple fix mob 10 5; -#X text 25 1 creation : 5 masses and 20 links; -#X text 52 281 compute and get masses and links positions; -#X text 364 315 move mass to mouse position; -#X text 365 197 display masses with gem; -#X text 261 6 1 CREATE WINDOW; -#X text 108 26 reset struct; -#X obj 90 259 s \$0-pmpdin; -#X obj 84 373 r \$0-pmpdin; -#X obj 52 419 s \$0-pmpdout; -#X obj 365 423 s \$0-pmpdin; -#X obj 366 218 r \$0-pmpdout; -#X msg 74 96 mass fix 0 100 50 50 50; -#X msg 58 139 mass mob 1 100 \$1 \$2 50; -#X obj 368 177 s \$0-pmpdin; -#X msg 369 129 forceZ mob 200; -#X msg 368 153 forceZ mob 200; -#X text 367 108 send vertical forces; -#X msg 263 58 reset \, create \, lighting 1 \, 1; -#X obj 51 454 gemhead; -#X obj 51 476 world_light; -#X obj 53 397 pmpd3d; -#X obj 366 244 route linksPosNo massesPos; -#X text 190 476 copyright Nicolas Montgermont 2010; -#X connect 0 0 6 0; -#X connect 2 0 1 0; -#X connect 4 0 6 0; -#X connect 5 0 28 0; -#X connect 6 0 20 0; -#X connect 6 1 17 0; -#X connect 6 1 7 0; -#X connect 6 2 18 0; -#X connect 6 3 33 0; -#X connect 6 4 5 0; -#X connect 7 0 28 0; -#X connect 8 0 9 0; -#X connect 9 0 10 0; -#X connect 10 0 42 0; -#X connect 12 0 14 0; -#X connect 12 0 15 0; -#X connect 13 0 12 0; -#X connect 14 0 31 0; -#X connect 15 0 31 0; -#X connect 17 0 19 0; -#X connect 18 0 34 0; -#X connect 20 0 21 0; -#X connect 20 0 28 0; -#X connect 21 0 28 0; -#X connect 29 0 42 0; -#X connect 32 0 43 0; -#X connect 33 0 28 0; -#X connect 34 0 28 0; -#X connect 36 0 35 0; -#X connect 37 0 35 0; -#X connect 39 0 1 0; -#X connect 40 0 41 0; -#X connect 42 0 30 0; -#X connect 43 0 16 0; -#X connect 43 1 11 0; diff --git a/examples/61_draw_link_force.pd b/examples/61_draw_link_force.pd deleted file mode 100644 index c8f3d27..0000000 --- a/examples/61_draw_link_force.pd +++ /dev/null @@ -1,137 +0,0 @@ -#N canvas 520 143 745 681 10; -#X obj 30 174 until; -#X obj 30 244 - 100; -#X obj 30 198 f; -#X obj 58 198 + 1; -#X obj 30 152 t f b; -#X msg 74 174 0; -#X msg 373 168 reset; -#X obj 334 148 t b b b; -#X obj 29 388 msd; -#X obj 334 282 s \$0-msd; -#X obj 84 338 r \$0-msd; -#X obj 334 129 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 --1 -1; -#X obj 30 264 / 100; -#X floatatom 128 152 5 0 0 0 - - -; -#X obj 30 218 t f f; -#X obj 29 451 tabwrite force; -#X msg 353 194 mass M1 0 1 0; -#X obj 29 409 route massesForcesId; -#X obj 29 431 route M2; -#N canvas 0 0 450 300 (subpatch) 0; -#X array force 200 float 3; -#A 0 0.123457 0.126247 0.129132 0.132118 0.135208 0.138408 0.141723 -0.145159 0.148721 0.152416 0.15625 0.160231 0.164366 0.168663 0.17313 -0.177778 0.182615 0.187652 0.192901 0.198373 0.204082 0.21004 0.216263 -0.222767 0.229568 0.236686 0.244141 0.251953 0.260146 0.268745 0.277778 -0.287274 0.297265 0.307787 0.318878 0.330579 0.342936 0.355999 0.369823 -0.384468 0.4 0.416493 0.434028 0.452694 0.47259 0.493827 0.516529 0.540833 -0.566893 0.594884 0.745 0.1083 0.0972 0.0867 0.0768 0.0675 0.0588 0.0507 -0.0432 0.0363 0.03 0.0243 0.0192 0.0147 0.0108 0.00749999 0.0048 0.0027 -0.0012 0.000299999 0 -0.000300001 -0.0012 -0.0027 -0.00480001 -0.0075 --0.0108 -0.0147 -0.0192 -0.0243 -0.03 -0.0363 -0.0432 -0.0507 -0.0588 --0.0675 -0.0768 -0.0867 -0.0972 -0.1083 -0.12 -0.1323 -0.1452 -0.1587 --0.1728 -0.1875 -0.2028 -0.2187 -0.2352 -0.2523 0 0.2523 0.2352 0.2187 -0.2028 0.1875 0.1728 0.1587 0.1452 0.1323 0.12 0.1083 0.0972 0.0867 -0.0768 0.0675 0.0588 0.0507 0.0432 0.0363 0.03 0.0243 0.0192 0.0147 -0.0108 0.0075 0.00480001 0.0027 0.0012 0.000300001 0 -0.000299999 -0.0012 --0.0027 -0.0048 -0.00749999 -0.0108 -0.0147 -0.0192 -0.0243 -0.03 -0.0363 --0.0432 -0.0507 -0.0588 -0.0675 -0.0768 -0.0867 -0.0972 -0.1083 -0.745 --0.594884 -0.566893 -0.540833 -0.516529 -0.493827 -0.47259 -0.452694 --0.434028 -0.416493 -0.4 -0.384468 -0.369823 -0.355999 -0.342936 -0.330579 --0.318878 -0.307787 -0.297265 -0.287274 -0.277778 -0.268745 -0.260146 --0.251953 -0.244141 -0.236686 -0.229568 -0.222767 -0.216263 -0.21004 --0.204082 -0.198373 -0.192901 -0.187652 -0.182615 -0.177778 -0.17313 --0.168663 -0.164366 -0.160231 -0.15625 -0.152416 -0.148721 -0.145159 --0.141723 -0.138408 -0.135208 -0.132118 -0.129132 -0.126247; -#X coords 0 1 200 -1 200 140 1; -#X restore 327 368 graph; -#X obj 30 284 * 1; -#X text 167 152 link length; -#X text 359 127 reset; -#X text 65 133 draw; -#X msg 362 213 mass M2 1 1 0; -#X obj 30 75 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#X obj 30 98 t b b; -#X msg 30 132 200; -#X text 31 9 This abstraction help to draw link forces regarding to -it's elongation; -#N canvas 0 0 450 300 (subpatch) 0; -#X array force2 200 float 3; -#A 0 0.123457 0.126247 0.129132 0.132118 0.135208 0.138408 0.141723 -0.145159 0.148721 0.152416 0.15625 0.160231 0.164366 0.168663 0.17313 -0.177778 0.182615 0.187652 0.192901 0.198373 0.204082 0.21004 0.216263 -0.222767 0.229568 0.236686 0.244141 0.251953 0.260146 0.268745 0.277778 -0.287274 0.297265 0.307787 0.318878 0.330579 0.342936 0.355999 0.369823 -0.384468 0.4 0.416493 0.434028 0.452694 0.47259 0.493827 0.516529 0.540833 -0.566894 0.594884 0.625 0.1083 0.0972 0.0867 0.0768 0.0675 0.0588 0.0507 -0.0432 0.0363 0.03 0.0243 0.0192 0.0147 0.0108 0.00749999 0.0048 0.0027 -0.0012 0.000299999 0 -0.000300001 -0.0012 -0.0027 -0.0048 -0.0075 -0.0108 --0.0147 -0.0192 -0.0243 -0.03 -0.0363 -0.0432 -0.0507 -0.0588 -0.0675 --0.0768 -0.0867 -0.0972 -0.1083 -0.12 -0.1323 -0.1452 -0.1587 -0.1728 --0.1875 -0.2028 -0.2187 -0.2352 -0.2523 -0 0.2523 0.2352 0.2187 0.2028 -0.1875 0.1728 0.1587 0.1452 0.1323 0.12 0.1083 0.0972 0.0867 0.0768 -0.0675 0.0588 0.0507 0.0432 0.0363 0.03 0.0243 0.0192 0.0147 0.0108 -0.0075 0.0048 0.0027 0.0012 0.000300001 0 -0.000299999 -0.0012 -0.0027 --0.0048 -0.00749999 -0.0108 -0.0147 -0.0192 -0.0243 -0.03 -0.0363 -0.0432 --0.0507 -0.0588 -0.0675 -0.0768 -0.0867 -0.0972 -0.1083 -0.625 -0.594884 --0.566894 -0.540833 -0.516529 -0.493827 -0.47259 -0.452694 -0.434028 --0.416493 -0.4 -0.384468 -0.369823 -0.355999 -0.342936 -0.330579 -0.318878 --0.307787 -0.297265 -0.287274 -0.277778 -0.268745 -0.260146 -0.251953 --0.244141 -0.236686 -0.229568 -0.222767 -0.216263 -0.21004 -0.204082 --0.198373 -0.192901 -0.187652 -0.182615 -0.177778 -0.17313 -0.168663 --0.164366 -0.160231 -0.15625 -0.152416 -0.148721 -0.145159 -0.141723 --0.138408 -0.135208 -0.132118 -0.129132 -0.126247; -#X coords 0 1 200 -1 200 140 1; -#X restore 326 529 graph; -#X obj 64 564 route massesForcesId; -#X obj 64 543 pmpd; -#X obj 64 606 tabwrite force2; -#X obj 64 586 route 1; -#X msg 334 240 link test M1 M2 0.1 0 -2 0.5 10 \, setL test 0.1; -#X msg 354 260 link test2 M1 M2 3 0 2 0 0.5 \, setL test2 0.3; -#X msg 30 304 posX M2 0 \, bang \, posX M2 \$1 \, bang \, get massesForces -M2; -#X msg 191 474 print; -#X connect 0 0 2 0; -#X connect 1 0 12 0; -#X connect 2 0 3 0; -#X connect 2 0 14 0; -#X connect 3 0 2 1; -#X connect 4 0 0 0; -#X connect 4 1 5 0; -#X connect 5 0 2 1; -#X connect 6 0 9 0; -#X connect 7 0 34 0; -#X connect 7 0 35 0; -#X connect 7 1 16 0; -#X connect 7 1 24 0; -#X connect 7 2 6 0; -#X connect 8 0 17 0; -#X connect 10 0 8 0; -#X connect 10 0 31 0; -#X connect 11 0 7 0; -#X connect 12 0 20 0; -#X connect 13 0 20 1; -#X connect 14 0 1 0; -#X connect 14 1 15 1; -#X connect 14 1 32 1; -#X connect 16 0 9 0; -#X connect 17 0 18 0; -#X connect 18 0 15 0; -#X connect 20 0 36 0; -#X connect 24 0 9 0; -#X connect 25 0 26 0; -#X connect 26 0 27 0; -#X connect 26 1 11 0; -#X connect 27 0 4 0; -#X connect 30 0 33 0; -#X connect 31 0 30 0; -#X connect 33 0 32 0; -#X connect 34 0 9 0; -#X connect 35 0 9 0; -#X connect 36 0 8 0; -#X connect 36 0 31 0; -#X connect 37 0 31 0; diff --git a/examples/61_draw_link_force_2d.pd b/examples/61_draw_link_force_2d.pd new file mode 100644 index 0000000..5c7e708 --- /dev/null +++ b/examples/61_draw_link_force_2d.pd @@ -0,0 +1,75 @@ +#N canvas 621 331 876 550 10; +#X obj 30 174 until; +#X obj 30 244 - 100; +#X obj 30 198 f; +#X obj 58 198 + 1; +#X obj 30 152 t f b; +#X msg 74 174 0; +#X msg 361 148 reset; +#X obj 319 128 t b b b; +#X obj 319 272 s \$0-msd; +#X obj 36 352 r \$0-msd; +#X obj 30 264 / 100; +#X floatatom 128 152 5 0 0 0 - - -; +#X obj 30 218 t f f; +#N canvas 0 0 450 300 (subpatch) 0; +#X array force 200 float 2; +#X coords 0 1 200 -1 200 140 1; +#X restore 303 345 graph; +#X obj 30 284 * 1; +#X text 167 152 link length; +#X text 65 133 draw; +#X obj 30 75 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 30 98 t b b; +#X msg 30 132 200; +#X obj 28 399 route massesForcesId; +#X obj 28 420 route 1; +#X msg 319 228 link test M1 M2 0.1 0 -2 0.5 10 \, setL test 0.1; +#X msg 336 247 link test2 M1 M2 3 0 2 0 0.5 \, setL test2 0.3; +#X obj 28 378 pmpd2d; +#X msg 341 174 mass M1 0 1 0 0; +#X msg 350 193 mass M2 1 1 0 0; +#X obj 671 225 table test 100; +#X msg 28 440 \$1; +#X obj 670 247 table null 100; +#X msg 492 202 tabLink test M1 M2 test 1 null 1; +#X text 36 26 This abstraction help to draw link forces regarding to +it's elongation / elongation speed; +#X msg 28 308 pos M2 0 0 \, bang \, pos M2 \$1 0 \, bang \, get massesForces +M2; +#X obj 28 460 tabwrite force; +#X connect 0 0 2 0; +#X connect 1 0 10 0; +#X connect 2 0 3 0; +#X connect 2 0 12 0; +#X connect 3 0 2 1; +#X connect 4 0 0 0; +#X connect 4 1 5 0; +#X connect 5 0 2 1; +#X connect 6 0 8 0; +#X connect 7 0 30 0; +#X connect 7 0 22 0; +#X connect 7 0 23 0; +#X connect 7 1 25 0; +#X connect 7 1 26 0; +#X connect 7 2 6 0; +#X connect 9 0 24 0; +#X connect 10 0 14 0; +#X connect 11 0 14 1; +#X connect 12 0 1 0; +#X connect 12 1 33 1; +#X connect 14 0 32 0; +#X connect 17 0 18 0; +#X connect 18 0 19 0; +#X connect 18 1 7 0; +#X connect 19 0 4 0; +#X connect 20 0 21 0; +#X connect 21 0 28 0; +#X connect 22 0 8 0; +#X connect 23 0 8 0; +#X connect 24 0 20 0; +#X connect 25 0 8 0; +#X connect 26 0 8 0; +#X connect 28 0 33 0; +#X connect 32 0 24 0; diff --git a/examples/62_draw_link_force_2d.pd b/examples/62_draw_link_force_2d.pd deleted file mode 100644 index 5c7e708..0000000 --- a/examples/62_draw_link_force_2d.pd +++ /dev/null @@ -1,75 +0,0 @@ -#N canvas 621 331 876 550 10; -#X obj 30 174 until; -#X obj 30 244 - 100; -#X obj 30 198 f; -#X obj 58 198 + 1; -#X obj 30 152 t f b; -#X msg 74 174 0; -#X msg 361 148 reset; -#X obj 319 128 t b b b; -#X obj 319 272 s \$0-msd; -#X obj 36 352 r \$0-msd; -#X obj 30 264 / 100; -#X floatatom 128 152 5 0 0 0 - - -; -#X obj 30 218 t f f; -#N canvas 0 0 450 300 (subpatch) 0; -#X array force 200 float 2; -#X coords 0 1 200 -1 200 140 1; -#X restore 303 345 graph; -#X obj 30 284 * 1; -#X text 167 152 link length; -#X text 65 133 draw; -#X obj 30 75 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 --1; -#X obj 30 98 t b b; -#X msg 30 132 200; -#X obj 28 399 route massesForcesId; -#X obj 28 420 route 1; -#X msg 319 228 link test M1 M2 0.1 0 -2 0.5 10 \, setL test 0.1; -#X msg 336 247 link test2 M1 M2 3 0 2 0 0.5 \, setL test2 0.3; -#X obj 28 378 pmpd2d; -#X msg 341 174 mass M1 0 1 0 0; -#X msg 350 193 mass M2 1 1 0 0; -#X obj 671 225 table test 100; -#X msg 28 440 \$1; -#X obj 670 247 table null 100; -#X msg 492 202 tabLink test M1 M2 test 1 null 1; -#X text 36 26 This abstraction help to draw link forces regarding to -it's elongation / elongation speed; -#X msg 28 308 pos M2 0 0 \, bang \, pos M2 \$1 0 \, bang \, get massesForces -M2; -#X obj 28 460 tabwrite force; -#X connect 0 0 2 0; -#X connect 1 0 10 0; -#X connect 2 0 3 0; -#X connect 2 0 12 0; -#X connect 3 0 2 1; -#X connect 4 0 0 0; -#X connect 4 1 5 0; -#X connect 5 0 2 1; -#X connect 6 0 8 0; -#X connect 7 0 30 0; -#X connect 7 0 22 0; -#X connect 7 0 23 0; -#X connect 7 1 25 0; -#X connect 7 1 26 0; -#X connect 7 2 6 0; -#X connect 9 0 24 0; -#X connect 10 0 14 0; -#X connect 11 0 14 1; -#X connect 12 0 1 0; -#X connect 12 1 33 1; -#X connect 14 0 32 0; -#X connect 17 0 18 0; -#X connect 18 0 19 0; -#X connect 18 1 7 0; -#X connect 19 0 4 0; -#X connect 20 0 21 0; -#X connect 21 0 28 0; -#X connect 22 0 8 0; -#X connect 23 0 8 0; -#X connect 24 0 20 0; -#X connect 25 0 8 0; -#X connect 26 0 8 0; -#X connect 28 0 33 0; -#X connect 32 0 24 0; -- cgit v1.2.1