diff options
Diffstat (limited to 'msd')
-rw-r--r-- | msd/01_msdtest.pd | 56 | ||||
-rw-r--r-- | msd/02_imsdtest.pd | 12 | ||||
-rw-r--r-- | msd/03_msdwave.pd | 133 | ||||
-rw-r--r-- | msd/filet.pd | 48 | ||||
-rw-r--r-- | msd/help-msd.pd | 596 |
5 files changed, 537 insertions, 308 deletions
diff --git a/msd/01_msdtest.pd b/msd/01_msdtest.pd index 9f13180..9921dbe 100644 --- a/msd/01_msdtest.pd +++ b/msd/01_msdtest.pd @@ -32,19 +32,18 @@ #X obj 45 576 cnv 15 300 200 empty empty empty 20 12 0 14 -261689 -66577 0; #X obj 88 590 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -261689 --1 -1 8396 1; +-1 -1 8489 1; #X obj 111 590 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -261689 --1 -1 6393 1; +-1 -1 6790 1; #X obj 66 590 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -261689 -1 -1 10160 1; #X msg 52 736 posX fix \$1; #X obj 156 590 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -261689 --1 -1 2427 1; +-1 -1 3216 1; #X obj 134 590 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -261689 --1 -1 4369 1; +-1 -1 5039 1; #X text 199 638 MOVE FIRST SLIDER; #X text 182 662 TO MOVE THE FIXED MASS; -#X msg 184 248 link souple \$1 \$2 10 0.5 0.5; #X msg 184 226 0 1 \, 1 2 \, 2 3 \, 3 4; #X msg 66 438 forceX mob 300; #X msg 180 438 forceX mob -300; @@ -53,13 +52,14 @@ #X obj 52 545 unpack f f f f f; #X obj 52 523 route massesPosL; #X msg 52 335 bang \, massesPosL; -#X connect 0 0 38 0; -#X connect 2 0 41 0; +#X msg 184 248 link souple \$1 \$2 10 10; +#X connect 0 0 37 0; +#X connect 2 0 40 0; #X connect 2 1 1 0; #X connect 3 0 6 0; -#X connect 6 0 42 0; +#X connect 6 0 41 0; #X connect 9 0 2 0; -#X connect 10 0 38 0; +#X connect 10 0 37 0; #X connect 11 0 9 0; #X connect 12 0 9 0; #X connect 13 0 9 0; @@ -72,23 +72,23 @@ #X connect 24 0 3 0; #X connect 28 0 29 0; #X connect 29 0 2 0; -#X connect 34 0 9 0; -#X connect 35 0 34 0; +#X connect 34 0 42 0; +#X connect 35 0 2 0; #X connect 36 0 2 0; -#X connect 37 0 2 0; -#X connect 38 0 36 0; -#X connect 38 0 3 0; -#X connect 38 1 35 0; -#X connect 38 1 24 0; -#X connect 38 2 13 0; -#X connect 38 3 15 0; -#X connect 38 4 14 0; -#X connect 38 5 11 0; -#X connect 40 0 28 0; -#X connect 40 1 26 0; -#X connect 40 2 27 0; -#X connect 40 3 31 0; -#X connect 40 4 30 0; -#X connect 41 0 40 0; -#X connect 41 1 1 0; -#X connect 42 0 2 0; +#X connect 37 0 35 0; +#X connect 37 0 3 0; +#X connect 37 1 34 0; +#X connect 37 1 24 0; +#X connect 37 2 13 0; +#X connect 37 3 15 0; +#X connect 37 4 14 0; +#X connect 37 5 11 0; +#X connect 39 0 28 0; +#X connect 39 1 26 0; +#X connect 39 2 27 0; +#X connect 39 3 31 0; +#X connect 39 4 30 0; +#X connect 40 0 39 0; +#X connect 40 1 1 0; +#X connect 41 0 2 0; +#X connect 42 0 9 0; diff --git a/msd/02_imsdtest.pd b/msd/02_imsdtest.pd index 901b7a2..6cb98e0 100644 --- a/msd/02_imsdtest.pd +++ b/msd/02_imsdtest.pd @@ -27,16 +27,16 @@ #X obj 45 576 cnv 15 300 200 empty empty empty 20 12 0 14 -261689 -66577 0; #X obj 88 590 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -261689 --1 -1 12166 1; +-1 -1 6955 1; #X obj 111 590 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -261689 --1 -1 7166 1; +-1 -1 5050 1; #X obj 66 590 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -261689 --1 -1 9960 1; +-1 -1 8860 1; #X msg 52 736 posX fix \$1; #X obj 156 590 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -261689 --1 -1 2370 1; +-1 -1 1240 1; #X obj 134 590 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -261689 --1 -1 12700 1; +-1 -1 3145 1; #X text 199 638 MOVE FIRST SLIDER; #X text 182 662 TO MOVE THE FIXED MASS; #X msg 66 438 forceX mob 300; @@ -51,7 +51,7 @@ #X msg 66 406 setK inter 2; #X msg 176 385 setD inter 0.01; #X msg 176 407 setD inter 1; -#X msg 184 223 iLink inter fix mob 10 2.5 0.5 5; +#X msg 184 223 link inter fix mob 10 10; #X connect 0 0 31 0; #X connect 2 0 33 0; #X connect 2 1 1 0; diff --git a/msd/03_msdwave.pd b/msd/03_msdwave.pd index 4ac3ab6..987b6de 100644 --- a/msd/03_msdwave.pd +++ b/msd/03_msdwave.pd @@ -28,53 +28,33 @@ #X connect 5 1 1 2; #X connect 5 2 6 3; #X connect 7 0 3 1; -#X restore 265 625 pd massrender; +#X restore 274 531 pd massrender; #X msg 203 83 symbol reset; #X text 793 205 Select view; #X obj 145 38 t b b b b; #X text 418 114 Filet abstraction : x0 y0 stepx stepy ny nx; -#X obj 454 464 msd -------------; -#X obj 33 497 msd2D --------------------------------; +#X obj 63 403 msd -------------; +#X obj 425 423 msd2D --------------------------------; #X obj 305 254 route mass; #X msg 305 275 mass msd1 \$1 \$2 \$5; #X obj 145 253 route mass; #X msg 145 274 mass msd2 \$1 \$2 \$3 \$4; -#X obj 33 517 route massesPos; +#X obj 425 443 route massesPos; #X msg 33 343 bang \, get massesPos; #X obj 33 321 t b b; -#X obj 265 600 pack f f f; -#N canvas 0 0 450 300 getmasses 0; -#X obj 84 33 inlet; -#X obj 91 71 t b b b; -#X obj 120 139 f 0; -#X obj 120 166 + 1; -#X obj 223 34 inlet; -#X obj 224 64 select reset; -#X msg 224 98 0; -#X obj 193 228 outlet; -#X obj 120 191 % 800; -#X connect 0 0 1 0; -#X connect 1 0 2 0; -#X connect 2 0 3 0; -#X connect 2 0 7 0; -#X connect 3 0 8 0; -#X connect 4 0 5 0; -#X connect 5 0 6 0; -#X connect 6 0 2 1; -#X connect 8 0 2 1; -#X restore 72 657 pd getmasses; -#X obj 454 488 route massesPosNo; -#X msg 63 718 get massesPos \$1; +#X obj 274 506 pack f f f; +#X obj 63 427 route massesPosNo; +#X msg 421 523 get massesPos \$1; #X obj 602 334 rotateXYZ; -#X obj 651 450 vsl 15 128 0 4 0 0 empty empty empty 0 -8 0 8 -262131 --1 -1 1400 1; -#X obj 670 450 vsl 15 128 0 4 0 0 empty empty empty 0 -8 0 8 -262131 +#X obj 56 547 vsl 15 128 0 4 0 0 empty empty empty 0 -8 0 8 -262131 +-1 -1 500 1; +#X obj 75 547 vsl 15 128 0 4 0 0 empty empty empty 0 -8 0 8 -262131 -1 -1 0 1; -#X obj 689 450 vsl 15 128 0 4 0 0 empty empty empty 0 -8 0 8 -262131 +#X obj 94 547 vsl 15 128 0 4 0 0 empty empty empty 0 -8 0 8 -262131 -1 -1 0 1; -#X obj 707 450 vsl 15 128 0 4 0 0 empty empty empty 0 -8 0 8 -262131 +#X obj 112 547 vsl 15 128 0 4 0 0 empty empty empty 0 -8 0 8 -262131 -1 -1 0 1; -#X msg 651 585 posX 0 \$1; +#X msg 56 682 posX 0 \$1; #X msg 621 311 45; #X msg 603 223 view 4 0 0.5 0 0 0 0 0 1; #X msg 603 185 view 0 0.5 6 0 0 0 0 1 0; @@ -88,11 +68,11 @@ #X msg 164 140 setFixed 0 \, setFixed 39 \, setFixed 760 \, setFixed 799; #X msg 603 204 view 0 5 0 0 0 0 0 0 1; -#X msg 670 605 posX 39 \$1; -#X msg 689 625 posX 799 \$1; -#X msg 707 645 posX 760 \$1; -#X text 734 508 Move corners to send a wave!; -#X text 194 703 Each time a mass2D position is send \, the corresponding +#X msg 75 702 posX 39 \$1; +#X msg 94 722 posX 799 \$1; +#X msg 112 742 posX 760 \$1; +#X text 28 514 Move corners to send a wave!; +#X text 330 559 Each time a mass2D position is send \, the corresponding z is asked to the 1D model.; #X text 389 35 X-Y : 2D model; #X text 389 49 Z : 1D model; @@ -100,29 +80,28 @@ z is asked to the 1D model.; ; #X text 178 14 Reset; #X text 304 228 800 masses / 1540 links for each model; -#X text 31 455 The 2D model is just here to help display masses and +#X text 423 381 The 2D model is just here to help display masses and test synchronization between msd objects; -#X obj 33 537 unpack f f f; -#X obj 443 546 unpack f f; -#X obj 173 597 f; -#X obj 33 574 t b f; +#X obj 425 463 unpack f f f; +#X obj 91 462 unpack f f; +#X obj 481 502 f; +#X obj 425 485 t b f; #X connect 0 0 12 0; #X connect 2 0 1 0; -#X connect 3 0 27 0; +#X connect 3 0 26 0; #X connect 5 0 16 0; #X connect 5 0 18 0; #X connect 6 0 12 0; #X connect 7 0 5 0; #X connect 8 0 22 0; -#X connect 10 0 24 1; -#X connect 10 0 41 1; +#X connect 10 0 40 1; +#X connect 12 0 37 0; #X connect 12 0 38 0; -#X connect 12 0 39 0; -#X connect 12 1 42 0; -#X connect 12 2 41 0; +#X connect 12 1 41 0; +#X connect 12 2 40 0; #X connect 12 3 7 0; #X connect 12 3 10 0; -#X connect 14 0 25 0; +#X connect 14 0 24 0; #X connect 15 0 20 0; #X connect 16 0 17 0; #X connect 16 1 14 0; @@ -130,40 +109,40 @@ test synchronization between msd objects; #X connect 18 0 19 0; #X connect 18 1 15 0; #X connect 19 0 15 0; -#X connect 20 0 55 0; +#X connect 20 0 54 0; #X connect 21 0 15 0; #X connect 22 0 21 0; #X connect 22 1 14 0; #X connect 23 0 9 0; -#X connect 25 0 56 0; -#X connect 26 0 14 0; -#X connect 27 0 4 0; -#X connect 28 0 32 0; +#X connect 24 0 55 0; +#X connect 25 0 14 0; +#X connect 26 0 4 0; +#X connect 27 0 31 0; +#X connect 28 0 43 0; #X connect 29 0 44 0; #X connect 30 0 45 0; -#X connect 31 0 46 0; -#X connect 32 0 14 0; -#X connect 33 0 27 1; +#X connect 31 0 14 0; +#X connect 32 0 26 1; +#X connect 33 0 1 0; #X connect 34 0 1 0; -#X connect 35 0 1 0; -#X connect 36 0 27 2; -#X connect 37 0 1 0; -#X connect 37 0 40 0; -#X connect 38 0 15 0; -#X connect 39 0 14 0; -#X connect 40 0 35 0; -#X connect 40 0 36 0; -#X connect 40 0 33 0; +#X connect 35 0 26 2; +#X connect 36 0 1 0; +#X connect 36 0 39 0; +#X connect 37 0 15 0; +#X connect 38 0 14 0; +#X connect 39 0 34 0; +#X connect 39 0 35 0; +#X connect 39 0 32 0; +#X connect 40 0 5 0; #X connect 41 0 5 0; -#X connect 42 0 5 0; -#X connect 43 0 1 0; +#X connect 42 0 1 0; +#X connect 43 0 14 0; #X connect 44 0 14 0; #X connect 45 0 14 0; -#X connect 46 0 14 0; -#X connect 55 0 58 0; -#X connect 55 1 57 1; -#X connect 55 2 23 1; -#X connect 56 1 23 2; -#X connect 57 0 23 0; -#X connect 58 0 57 0; -#X connect 58 1 26 0; +#X connect 54 0 57 0; +#X connect 54 1 56 1; +#X connect 54 2 23 1; +#X connect 55 1 23 2; +#X connect 56 0 23 0; +#X connect 57 0 56 0; +#X connect 57 1 25 0; diff --git a/msd/filet.pd b/msd/filet.pd index ccc5fc5..6e6edb7 100644 --- a/msd/filet.pd +++ b/msd/filet.pd @@ -33,7 +33,6 @@ #X obj 344 59 t b b; #X obj 375 370 t b; #X obj 334 391 f; -#X msg 335 468 link fil \$1 \$2 10 2.5 0.5; #X obj 330 253 t f f f f; #X obj 494 339 moses; #X obj 443 431 pack f f; @@ -44,8 +43,9 @@ #X msg 54 359 mass filet 1 80 \$1 \$2 0; #X obj 46 257 * \$3; #X obj 176 256 * \$4; +#X msg 335 468 link fil \$1 \$2 10 10; #X connect 1 0 5 0; -#X connect 1 0 41 0; +#X connect 1 0 40 0; #X connect 2 0 5 1; #X connect 2 0 26 0; #X connect 3 0 6 0; @@ -62,7 +62,7 @@ #X connect 9 0 17 1; #X connect 10 0 23 0; #X connect 10 1 24 0; -#X connect 11 0 42 0; +#X connect 11 0 41 0; #X connect 12 0 15 0; #X connect 13 0 9 0; #X connect 13 0 31 0; @@ -72,35 +72,35 @@ #X connect 16 0 17 0; #X connect 17 0 18 0; #X connect 18 0 17 1; -#X connect 18 0 35 0; +#X connect 18 0 34 0; #X connect 19 0 16 1; #X connect 20 0 32 0; #X connect 21 0 11 0; #X connect 22 0 11 1; -#X connect 23 0 43 0; -#X connect 24 0 44 0; +#X connect 23 0 42 0; +#X connect 24 0 43 0; #X connect 26 0 20 1; #X connect 27 0 20 0; -#X connect 28 0 36 0; +#X connect 28 0 35 0; #X connect 29 0 30 1; -#X connect 30 0 34 0; +#X connect 30 0 44 0; #X connect 31 0 1 0; #X connect 31 1 2 0; #X connect 32 0 33 0; #X connect 33 0 30 0; -#X connect 34 0 0 0; -#X connect 35 0 27 0; -#X connect 35 1 29 0; -#X connect 35 1 33 1; -#X connect 35 2 28 0; -#X connect 35 3 40 0; -#X connect 35 3 39 1; -#X connect 36 0 38 0; -#X connect 37 0 34 0; -#X connect 38 0 39 0; -#X connect 39 0 37 0; -#X connect 40 0 37 1; -#X connect 41 0 36 1; -#X connect 42 0 0 0; -#X connect 43 0 21 0; -#X connect 44 0 22 0; +#X connect 34 0 27 0; +#X connect 34 1 29 0; +#X connect 34 1 33 1; +#X connect 34 2 28 0; +#X connect 34 3 39 0; +#X connect 34 3 38 1; +#X connect 35 0 37 0; +#X connect 36 0 44 0; +#X connect 37 0 38 0; +#X connect 38 0 36 0; +#X connect 39 0 36 1; +#X connect 40 0 35 1; +#X connect 41 0 0 0; +#X connect 42 0 21 0; +#X connect 43 0 22 0; +#X connect 44 0 0 0; diff --git a/msd/help-msd.pd b/msd/help-msd.pd index b113a1f..d3ef5e4 100644 --- a/msd/help-msd.pd +++ b/msd/help-msd.pd @@ -1,176 +1,426 @@ -#N canvas 367 274 570 449 10; -#N canvas 271 52 742 843 masses 0; -#X obj 33 821 msd; -#X obj 62 154 cnv 15 610 180 empty empty CREATION 20 12 0 14 -262131 --66577 0; -#X msg 79 183 reset; -#X text 249 214 Add a mass; -#X text 335 215 \$1 : Id (symbol); -#X text 334 235 \$2 : fixed or mobile (0/1); -#X text 334 253 \$3 : mass; -#X text 251 184 Delete all masses and links; -#X obj 62 338 cnv 15 610 60 empty empty COMPUTATION 20 12 0 14 -261689 --66577 0; -#X msg 82 367 bang; -#X text 235 367 Compute new masses positions; -#X obj 61 403 cnv 15 610 210 empty empty DYNAMIC_SETTING 20 12 0 14 --262131 -66577 0; -#X text 350 467 \$2 : New value; -#X text 348 521 \$2 : New value; -#X msg 87 429 posX \$1 \$2; -#X text 350 431 Set position of mass(es); -#X text 347 486 Add force on mass(es); -#X msg 85 485 forceX \$1 \$2; -#X obj 61 617 cnv 15 610 198 empty empty GET_ATTRIBUTES 20 12 0 14 --261689 -66577 0; -#X text 248 644 output all masses positions in a list on outlet No -1; -#X text 247 673 output all masses forces in a list on outlet No 1; -#X msg 146 710 get \$1 \$2; -#X text 249 711 Get specific attribute; -#X text 249 736 \$1 : Attribute type ( massesPos / massesSpeeds / massesForces -/ linksPos ); -#X text 249 773 \$2 : Id (symbol or creations numbers); -#X msg 79 214 mass \$1 \$2 \$3 \$4; -#X msg 79 290 deleteMass \$1; -#X text 248 292 Delete a mass and associated links; -#X text 338 309 \$1 : Creation No of mass; -#X msg 144 793 infosL; -#X text 247 793 Get infos on all masses and links on outlet No 2; -#X msg 84 535 Xmin \$1 \, Xmax \$1; -#X text 347 538 Set minimimum and maximum X of masses; -#X text 347 555 \$1 : Value; -#X text 73 22 MASSES :; -#X text 66 69 They got only one physical parameter \, the value of -their; -#X text 67 83 mass. They can be mobile or fixed \, in this case forces -; -#X text 66 54 The msd masses are the principals objects of the model. -; -#X text 66 97 applied on them automatically \, by links \, or manually -\, by; -#X text 67 112 messages \, don't do anything.; -#X msg 81 574 setMobile \$1 \, setFixed \$1; -#X text 345 578 Change mobile parameter; -#X text 345 594 \$1 : Creation No of mass; -#X text 334 271 \$4 : initial position; -#X text 350 449 \$1 : Id (symbol) or No; -#X text 348 503 \$1 : Id (symbol) or No; -#X msg 147 644 massesPosL; -#X msg 147 672 massesForcesL; -#X text 66 128 Be careful : if masses are deleted \, lists messages +#N canvas 479 25 563 818 10; +#X obj 4 369 cnv 15 550 15 empty empty empty 20 12 0 14 -158509 -66577 +0; +#X obj 5 779 cnv 15 550 30 empty empty empty 20 12 0 14 -158509 -66577 +0; +#X obj 8 6 cnv 15 550 30 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X obj 14 389 cnv 15 75 15 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X obj 14 584 cnv 15 75 15 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X obj 4 527 cnv 15 550 15 empty empty empty 20 12 0 14 -158509 -66577 +0; +#X obj 4 562 cnv 15 550 15 empty empty empty 20 12 0 14 -158509 -66577 +0; +#X obj 7 76 cnv 15 550 15 empty empty empty 20 12 0 14 -158509 -66577 +0; +#X obj 5 729 cnv 15 550 15 empty empty empty 20 12 0 14 -158509 -66577 +0; +#X obj 5 749 cnv 15 550 30 empty empty empty 20 12 0 14 -233017 -66577 +0; +#N canvas 76 31 777 741 More_Info 0; +#X text 94 17 MSD : mass - spring - damper model; +#X text 26 46 MSD is the 1D object of the msd objects collection.; +#X text 25 160 Be careful : if masses are deleted \, lists messages won't work; -#X connect 2 0 0 0; -#X connect 9 0 0 0; -#X connect 14 0 0 0; -#X connect 17 0 0 0; -#X connect 21 0 0 0; -#X connect 25 0 0 0; -#X connect 26 0 0 0; -#X connect 29 0 0 0; -#X connect 31 0 0 0; -#X connect 40 0 0 0; -#X connect 46 0 0 0; -#X connect 47 0 0 0; -#X restore 282 323 pd masses; -#N canvas 222 83 808 841 links 0; -#X obj 33 821 msd; -#X obj 62 192 cnv 15 610 360 empty empty CREATION 20 12 0 14 -262131 --66577 0; -#X msg 79 221 reset; -#X text 402 247 \$1 : Id (symbol); -#X text 314 247 Add a link; -#X text 401 267 \$2 : creation No of mass1; -#X text 401 285 \$3 : creation No of mass2; -#X text 400 303 \$4 : rigidity; -#X text 251 222 Delete all masses and links; -#X text 400 321 \$5 : viscosity; -#X text 400 338 \$6 : damping; -#X obj 61 561 cnv 15 610 82 empty empty DYNAMIC_SETTING 20 12 0 14 --262131 -66577 0; -#X msg 172 583 setD \$1 \$2; -#X text 354 601 \$1 : Id (symbol); -#X text 354 619 \$2 : New value; -#X msg 87 583 setK \$1 \$2; -#X msg 255 583 setD2 \$1 \$2; -#X text 354 583 Set rigidity \, viscosity or damping of link(s); -#X obj 60 650 cnv 15 610 140 empty empty GET_ATTRIBUTES 20 12 0 14 --261689 -66577 0; -#X msg 75 679 get \$1 \$2; -#X text 237 680 Get specific attribute; -#X text 237 705 \$1 : Attribute type ( massesPos / massesSpeeds / massesForces -/ linksPos ); -#X text 237 742 \$2 : Id (symbol or creations numbers); -#X msg 74 533 deleteLink \$1; -#X text 239 535 Delete a link; -#X text 340 535 \$1 : Creation No of link; -#X msg 73 762 infosL; -#X text 236 762 Get infos on all masses and links on outlet No 2; -#X text 402 247 \$1 : Id (symbol); -#X text 314 247 Add a link; -#X text 401 267 \$2 : creation No of mass1; -#X text 401 285 \$3 : creation No of mass2; -#X text 400 303 \$4 : rigidity; -#X text 400 321 \$5 : viscosity; -#X text 400 338 \$6 : damping; -#X text 463 392 \$1 : Id (symbol); -#X text 462 448 \$4 : rigidity; -#X text 462 466 \$5 : viscosity; -#X text 462 483 \$6 : damping; -#X text 463 392 \$1 : Id (symbol); -#X text 462 448 \$4 : rigidity; -#X text 462 466 \$5 : viscosity; -#X text 462 483 \$6 : damping; -#X text 301 393 Add an interactor link; -#X text 94 52 LINKS :; -#X text 71 91 parameters : length \, rigidity \, viscosity and damping. -; -#X text 72 78 Links connect masses two by two. They got 4 physicals +#X text 25 65 It is designed to implement particules physical model +in PD.The model is based on two elements type : mass and link. The +msd masses are the principals objects of the model. They got only one +physical parameter \, the value of their mass. They can be mobile or +fixed \, in this case forces applied on them automatically \, by links +\, or manually \, by messages \, don't do anything.; +#X text 25 262 Links can be created between mutiples masses \, instead +of creation number \, the masses linked are defined with their Id. ; -#X text 70 134 the two masses at the creation.; -#X text 71 120 message. The lenght is initialised to the distance between +#X obj 449 23 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 449 277 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#N canvas 0 0 450 300 graph1 0; +#X array rigidity1 4 float 1; +#A 0 -1 0 1 2; +#X array zero 4 float 1; +#A 0 0 0 0 0; +#X coords 0 3 3 -3 200 150 1; +#X restore 117 339 graph; +#X text 175 496 L0; +#N canvas 163 176 956 727 figure 0; +#X obj 182 108 loadbang; +#X msg 191 180 \; rigidity1 resize 1 \; rigidity1 resize 4 \; rigidity1 +bounds 0 3 3 -3 \; rigidity1 0 -1 0 1 2 \; rigidity1 ylabel -0.5 \; +rigidity1 xlabel -3.5 \; rigidity1 xticks 0 1 1 \; rigidity1 yticks +0 0.1 5; +#X obj 399 574 sqrt; +#X obj 316 651 tabwrite rigidity3; +#X obj 343 464 - 20; +#X obj 316 609 f; +#X obj 316 579 t b f; +#X obj 343 494 moses 0; +#X obj 343 517 * -1; +#X obj 343 538 sqrt; +#X obj 343 559 * -1; +#X obj 375 429 counter 0 50; +#X obj 481 479 - 20; +#X obj 453 662 f; +#X obj 453 632 t b f; +#X obj 481 509 moses 0; +#X obj 481 532 * -1; +#X obj 480 612 * -1; +#X obj 536 627 *; +#X obj 480 591 *; +#X obj 533 595 t f f; +#X obj 480 564 t f f; +#X obj 453 704 tabwrite rigidity4; +#X msg 55 419 \; rigidity3 resize 51 \; rigidity3 xticks 0 1 5 \; rigidity3 +yticks 0 1 5 \; rigidity4 resize 51 \; rigidity4 xticks 0 1 5 \; rigidity4 +yticks 0 100 5; +#X obj 255 350 t b b; +#X obj 374 404 until; +#X msg 404 183 \; rigidity2 resize 1 \; rigidity2 resize 23 \; rigidity2 +bounds 0 3 22 -3 \; rigidity2 0 0 0 -2.5 -2.34 -2.167 -2 -1.833 -1.667 +-1.5 0 0 0 0 0 1.5 1.667 1.833 2 2.167 2.34 2.5 0 0 0 \; rigidity2 +ylabel -0.5 \; rigidity2 xlabel -3.5 \; rigidity2 xticks 1 1 5 \; rigidity2 +yticks 0 0.2 5; +#X connect 0 0 1 0; +#X connect 0 0 26 0; +#X connect 0 0 24 0; +#X connect 2 0 5 1; +#X connect 4 0 7 0; +#X connect 5 0 3 0; +#X connect 6 0 5 0; +#X connect 6 1 3 1; +#X connect 7 0 8 0; +#X connect 7 1 2 0; +#X connect 8 0 9 0; +#X connect 9 0 10 0; +#X connect 10 0 5 1; +#X connect 11 0 4 0; +#X connect 11 0 6 0; +#X connect 11 0 12 0; +#X connect 11 0 14 0; +#X connect 11 1 25 1; +#X connect 12 0 15 0; +#X connect 13 0 22 0; +#X connect 14 0 13 0; +#X connect 14 1 22 1; +#X connect 15 0 16 0; +#X connect 15 1 20 0; +#X connect 16 0 21 0; +#X connect 17 0 13 1; +#X connect 18 0 13 1; +#X connect 19 0 17 0; +#X connect 20 0 18 0; +#X connect 20 1 18 1; +#X connect 21 0 19 0; +#X connect 21 1 19 1; +#X connect 24 0 25 0; +#X connect 24 1 23 0; +#X connect 25 0 11 0; +#X restore 430 703 pd figure; +#X text 121 318 Rigidity; +#N canvas 0 0 450 300 graph1 0; +#X array rigidity2 23 float 1; +#A 0 0 0 -2.5 -2.34 -2.167 -2 -1.833 -1.667 -1.5 0 0 0 0 0 1.5 1.667 +1.833 2 2.167 2.34 2.5 0 0; +#X array zero 23 float 1; +#A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; +#X coords 0 3 22 -3 200 150 1; +#X restore 112 555 graph; +#X text 204 710 L0; +#X text 117 532 Rigidity with Lmin and Lmax; +#X text 220 710 Lmin; +#X text 282 711 Lmax; +#N canvas 0 0 450 300 graph1 0; +#X array rigidity3 51 float 1; +#A 0 -4.47214 -4.3589 -4.24264 -4.12311 -4 -3.87298 -3.74166 -3.60555 +-3.4641 -3.31662 -3.16228 -3 -2.82843 -2.64575 -2.44949 -2.23607 -2 +-1.73205 -1.41421 -1 0 1 1.41421 1.73205 2 2.23607 2.44949 2.64575 +2.82843 3 3.16228 3.31662 3.4641 3.60555 3.74166 3.87298 4 4.12311 +4.24264 4.3589 4.47214 4.58258 4.69042 4.79583 4.89898 5 5.09902 5.19615 +5.2915 5.38516 5.47723; +#X array zero 51 float 1; +#A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; +#X coords 0 6 50 -6 200 150 1; +#X restore 557 346 graph; +#X text 630 499 L0; +#X text 562 325 Rigidity with power = 1/2; +#N canvas 0 0 450 300 graph1 0; +#X array rigidity4 51 float 1; +#A 0 -400 -361 -324 -289 -256 -225 -196 -169 -144 -121 -100 -81 -64 +-49 -36 -25 -16 -9 -4 -1 0 1 4 9 16 25 36 49 64 81 100 121 144 169 +196 225 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 ; -#X text 71 107 Rigidity \, viscosity and damping are defined by the -creation; -#X text 70 148 Interactor links are links between mutiples masses \, -instead; -#X text 70 161 of creation number \, the masses linked are defined -with; -#X text 69 175 their Id.; -#X text 397 356 ($7) : minimum lenght of link; -#X text 397 373 ($8) : maximum lenght of link; -#X msg 78 247 link \$1 \$2 \$3 \$4 \$5 \$6 ($7 \$8); -#X text 462 412 \$2 : Id (symbol) of masses 1; -#X text 462 430 \$3 : Id (symbol) of masses 2; -#X msg 73 393 iLink \$1 \$2 \$3 \$4 \$5 \$6 ($7 \$8); -#X text 458 500 ($7) : minimum lenght of links; -#X text 458 517 ($8) : maximum lenght of links; -#X connect 2 0 0 0; -#X connect 15 0 0 0; -#X connect 19 0 0 0; -#X connect 23 0 0 0; -#X connect 26 0 0 0; -#X connect 55 0 0 0; -#X connect 58 0 0 0; -#X restore 284 353 pd links; -#X text 135 323 HELP on masses --->; -#X text 134 354 HELP on links --->; -#X text 154 34 MSD : mass - spring - damper model; -#X text 75 79 MSD is the 1D object of the msd objects collection.; -#X text 73 128 There are 4 types of messages for msd :; -#X text 74 92 It is designed to implement particules physical model -in PD.The model is based on two elements type : mass and link.; -#X obj 73 143 cnv 15 420 30 empty empty empty 20 12 0 14 -262131 -66577 -0; -#X obj 73 176 cnv 15 420 30 empty empty empty 20 12 0 14 -261689 -66577 -0; -#X obj 73 209 cnv 15 420 30 empty empty empty 20 12 0 14 -262131 -66577 -0; -#X obj 73 242 cnv 15 420 30 empty empty empty 20 12 0 14 -261689 -66577 -0; -#X text 76 150 CREATION : To create the model masses and links.; -#X text 76 215 DYNAMIC SETTING : To set the model parameters dynamically. -; -#X text 76 248 ATTRIBUTES : To get the model parameters.; -#X text 76 177 COMPUTATION : To compute the new model state based on -previous instant.; +#X array zero 51 float 1; +#A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; +#X coords 0 1000 50 -1000 200 150 1; +#X restore 554 561 graph; +#X text 627 715 L0; +#X text 557 539 Rigidity with power = 2; +#X text 548 21 The equations are :; +#X text 474 45 if Lmin<|L[n]-L[0]|<Lmax; +#X text 473 84 else; +#X text 473 104 F[n] = D(L[n]-L[n-1]); +#X text 473 63 F[n] = K(L[n] - L[0])^P + D(L[n] - L[n-1]); +#X text 25 192 Links connect masses two by two. They got 4 physicals +parameters : length \, rigidity \, damping and power.; +#X text 25 221 Rigidity \, damping and power are defined by the creation +message. The lenght is initialised to the distance between the two +masses at the creation.; +#X connect 5 0 6 0; +#X restore 16 785 pd More_Info; +#X text 12 76 Examples:; +#X text 9 369 Inlets:; +#X text 19 388 - Left:; +#X text 10 526 Arguments:; +#X text 11 562 Outlets:; +#X text 19 729 See Also:; +#X text 74 48 Full Name:; +#N canvas 58 22 262 70 Related_Objects 0; +#X obj 3 10 cnv 15 250 15 empty empty empty 20 12 0 14 -158509 -66577 +0; +#X obj 3 30 cnv 15 250 30 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X text 5 10 Externals and libraries; +#X obj 44 37 msd2D; +#X obj 140 37 msd3D; +#X restore 122 785 pd Related_Objects; +#X text 12 8 HELP: msd; +#X obj 157 48 msd; +#X text 12 18 DESCRIPTION: Mass spring damper physical modeling in +1D.; +#X obj 18 296 msd; +#N canvas 541 387 524 302 init 0; +#X msg 89 187 Xmax 127 \, Xmin 0; +#X obj 89 215 t a; +#X obj 89 33 loadbang; +#X msg 143 100 mass fix 0 10 0; +#X obj 89 241 s \$0-in; +#X obj 89 59 t b b b b b; +#X msg 161 80 reset; +#X obj 44 13 inlet; +#X msg 125 120 mass mob 1 10 0 \, mass mob 1 10 0 \, mass mob 1 10 +0; +#X msg 107 143 link souple 1 0 1 0.5 \, link souple 1 2 1 0.5 \, link +souple 3 2 1 0.5; +#X connect 0 0 1 0; +#X connect 1 0 4 0; +#X connect 2 0 5 0; +#X connect 3 0 1 0; +#X connect 5 0 0 0; +#X connect 5 1 9 0; +#X connect 5 2 8 0; +#X connect 5 3 3 0; +#X connect 5 4 6 0; +#X connect 6 0 1 0; +#X connect 7 0 5 0; +#X connect 8 0 1 0; +#X connect 9 0 1 0; +#X restore 17 156 pd init; +#X obj 18 321 s \$0-out; +#X obj 18 272 r \$0-in; +#X obj 261 184 vsl 15 127 0 127 0 0 empty empty Drag-----> -70 60 1 +10 -262144 -1 -1 0 1; +#X obj 292 184 vsl 15 127 0 127 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X obj 261 345 s \$0-in; +#X msg 261 322 posX fix \$1; +#N canvas 565 515 355 193 compute 0; +#X obj 159 37 inlet; +#X obj 159 74 metro 20; +#X obj 159 135 s \$0-in; +#X msg 159 104 bang \, massesPosL; +#X connect 0 0 1 0; +#X connect 1 0 3 0; +#X connect 3 0 2 0; +#X restore 17 208 pd compute; +#X obj 17 181 tgl 20 0 empty empty ON/OFF 25 10 1 10 -262144 -1 -1 +0 1; +#X obj 261 107 r \$0-out; +#X obj 17 126 bng 20 250 50 0 empty empty Reset 25 10 1 10 -262144 +-1 -1; +#X obj 261 131 route massesPosL; +#X obj 311 184 vsl 15 127 0 127 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X obj 330 184 vsl 15 127 0 127 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 0 1; +#X obj 261 152 unpack f f f f; +#X text 101 388 Bang - A bang at the left inlet compute the new model +state based on previous instant.; +#X text 158 478 To set the model parameters after creation.; +#X text 158 456 To create the model masses and links.; +#X text 158 501 To get the model parameters; +#N canvas 33 254 559 560 creation________ 0; +#X obj 11 95 cnv 15 100 35 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X obj 5 75 cnv 15 550 15 empty empty empty 20 12 0 14 -158509 -66577 +0; +#X obj 5 3 cnv 15 550 15 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X text 7 2 CREATION Messages; +#X obj 10 156 cnv 15 150 140 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X obj 4 137 cnv 15 550 15 empty empty empty 20 12 0 14 -158509 -66577 +0; +#X obj 10 332 cnv 15 240 220 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X obj 3 308 cnv 15 550 15 empty empty empty 20 12 0 14 -158509 -66577 +0; +#X msg 32 104 reset; +#X text 202 167 Add a mass; +#X text 288 168 \$1 : Id (symbol); +#X text 287 188 \$2 : fixed or mobile (0/1); +#X text 287 206 \$3 : mass; +#X msg 32 167 mass \$1 \$2 \$3 \$4; +#X msg 32 243 deleteMass \$1; +#X text 201 245 Delete a mass and associated links; +#X text 285 262 \$1 : Creation No of mass; +#X text 287 224 \$4 : initial position; +#X text 7 137 Masses :; +#X text 7 74 Reset :; +#X text 129 105 Delete all masses \, links and internal variables; +#X text 6 308 Links :; +#X text 271 360 \$1 : Id (symbol); +#X text 271 413 \$4 : rigidity; +#X msg 30 505 deleteLink \$1; +#X text 264 507 Delete a link; +#X text 268 525 \$1 : Creation No of link; +#X text 271 360 \$1 : Id (symbol); +#X text 271 413 \$4 : rigidity; +#X text 271 378 \$2 : creation No/Id of mass1; +#X text 271 396 \$3 : creation No/Id of mass2; +#X text 266 341 Add link(s); +#X text 268 468 ($6) : minimum lenght of link; +#X text 268 485 ($7) : maximum lenght of link; +#X text 271 431 \$5 : damping; +#X text 10 28 Creation messages are used to define the structure of +the model. Messages create links and masses or destroy them.; +#X msg 30 341 link \$1 \$2 \$3 \$4 \$5 ($6 \$7 \$8); +#X text 271 449 \$6 : Power of the rigidity distance; +#X restore 12 457 pd creation________; +#X text 103 542 None; +#X text 18 583 - Left:; +#X text 101 584 Outputs the model parameters asked with the attributes +messages.; +#X obj 13 629 cnv 15 75 15 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X text 17 628 - Right:; +#X text 100 629 Outputs information on model when creation messages +are send or with the special message [infosL( which dump the complete +state of the model.; +#X text 101 420 Messages - Different messages are used to control the +msd object. They are of three types :; +#X text 9 751 CATEGORY: control; +#N canvas 475 181 557 516 dynamic 0; +#X obj 5 3 cnv 15 550 15 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X obj 10 85 cnv 15 130 210 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X obj 4 62 cnv 15 550 15 empty empty empty 20 12 0 14 -158509 -66577 +0; +#X obj 10 330 cnv 15 130 180 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X obj 3 306 cnv 15 550 15 empty empty empty 20 12 0 14 -158509 -66577 +0; +#X text 7 62 Masses :; +#X text 6 306 Links :; +#X text 7 2 DYNAMIC SETTINGS Messages; +#X msg 31 96 posX \$1 \$2; +#X text 190 144 Add force on mass(es); +#X msg 30 152 forceX \$1 \$2; +#X text 192 212 \$1 : Value; +#X text 193 107 \$1 : Id (symbol) or No; +#X text 193 161 \$1 : Id (symbol) or No; +#X msg 30 195 Xmin \$1; +#X msg 30 217 Xmax \$1; +#X msg 29 244 setMobile \$1; +#X msg 29 265 setFixed \$1; +#X text 193 89 Set position of fixed mass(es); +#X text 193 125 \$2 : Value; +#X text 193 179 \$2 : Value; +#X text 189 196 Set minimimum and maximum position of all masses; +#X text 188 244 Set mass to mobile or fixed; +#X msg 29 394 setD \$1 \$2; +#X text 184 380 \$2 : New value; +#X msg 29 343 setK \$1 \$2; +#X text 184 436 \$2 : New value; +#X text 184 489 \$2 : New value; +#X text 178 344 Set rigidity of link(s); +#X text 178 400 Set damping of link(s); +#X msg 29 449 setL \$1 \$2; +#X text 178 453 Set initial lenght of link(s); +#X text 184 362 \$1 : Id (symbol) or No; +#X text 184 418 \$1 : Id (symbol) or No; +#X text 184 471 \$1 : Id (symbol) or No; +#X text 191 261 \$1 : Id (symbol) or No; +#X text 10 25 Dynamic settings messages allows the user to redefine +internal parameters of links and masses.; +#X restore 12 478 pd dynamic settings; +#N canvas 382 95 598 603 attributes______ 0; +#X obj 11 95 cnv 15 100 35 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X obj 5 75 cnv 15 590 15 empty empty empty 20 12 0 14 -158509 -66577 +0; +#X obj 5 3 cnv 15 590 15 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X obj 10 158 cnv 15 150 75 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X obj 4 137 cnv 15 590 15 empty empty empty 20 12 0 14 -158509 -66577 +0; +#X obj 10 264 cnv 15 110 330 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X obj 4 240 cnv 15 590 15 empty empty empty 20 12 0 14 -158509 -66577 +0; +#X text 7 74 General :; +#X text 7 2 ATTRIBUTES Messages; +#X text 7 137 Lists :; +#X msg 33 104 infosL; +#X text 136 104 Get infos on all masses and links on right outlet; +#X msg 32 170 massesPosL; +#X msg 32 198 massesForcesL; +#X text 170 170 Output all masses positions in a list on outlet No +1; +#X text 140 305 \$1 : Attribute type ( massesPos / massesSpeeds / massesForces +/ linksPos ); +#X text 140 280 Get specific attribute on specific element; +#X msg 20 278 get \$1 ($2); +#X text 7 240 Specific :; +#X text 140 375 The get message return the asked attribute preceded +by an identifier and the creation No of the element. The identifier +is made of the asked parameter and the way you asked for it.; +#X text 141 451 message; +#X text 381 451 response; +#X text 140 432 Examples with 3 masses numbered 0 \, 1 and 2 and named +mas:; +#X text 146 541 [get massesPos mas( -----> [massesPosId 0 x0(; +#X text 335 556 [massesPosId 2 x2(; +#X text 335 571 [massesPosId 1 x1(; +#X text 174 470 [get massesPos( -----> [massesPos 0 x0(; +#X text 335 484 [massesPos 2 x2(; +#X text 335 498 [massesPos 1 x1(; +#X text 160 520 [get massesPos 1( -----> [massesPosNo 1 x1(; +#X text 15 30 The attributes messages ask the object to output some +of his internal parameters. They can be output by lists for positions +and forces of masses.; +#X text 170 199 Output all forces applied on masses in a list on outlet +No 1; +#X text 140 342 ($2) : - If not defined all the attributes are send +for all the elements. - Ids or/and creations No; +#X restore 12 499 pd attributes______; +#X text 9 761 KEYWORDS: physical model mass spring damper link; +#X text 267 786 - Nicolas Montgermont \, May 12 \, 2005; +#X text 111 729 01_msdtest.pd; +#X connect 22 0 24 0; +#X connect 25 0 22 0; +#X connect 26 0 29 0; +#X connect 29 0 28 0; +#X connect 31 0 30 0; +#X connect 32 0 34 0; +#X connect 33 0 23 0; +#X connect 34 0 37 0; +#X connect 37 0 26 0; +#X connect 37 1 27 0; +#X connect 37 2 35 0; +#X connect 37 3 36 0; |