diff options
Diffstat (limited to 'msd2D')
-rw-r--r-- | msd2D/editor/butterfly.txt | 70 | ||||
-rw-r--r-- | msd2D/editor/dancer.txt | 74 | ||||
-rw-r--r-- | msd2D/editor/ilinker.pd | 28 | ||||
-rw-r--r-- | msd2D/editor/link2masses.pd | 45 | ||||
-rw-r--r-- | msd2D/editor/morelinks.pd | 181 | ||||
-rw-r--r-- | msd2D/editor/msd2d-editor.pd | 210 | ||||
-rw-r--r-- | msd2D/editor/msd_append.pd | 80 | ||||
-rw-r--r-- | msd2D/editor/structures.pd | 22 |
8 files changed, 391 insertions, 319 deletions
diff --git a/msd2D/editor/butterfly.txt b/msd2D/editor/butterfly.txt index e235fa3..62b8f1e 100644 --- a/msd2D/editor/butterfly.txt +++ b/msd2D/editor/butterfly.txt @@ -15,38 +15,38 @@ float mid; float mob; ; ; -liaison 140 278 94 339 3 11 0; -liaison 95 230 140 278 12 3 0; -liaison 210 267 95 230 2 12 0; -liaison 95 230 211 303 12 6 0; -liaison 94 339 211 303 11 6 0; -liaison 94 339 210 267 11 2 0; -mass 95 230 12 0; -mass 94 339 11 0; -liaison 242 303 140 278 5 3 0; -liaison 140 278 241 268 3 4 0; -liaison 211 303 293 284 6 7 0; -liaison 293 284 210 267 7 2 0; -liaison 293 284 333 348 7 0 0; -liaison 293 284 330 222 7 1 0; -liaison 333 348 242 303 0 5 0; -liaison 241 268 333 348 4 0 0; -liaison 330 222 241 268 1 4 0; -liaison 330 222 242 303 1 5 0; -liaison 221 187 241 268 8 4 0; -liaison 221 187 210 267 8 2 0; -liaison 242 303 241 268 5 4 0; -liaison 210 267 211 303 2 6 0; -liaison 242 303 210 267 5 2 0; -liaison 211 303 242 303 6 5 0; -liaison 241 268 211 303 4 6 0; -liaison 210 267 241 268 2 4 0; -mass 221 187 8 900; -mass 293 284 7 0; -mass 211 303 6 0; -mass 242 303 5 0; -mass 241 268 4 0; -mass 140 278 3 0; -mass 210 267 2 0; -mass 330 222 1 0; -mass 333 348 0 0; +liaison 140 278 94 339 3 11 0 10 2.5 1.5; +liaison 95 230 140 278 12 3 0 10 2.5 1.5; +liaison 210 267 95 230 2 12 0 10 2.5 1.5; +liaison 95 230 211 303 12 6 0 10 2.5 1.5; +liaison 94 339 211 303 11 6 0 10 2.5 1.5; +liaison 94 339 210 267 11 2 0 10 2.5 1.5; +mass 95 230 12 0 100; +mass 94 339 11 0 100; +liaison 242 303 140 278 5 3 0 10 2.5 1.5; +liaison 140 278 241 268 3 4 0 10 2.5 1.5; +liaison 211 303 293 284 6 7 0 10 2.5 1.5; +liaison 293 284 210 267 7 2 0 10 2.5 1.5; +liaison 293 284 333 348 7 0 0 10 2.5 1.5; +liaison 293 284 330 222 7 1 0 10 2.5 1.5; +liaison 333 348 242 303 0 5 0 10 2.5 1.5; +liaison 241 268 333 348 4 0 0 10 2.5 1.5; +liaison 330 222 241 268 1 4 0 10 2.5 1.5; +liaison 330 222 242 303 1 5 0 10 2.5 1.5; +liaison 221 187 241 268 8 4 0 10 2.5 1.5; +liaison 221 187 210 267 8 2 0 10 2.5 1.5; +liaison 242 303 241 268 5 4 0 10 2.5 1.5; +liaison 210 267 211 303 2 6 0 10 2.5 1.5; +liaison 242 303 210 267 5 2 0 10 2.5 1.5; +liaison 211 303 242 303 6 5 0 10 2.5 1.5; +liaison 241 268 211 303 4 6 0 10 2.5 1.5; +liaison 210 267 241 268 2 4 0 10 2.5 1.5; +mass 221 187 8 900 100; +mass 293 284 7 0 100; +mass 211 303 6 0 100; +mass 242 303 5 0 100; +mass 241 268 4 0 100; +mass 140 278 3 0 100; +mass 210 267 2 0 100; +mass 330 222 1 0 100; +mass 333 348 0 0 100; diff --git a/msd2D/editor/dancer.txt b/msd2D/editor/dancer.txt index 971ea73..dbb9d80 100644 --- a/msd2D/editor/dancer.txt +++ b/msd2D/editor/dancer.txt @@ -15,40 +15,40 @@ float mid; float mob; ; ; -liaison 160.067 196.866 175.068 187.056 9 6 0; -liaison 122.843 187.056 137.844 196.866 5 12 0; -liaison 164.966 167.633 149 100 11 0 0; -liaison 149 100 133.946 167.633 0 10 1; -mass 149 100 0 900; -liaison 173.155 235.499 184.692 300 4 2 2; -liaison 184.692 300 122.843 187.056 2 5 3; -liaison 113.219 300 124.756 235.499 1 3 4; -liaison 113.219 300 175.068 187.056 1 6 5; -liaison 215.173 220.483 122.843 187.056 8 5 6; -liaison 175.068 187.056 215.173 220.483 6 8 7; -liaison 82.7376 220.483 175.068 187.056 7 6 8; -liaison 122.843 187.056 82.7376 220.483 5 7 9; -liaison 175.068 187.056 122.843 187.056 6 5 10; -liaison 124.756 235.499 173.155 235.499 3 4 11; -liaison 122.843 187.056 124.756 235.499 5 3 12; -liaison 173.155 235.499 122.843 187.056 4 5 13; -liaison 175.068 187.056 173.155 235.499 6 4 14; -liaison 124.756 235.499 175.068 187.056 3 6 15; -liaison 133.946 167.633 164.966 167.633 10 11 16; -liaison 133.946 167.633 137.844 196.866 10 12 17; -liaison 137.844 196.866 160.067 196.866 12 9 18; -liaison 164.966 167.633 137.844 196.866 11 12 19; -liaison 160.067 196.866 164.966 167.633 9 11 20; -liaison 133.946 167.633 160.067 196.866 10 9 21; -mass 113.219 300 1 0; -mass 184.692 300 2 0; -mass 124.756 235.499 3 0; -mass 173.155 235.499 4 0; -mass 122.843 187.056 5 0; -mass 175.068 187.056 6 0; -mass 82.7376 220.483 7 0; -mass 215.173 220.483 8 0; -mass 160.067 196.866 9 0; -mass 133.946 167.633 10 0; -mass 164.966 167.633 11 0; -mass 137.844 196.866 12 0; +liaison 160.067 196.866 175.068 187.056 9 6 0 10 2.5 1.5; +liaison 122.843 187.056 137.844 196.866 5 12 0 10 2.5 1.5; +liaison 164.966 167.633 149 100 11 0 0 10 2.5 1.5; +liaison 149 100 133.946 167.633 0 10 1 10 2.5 1.5; +mass 149 100 0 900 100; +liaison 173.155 235.499 184.692 300 4 2 2 10 2.5 1.5; +liaison 184.692 300 122.843 187.056 2 5 3 10 2.5 1.5; +liaison 113.219 300 124.756 235.499 1 3 4 10 2.5 1.5; +liaison 113.219 300 175.068 187.056 1 6 5 10 2.5 1.5; +liaison 215.173 220.483 122.843 187.056 8 5 6 10 2.5 1.5; +liaison 175.068 187.056 215.173 220.483 6 8 7 10 2.5 1.5; +liaison 82.7376 220.483 175.068 187.056 7 6 8 10 2.5 1.5; +liaison 122.843 187.056 82.7376 220.483 5 7 9 10 2.5 1.5; +liaison 175.068 187.056 122.843 187.056 6 5 10 10 2.5 1.5; +liaison 124.756 235.499 173.155 235.499 3 4 11 10 2.5 1.5; +liaison 122.843 187.056 124.756 235.499 5 3 12 10 2.5 1.5; +liaison 173.155 235.499 122.843 187.056 4 5 13 10 2.5 1.5; +liaison 175.068 187.056 173.155 235.499 6 4 14 10 2.5 1.5; +liaison 124.756 235.499 175.068 187.056 3 6 15 10 2.5 1.5; +liaison 133.946 167.633 164.966 167.633 10 11 16 10 2.5 1.5; +liaison 133.946 167.633 137.844 196.866 10 12 17 10 2.5 1.5; +liaison 137.844 196.866 160.067 196.866 12 9 18 10 2.5 1.5; +liaison 164.966 167.633 137.844 196.866 11 12 19 10 2.5 1.5; +liaison 160.067 196.866 164.966 167.633 9 11 20 10 2.5 1.5; +liaison 133.946 167.633 160.067 196.866 10 9 21 10 2.5 1.5; +mass 113.219 300 1 0 100; +mass 184.692 300 2 0 100; +mass 124.756 235.499 3 0 100; +mass 173.155 235.499 4 0 100; +mass 122.843 187.056 5 0 100; +mass 175.068 187.056 6 0 100; +mass 82.7376 220.483 7 0 100; +mass 215.173 220.483 8 0 100; +mass 160.067 196.866 9 0 100; +mass 133.946 167.633 10 0 100; +mass 164.966 167.633 11 0 100; +mass 137.844 196.866 12 0 100; diff --git a/msd2D/editor/ilinker.pd b/msd2D/editor/ilinker.pd deleted file mode 100644 index 610c904..0000000 --- a/msd2D/editor/ilinker.pd +++ /dev/null @@ -1,28 +0,0 @@ -#N canvas 114 149 496 493 10; -#X obj 195 306 pointer mass; -#X msg 147 260 vnext 1; -#X msg 274 218 vnext 1; -#X obj 197 167 pointer mass; -#X obj 197 190 t b p; -#X obj 177 418 link2masses; -#X obj 177 387 pack p p; -#X msg 197 135 traverse pd-data \, vnext 1; -#X obj 147 330 t b p; -#X obj 197 106 inlet; -#X text 111 48 This will create all possible links between all selected -masses like iLink.; -#X connect 0 0 8 0; -#X connect 0 1 1 0; -#X connect 0 2 2 0; -#X connect 1 0 0 0; -#X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 3 1 2 0; -#X connect 4 0 1 0; -#X connect 4 1 6 1; -#X connect 4 1 0 1; -#X connect 6 0 5 0; -#X connect 7 0 3 0; -#X connect 8 0 1 0; -#X connect 8 1 6 0; -#X connect 9 0 7 0; diff --git a/msd2D/editor/link2masses.pd b/msd2D/editor/link2masses.pd index 6fe8b4b..157ea8b 100644 --- a/msd2D/editor/link2masses.pd +++ b/msd2D/editor/link2masses.pd @@ -1,25 +1,32 @@ #N canvas 567 387 568 421 10; #X obj 42 51 inlet; #X obj 42 83 t a b; -#X obj 191 213 append liaison mid1 x1 y1; -#X obj 42 249 set liaison mid2 x2 y2; -#X obj 361 190 pointer; -#X msg 361 161 traverse pd-data \, bang; +#X obj 259 221 append liaison mid1 x1 y1; +#X obj 429 198 pointer; +#X msg 429 169 traverse pd-data \, bang; #X obj 42 118 unpack p p; -#X obj 191 162 get mass mid x y; +#X obj 259 170 get mass mid x y; #X obj 42 177 get mass mid x y; -#X text 183 56 Link two masses with a link in [pd data]; +#X text 199 24 Link two masses with a link in [pd data]; +#X obj 178 55 inlet; +#X obj 178 89 unpack 0 0 0; +#X obj 42 249 set liaison mid2 x2 y2 K D D2; +#X text 227 54 List: K \, D \, D2; #X connect 0 0 1 0; -#X connect 1 0 6 0; -#X connect 1 1 5 0; -#X connect 2 0 3 3; -#X connect 4 0 2 3; -#X connect 5 0 4 0; -#X connect 6 0 8 0; -#X connect 6 1 7 0; -#X connect 7 0 2 0; -#X connect 7 1 2 1; -#X connect 7 2 2 2; -#X connect 8 0 3 0; -#X connect 8 1 3 1; -#X connect 8 2 3 2; +#X connect 1 0 5 0; +#X connect 1 1 4 0; +#X connect 2 0 11 6; +#X connect 3 0 2 3; +#X connect 4 0 3 0; +#X connect 5 0 7 0; +#X connect 5 1 6 0; +#X connect 6 0 2 0; +#X connect 6 1 2 1; +#X connect 6 2 2 2; +#X connect 7 0 11 0; +#X connect 7 1 11 1; +#X connect 7 2 11 2; +#X connect 9 0 10 0; +#X connect 10 0 11 3; +#X connect 10 1 11 4; +#X connect 10 2 11 5; diff --git a/msd2D/editor/morelinks.pd b/msd2D/editor/morelinks.pd index 439145a..d5d8073 100644 --- a/msd2D/editor/morelinks.pd +++ b/msd2D/editor/morelinks.pd @@ -1,8 +1,7 @@ -#N canvas 225 469 136 103 10; +#N canvas 225 469 135 183 10; #N canvas 375 417 614 523 left-right-links 0; #X msg 111 227 vnext 1; #X obj 192 225 pointer mass; -#X obj 184 454 link2masses; #X obj 184 423 pack p p; #X msg 192 193 traverse pd-data \, vnext 1; #X obj 191 150 inlet; @@ -22,25 +21,28 @@ to right and create links between two neighbor masses like:; #X obj 184 385 spigot; #X msg 206 321 1; #X text 258 384 Skip the first mass; +#X obj 184 454 link2masses; +#X obj 256 416 r \$0-link-param; #X connect 0 0 1 0; -#X connect 1 0 13 0; +#X connect 1 0 12 0; #X connect 1 1 0 0; -#X connect 3 0 2 0; -#X connect 4 0 1 0; -#X connect 5 0 12 0; -#X connect 8 0 7 0; -#X connect 12 0 4 0; -#X connect 12 1 16 0; -#X connect 12 2 8 0; -#X connect 13 0 0 0; -#X connect 13 1 18 0; -#X connect 13 2 15 0; -#X connect 14 0 12 0; -#X connect 15 0 3 1; -#X connect 15 1 17 0; -#X connect 16 0 17 1; -#X connect 17 0 3 0; -#X connect 18 0 17 1; +#X connect 2 0 19 0; +#X connect 3 0 1 0; +#X connect 4 0 11 0; +#X connect 7 0 6 0; +#X connect 11 0 3 0; +#X connect 11 1 15 0; +#X connect 11 2 7 0; +#X connect 12 0 0 0; +#X connect 12 1 17 0; +#X connect 12 2 14 0; +#X connect 13 0 11 0; +#X connect 14 0 2 1; +#X connect 14 1 16 0; +#X connect 15 0 16 1; +#X connect 16 0 2 0; +#X connect 17 0 16 1; +#X connect 20 0 19 1; #X restore 141 68 pd left-right-links; #X obj 2 19 cnv 15 130 80 empty empty empty 20 12 0 14 -233017 -66577 0; @@ -48,7 +50,6 @@ to right and create links between two neighbor masses like:; -1 -1; #N canvas 487 247 771 749 one-to-many 0; #X obj 203 173 pointer mass; -#X obj 182 473 link2masses; #X obj 182 442 pack p p; #X msg 203 141 traverse pd-data \, vnext 1; #X obj 132 337 t b p; @@ -62,29 +63,31 @@ to right and create links between two neighbor masses like:; #X msg 274 325 label one2many-Start; #X msg 281 351 label one2many-Ends; #X obj 69 146 select 0 1; -#X connect 0 0 8 0; -#X connect 2 0 1 0; -#X connect 3 0 0 0; -#X connect 4 0 7 0; -#X connect 4 1 2 0; -#X connect 5 0 14 0; -#X connect 6 0 4 0; -#X connect 6 1 7 0; -#X connect 6 2 12 0; -#X connect 7 0 6 0; -#X connect 8 0 13 0; -#X connect 8 1 2 1; -#X connect 9 0 7 0; -#X connect 9 1 10 0; -#X connect 10 0 6 0; -#X connect 12 0 11 0; -#X connect 13 0 11 0; -#X connect 14 0 9 0; -#X connect 14 1 3 0; +#X obj 182 473 link2masses; +#X obj 254 440 r \$0-link-param; +#X connect 0 0 7 0; +#X connect 1 0 14 0; +#X connect 2 0 0 0; +#X connect 3 0 6 0; +#X connect 3 1 1 0; +#X connect 4 0 13 0; +#X connect 5 0 3 0; +#X connect 5 1 6 0; +#X connect 5 2 11 0; +#X connect 6 0 5 0; +#X connect 7 0 12 0; +#X connect 7 1 1 1; +#X connect 8 0 6 0; +#X connect 8 1 9 0; +#X connect 9 0 5 0; +#X connect 11 0 10 0; +#X connect 12 0 10 0; +#X connect 13 0 8 0; +#X connect 13 1 2 0; +#X connect 15 0 14 1; #X restore 143 95 pd one-to-many; -#X obj 9 80 tgl 15 0 empty empty one2many-Start 20 8 0 8 -262131 -1 +#X obj 10 76 tgl 15 0 empty empty one2many-Start 20 8 0 8 -262131 -1 -1 0 1; -#X obj 149 46 ilinker; #X obj 10 31 bng 15 250 50 0 empty empty all_selected 20 8 0 8 -241291 -1 -1; #X obj 107 30 tgl 15 0 empty empty Key:L -3 -6 0 8 -24198 -1 -1 0 1 @@ -92,12 +95,96 @@ to right and create links between two neighbor masses like:; #X obj 211 6 keyup; #X obj 211 48 select 108; #X obj 211 27 spigot; +#X obj 2 101 cnv 15 130 80 empty empty Link_Params 10 10 0 10 -195568 +-1 0; +#X obj 44 121 nbx 5 14 -1e+37 1e+37 0 0 \$0-K \$0-K K -12 8 0 10 -225271 +-1 -1 10 256; +#X obj 44 156 nbx 5 14 -1e+37 1e+37 0 0 \$0-D2 \$0-D2 D2 -22 8 0 10 +-225271 -1 -1 1.5 256; +#X obj 44 138 nbx 5 14 -1e+37 1e+37 0 0 \$0-D \$0-D D -12 8 0 10 -225271 +-1 -1 2.5 256; +#N canvas 374 319 630 363 linkparam 0; +#X obj 40 195 s \$0-link-param; +#X obj 40 162 pack 0 0 0; +#X obj 50 128 t b f; +#X obj 93 130 t b f; +#X obj 40 51 r \$0-K; +#X obj 50 80 r \$0-D; +#X obj 93 104 r \$0-D2; +#X obj 240 240 s \$0-K; +#X obj 320 233 s \$0-D; +#X obj 402 236 s \$0-D2; +#X obj 240 147 f \$1; +#X obj 320 157 f \$2; +#X obj 402 156 f \$3; +#X obj 240 178 select 0; +#X msg 240 204 10; +#X obj 320 181 select 0; +#X obj 402 177 select 0; +#X msg 320 207 2.5; +#X msg 402 203 1.5; +#X obj 300 97 loadbang; +#X text 295 75 Init; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X connect 2 1 1 1; +#X connect 3 0 1 0; +#X connect 3 1 1 2; +#X connect 4 0 1 0; +#X connect 5 0 2 0; +#X connect 6 0 3 0; +#X connect 10 0 13 0; +#X connect 11 0 15 0; +#X connect 12 0 16 0; +#X connect 13 0 14 0; +#X connect 13 1 7 0; +#X connect 14 0 7 0; +#X connect 15 0 17 0; +#X connect 15 1 8 0; +#X connect 16 0 18 0; +#X connect 16 1 9 0; +#X connect 17 0 8 0; +#X connect 18 0 9 0; +#X connect 19 0 10 0; +#X connect 19 0 11 0; +#X connect 19 0 12 0; +#X restore 145 127 pd linkparam; +#N canvas 0 0 483 507 ilinker 0; +#X obj 195 306 pointer mass; +#X msg 147 260 vnext 1; +#X msg 274 218 vnext 1; +#X obj 197 167 pointer mass; +#X obj 197 190 t b p; +#X obj 177 418 link2masses; +#X obj 177 387 pack p p; +#X msg 197 135 traverse pd-data \, vnext 1; +#X obj 147 330 t b p; +#X obj 197 106 inlet; +#X text 111 48 This will create all possible links between all selected +masses like iLink.; +#X obj 249 386 r \$0-link-param; +#X connect 0 0 8 0; +#X connect 0 1 1 0; +#X connect 0 2 2 0; +#X connect 1 0 0 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 3 1 2 0; +#X connect 4 0 1 0; +#X connect 4 1 6 1; +#X connect 4 1 0 1; +#X connect 6 0 5 0; +#X connect 7 0 3 0; +#X connect 8 0 1 0; +#X connect 8 1 6 0; +#X connect 9 0 7 0; +#X connect 11 0 5 1; +#X restore 137 46 pd ilinker; #X connect 2 0 0 0; #X connect 3 0 4 0; #X connect 4 0 3 0; -#X connect 6 0 5 0; -#X connect 7 0 10 1; -#X connect 8 0 10 0; -#X connect 9 0 5 0; -#X connect 10 0 9 0; -#X coords 0 0 1 1 132 100 1; +#X connect 5 0 15 0; +#X connect 6 0 9 1; +#X connect 7 0 9 0; +#X connect 9 0 8 0; +#X coords 0 0 1 1 132 180 1; diff --git a/msd2D/editor/msd2d-editor.pd b/msd2D/editor/msd2d-editor.pd index 74d742a..6566249 100644 --- a/msd2D/editor/msd2d-editor.pd +++ b/msd2D/editor/msd2d-editor.pd @@ -1,29 +1,9 @@ -#N struct liaison float x1 float y1 float x2 float y2 float mid1 float -mid2 float lid; -#N struct mass float x float y float mid float mob; #N canvas 130 52 866 562 10; #N canvas 610 84 617 552 data 1; -#X scalar liaison 473.44 182.541 548 179 7 8 0 \;; -#X scalar liaison 391.87 183.337 473.44 182.541 6 7 1 \;; -#X scalar liaison 313.233 178.369 391.87 183.337 5 6 2 \;; -#X scalar liaison 260.779 172.377 313.233 178.369 4 5 3 \;; -#X scalar liaison 196.229 164.351 260.779 172.377 3 4 4 \;; -#X scalar liaison 137.18 159.608 196.229 164.351 2 3 5 \;; -#X scalar liaison 79.9374 158.402 137.18 159.608 1 2 6 \;; -#X scalar liaison 36 159 79.9374 158.402 0 1 7 \;; -#X scalar mass 36 159 0 900 \;; -#X scalar mass 79.9374 158.402 1 0 \;; -#X scalar mass 137.18 159.608 2 0 \;; -#X scalar mass 196.229 164.351 3 0 \;; -#X scalar mass 260.779 172.377 4 0 \;; -#X scalar mass 313.233 178.369 5 0 \;; -#X scalar mass 391.87 183.337 6 0 \;; -#X scalar mass 473.44 182.541 7 0 \;; -#X scalar mass 548 179 8 900 \;; #X restore 735 71 pd data; #X obj 56 517 structures; #X msg 152 72 \; pd-data clear; -#X obj 60 298 bng 24 250 50 0 empty \$0-generate generate 0 -6 0 8 +#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; @@ -57,7 +37,7 @@ mid2 float lid; #X coords 0 0 1 1 102 44 1; #X restore 723 150 pd save; #X text 728 46 Edit here:; -#N canvas 564 255 781 748 generator 0; +#N canvas 257 131 781 748 generator 0; #N canvas 210 99 931 555 getter 0; #X obj 244 89 inlet; #X obj 244 141 outlet; @@ -146,11 +126,9 @@ mid2 float lid; #X msg 264 258 traverse pd-data \, next; #X msg 215 362 next; #X obj 264 288 pointer mass; -#X obj 347 432 get mass x y mid mob; -#X obj 482 459 select 0; -#X msg 522 484 0; -#X obj 347 514 pack 0 0 0 0; -#X msg 481 483 1; +#X obj 458 455 select 0; +#X msg 498 480 0; +#X msg 457 479 1; #X obj 328 193 s \$0-reset-counter; #N canvas 331 520 708 349 counter 0; #X obj 156 125 f 0; @@ -182,39 +160,40 @@ mid2 float lid; #X text 598 515 Write old mids to table; #X obj 605 640 print mass-as-in-struct; #X obj 612 368 outlet; +#X obj 347 432 get mass x y mid mob M; +#X obj 347 514 pack 0 0 0 0 0; #X connect 0 5 1 0; -#X connect 0 6 9 0; -#X connect 0 6 14 0; +#X connect 0 6 7 0; +#X connect 0 6 12 0; #X connect 1 0 3 0; #X connect 2 0 3 0; -#X connect 3 0 11 0; +#X connect 3 0 9 0; #X connect 3 1 2 0; -#X connect 3 2 26 0; -#X connect 4 0 7 0; -#X connect 4 1 7 1; -#X connect 4 2 7 2; -#X connect 4 2 13 0; -#X connect 4 3 5 0; -#X connect 5 0 8 0; -#X connect 5 1 6 0; -#X connect 6 0 7 3; -#X connect 7 0 19 0; -#X connect 8 0 7 3; -#X connect 10 0 12 0; -#X connect 11 0 2 0; -#X connect 11 5 4 0; -#X connect 11 6 10 0; -#X connect 14 0 15 0; -#X connect 14 0 16 0; -#X connect 18 0 0 0; -#X connect 20 0 23 1; +#X connect 3 2 24 0; +#X connect 4 0 6 0; +#X connect 4 1 5 0; +#X connect 5 0 26 3; +#X connect 6 0 26 3; +#X connect 8 0 10 0; +#X connect 9 0 2 0; +#X connect 9 5 25 0; +#X connect 9 6 8 0; +#X connect 12 0 13 0; +#X connect 12 0 14 0; +#X connect 16 0 0 0; +#X connect 18 0 21 1; +#X connect 19 0 21 0; +#X connect 21 0 20 0; #X connect 21 0 23 0; -#X connect 23 0 22 0; -#X connect 23 0 25 0; +#X connect 25 0 26 0; +#X connect 25 1 26 1; +#X connect 25 2 11 0; +#X connect 25 2 26 2; +#X connect 25 3 4 0; +#X connect 25 4 26 4; +#X connect 26 0 17 0; #X restore 244 115 pd get-masses; #N canvas 0 0 768 708 make-links 0; -#X obj 156 275 get liaison mid1 mid2; -#X obj 174 318 pack 0 0; #X obj 156 229 pointer liaison; #X msg 156 203 next; #X msg 194 204 traverse pd-data \, bang; @@ -223,17 +202,22 @@ mid2 float lid; #X obj 194 147 inlet; #X obj 388 303 outlet; #X text 440 302 Now set lid field of links.; -#X connect 0 0 1 0; -#X connect 0 1 1 1; -#X connect 1 0 6 0; -#X connect 2 0 5 0; -#X connect 2 1 3 0; -#X connect 2 2 8 0; -#X connect 3 0 2 0; -#X connect 4 0 2 0; -#X connect 5 0 3 0; -#X connect 5 1 0 0; -#X connect 7 0 4 0; +#X obj 156 275 get liaison mid1 mid2 K D D2; +#X obj 174 318 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; #N canvas 0 0 590 588 get-ids-from-msd 0; #X obj 176 209 r \$0-msd-attr; @@ -309,8 +293,6 @@ is right.; #X msg 310 281 traverse pd-data \, next; #X msg 288 163 infosL; #X obj 162 231 route Link; -#X obj 175 352 set liaison lid mid1 mid2; -#X msg 175 327 \$1 \$3 \$4; #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 @@ -319,6 +301,8 @@ 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; @@ -328,15 +312,15 @@ turn and crashed the car and left the toilet seat open.; #X connect 6 2 9 0; #X connect 6 3 3 0; #X connect 6 4 8 0; -#X connect 7 0 11 3; -#X connect 7 1 13 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 14 0; +#X connect 10 0 12 0; +#X connect 11 0 7 0; #X connect 12 0 11 0; -#X connect 13 0 7 0; -#X connect 14 0 13 0; -#X connect 14 1 12 0; +#X connect 12 1 15 0; +#X connect 15 0 16 0; #X restore 234 286 pd set-lid; #X text 314 284 Correct lids to match what msd2D tells us; #X obj 475 458 table \$0-mid 4000; @@ -355,7 +339,7 @@ turn and crashed the car and left the toilet seat open.; #X msg 175 154 reset; #X obj 175 200 s \$0-msd; #X msg 175 175 Xmin 0 \, Xmax 800 \, Ymin 0 \, Ymax 800; -#X msg 239 300 mass fix 0 100 \$1 \$2; +#X msg 368 473 mass fix 0 100 \$1 \$2; #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; @@ -405,12 +389,12 @@ turn and crashed the car and left the toilet seat open.; #X connect 15 2 13 2; #X connect 16 0 17 0; #X restore 112 401 pd make-setters; -#X obj 201 354 r pointer2msd; +#X obj 181 344 r pointer2msd; #X obj 112 91 inlet; -#X msg 189 275 mass id \$4 100 \$1 \$2; -#X msg 131 324 link ml \$1 \$2 10 2.5 1.5; -#X connect 0 0 11 0; -#X connect 0 1 10 0; +#X msg 131 324 link ml \$1 \$2 \$3 \$4 \$5; +#X msg 189 275 mass id \$4 \$5 \$1 \$2; +#X connect 0 0 10 0; +#X connect 0 1 11 0; #X connect 2 0 3 0; #X connect 4 0 3 0; #X connect 6 0 7 0; @@ -421,7 +405,7 @@ turn and crashed the car and left the toilet seat open.; #X connect 9 0 6 0; #X connect 10 0 1 0; #X connect 11 0 1 0; -#X restore 60 329 pd generator; +#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; @@ -443,7 +427,7 @@ turn and crashed the car and left the toilet seat open.; #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 1 1 +#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; @@ -512,7 +496,7 @@ turn and crashed the car and left the toilet seat open.; #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 1 1; +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 0 0 751 433 ignore 0; @@ -527,25 +511,45 @@ create the physical model inside.; #X obj 281 267 print FromMSD; #X obj 281 212 r \$0-msd-out; #N canvas 0 0 578 686 setter 0; -#X obj 452 168 mass-set 8; -#X obj 393 207 mass-set 7; -#X obj 317 227 mass-set 6; -#X obj 290 156 mass-set 5; -#X obj 243 172 mass-set 4; -#X obj 185 152 mass-set 3; -#X obj 129 151 mass-set 2; -#X obj 76 155 mass-set 1; -#X obj 36 159 mass-set 0; +#X obj 137 196 mass-set 12; +#X obj 164 167 mass-set 11; +#X obj 133 167 mass-set 10; +#X obj 160 196 mass-set 9; +#X obj 215 220 mass-set 8; +#X obj 82 220 mass-set 7; +#X obj 175 187 mass-set 6; +#X obj 122 187 mass-set 5; +#X obj 173 235 mass-set 4; +#X obj 124 235 mass-set 3; +#X obj 184 300 mass-set 2; +#X obj 113 300 mass-set 1; +#X obj 149 100 mass-set 0; #X restore 305 122 pd setter; #N canvas 0 0 822 675 lsetter 0; -#X obj 36 159 link-set 7; -#X obj 76 155 link-set 6; -#X obj 129 151 link-set 5; -#X obj 185 152 link-set 4; -#X obj 243 172 link-set 3; -#X obj 290 156 link-set 2; -#X obj 317 227 link-set 1; -#X obj 393 207 link-set 0; +#X obj 133 167 link-set 23; +#X obj 160 196 link-set 22; +#X obj 164 167 link-set 21; +#X obj 137 196 link-set 20; +#X obj 133 167 link-set 19; +#X obj 133 167 link-set 18; +#X obj 124 235 link-set 17; +#X obj 175 187 link-set 16; +#X obj 173 235 link-set 15; +#X obj 122 187 link-set 14; +#X obj 124 235 link-set 13; +#X obj 175 187 link-set 12; +#X obj 122 187 link-set 11; +#X obj 82 220 link-set 10; +#X obj 175 187 link-set 9; +#X obj 215 220 link-set 8; +#X obj 113 300 link-set 7; +#X obj 113 300 link-set 6; +#X obj 184 300 link-set 5; +#X obj 173 235 link-set 4; +#X obj 149 100 link-set 3; +#X obj 164 167 link-set 2; +#X obj 122 187 link-set 1; +#X obj 160 196 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 @@ -573,10 +577,6 @@ wrong.; \, 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 274 23 First create structure inside [pd data] using msd_append. -Add mobile masses with black bang \, add fixed masses with the red -bang.; -#X obj 57 24 msd_append; #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 @@ -639,7 +639,6 @@ masses will get created. Use this to mass-connect masses. :); 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 obj 56 114 morelinks; #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 @@ -648,6 +647,11 @@ 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 connect 3 0 7 0; #X connect 8 0 9 0; #X connect 8 1 10 0; diff --git a/msd2D/editor/msd_append.pd b/msd2D/editor/msd_append.pd index 8d118c2..71dd5b2 100644 --- a/msd2D/editor/msd_append.pd +++ b/msd2D/editor/msd_append.pd @@ -1,9 +1,9 @@ -#N canvas 862 152 86 80 10; +#N canvas 862 152 84 110 10; #X obj 2 16 cnv 15 80 60 empty empty empty 20 12 0 14 -233017 -66577 0; -#X obj 13 29 bng 15 250 50 0 empty empty mass 0 -6 0 8 -1 -262144 -1 +#X obj 16 29 bng 15 250 50 0 empty empty mass 0 -6 0 8 -1 -262144 -1 ; -#X obj 46 29 bng 15 250 50 0 empty empty fix 0 -6 0 8 -258699 -1 -1 +#X obj 54 29 bng 15 250 50 0 empty empty fix 0 -6 0 8 -258699 -1 -1 ; #N canvas 355 457 863 719 guts 0; #X obj 252 139 pointer; @@ -15,9 +15,8 @@ #X obj 385 351 + 1; #X obj 355 291 r \$0-counter-bng; #X obj 355 393 s \$0-nextmass; -#X obj 144 200 r \$0-nextmass; +#X obj 145 153 r \$0-nextmass; #X obj 70 97 s \$0-counter-bng; -#X obj 66 231 append mass x y mid mob; #X obj 70 71 t b b b b b f b; #X msg 70 47 0; #X text 111 24 mobile; @@ -30,37 +29,54 @@ #X obj 296 425 s \$0-counter-in; #X obj 66 203 + 20; #X obj 105 148 + 20; -#X connect 0 0 11 4; -#X connect 1 0 22 0; +#X obj 192 177 r \$0-M; +#X obj 68 231 append mass x y mid mob M; +#X obj 553 175 f \$1; +#X obj 553 199 select 0; +#X obj 553 254 s \$0-M; +#X msg 552 224 100; +#X obj 558 152 loadbang; +#X connect 0 0 24 5; +#X connect 1 0 21 0; #X connect 2 0 0 0; -#X connect 3 0 23 0; -#X connect 4 0 13 0; -#X connect 5 0 16 0; -#X connect 6 0 17 1; -#X connect 7 0 17 0; -#X connect 9 0 11 2; -#X connect 12 0 10 0; -#X connect 12 1 1 0; -#X connect 12 3 3 0; -#X connect 12 5 11 3; -#X connect 12 6 2 0; -#X connect 13 0 12 0; -#X connect 16 0 12 0; -#X connect 17 0 6 0; -#X connect 17 0 8 0; -#X connect 17 0 20 0; -#X connect 18 0 17 0; -#X connect 19 0 17 0; -#X connect 20 0 21 0; -#X connect 22 0 11 0; -#X connect 23 0 11 1; -#X restore 119 47 pd guts; +#X connect 3 0 22 0; +#X connect 4 0 12 0; +#X connect 5 0 15 0; +#X connect 6 0 16 1; +#X connect 7 0 16 0; +#X connect 9 0 24 2; +#X connect 11 0 10 0; +#X connect 11 1 1 0; +#X connect 11 3 3 0; +#X connect 11 5 24 3; +#X connect 11 6 2 0; +#X connect 12 0 11 0; +#X connect 15 0 11 0; +#X connect 16 0 6 0; +#X connect 16 0 8 0; +#X connect 16 0 19 0; +#X connect 17 0 16 0; +#X connect 18 0 16 0; +#X connect 19 0 20 0; +#X connect 21 0 24 0; +#X connect 22 0 24 1; +#X connect 23 0 24 4; +#X connect 25 0 26 0; +#X connect 26 0 28 0; +#X connect 26 1 27 0; +#X connect 28 0 27 0; +#X connect 29 0 25 0; +#X restore 105 79 pd guts; #X obj 126 6 inlet; #X obj 169 5 inlet; -#X obj 16 59 nbx 5 14 -1e+37 1e+37 0 0 \$0-counter \$0-counter-in next -0 -6 0 10 -262144 -1 -1 0 256; +#X obj 25 59 nbx 5 14 -1e+37 1e+37 0 0 \$0-counter \$0-counter-in id +-22 8 0 10 -262144 -1 -1 8 256; +#X obj 2 77 cnv 15 80 30 empty empty empty 10 10 0 10 -195568 -1 0 +; +#X obj 26 85 nbx 5 14 -1e+37 1e+37 0 0 \$0-M \$0-M M -12 8 0 10 -225271 +-1 -1 0 256; #X connect 1 0 3 0; #X connect 2 0 3 1; #X connect 4 0 3 0; #X connect 5 0 3 1; -#X coords 0 0 1 1 82 80 1; +#X coords 0 0 1 1 82 100 1; diff --git a/msd2D/editor/structures.pd b/msd2D/editor/structures.pd index 434a0ee..55220ff 100644 --- a/msd2D/editor/structures.pd +++ b/msd2D/editor/structures.pd @@ -1,27 +1,13 @@ #N canvas 752 10 450 300 10; #N canvas 389 332 664 321 mass 0; #X obj 62 182 drawnumber mid 0 -18 0 m; -#X obj 64 72 struct mass float x float y float mid float mob; #X obj 61 136 filledpolygon mob mob 1 -5 0 -4 4 0 5 4 4 5 0 4 -4 0 -5 -4 -4; +#X obj 64 72 struct mass float x float y float mid float mob float +M; #X restore 132 125 pd mass; #N canvas 73 302 487 201 liaison 0; #X obj 19 25 struct liaison float x1 float y1 float x2 float y2 float -mid1 float mid2 float lid; +mid1 float mid2 float lid float K float D float D2; #X obj 23 73 drawpolygon 444 2 x1 y1 x2 y2; -#X restore 132 169 pd liaison; -#N canvas 0 0 450 300 model 0; -#X obj 50 102 plot m 0 0 0 0; -#X obj 51 135 plot l 0 0 0 0; -#X obj 45 72 struct model float x1 array m mass array l liaison; -#X restore 132 147 pd model; -#N canvas 389 332 664 321 fixmass 0; -#X obj 64 72 struct fixmass float x float y float mid; -#X obj 61 136 filledpolygon 900 900 1 -5 0 -4 4 0 5 4 4 5 0 4 -4 0 --5 -4 -4; -#X obj 51 203 drawnumber mid 0 -18 900 m; -#X restore 132 191 pd fixmass; -#N canvas 0 0 450 300 fixed 0; -#X obj 50 97 plot f 0 0 0 0; -#X obj 49 56 struct fixed float x float y array f fixmass; -#X restore 132 213 pd fixed; +#X restore 132 147 pd liaison; |