diff options
author | Frank Barknecht <fbar@users.sourceforge.net> | 2005-05-08 13:19:05 +0000 |
---|---|---|
committer | Frank Barknecht <fbar@users.sourceforge.net> | 2005-05-08 13:19:05 +0000 |
commit | f2849dcdd5d70a4903485d0414313c9a4002d73b (patch) | |
tree | e0ff6b78cc486e5cd418c4e98712181013c869de | |
parent | 28fb2944f210b69f0e8fd08f883bfb7fb71ca6d8 (diff) |
Lots of changes: added geometric formations (geos), fixed some problems,...
svn path=/trunk/externals/nusmuk/; revision=2920
-rw-r--r-- | msd2D/editor/ds-next.pd | 10 | ||||
-rw-r--r-- | msd2D/editor/ds-vnext.pd | 10 | ||||
-rw-r--r-- | msd2D/editor/make_circ.pd | 90 | ||||
-rw-r--r-- | msd2D/editor/make_rect.pd | 117 | ||||
-rw-r--r-- | msd2D/editor/morelinks.pd | 119 | ||||
-rw-r--r-- | msd2D/editor/msd2d-editor.pd | 300 | ||||
-rw-r--r-- | msd2D/editor/msd_append.pd | 109 | ||||
-rw-r--r-- | msd2D/editor/sixpack.pd | 31 |
8 files changed, 566 insertions, 220 deletions
diff --git a/msd2D/editor/ds-next.pd b/msd2D/editor/ds-next.pd new file mode 100644 index 0000000..14f9653 --- /dev/null +++ b/msd2D/editor/ds-next.pd @@ -0,0 +1,10 @@ +#N canvas 0 0 450 300 10; +#X obj 138 76 inlet; +#X obj 138 214 outlet; +#X obj 138 111 t b; +#X msg 138 168 next; +#X obj 138 140 del 0; +#X connect 0 0 2 0; +#X connect 2 0 4 0; +#X connect 3 0 1 0; +#X connect 4 0 3 0; diff --git a/msd2D/editor/ds-vnext.pd b/msd2D/editor/ds-vnext.pd new file mode 100644 index 0000000..93a9d81 --- /dev/null +++ b/msd2D/editor/ds-vnext.pd @@ -0,0 +1,10 @@ +#N canvas 0 0 450 300 10; +#X obj 138 76 inlet; +#X obj 138 214 outlet; +#X obj 138 111 t b; +#X msg 138 168 vnext 1; +#X obj 138 140 del 1; +#X connect 0 0 2 0; +#X connect 2 0 4 0; +#X connect 3 0 1 0; +#X connect 4 0 3 0; diff --git a/msd2D/editor/make_circ.pd b/msd2D/editor/make_circ.pd new file mode 100644 index 0000000..3d9ffc3 --- /dev/null +++ b/msd2D/editor/make_circ.pd @@ -0,0 +1,90 @@ +#N canvas 496 414 573 483 10; +#X obj 79 355 pack 0 0; +#X obj 79 388 outlet; +#X obj 235 67 unpack 0 0 0 0; +#X obj 235 233 s \$0-x0; +#X obj 274 205 s \$0-y0; +#X obj 312 173 s \$0-radius; +#X obj 352 150 s \$0-masses; +#X obj 235 43 inlet; +#X obj 79 34 inlet; +#X obj 130 332 + 0; +#X obj 149 304 r \$0-y0; +#X obj 79 330 + 0; +#X obj 95 304 r \$0-x0; +#N canvas 195 426 450 300 2029-turnme 0; +#X obj 115 64 inlet; +#X obj 120 218 outlet; +#X obj 157 81 r \$0-masses; +#X obj 301 137 r \$0-radius; +#X obj 155 163 expr $f2 * sin($f1) \; $f2 * cos($f1); +#X obj 119 102 / 1; +#X obj 292 210 outlet; +#X obj 155 135 * 0.01745; +#X obj 157 113 * 360; +#X connect 0 0 5 0; +#X connect 2 0 5 1; +#X connect 3 0 4 1; +#X connect 4 0 1 0; +#X connect 4 1 6 0; +#X connect 5 0 8 0; +#X connect 7 0 4 0; +#X connect 8 0 7 0; +#X restore 79 122 pd \$0-turnme; +#N canvas 0 0 723 519 2029-count 0; +#X text 294 126 count y; +#N canvas 0 0 450 300 2029-count 0; +#X obj 112 28 inlet; +#X obj 116 96 f 0; +#X obj 156 98 + 1; +#X obj 178 52 inlet; +#X msg 175 73 0; +#X obj 118 122 outlet; +#X obj 112 66 until; +#X connect 0 0 6 0; +#X connect 1 0 2 0; +#X connect 1 0 5 0; +#X connect 2 0 1 1; +#X connect 3 0 4 0; +#X connect 4 0 1 1; +#X connect 6 0 1 0; +#X restore 237 228 pd \$0-count; +#X obj 237 103 inlet; +#X obj 237 371 outlet; +#X obj 237 130 t b b; +#X obj 262 176 r \$0-masses; +#X obj 237 197 f 1; +#X connect 1 0 3 0; +#X connect 2 0 4 0; +#X connect 4 0 6 0; +#X connect 4 1 1 1; +#X connect 5 0 6 1; +#X connect 6 0 1 0; +#X restore 79 80 pd \$0-count; +#X obj 235 125 f \$1; +#X obj 274 124 f \$2; +#X obj 312 124 f \$3; +#X obj 352 124 f \$4; +#X obj 352 67 loadbang; +#X connect 0 0 1 0; +#X connect 2 0 15 0; +#X connect 2 1 16 0; +#X connect 2 2 17 0; +#X connect 2 3 18 0; +#X connect 7 0 2 0; +#X connect 8 0 14 0; +#X connect 9 0 0 1; +#X connect 10 0 9 1; +#X connect 11 0 0 0; +#X connect 12 0 11 1; +#X connect 13 0 11 0; +#X connect 13 1 9 0; +#X connect 14 0 13 0; +#X connect 15 0 3 0; +#X connect 16 0 4 0; +#X connect 17 0 5 0; +#X connect 18 0 6 0; +#X connect 19 0 18 0; +#X connect 19 0 17 0; +#X connect 19 0 16 0; +#X connect 19 0 15 0; diff --git a/msd2D/editor/make_rect.pd b/msd2D/editor/make_rect.pd new file mode 100644 index 0000000..57bc285 --- /dev/null +++ b/msd2D/editor/make_rect.pd @@ -0,0 +1,117 @@ +#N canvas 253 193 699 400 10; +#X obj 77 53 inlet; +#X obj 298 50 inlet; +#X obj 298 77 unpack 0 0 0 0 0 0; +#X obj 259 123 f \$1; +#X obj 298 122 f \$2; +#X obj 336 122 f \$3; +#X obj 376 122 f \$4; +#X obj 412 122 f \$5; +#X obj 259 260 s \$0-x0; +#X obj 448 122 f \$6; +#X obj 298 239 s \$0-y0; +#X obj 336 206 s \$0-xgap; +#X obj 412 164 s \$0-xsteps; +#X obj 448 143 s \$0-ysteps; +#X obj 376 185 s \$0-ygap; +#X obj 77 226 pack 0 0; +#X obj 77 260 outlet; +#X obj 77 129 t b f; +#N canvas 0 0 490 471 1002-countx 0; +#X obj 149 231 r \$0-x0; +#X obj 126 258 + \$1; +#X obj 126 200 * \$3; +#X obj 149 171 r \$0-xgap; +#X obj 126 115 f \$5; +#X obj 149 92 r \$0-xsteps; +#X text 194 49 count x; +#X obj 126 23 inlet; +#N canvas 0 0 450 300 1002-count 0; +#X obj 112 28 inlet; +#X obj 116 96 f 0; +#X obj 156 98 + 1; +#X obj 178 52 inlet; +#X msg 175 73 0; +#X obj 118 122 outlet; +#X obj 112 66 until; +#X connect 0 0 6 0; +#X connect 1 0 2 0; +#X connect 1 0 5 0; +#X connect 2 0 1 1; +#X connect 3 0 4 0; +#X connect 4 0 1 1; +#X connect 6 0 1 0; +#X restore 126 146 pd \$0-count; +#X obj 126 284 outlet; +#X obj 126 48 t b b; +#X connect 0 0 1 1; +#X connect 1 0 9 0; +#X connect 2 0 1 0; +#X connect 3 0 2 1; +#X connect 4 0 8 0; +#X connect 5 0 4 1; +#X connect 7 0 10 0; +#X connect 8 0 2 0; +#X connect 10 0 4 0; +#X connect 10 1 8 1; +#X restore 77 172 pd \$0-countx; +#N canvas 0 0 723 519 1002-county 0; +#X obj 260 174 r \$0-ysteps; +#X obj 260 253 r \$0-ygap; +#X obj 260 313 r \$0-y0; +#X obj 237 340 + \$2; +#X obj 237 282 * \$4; +#X obj 237 197 f \$6; +#X text 294 126 count y; +#N canvas 0 0 450 300 1002-count 0; +#X obj 112 28 inlet; +#X obj 116 96 f 0; +#X obj 156 98 + 1; +#X obj 178 52 inlet; +#X msg 175 73 0; +#X obj 118 122 outlet; +#X obj 112 66 until; +#X connect 0 0 6 0; +#X connect 1 0 2 0; +#X connect 1 0 5 0; +#X connect 2 0 1 1; +#X connect 3 0 4 0; +#X connect 4 0 1 1; +#X connect 6 0 1 0; +#X restore 237 228 pd \$0-count; +#X obj 237 103 inlet; +#X obj 237 371 outlet; +#X obj 237 130 t b b; +#X connect 0 0 5 1; +#X connect 1 0 4 1; +#X connect 2 0 3 1; +#X connect 3 0 9 0; +#X connect 4 0 3 0; +#X connect 5 0 7 0; +#X connect 7 0 4 0; +#X connect 8 0 10 0; +#X connect 10 0 5 0; +#X connect 10 1 7 1; +#X restore 77 100 pd \$0-county; +#X obj 77 76 t b; +#X text 452 208 Args; +#X connect 0 0 20 0; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X connect 2 1 4 0; +#X connect 2 2 5 0; +#X connect 2 3 6 0; +#X connect 2 4 7 0; +#X connect 2 5 9 0; +#X connect 3 0 8 0; +#X connect 4 0 10 0; +#X connect 5 0 11 0; +#X connect 6 0 14 0; +#X connect 7 0 12 0; +#X connect 9 0 13 0; +#X connect 15 0 16 0; +#X connect 17 0 18 0; +#X connect 17 1 15 1; +#X connect 18 0 15 0; +#X connect 19 0 17 0; +#X connect 20 0 19 0; diff --git a/msd2D/editor/morelinks.pd b/msd2D/editor/morelinks.pd index d5d8073..532e511 100644 --- a/msd2D/editor/morelinks.pd +++ b/msd2D/editor/morelinks.pd @@ -1,6 +1,5 @@ #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 423 pack p p; #X msg 192 193 traverse pd-data \, vnext 1; @@ -23,26 +22,27 @@ to right and create links between two neighbor masses like:; #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 12 0; -#X connect 1 1 0 0; -#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 obj 113 225 ds-vnext; +#X connect 0 0 11 0; +#X connect 0 1 20 0; +#X connect 1 0 18 0; +#X connect 2 0 0 0; +#X connect 3 0 10 0; +#X connect 6 0 5 0; +#X connect 10 0 2 0; +#X connect 10 1 14 0; +#X connect 10 2 6 0; +#X connect 11 0 20 0; +#X connect 11 1 16 0; +#X connect 11 2 13 0; +#X connect 12 0 10 0; +#X connect 13 0 1 1; +#X connect 13 1 15 0; +#X connect 14 0 15 1; +#X connect 15 0 1 0; +#X connect 16 0 15 1; +#X connect 19 0 18 1; +#X connect 20 0 0 0; #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; @@ -55,38 +55,38 @@ to right and create links between two neighbor masses like:; #X obj 132 337 t b p; #X obj 69 120 inlet; #X obj 135 310 pointer mass; -#X msg 103 276 vnext 1; #X obj 203 196 t b p; #X obj 69 178 t b b; -#X msg 134 242 traverse pd-data; +#X msg 135 242 traverse pd-data; #X obj 274 378 outlet; #X msg 274 325 label one2many-Start; #X msg 281 351 label one2many-Ends; #X obj 69 146 select 0 1; #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 obj 69 281 ds-vnext; +#X connect 0 0 6 0; +#X connect 1 0 13 0; #X connect 2 0 0 0; -#X connect 3 0 6 0; +#X connect 3 0 15 0; #X connect 3 1 1 0; -#X connect 4 0 13 0; +#X connect 4 0 12 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 connect 5 1 15 0; +#X connect 5 2 10 0; +#X connect 6 0 11 0; +#X connect 6 1 1 1; +#X connect 7 0 15 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 10 0 9 0; +#X connect 11 0 9 0; +#X connect 12 0 7 0; +#X connect 12 1 2 0; +#X connect 14 0 13 1; +#X connect 15 0 5 0; #X restore 143 95 pd one-to-many; -#X obj 10 76 tgl 15 0 empty empty one2many-Start 20 8 0 8 -262131 -1 +#X obj 10 76 tgl 15 0 empty empty one2many-Ends 20 8 0 8 -262131 -1 -1 0 1; #X obj 10 31 bng 15 250 50 0 empty empty all_selected 20 8 0 8 -241291 -1 -1; @@ -151,8 +151,6 @@ to right and create links between two neighbor masses like:; #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; @@ -163,22 +161,24 @@ to right and create links between two neighbor masses like:; #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 obj 274 214 ds-vnext; +#X obj 147 257 ds-vnext; +#X connect 0 0 6 0; +#X connect 0 1 11 0; +#X connect 0 2 10 0; +#X connect 1 0 2 0; +#X connect 1 1 10 0; +#X connect 2 0 11 0; +#X connect 2 1 4 1; +#X connect 2 1 0 1; +#X connect 4 0 3 0; +#X connect 5 0 1 0; +#X connect 6 0 11 0; +#X connect 6 1 4 0; +#X connect 7 0 5 0; +#X connect 9 0 3 1; +#X connect 10 0 1 0; +#X connect 11 0 0 0; #X restore 137 46 pd ilinker; #X connect 2 0 0 0; #X connect 3 0 4 0; @@ -186,5 +186,6 @@ masses like iLink.; #X connect 5 0 15 0; #X connect 6 0 9 1; #X connect 7 0 9 0; +#X connect 8 0 15 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 fb07b54..97e6d91 100644 --- a/msd2D/editor/msd2d-editor.pd +++ b/msd2D/editor/msd2d-editor.pd @@ -1,5 +1,5 @@ -#N canvas 34 224 866 562 10; -#N canvas 0 0 1222 870 data 0; +#N canvas 121 260 866 562 10; +#N canvas 334 79 1222 870 data 0; #X restore 719 51 pd data; #X obj 24 523 structures; #X obj 30 314 bng 24 250 50 0 empty \$0-generate generate 0 -6 0 8 @@ -45,8 +45,7 @@ #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 79 200 pointer mass; #X obj 143 103 s \$0-reset-counter; #N canvas 331 520 708 349 counter 0; #X obj 156 125 f 0; @@ -70,29 +69,34 @@ #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 43 24 inlet; #X obj 158 221 outlet; +#X text 96 52 Avoid stack overflow lops; +#X obj 85 23 r \$0-stack-delay; +#X obj 16 228 ds-next; +#X obj 43 51 del 0; #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 connect 0 6 3 0; +#X connect 1 0 2 0; +#X connect 2 0 8 0; +#X connect 2 1 16 0; +#X connect 2 2 13 0; +#X connect 4 0 9 0; +#X connect 4 0 5 0; +#X connect 7 0 9 1; +#X connect 8 0 16 0; +#X connect 8 1 4 0; +#X connect 8 4 7 0; +#X connect 8 5 5 1; +#X connect 9 0 10 0; +#X connect 12 0 17 0; +#X connect 15 0 17 1; +#X connect 16 0 2 0; +#X connect 17 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*!; @@ -101,27 +105,32 @@ #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 139 70 inlet; #X obj 275 312 outlet; +#X text 192 106 Avoid stack overflow lops; +#X obj 188 68 r \$0-stack-delay; +#X obj 113 282 ds-next; +#X obj 139 105 del 0; #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 connect 1 0 3 0; +#X connect 3 0 9 0; +#X connect 3 1 14 0; +#X connect 3 2 11 0; +#X connect 5 0 6 0; +#X connect 7 0 6 1; +#X connect 8 0 5 0; +#X connect 8 1 7 0; +#X connect 9 0 14 0; +#X connect 9 4 8 0; +#X connect 9 5 6 2; +#X connect 10 0 15 0; +#X connect 13 0 15 1; +#X connect 14 0 3 0; +#X connect 15 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; @@ -138,35 +147,35 @@ #X obj 214 444 pack 0 0 0 0 0; #X obj 184 255 t b p; #X obj 214 402 scale-ds2msd; +#X obj 120 251 ds-next; #X connect 0 5 1 0; +#X connect 0 6 6 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 18 0; -#X connect 15 1 18 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 connect 18 0 16 0; -#X connect 18 1 16 1; +#X connect 1 0 2 0; +#X connect 2 0 16 0; +#X connect 2 1 18 0; +#X connect 2 2 13 0; +#X connect 3 0 5 0; +#X connect 3 1 4 0; +#X connect 4 0 15 3; +#X connect 5 0 15 3; +#X connect 7 0 8 0; +#X connect 7 0 9 0; +#X connect 11 0 0 0; +#X connect 14 0 17 0; +#X connect 14 1 17 1; +#X connect 14 2 15 2; +#X connect 14 3 3 0; +#X connect 14 4 15 4; +#X connect 15 0 12 0; +#X connect 16 0 18 0; +#X connect 16 1 14 0; +#X connect 17 0 15 0; +#X connect 17 1 15 1; +#X connect 18 0 2 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; @@ -175,20 +184,26 @@ #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 text 407 200 Avoid stack overflow lops; +#X obj 399 167 r \$0-stack-delay; +#X obj 286 226 ds-next; +#X obj 354 201 del 0; +#X connect 0 0 2 0; +#X connect 0 1 11 0; +#X connect 0 2 5 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 connect 2 0 11 0; +#X connect 2 1 7 0; +#X connect 4 0 12 0; +#X connect 7 0 8 0; +#X connect 7 1 8 1; +#X connect 7 2 8 2; +#X connect 7 3 8 3; +#X connect 7 4 8 4; +#X connect 8 0 3 0; +#X connect 10 0 12 1; +#X connect 11 0 0 0; +#X connect 12 0 1 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 @@ -202,13 +217,12 @@ is right.; #X obj 162 203 spigot; #X msg 292 129 1; #X msg 236 127 0; -#X obj 238 62 inlet; +#X obj 238 22 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 @@ -218,24 +232,33 @@ 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 text 291 52 Avoid stack overflow lops; +#X obj 287 21 r \$0-stack-delay; +#X obj 219 307 ds-next; +#X msg 260 281 next; +#X obj 74 351 print set-lid; +#X obj 238 51 del 0; #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 5 0 21 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 7 0 15 6; +#X connect 7 1 19 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 connect 10 0 11 0; +#X connect 11 0 19 0; +#X connect 11 1 14 0; +#X connect 14 0 15 0; +#X connect 14 0 20 0; +#X connect 17 0 21 1; +#X connect 19 0 7 0; +#X connect 21 0 6 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; @@ -304,7 +327,7 @@ from the #define in msd sources.; #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 restore 112 428 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; @@ -362,13 +385,14 @@ from the #define in msd sources.; #X connect 23 0 20 0; #X connect 24 0 23 0; #X connect 25 0 23 1; -#X restore 112 441 pd set-min-max; +#X restore 112 468 pd set-min-max; #X text 283 344 <== messages coming from the data structure setters ; +#X obj 112 399 del 200; #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 0 12 0; #X connect 4 1 0 0; #X connect 4 3 2 0; #X connect 5 0 10 0; @@ -376,6 +400,7 @@ from the #define in msd sources.; #X connect 7 0 4 0; #X connect 8 0 1 0; #X connect 9 0 1 0; +#X connect 12 0 5 0; #X restore 30 343 pd generator; #N canvas 0 0 718 819 activate 0; #X obj 233 307 msd2D; @@ -492,71 +517,8 @@ create the physical model inside.; #X obj 147 265 print FromMSD; #X obj 147 210 r \$0-msd-out; #N canvas 0 0 578 686 setter 0; -#X obj 930 500 mass-set 31; -#X obj 900 500 mass-set 30; -#X obj 870 500 mass-set 29; -#X obj 840 500 mass-set 28; -#X obj 810 500 mass-set 27; -#X obj 780 500 mass-set 26; -#X obj 750 500 mass-set 25; -#X obj 720 500 mass-set 24; -#X obj 690 500 mass-set 23; -#X obj 660 500 mass-set 22; -#X obj 630 500 mass-set 21; -#X obj 600 500 mass-set 20; -#X obj 570 500 mass-set 19; -#X obj 540 500 mass-set 18; -#X obj 510 500 mass-set 17; -#X obj 480 500 mass-set 16; -#X obj 450 500 mass-set 15; -#X obj 420 500 mass-set 14; -#X obj 390 500 mass-set 13; -#X obj 360 500 mass-set 12; -#X obj 330 500 mass-set 11; -#X obj 300 500 mass-set 10; -#X obj 270 500 mass-set 9; -#X obj 240 500 mass-set 8; -#X obj 210 500 mass-set 7; -#X obj 180 500 mass-set 6; -#X obj 150 500 mass-set 5; -#X obj 120 500 mass-set 4; -#X obj 90 500 mass-set 3; -#X obj 60 500 mass-set 2; -#X obj 30 500 mass-set 1; -#X obj 0 500 mass-set 0; #X restore 521 67 pd setter; #N canvas 0 0 822 675 lsetter 0; -#X obj 0 500 link-set 15; -#X obj 30 500 link-set 23; -#X obj 60 500 link-set 7; -#X obj 90 500 link-set 27; -#X obj 120 500 link-set 11; -#X obj 150 500 link-set 19; -#X obj 180 500 link-set 3; -#X obj 210 500 link-set 29; -#X obj 240 500 link-set 13; -#X obj 270 500 link-set 21; -#X obj 300 500 link-set 5; -#X obj 330 500 link-set 25; -#X obj 360 500 link-set 9; -#X obj 390 500 link-set 17; -#X obj 420 500 link-set 1; -#X obj 450 500 link-set 30; -#X obj 480 500 link-set 14; -#X obj 510 500 link-set 22; -#X obj 540 500 link-set 6; -#X obj 570 500 link-set 26; -#X obj 600 500 link-set 10; -#X obj 630 500 link-set 18; -#X obj 660 500 link-set 2; -#X obj 690 500 link-set 28; -#X obj 720 500 link-set 12; -#X obj 750 500 link-set 20; -#X obj 780 500 link-set 4; -#X obj 810 500 link-set 24; -#X obj 840 500 link-set 8; -#X obj 870 500 link-set 16; -#X obj 900 500 link-set 0; #X restore 520 90 pd lsetter; #X text 504 43 Automatic scripting targets; #X text 23 46 You can ignore this stuff here \, unless something goes @@ -570,7 +532,7 @@ wrong.; #X msg 544 247 infosL; #X obj 143 363 spigot; #X obj 180 310 tgl 15 0 empty empty global-send 0 -6 0 8 -262144 -1 --1 1 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; @@ -598,6 +560,10 @@ wrong.; #X obj 625 117 s pd-lsetter; #X msg 531 346 massesForcesL; #X msg 630 225 massesPosYL; +#X obj 28 133 nbx 5 14 -1e+37 1e+37 0 0 \$0-delay-stack empty delay-stack +0 -6 0 10 -262144 -1 -1 0 256; +#X text 25 92 If you experience stack overflows \, try setting this +larger than 10; #X connect 1 0 0 0; #X connect 2 0 1 1; #X connect 3 0 1 0; @@ -638,12 +604,12 @@ metro \, to accelerate or slow down the simulation.; 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 630 176 576 613 forces 0; +#N canvas 423 517 576 613 forces 0; #X obj 295 415 s \$0-msd; #X obj 394 355 hsl 128 24 -5 5 0 1 empty empty empty -2 -6 0 8 -262144 -1 -1 6350 1; #X obj 295 230 vsl 24 128 -5 5 0 1 empty empty empty 0 -8 0 8 -262144 --1 -1 7550 1; +-1 -1 6350 1; #X msg 295 388 forceY id \$1; #X msg 391 388 forceX id \$1; #X obj 295 174 tgl 24 0 empty empty constant? 0 -6 0 8 -262144 -1 -1 @@ -702,11 +668,11 @@ masses will get created. Use this to mass-connect masses. :); #X connect 27 0 26 0; #X connect 29 0 28 0; #X restore 28 463 pd forces; -#X obj 254 524 tgl 15 0 \$0-gem-masses-on empty gem_m 0 -6 0 8 -233017 +#X obj 254 524 tgl 15 0 \$0-gem-masses-on empty gem_m 0 -6 0 8 -225280 -1 -1 0 1; -#X obj 296 524 tgl 15 0 \$0-gem-links-on empty gem_l 0 -6 0 8 -233017 +#X obj 296 524 tgl 15 0 \$0-gem-links-on empty gem_l 0 -6 0 8 -225271 -1 -1 0 1; -#N canvas 557 667 450 300 props 0; +#N canvas 779 673 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; @@ -786,10 +752,30 @@ from left to right. one2many will connect one mass to many others. First select the first mass \, then set the toggle to 1 \, after that select the other masses and set toggle to 0; #X obj 707 106 tgl 15 0 \$0-poll-ds \$0-poll-ds poll-ds 0 -6 0 8 -225280 --1 -1 0 1; +-1 -1 1 1; #X obj 765 106 tgl 15 0 \$0-set-ds \$0-set-ds set-ds 0 -6 0 8 -225271 --1 -1 0 1; +-1 -1 1 1; #X text 669 75 Data struct anim ON/OFF:; +#N canvas 504 489 531 315 TODO 0; +#X text 146 11 TODO :: IDEAS; +#X text 41 92 Make symbolic ids of new masses/links editable. For this +I need to add new fields \, probably called "sym" \, to masses and +links. They have to be floats for now (symbols in DS don't work yet). +Then [makefilename] symbolic ids of this.; +#X text 41 48 Save/load of MSD messages: Route [r \$0-msd] to a [textfile] +or [qlist]; +#X text 41 164 Related to that the props and forces subpatches should +be dynamic as well \, so that users can send messages to groups of +masses/links using the different symbolic names.; +#X restore 777 529 pd TODO; +#N canvas 307 452 509 305 NEWS 0; +#X text 42 52 Hopefully fixed the "stack overflows" when creating lots +of masses.; +#X text 32 24 RecentChanges; +#X text 39 90 Geos: Now it's possible to add masses in geometric formations: +rectangles (2d-networks) and circles (set center point \, radius and +number of masses).; +#X restore 777 508 pd NEWS; #X connect 2 0 6 0; #X connect 7 0 8 0; #X connect 7 1 9 0; diff --git a/msd2D/editor/msd_append.pd b/msd2D/editor/msd_append.pd index 71dd5b2..b8a6a1b 100644 --- a/msd2D/editor/msd_append.pd +++ b/msd2D/editor/msd_append.pd @@ -1,9 +1,9 @@ #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 16 29 bng 15 250 50 0 empty empty mass 0 -6 0 8 -1 -262144 -1 +#X obj 6 29 bng 15 250 50 0 empty empty mass 0 -6 0 8 -1 -262144 -1 ; -#X obj 54 29 bng 15 250 50 0 empty empty fix 0 -6 0 8 -258699 -1 -1 +#X obj 34 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; @@ -36,6 +36,8 @@ #X obj 553 254 s \$0-M; #X msg 552 224 100; #X obj 558 152 loadbang; +#X obj 21 135 r \$0-geos; +#X obj 252 77 r \$0-start-traverse; #X connect 0 0 24 5; #X connect 1 0 21 0; #X connect 2 0 0 0; @@ -66,15 +68,114 @@ #X connect 26 1 27 0; #X connect 28 0 27 0; #X connect 29 0 25 0; +#X connect 30 0 24 0; +#X connect 31 0 2 0; #X restore 105 79 pd guts; #X obj 126 6 inlet; #X obj 169 5 inlet; #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; +-22 8 0 10 -262144 -1 -1 0 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; +-1 -1 100 256; +#N canvas 379 246 663 624 geos 0; +#X obj 93 96 make_rect 100 100 30 30 10 10; +#X obj 123 162 s \$0-geos; +#X obj 93 188 s \$0-counter-bng; +#X obj 48 33 r \$0-make-rect; +#X msg 93 67 bang; +#N canvas 449 480 450 300 1016-geos 1; +#X obj 48 82 bng 24 250 50 0 \$0-make-rect empty make-rect 0 -6 0 8 +-24198 -1 -1; +#X floatatom 151 76 5 0 0 0 x0 - #0-x0; +#X floatatom 151 92 5 0 0 0 y0 - #0-y0; +#X floatatom 227 75 5 0 0 0 xgap - #0-xgap; +#X floatatom 227 91 5 0 0 0 ygap - #0-ygap; +#X floatatom 322 74 5 0 0 0 xsteps - #0-xsteps; +#X floatatom 322 90 5 0 0 0 ysteps - #0-ysteps; +#X text 46 18 Add various geometric forms; +#X text 38 46 Rectangle Networks:; +#X text 37 137 Circles:; +#X obj 52 172 bng 24 250 50 0 \$0-make-circ empty make-circ 0 -6 0 +8 -24198 -1 -1; +#X floatatom 145 166 5 0 0 0 x0 - #0-x0-circ; +#X floatatom 145 182 5 0 0 0 y0 - #0-y0-circ; +#X floatatom 251 166 5 0 0 0 radius - #0-radius; +#X floatatom 251 184 5 0 0 0 masses_# - #0-masses-circ; +#X text 107 266 All coords as used by data structs.; +#X restore 518 165 pd \$0-geos; +#X msg 519 125 \; \$1 vis 1; +#X obj 518 96 makefilename pd-%s; +#X obj 520 68 symbol \$0-geos; +#X msg 516 22 bang; +#X obj 48 66 t b b; +#X obj 78 226 s \$0-start-traverse; +#N canvas 0 0 930 534 1016-sixpack 0; +#X obj 250 282 r \$0-x0; +#X text 452 208 Args; +#X obj 320 310 sixpack --------------------; +#X obj 296 237 r \$0-y0; +#X obj 336 206 r \$0-xgap; +#X obj 376 185 r \$0-ygap; +#X obj 412 164 r \$0-xsteps; +#X obj 448 143 r \$0-ysteps; +#X obj 326 342 outlet; +#X connect 0 0 2 0; +#X connect 2 0 8 0; +#X connect 3 0 2 1; +#X connect 4 0 2 2; +#X connect 5 0 2 3; +#X connect 6 0 2 4; +#X connect 7 0 2 5; +#X restore 291 40 pd \$0-sixpack; +#X obj 93 128 t b a; +#X obj 524 45 r \$0-show-geos; +#X obj 63 322 r \$0-make-circ; +#N canvas 0 0 930 534 1016-fourpack 0; +#X text 452 208 Args; +#X obj 320 310 sixpack --------------------; +#X obj 319 390 outlet; +#X msg 319 349 \$1 \$2 \$3 \$4; +#X obj 252 282 r \$0-x0-circ; +#X obj 296 237 r \$0-y0-circ; +#X obj 376 185 r \$0-masses-circ; +#X obj 336 206 r \$0-radius; +#X connect 1 0 3 0; +#X connect 3 0 2 0; +#X connect 4 0 1 0; +#X connect 5 0 1 1; +#X connect 6 0 1 3; +#X connect 7 0 1 2; +#X restore 219 327 pd \$0-fourpack; +#X obj 136 441 s \$0-geos; +#X obj 106 467 s \$0-counter-bng; +#X obj 63 345 t b b; +#X obj 93 505 s \$0-start-traverse; +#X obj 106 407 t b a; +#X obj 63 370 make_circ 300 300 100 8; +#X connect 0 0 13 0; +#X connect 3 0 10 0; +#X connect 4 0 0 0; +#X connect 7 0 6 0; +#X connect 8 0 7 0; +#X connect 9 0 8 0; +#X connect 10 0 0 0; +#X connect 10 1 11 0; +#X connect 12 0 0 1; +#X connect 13 0 2 0; +#X connect 13 1 1 0; +#X connect 14 0 8 0; +#X connect 15 0 19 0; +#X connect 16 0 22 1; +#X connect 19 0 22 0; +#X connect 19 1 20 0; +#X connect 21 0 18 0; +#X connect 21 1 17 0; +#X connect 22 0 21 0; +#X restore 113 41 pd geos; +#X obj 59 29 bng 15 250 50 0 \$0-show-geos \$0-show-geos geos 0 -6 +0 8 -225271 -1 -1; #X connect 1 0 3 0; #X connect 2 0 3 1; #X connect 4 0 3 0; diff --git a/msd2D/editor/sixpack.pd b/msd2D/editor/sixpack.pd new file mode 100644 index 0000000..fd97eee --- /dev/null +++ b/msd2D/editor/sixpack.pd @@ -0,0 +1,31 @@ +#N canvas 519 499 450 300 10; +#X obj 143 51 inlet; +#X obj 91 51 inlet; +#X obj 141 72 t b f; +#X obj 191 51 inlet; +#X obj 189 72 t b f; +#X obj 238 50 inlet; +#X obj 236 71 t b f; +#X obj 148 222 outlet; +#X obj 287 49 inlet; +#X obj 285 70 t b f; +#X obj 334 48 inlet; +#X obj 332 69 t b f; +#X obj 148 179 pack 0 0 0 0 0 0; +#X connect 0 0 2 0; +#X connect 1 0 12 0; +#X connect 2 0 12 0; +#X connect 2 1 12 1; +#X connect 3 0 4 0; +#X connect 4 0 12 0; +#X connect 4 1 12 2; +#X connect 5 0 6 0; +#X connect 6 0 12 0; +#X connect 6 1 12 3; +#X connect 8 0 9 0; +#X connect 9 0 12 0; +#X connect 9 1 12 4; +#X connect 10 0 11 0; +#X connect 11 0 12 0; +#X connect 11 1 12 5; +#X connect 12 0 7 0; |