#N canvas 84 270 866 562 10; #N canvas 610 84 617 552 data 0; #X restore 735 71 pd data; #X obj 56 517 structures; #X obj 62 308 bng 24 250 50 0 empty \$0-generate generate 0 -6 0 8 -24198 -1 -1; #X text 57 493 Data Struct Definitions; #N canvas 460 399 104 45 save 0; #X obj 2 3 cnv 15 100 40 empty empty empty 20 12 0 14 -228992 -66577 0; #X obj 4 17 bng 20 250 50 0 empty empty load 0 -6 0 8 -258699 -1 -1 ; #X obj 34 17 bng 20 250 50 0 empty empty saveas 0 -6 0 8 -24198 -1 -1; #X obj 101 60 savepanel; #X obj 50 168 s pd-data; #X msg 101 115 write \$1; #X obj 20 91 openpanel; #X msg 20 115 read \$1; #X obj 20 138 t b a; #X obj 20 195 s \$0-generate; #X obj 79 17 bng 20 250 50 0 empty empty save 0 -6 0 8 -241291 -1 -1 ; #X obj 100 91 symbol; #X connect 1 0 6 0; #X connect 2 0 3 0; #X connect 3 0 11 0; #X connect 5 0 4 0; #X connect 6 0 7 0; #X connect 6 0 11 1; #X connect 7 0 8 0; #X connect 8 0 9 0; #X connect 8 1 4 0; #X connect 10 0 11 0; #X connect 11 0 5 0; #X coords 0 0 1 1 102 44 1; #X restore 723 150 pd save; #X text 728 46 Edit here:; #N canvas 257 131 781 748 generator 0; #N canvas 311 93 877 551 getter 0; #X obj 244 89 inlet; #X obj 330 145 outlet; #X text 91 57 First build masses \, then links!!; #X obj 234 285 outlet; #N canvas 629 18 551 784 fix-mass-ids 0; #X obj 43 72 t b b b b b b b; #X msg 79 168 traverse pd-data \, next; #X msg 20 230 next; #X obj 79 198 pointer mass; #X obj 143 103 s \$0-reset-counter; #N canvas 331 520 708 349 counter 0; #X obj 156 125 f 0; #X msg 172 102 0; #X obj 172 74 r \$0-reset-counter; #X obj 188 125 + 1; #X obj 156 179 outlet; #X obj 156 50 inlet; #X connect 0 0 3 0; #X connect 0 0 4 0; #X connect 1 0 0 1; #X connect 2 0 1 0; #X connect 3 0 0 1; #X connect 5 0 0 0; #X restore 96 298 pd counter; #X obj 96 396 set mass mid; #X text 176 200 At end: fix links!; #X obj 186 300 get mass mid; #X obj 79 247 t b b b b p p; #X obj 211 375 pack 0 0; #X obj 211 404 tabwrite \$0-mid2msdid; #X text 125 434 Store a mapping mid => msdid for fixing links later ; #X obj 43 30 inlet; #X obj 158 221 outlet; #X connect 0 5 1 0; #X connect 0 6 4 0; #X connect 1 0 3 0; #X connect 2 0 3 0; #X connect 3 0 9 0; #X connect 3 1 2 0; #X connect 3 2 14 0; #X connect 5 0 10 0; #X connect 5 0 6 0; #X connect 8 0 10 1; #X connect 9 0 2 0; #X connect 9 1 5 0; #X connect 9 4 8 0; #X connect 9 5 6 1; #X connect 10 0 11 0; #X connect 13 0 0 0; #X restore 244 173 pd fix-mass-ids; #N canvas 403 15 685 826 fix-links 0; #X obj 139 158 t b b b b b b b; #X msg 175 254 traverse pd-data \, next; #X msg 116 316 next; #X obj 239 189 s \$0-reset-counter; #X obj 175 284 pointer liaison; #X text 293 285 At end: make links in msd*!; #X obj 192 420 tabread \$0-mid2msdid; #X obj 192 482 set liaison mid1 mid2; #X obj 343 418 tabread \$0-mid2msdid; #X obj 192 389 get liaison mid1 mid2; #X obj 175 333 t b b b b p p; #X obj 139 128 inlet; #X obj 275 312 outlet; #X connect 0 5 1 0; #X connect 1 0 4 0; #X connect 2 0 4 0; #X connect 4 0 10 0; #X connect 4 1 2 0; #X connect 4 2 12 0; #X connect 6 0 7 0; #X connect 8 0 7 1; #X connect 9 0 6 0; #X connect 9 1 8 0; #X connect 10 0 2 0; #X connect 10 4 9 0; #X connect 10 5 7 2; #X connect 11 0 0 0; #X restore 244 196 pd fix-links; #N canvas 236 8 602 856 get-masses 0; #X obj 148 80 t b b b b b b b; #X msg 184 176 traverse pd-data \, next; #X msg 135 280 next; #X obj 184 206 pointer mass; #X obj 325 385 select 0; #X msg 365 410 0; #X msg 324 409 1; #X obj 248 111 s \$0-reset-counter; #X msg 248 131 const 0; #X obj 248 152 s \$0-mid; #X obj 310 152 s \$0-msdid; #X text 44 397 At end: start 2nd pass; #X obj 148 31 inlet; #X obj 214 494 outlet; #X obj 81 435 outlet; #X obj 214 362 get mass x y mid mob M; #X obj 214 444 pack 0 0 0 0 0; #X obj 184 255 t b p; #X connect 0 5 1 0; #X connect 0 6 7 0; #X connect 0 6 8 0; #X connect 1 0 3 0; #X connect 2 0 3 0; #X connect 3 0 17 0; #X connect 3 1 2 0; #X connect 3 2 14 0; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 16 3; #X connect 6 0 16 3; #X connect 8 0 9 0; #X connect 8 0 10 0; #X connect 12 0 0 0; #X connect 15 0 16 0; #X connect 15 1 16 1; #X connect 15 2 16 2; #X connect 15 3 4 0; #X connect 15 4 16 4; #X connect 16 0 13 0; #X connect 17 0 2 0; #X connect 17 1 15 0; #X restore 244 115 pd get-masses; #N canvas 0 0 768 708 make-links 0; #X obj 316 252 pointer liaison; #X msg 316 226 next; #X msg 354 227 traverse pd-data \, bang; #X obj 286 274 t b p; #X obj 334 374 outlet; #X obj 354 170 inlet; #X obj 192 389 outlet; #X text 142 412 Now set lid field of links.; #X obj 316 298 get liaison mid1 mid2 K D D2; #X obj 334 341 pack 0 0 0 0 0; #X connect 0 0 3 0; #X connect 0 1 1 0; #X connect 0 2 6 0; #X connect 1 0 0 0; #X connect 2 0 0 0; #X connect 3 0 1 0; #X connect 3 1 8 0; #X connect 5 0 2 0; #X connect 8 0 9 0; #X connect 8 1 9 1; #X connect 8 2 9 2; #X connect 8 3 9 3; #X connect 8 4 9 4; #X connect 9 0 4 0; #X restore 148 257 pd make-links; #X text 284 418 TABLES USED:; #X text 364 174 Change DS mass ids to match msdIds \, store mid2msdid mapping; #X text 366 196 Fix mid1 and mid2 in links to match what msd2D thinks is right.; #X text 257 258 Create messages to msd2D to create links; #N canvas 209 87 622 579 set-lid 0; #X obj 162 163 r \$0-msd-attr; #X obj 288 201 s \$0-msd; #X obj 162 203 spigot; #X msg 292 129 1; #X msg 236 127 0; #X obj 238 62 inlet; #X obj 238 93 t b b b b b; #X obj 310 307 pointer liaison; #X msg 310 281 traverse pd-data \, next; #X msg 288 163 infosL; #X obj 162 231 route Link; #X msg 272 307 next; #X obj 145 254 t b a; #X text 105 394 This will move around the links \, but it's not critical as long as we have the same number of graphical links as we have inside the msd2D object. And we'd better damn sure should have the same amount \, otherwise somethings went really \, really wrong and took a bad turn and crashed the car and left the toilet seat open.; #X text 104 481 Shouldn't happen.; #X msg 175 332 \$1 \$3 \$4 \$5 \$6 \$7; #X obj 175 357 set liaison lid mid1 mid2 K D D2; #X connect 0 0 2 0; #X connect 2 0 10 0; #X connect 3 0 2 1; #X connect 4 0 2 1; #X connect 5 0 6 0; #X connect 6 1 4 0; #X connect 6 2 9 0; #X connect 6 3 3 0; #X connect 6 4 8 0; #X connect 7 0 16 6; #X connect 7 1 11 0; #X connect 8 0 7 0; #X connect 9 0 1 0; #X connect 10 0 12 0; #X connect 11 0 7 0; #X connect 12 0 11 0; #X connect 12 1 15 0; #X connect 15 0 16 0; #X restore 148 322 pd set-lid; #X text 238 322 Correct lids to match what msd2D tells us; #X obj 146 446 table \$0-mid2msdid 4000; #X text 354 111 First get masses positions \, send to msd2D; #X text 324 446 mass id as index \, msdid as value. Size 4000 taken from the #define in msd sources.; #X connect 0 0 6 0; #X connect 4 0 5 0; #X connect 5 0 7 0; #X connect 6 0 4 0; #X connect 6 1 1 0; #X connect 7 0 12 0; #X connect 7 1 3 0; #X restore 131 221 pd getter; #X obj 131 369 s \$0-msd; #X msg 175 154 reset; #X obj 175 200 s \$0-msd; #X obj 112 132 t b b b b; #N canvas 376 279 682 601 make-setters 0; #X obj 236 443 s pd-setter; #X msg 206 213 traverse pd-data \, next; #X obj 168 109 t b b b b; #X obj 236 329 get mass x y mid; #X msg 236 396 obj \$1 \$2 mass-set \$3; #X obj 236 352 pack 0 0 0; #X msg 151 239 next; #X obj 145 327 s mypointer; #X obj 206 272 t p p; #X msg 226 135 clear; #X obj 226 160 s pd-setter; #X obj 168 68 inlet; #X obj 206 240 pointer mass liaison; #X obj 480 365 pack 0 0 0; #X obj 389 294 t p p; #X obj 480 342 get liaison x1 y1 lid; #X msg 480 409 obj \$1 \$2 link-set \$3; #X obj 480 454 s pd-lsetter; #X obj 226 186 s pd-lsetter; #X obj 373 342 s myliapointer; #X connect 1 0 12 0; #X connect 2 2 1 0; #X connect 2 3 9 0; #X connect 3 0 5 0; #X connect 3 1 5 1; #X connect 3 2 5 2; #X connect 4 0 0 0; #X connect 5 0 4 0; #X connect 6 0 12 0; #X connect 8 0 7 0; #X connect 8 1 3 0; #X connect 9 0 10 0; #X connect 9 0 18 0; #X connect 11 0 2 0; #X connect 12 0 6 0; #X connect 12 0 8 0; #X connect 12 1 6 0; #X connect 12 1 14 0; #X connect 12 2 6 0; #X connect 13 0 16 0; #X connect 14 0 19 0; #X connect 14 1 15 0; #X connect 15 0 13 0; #X connect 15 1 13 1; #X connect 15 2 13 2; #X connect 16 0 17 0; #X restore 112 401 pd make-setters; #X obj 181 344 r pointer2msd; #X obj 112 91 inlet; #X msg 131 324 link ml \$1 \$2 \$3 \$4 \$5; #X msg 189 275 mass id \$4 \$5 \$1 \$2; #X msg 175 177 Xmin 0 \, Xmax 1200 \, Ymin 0 \, Ymax 800; #X connect 0 0 8 0; #X connect 0 1 9 0; #X connect 2 0 3 0; #X connect 4 0 5 0; #X connect 4 1 0 0; #X connect 4 2 10 0; #X connect 4 3 2 0; #X connect 6 0 1 0; #X connect 7 0 4 0; #X connect 8 0 1 0; #X connect 9 0 1 0; #X connect 10 0 3 0; #X restore 62 337 pd generator; #N canvas 0 0 718 819 activate 0; #X obj 233 284 msd2D; #X obj 233 215 r \$0-msd; #X msg 317 213 infosL; #X msg 300 256 get linksPos; #X obj 233 449 gem_masses; #X obj 313 445 gem_links; #X msg 167 193 bang \, get massesPos \, get linksPos; #X obj 177 125 gemhead; #X obj 233 396 route massesPos linksPos; #X obj 139 498 gemwin; #X msg 139 471 0 \, destroy; #X msg 315 233 forceX id 200; #X obj 249 354 s \$0-msd-out; #X obj 139 425 select 1 0; #X obj 139 397 tgl 24 0 empty empty GEM 0 -6 0 8 -262144 -1 -1 0 1 ; #X obj 279 301 s \$0-msd-attr; #X obj 233 510 s masspositions; #X obj 313 488 s linkspositions; #X obj 167 69 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X obj 233 421 spigot; #X obj 313 421 spigot; #X text 238 532 sent to the data struct pointers; #X obj 167 149 t b b; #X obj 197 172 s pollpos; #X obj 167 44 inlet data_only; #X obj 81 316 inlet GEM; #X obj 341 40 inlet speed; #X obj 62 378 select 1; #X msg 62 403 0; #X obj 80 340 t f f; #X obj 54 90 select 1; #X msg 54 115 0; #X obj 72 52 t f f; #X msg 225 622 set \$1; #X msg 56 467 set \$1; #X obj 231 648 outlet; #X obj 57 493 outlet; #X obj 167 92 metro 20; #X obj 413 395 r \$0-gem-masses-on; #X obj 413 417 r \$0-gem-links-on; #X msg 139 447 reset \, create \, 1; #X connect 0 0 8 0; #X connect 0 0 12 0; #X connect 0 1 15 0; #X connect 1 0 0 0; #X connect 2 0 0 0; #X connect 3 0 0 0; #X connect 6 0 0 0; #X connect 7 0 22 0; #X connect 8 0 16 0; #X connect 8 0 19 0; #X connect 8 1 17 0; #X connect 8 1 20 0; #X connect 10 0 9 0; #X connect 11 0 0 0; #X connect 13 0 40 0; #X connect 13 1 10 0; #X connect 14 0 13 0; #X connect 14 0 19 1; #X connect 14 0 20 1; #X connect 14 0 34 0; #X connect 18 0 33 0; #X connect 18 0 37 0; #X connect 19 0 4 0; #X connect 20 0 5 0; #X connect 22 0 6 0; #X connect 22 1 23 0; #X connect 24 0 32 0; #X connect 25 0 29 0; #X connect 26 0 37 1; #X connect 27 0 28 0; #X connect 28 0 18 0; #X connect 29 0 14 0; #X connect 29 1 27 0; #X connect 30 0 31 0; #X connect 31 0 14 0; #X connect 32 0 18 0; #X connect 32 1 30 0; #X connect 33 0 35 0; #X connect 34 0 36 0; #X connect 37 0 22 0; #X connect 38 0 4 1; #X connect 39 0 5 1; #X connect 40 0 9 0; #X restore 61 414 pd activate; #X obj 61 378 tgl 24 0 empty empty GEM 0 -6 0 8 -233017 -1 -1 0 1; #X obj 97 378 tgl 24 0 empty empty Graphical_Datastructures 0 -6 0 8 -1 -262144 -1 0 1; #X text 275 306 Press "generate" to generate messages to msd2D and create the physical model inside.; #N canvas 334 329 751 433 ignore 0; #X obj 46 264 print ToMSD; #X obj 46 234 spigot; #X obj 83 181 tgl 15 0 empty empty debug 0 -6 0 8 -262144 -1 -1 0 1 ; #X obj 46 207 r \$0-msd; #X obj 147 237 spigot; #X obj 184 184 tgl 15 0 empty empty debug 0 -6 0 8 -262144 -1 -1 0 1; #X obj 147 265 print FromMSD; #X obj 147 210 r \$0-msd-out; #N canvas 0 0 578 686 setter 0; #X obj 61 100 mass-set 10; #X obj 103 72 mass-set 9; #X obj 77 103 mass-set 8; #X obj 69 38 mass-set 7; #X obj 39 30 mass-set 6; #X obj 57 40 mass-set 5; #X obj 57 66 mass-set 4; #X obj 26 38 mass-set 3; #X obj 52 99 mass-set 2; #X obj 47 118 mass-set 1; #X obj 158 166 mass-set 0; #X restore 305 122 pd setter; #N canvas 0 0 822 675 lsetter 0; #X obj 47 118 link-set 31; #X obj 47 118 link-set 15; #X obj 47 118 link-set 23; #X obj 47 118 link-set 39; #X obj 47 118 link-set 7; #X obj 47 118 link-set 27; #X obj 47 118 link-set 43; #X obj 47 118 link-set 11; #X obj 47 118 link-set 19; #X obj 52 99 link-set 35; #X obj 52 99 link-set 3; #X obj 52 99 link-set 29; #X obj 52 99 link-set 45; #X obj 52 99 link-set 13; #X obj 52 99 link-set 21; #X obj 52 99 link-set 37; #X obj 52 99 link-set 5; #X obj 26 38 link-set 25; #X obj 26 38 link-set 41; #X obj 26 38 link-set 9; #X obj 26 38 link-set 17; #X obj 26 38 link-set 33; #X obj 26 38 link-set 1; #X obj 26 38 link-set 30; #X obj 57 66 link-set 14; #X obj 57 66 link-set 22; #X obj 57 66 link-set 38; #X obj 57 66 link-set 6; #X obj 57 66 link-set 26; #X obj 57 66 link-set 42; #X obj 57 40 link-set 10; #X obj 57 40 link-set 18; #X obj 57 40 link-set 34; #X obj 57 40 link-set 2; #X obj 57 40 link-set 28; #X obj 39 30 link-set 44; #X obj 39 30 link-set 12; #X obj 39 30 link-set 20; #X obj 39 30 link-set 36; #X obj 69 38 link-set 4; #X obj 69 38 link-set 24; #X obj 69 38 link-set 40; #X obj 77 103 link-set 8; #X obj 77 103 link-set 16; #X obj 103 72 link-set 32; #X obj 158 166 link-set 0; #X restore 304 145 pd lsetter; #X text 288 98 Automatic scripting targets; #X text 65 66 You can ignore this stuff here \, unless something goes wrong.; #X obj 269 233 spigot; #X obj 306 180 tgl 15 0 empty empty debug 0 -6 0 8 -262144 -1 -1 0 1; #X obj 269 206 r \$0-msd-attr; #X obj 269 264 print AttrMSD; #X obj 532 270 s \$0-msd; #X msg 532 249 infosL; #X obj 143 363 spigot; #X obj 180 310 tgl 15 0 empty empty global-send 0 -6 0 8 -262144 -1 -1 0 1; #X obj 143 336 r \$0-msd-out; #X obj 143 391 s MSD-OUT-GLOBAL; #X msg 532 223 massesPosL; #X obj 532 199 metro 40; #X obj 532 177 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X floatatom 585 178 5 0 0 0 - - -; #X obj 280 365 spigot; #X obj 317 312 tgl 15 0 empty empty global-receive 0 -6 0 8 -262144 -1 -1 0 1; #X obj 280 338 r MSD-IN-GLOBAL; #X obj 280 393 s \$0-msd; #X connect 1 0 0 0; #X connect 2 0 1 1; #X connect 3 0 1 0; #X connect 4 0 6 0; #X connect 5 0 4 1; #X connect 7 0 4 0; #X connect 12 0 15 0; #X connect 13 0 12 1; #X connect 14 0 12 0; #X connect 17 0 16 0; #X connect 18 0 21 0; #X connect 19 0 18 1; #X connect 20 0 18 0; #X connect 22 0 16 0; #X connect 23 0 22 0; #X connect 24 0 23 0; #X connect 25 0 23 1; #X connect 26 0 29 0; #X connect 27 0 26 1; #X connect 28 0 26 0; #X restore 149 517 pd ignore this; #X floatatom 133 385 5 10 1000 1 frequency - -; #X text 272 364 Visualization is done using either a GEM OpenGL window \, or just animate the data structure alone. Better don't use both at the same time. In GDS-mode you can set the frequency of the internal metro \, to accelerate or slow down the simulation.; #X text 273 110 Links are created by selecting at least two masses in edit mode \, then press "L" to connect those with a link. If you select more than two masses \, then all possible links between those masses will get created. Use this to mass-connect masses. :); #N canvas 705 166 576 613 forces 0; #X obj 295 415 s \$0-msd; #X obj 394 355 hsl 128 24 -500 500 0 1 empty empty empty -2 -6 0 8 -262144 -1 -1 6350 1; #X obj 295 230 vsl 24 128 -500 500 0 1 empty empty empty 0 -8 0 8 -262144 -1 -1 6350 1; #X msg 295 388 forceY id \$1; #X msg 391 388 forceX id \$1; #X obj 295 366 * -1; #X obj 295 174 tgl 24 0 empty empty constant? 0 -6 0 8 -262144 -1 -1 0 1; #X obj 391 295 tgl 24 0 empty empty constant? 0 -6 0 8 -262144 -1 -1 0 1; #X obj 295 205 metro 10; #X obj 391 326 metro 10; #X msg 455 325 0; #X msg 263 204 0; #X text 230 127 Add some forces to the system.; #X msg 63 158 forceX \$2 \$1; #X msg 63 272 forceY \$2 \$1; #X obj 63 137 pack 0 0; #X floatatom 114 114 5 0 0 2 Mass_ID - -; #X obj 63 249 pack 0 0; #X floatatom 63 115 5 0 0 0 forceX - -; #X floatatom 63 204 5 0 0 0 forceY - -; #X obj 63 299 s \$0-msd; #X obj 63 181 s \$0-msd; #X obj 63 224 * -1; #X obj 63 461 pack 0 0; #X floatatom 63 437 5 0 0 0 posY - -; #X obj 63 511 s \$0-msd; #X msg 63 484 posY \$2 \$1; #X obj 63 358 pack 0 0; #X floatatom 63 334 5 0 0 0 posX - -; #X obj 63 408 s \$0-msd; #X msg 63 381 posX \$2 \$1; #X text 31 74 Modify one mass:; #X connect 1 0 4 0; #X connect 2 0 5 0; #X connect 3 0 0 0; #X connect 4 0 0 0; #X connect 5 0 3 0; #X connect 6 0 8 0; #X connect 7 0 9 0; #X connect 8 0 2 0; #X connect 9 0 1 0; #X connect 10 0 1 0; #X connect 11 0 2 0; #X connect 13 0 21 0; #X connect 14 0 20 0; #X connect 15 0 13 0; #X connect 16 0 15 1; #X connect 16 0 17 1; #X connect 16 0 23 1; #X connect 16 0 27 1; #X connect 17 0 14 0; #X connect 18 0 15 0; #X connect 19 0 22 0; #X connect 22 0 17 0; #X connect 23 0 26 0; #X connect 24 0 23 0; #X connect 26 0 25 0; #X connect 27 0 30 0; #X connect 28 0 27 0; #X connect 30 0 29 0; #X restore 60 457 pd forces; #X obj 286 518 tgl 15 0 \$0-gem-masses-on empty gem_m 0 -6 0 8 -233017 -1 -1 0 1; #X obj 328 518 tgl 15 0 \$0-gem-links-on empty gem_l 0 -6 0 8 -233017 -1 -1 0 1; #N canvas 557 667 450 300 props 0; #X obj 117 204 s \$0-msd; #X obj 117 46 vsl 15 64 0 10 0 0 empty empty D 0 -8 0 8 -262144 -1 -1 0 1; #X obj 141 46 vsl 15 64 0 10 0 0 empty empty D2 0 -8 0 8 -262144 -1 -1 0 1; #X obj 90 46 vsl 15 64 0 100 0 0 empty empty K 0 -8 0 8 -262144 -1 -1 0 1; #X msg 90 175 setK ml \$1; #X msg 117 151 setD ml \$1; #X msg 141 122 setD2 ml \$1; #X text 192 47 Edit properties of Links.; #X connect 1 0 5 0; #X connect 2 0 6 0; #X connect 3 0 4 0; #X connect 4 0 0 0; #X connect 5 0 0 0; #X connect 6 0 0 0; #X restore 134 458 pd props; #X text 369 515 Toggle display of masses and links in GEM.; #X text 273 445 In edit mode and while visualization is active \, you can move around the masses. The red masses will not receive any other forces from the model. Use the "forces" and "props" subpatches to change parameters of links and send forces.; #X text 271 219 More ways to create links: left-to-right connects masses from left to right. one2many will connect one mass to many others. First select the first mass \, the set the toggle to 1 \, after that select the other masses and set toggle to 0; #X text 270 181 "L" is only active \, if the green toggle "Key:L" is set to on. Otherwise use the yellow "link" bang.; #X text 705 123 Save network to disk:; #X obj 56 114 morelinks; #X obj 57 8 msd_append; #X text 274 23 First create structure inside [pd data] using msd_append. Add mobile masses with black bang \, add fixed masses with the red bang. Set weight of mass with the "M" number box.; #X obj 152 86 s pd-data; #X msg 152 46 clear; #X msg 152 66 sort; #X text 150 21 Clear or sort:; #X connect 2 0 6 0; #X connect 7 0 8 0; #X connect 7 1 9 0; #X connect 8 0 7 0; #X connect 9 0 7 1; #X connect 12 0 7 2; #X connect 28 0 27 0; #X connect 29 0 27 0;