aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--msd.h116
-rw-r--r--msd2D/02_msd2Dadd.pd113
-rw-r--r--msd2D/help-msd2D.pd27
-rw-r--r--msd3D/help-msd3D.pd106
4 files changed, 239 insertions, 123 deletions
diff --git a/msd.h b/msd.h
index baeecd7..7c082bd 100644
--- a/msd.h
+++ b/msd.h
@@ -7,12 +7,11 @@
Written by Nicolas Montgermont for a Master's train in Acoustic,
Signal processing and Computing Applied to Music (ATIAM, Paris 6)
at La Kitchen supervised by Cyrille Henry.
-
+
+ ptimized by Thomas Grill for Flext
Based on Pure Data by Miller Puckette and others
- Use FLEXT C++ Layer by Thomas Grill (xovo@gmx.net)
Based on pmpd by Cyrille Henry
-
Contact : Nicolas Montgermont, montgermont@la-kitchen.fr
Cyrille Henry, Cyrille.Henry@la-kitchen.fr
@@ -336,7 +335,7 @@ protected:
IDMap<t_mass *> massids; // masses by name
t_float limit[N][2]; // Limit values
- unsigned int id_mass, id_link;
+ unsigned int id_mass, id_link, mouse_grab, nearest_mass;
// --------------------------------------------------------------- RESET
// ----------------------------------------------------------------------
@@ -505,6 +504,59 @@ protected:
inline void m_Ymax(int argc,t_atom *argv) { m_limit(argc,argv,1,1); }
inline void m_Zmax(int argc,t_atom *argv) { m_limit(argc,argv,2,1); }
+ void m_grab_mass(int argc,t_atom *argv)
+ {
+ // grab nearest mass X Y
+ t_mass **mi;
+ t_float aux, distance;
+ t_atom aux2[2];
+ bool mobil;
+
+ // if click
+ if (GetInt(argv[2])==1 && mass.size()>0) {
+
+ if (argc != 3)
+ error("grabMass : X Y click");
+ // first time we grab this mass?Find nearest mass
+ if (mouse_grab == 0) {
+ t_mass *m = mass.find(0);
+ aux = sqr(m->pos[0]-GetFloat(argv[0])) + sqr(m->pos[1]-GetFloat(argv[1]));
+ nearest_mass = 0;
+ for(typename IndexMap<t_mass *>::iterator mit(mass); mit; ++mit) {
+ distance = sqr(mit.data()->pos[0]-GetFloat(argv[0])) + sqr(mit.data()->pos[1]-GetFloat(argv[1]));
+ if (distance<aux) {
+ aux = distance;
+ nearest_mass = mit.data()->nbr;
+ }
+ }
+
+
+ }
+
+ // Set fixed if mobile
+ mobil = mass.find(nearest_mass)->M;
+ SetInt(aux2[0],nearest_mass);
+ if (mobil != 0)
+ m_set_fixe(1,aux2);
+
+ // Set XY
+ SetFloat(aux2[1],GetFloat(argv[0]));
+ m_posX(2,aux2);
+ SetFloat(aux2[1],GetFloat(argv[1]));
+ m_posY(2,aux2);
+
+ // Set mobile
+ if(mobil != 0)
+ m_set_mobile(1,aux2);
+
+ // Current grabbing on
+ mouse_grab = 1;
+ }
+ else
+ // Grabing off
+ mouse_grab = 0;
+ }
+
// -------------------------------------------------------------- LINKS
// ---------------------------------------------------------------------
@@ -794,6 +846,41 @@ protected:
ToOutAnything(0, S_massesPosL, sz*N, sortie);
DELARR(sortie);
}
+ // List of masses x positions on first outlet
+ void m_mass_dump_xl()
+ {
+ int sz = mass.size();
+ NEWARR(t_atom,sortie,sz);
+ t_atom *s = sortie;
+ for(typename IndexMap<t_mass *>::iterator mit(mass); mit; ++mit)
+ SetFloat(*(s++),mit.data()->pos[0]);
+ ToOutAnything(0, S_massesPosXL, sz, sortie);
+ DELARR(sortie);
+ }
+
+ // List of masses y positions on first outlet
+ void m_mass_dump_yl()
+ {
+ int sz = mass.size();
+ NEWARR(t_atom,sortie,sz);
+ t_atom *s = sortie;
+ for(typename IndexMap<t_mass *>::iterator mit(mass); mit; ++mit)
+ SetFloat(*(s++),mit.data()->pos[1]);
+ ToOutAnything(0, S_massesPosYL, sz, sortie);
+ DELARR(sortie);
+ }
+
+ // List of masses z positions on first outlet
+ void m_mass_dump_zl()
+ {
+ int sz = mass.size();
+ NEWARR(t_atom,sortie,sz);
+ t_atom *s = sortie;
+ for(typename IndexMap<t_mass *>::iterator mit(mass); mit; ++mit)
+ SetFloat(*(s++),mit.data()->pos[2]);
+ ToOutAnything(0, S_massesPosZL, sz, sortie);
+ DELARR(sortie);
+ }
// List of masses forces on first outlet
void m_force_dumpl()
@@ -831,7 +918,7 @@ private:
massids.reset();
mass.reset();
- id_mass = id_link = 0;
+ id_mass = id_link = mouse_grab = 0;
}
void deletelink(t_link *l)
@@ -887,6 +974,9 @@ private:
const static t_symbol *S_massesSpeedsNo;
const static t_symbol *S_massesSpeedsId;
const static t_symbol *S_massesPosL;
+ const static t_symbol *S_massesPosXL;
+ const static t_symbol *S_massesPosYL;
+ const static t_symbol *S_massesPosZL;
const static t_symbol *S_massesForcesL;
static void setup(t_classid c)
@@ -910,6 +1000,9 @@ private:
S_massesSpeedsNo = MakeSymbol("massesSpeedsNo");
S_massesSpeedsId = MakeSymbol("massesSpeedsId");
S_massesPosL = MakeSymbol("massesPosL");
+ S_massesPosXL = MakeSymbol("massesPosXL");
+ S_massesPosYL = MakeSymbol("massesPosYL");
+ S_massesPosZL = MakeSymbol("massesPosZL");
S_massesForcesL = MakeSymbol("massesForcesL");
// --- set up methods (class scope) ---
@@ -926,17 +1019,22 @@ private:
FLEXT_CADDMETHOD_(c,0,"posX",m_posX);
FLEXT_CADDMETHOD_(c,0,"Xmax",m_Xmax);
FLEXT_CADDMETHOD_(c,0,"Xmin",m_Xmin);
+ FLEXT_CADDMETHOD_(c,0,"massesPosL",m_mass_dumpl);
+ FLEXT_CADDMETHOD_(c,0,"massesPosXL",m_mass_dump_xl);
if(N >= 2) {
FLEXT_CADDMETHOD_(c,0,"forceY",m_forceY);
FLEXT_CADDMETHOD_(c,0,"posY",m_posY);
FLEXT_CADDMETHOD_(c,0,"Ymax",m_Ymax);
FLEXT_CADDMETHOD_(c,0,"Ymin",m_Ymin);
+ FLEXT_CADDMETHOD_(c,0,"massesPosYL",m_mass_dump_yl);
+ FLEXT_CADDMETHOD_(c,0,"grabMass",m_grab_mass);
}
if(N >= 3) {
FLEXT_CADDMETHOD_(c,0,"forceZ",m_forceZ);
FLEXT_CADDMETHOD_(c,0,"posZ",m_posZ);
FLEXT_CADDMETHOD_(c,0,"Zmax",m_Zmax);
FLEXT_CADDMETHOD_(c,0,"Zmin",m_Zmin);
+ FLEXT_CADDMETHOD_(c,0,"massesPosZL",m_mass_dump_zl);
}
FLEXT_CADDMETHOD_(c,0,"setMobile",m_set_mobile);
@@ -950,7 +1048,6 @@ private:
FLEXT_CADDMETHOD_(c,0,"get",m_get);
FLEXT_CADDMETHOD_(c,0,"deleteLink",m_delete_link);
FLEXT_CADDMETHOD_(c,0,"deleteMass",m_delete_mass);
- FLEXT_CADDMETHOD_(c,0,"massesPosL",m_mass_dumpl);
FLEXT_CADDMETHOD_(c,0,"infosL",m_info_dumpl);
FLEXT_CADDMETHOD_(c,0,"massesForcesL",m_force_dumpl);
}
@@ -958,6 +1055,9 @@ private:
// for every registered method a callback has to be declared
FLEXT_CALLBACK(m_bang)
FLEXT_CALLBACK(m_mass_dumpl)
+ FLEXT_CALLBACK(m_mass_dump_xl)
+ FLEXT_CALLBACK(m_mass_dump_yl)
+ FLEXT_CALLBACK(m_mass_dump_zl)
FLEXT_CALLBACK(m_info_dumpl)
FLEXT_CALLBACK(m_force_dumpl)
FLEXT_CALLBACK(m_reset)
@@ -984,6 +1084,7 @@ private:
FLEXT_CALLBACK_V(m_get)
FLEXT_CALLBACK_V(m_delete_link)
FLEXT_CALLBACK_V(m_delete_mass)
+ FLEXT_CALLBACK_V(m_grab_mass)
};
// -------------------------------------------------------------- STATIC VARIABLES
// -------------------------------------------------------------------------------
@@ -997,7 +1098,8 @@ const t_symbol \
*msdN<N>::S_linksPos,*msdN<N>::S_linksPosNo,*msdN<N>::S_linksPosId, \
*msdN<N>::S_massesForces,*msdN<N>::S_massesForcesNo,*msdN<N>::S_massesForcesId, \
*msdN<N>::S_massesSpeeds,*msdN<N>::S_massesSpeedsNo,*msdN<N>::S_massesSpeedsId, \
- *msdN<N>::S_massesPosL,*msdN<N>::S_massesForcesL; \
+ *msdN<N>::S_massesPosL,*msdN<N>::S_massesPosXL,*msdN<N>::S_massesPosYL, \
+ *msdN<N>::S_massesPosZL,*msdN<N>::S_massesForcesL; \
\
typedef msdN<N> CLASS; \
FLEXT_NEW_V(NAME,CLASS)
diff --git a/msd2D/02_msd2Dadd.pd b/msd2D/02_msd2Dadd.pd
index 549c132..95c6173 100644
--- a/msd2D/02_msd2Dadd.pd
+++ b/msd2D/02_msd2Dadd.pd
@@ -10,7 +10,7 @@
#X msg 511 526 0 \, destroy;
#X obj 481 320 gemhead;
#X obj 481 343 world_light;
-#N canvas 177 95 946 729 synthese 1;
+#N canvas 177 95 946 729 synthese 0;
#X obj 267 9 inlet;
#X msg -35 224 \$1 50;
#X obj -35 246 line~;
@@ -223,42 +223,41 @@
#X msg 155 258 Xmax 100 \, Xmin 0 \, Ymax 100 \, Ymin 0;
#X msg 511 503 reset \, create \, lighting 1 \, 1;
#X obj 52 399 t b;
-#N canvas 643 123 605 590 massrender 1;
+#N canvas 643 123 605 590 massrender 0;
#X obj 127 22 inlet;
-#X obj 48 230 translateXYZ;
-#X obj 48 321 sphere 0.1;
-#X obj 127 86 / 12.5;
-#X obj 127 109 - 4;
-#X obj 192 87 / 12.5;
-#X obj 192 110 - 4;
-#X obj 64 114 gemhead;
-#X obj 48 204 separator;
-#X obj 48 180 any;
+#X obj 62 231 translateXYZ;
+#X obj 141 87 / 12.5;
+#X obj 141 110 - 4;
+#X obj 206 88 / 12.5;
+#X obj 206 111 - 4;
+#X obj 78 115 gemhead;
+#X obj 62 205 separator;
+#X obj 62 181 any;
#X obj 127 57 unpack f f f;
-#X obj 48 283 color 1 1 1;
-#X msg 171 224 1 \$1 \$1;
-#X obj 171 202 / 29;
-#X obj 127 136 t b f b;
-#X obj 171 177 f;
-#X connect 0 0 10 0;
-#X connect 1 0 11 0;
-#X connect 3 0 4 0;
-#X connect 4 0 14 0;
-#X connect 5 0 6 0;
-#X connect 6 0 1 2;
-#X connect 7 0 9 1;
-#X connect 8 0 1 0;
-#X connect 9 0 8 0;
-#X connect 10 0 15 1;
-#X connect 10 1 3 0;
-#X connect 10 2 5 0;
-#X connect 11 0 2 0;
-#X connect 12 0 11 1;
-#X connect 13 0 12 0;
-#X connect 14 0 9 0;
-#X connect 14 1 1 1;
-#X connect 14 2 15 0;
-#X connect 15 0 13 0;
+#X obj 185 178 f;
+#X msg 185 241 \$1;
+#X obj 141 137 t b b f;
+#X obj 185 221 / 99;
+#X obj 185 199 - 29;
+#X obj 62 322 sphere 0.1;
+#X connect 0 0 9 0;
+#X connect 1 0 15 0;
+#X connect 2 0 3 0;
+#X connect 3 0 12 0;
+#X connect 4 0 5 0;
+#X connect 5 0 1 2;
+#X connect 6 0 8 1;
+#X connect 7 0 1 0;
+#X connect 8 0 7 0;
+#X connect 9 0 10 1;
+#X connect 9 1 2 0;
+#X connect 9 2 4 0;
+#X connect 10 0 14 0;
+#X connect 12 0 10 0;
+#X connect 12 1 8 0;
+#X connect 12 2 1 1;
+#X connect 13 0 11 0;
+#X connect 14 0 13 0;
#X restore 141 657 pd massrender;
#N canvas 284 227 587 558 linkrender 0;
#X obj 93 25 inlet;
@@ -280,13 +279,14 @@
#X obj 207 193 pack f f;
#X msg 207 216 \$1 \$2 0;
#X obj 93 69 unpack f f f f f;
+#X obj 44 244 colorRGB 1 1 1;
#X connect 0 0 18 0;
#X connect 1 0 2 0;
#X connect 2 0 8 0;
#X connect 3 0 4 0;
#X connect 4 0 14 1;
#X connect 5 0 7 1;
-#X connect 6 0 9 0;
+#X connect 6 0 19 0;
#X connect 7 0 6 0;
#X connect 8 0 7 0;
#X connect 8 1 14 0;
@@ -302,6 +302,7 @@
#X connect 18 2 3 0;
#X connect 18 3 10 0;
#X connect 18 4 12 0;
+#X connect 19 0 9 0;
#X restore 52 678 pd linkrender;
#X msg 221 231 mass mob 1 \$1 \$2 \$3;
#X obj 393 181 random 100;
@@ -321,8 +322,7 @@
#X obj 79 229 f -1;
#X obj 70 317 pack f f;
#X obj 173 148 t b b b;
-#X msg 129 350 link souple \$1 \$2 100 0.5 0.5;
-#X obj 52 379 gemhead;
+#X obj 52 358 gemhead;
#X obj 511 547 gemwin;
#X obj 52 628 route linksPos massesPos massesSpeedsNo;
#X msg 71 498 forceX mob -200;
@@ -332,7 +332,6 @@
#X text 175 41 Reset;
#X text 484 171 Random positions and masses;
#X text 370 502 1 Create window -->;
-#X text 405 643 3 Drag mouse;
#X text 196 484 Add force;
#X msg 522 585 \; pd dsp 1;
#X text 396 591 2 SET DSP ON -->;
@@ -362,26 +361,27 @@
#X msg 295 518 grabMass \$1 \$2 \$3;
#X obj 173 126 repeat 30;
#X obj 79 187 repeat 29;
+#X msg 129 348 link souple \$1 \$2 10 0.5 0.5;
#X connect 0 0 6 0;
#X connect 1 0 4 0;
#X connect 2 0 0 0;
#X connect 3 0 4 0;
-#X connect 4 0 52 0;
+#X connect 4 0 50 0;
#X connect 4 1 12 0;
-#X connect 4 2 51 0;
+#X connect 4 2 49 0;
#X connect 4 4 2 0;
#X connect 4 4 31 0;
#X connect 4 4 23 0;
#X connect 4 4 19 0;
#X connect 4 4 22 0;
-#X connect 6 0 38 0;
+#X connect 6 0 37 0;
#X connect 6 1 5 0;
-#X connect 7 0 37 0;
+#X connect 7 0 36 0;
#X connect 8 0 9 0;
-#X connect 11 0 49 0;
+#X connect 11 0 47 0;
#X connect 12 0 0 0;
-#X connect 13 0 37 0;
-#X connect 14 0 40 0;
+#X connect 13 0 36 0;
+#X connect 14 0 39 0;
#X connect 17 0 0 0;
#X connect 18 0 25 2;
#X connect 19 0 18 0;
@@ -401,18 +401,19 @@
#X connect 30 1 28 0;
#X connect 31 0 32 1;
#X connect 32 0 27 0;
-#X connect 33 0 35 0;
+#X connect 33 0 51 0;
#X connect 34 0 21 0;
#X connect 34 1 20 0;
#X connect 34 2 18 0;
-#X connect 35 0 0 0;
-#X connect 36 0 14 0;
-#X connect 38 1 15 0;
-#X connect 38 2 10 0;
+#X connect 35 0 14 0;
+#X connect 37 0 16 0;
+#X connect 37 1 15 0;
+#X connect 37 2 10 0;
+#X connect 38 0 6 0;
#X connect 39 0 6 0;
#X connect 40 0 6 0;
-#X connect 41 0 6 0;
-#X connect 49 0 50 0;
-#X connect 50 0 6 0;
-#X connect 51 0 34 0;
-#X connect 52 0 26 0;
+#X connect 47 0 48 0;
+#X connect 48 0 6 0;
+#X connect 49 0 34 0;
+#X connect 50 0 26 0;
+#X connect 51 0 0 0;
diff --git a/msd2D/help-msd2D.pd b/msd2D/help-msd2D.pd
index 67071b9..f40ee81 100644
--- a/msd2D/help-msd2D.pd
+++ b/msd2D/help-msd2D.pd
@@ -1,5 +1,5 @@
#N canvas 0 0 478 397 10;
-#N canvas 271 52 742 843 masses 0;
+#N canvas 289 25 787 879 masses 0;
#X obj 62 154 cnv 15 610 180 empty empty CREATION 20 12 0 14 -262131
-66577 0;
#X msg 79 183 reset;
@@ -20,23 +20,23 @@
#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
+#X obj 61 617 cnv 15 610 230 empty empty GET_ATTRIBUTES 20 12 0 14
-261689 -66577 0;
#X msg 147 644 massePosL;
-#X msg 147 672 masseForcesL;
+#X msg 147 694 masseForcesL;
#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
+#X text 247 695 output all masses forces in a list on outlet No 1;
+#X msg 146 732 get \$1 \$2;
+#X text 249 733 Get specific attribute;
+#X text 249 758 \$1 : Attribute type ( massesPos / massesSpeeds / massesForces
/ linksPos );
-#X text 249 773 \$2 : Id (symbol or creations numbers);
+#X text 249 795 \$2 : Id (symbol or creations numbers);
#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 144 815 infosL;
+#X text 247 815 Get infos on all masses and links on outlet No 2;
#X text 347 555 \$1 : Value;
#X text 73 22 MASSES :;
#X text 66 69 They got only one physical parameter \, the value of
@@ -60,6 +60,10 @@ their;
#X text 334 271 \$4 \, \$5 : initial position;
#X text 350 449 \$1 : Id (symbol) or No;
#X text 348 503 \$1 : Id (symbol) or No;
+#X msg 68 668 massePosXL;
+#X msg 147 669 massePosYL;
+#X text 248 669 output all masses x/y position in a list on outlet
+No 1;
#X connect 1 0 44 0;
#X connect 8 0 44 0;
#X connect 13 0 44 0;
@@ -72,7 +76,8 @@ their;
#X connect 38 0 44 0;
#X connect 41 0 44 0;
#X connect 46 0 44 0;
-#X restore 221 312 pd masses;
+#X connect 50 0 44 0;
+#X restore 222 312 pd masses;
#X text 75 312 HELP on masses --->;
#X text 74 343 HELP on links --->;
#X text 13 117 There are 4 types of messages for msd :;
diff --git a/msd3D/help-msd3D.pd b/msd3D/help-msd3D.pd
index 547aad7..21f6a71 100644
--- a/msd3D/help-msd3D.pd
+++ b/msd3D/help-msd3D.pd
@@ -1,43 +1,43 @@
-#N canvas 0 0 467 396 10;
-#N canvas 271 52 742 843 masses 0;
-#X obj 62 154 cnv 15 610 180 empty empty CREATION 20 12 0 14 -262131
+#N canvas 369 233 467 396 10;
+#N canvas 271 52 742 855 masses 0;
+#X obj 62 132 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
+#X msg 79 161 reset;
+#X text 249 192 Add a mass;
+#X text 335 193 \$1 : Id (symbol);
+#X text 334 213 \$2 : fixed or mobile (0/1);
+#X text 334 231 \$3 : mass;
+#X text 251 162 Delete all masses and links;
+#X obj 62 316 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
+#X msg 82 345 bang;
+#X text 235 345 Compute new masses positions;
+#X obj 61 381 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 82 480 forceX \$1 \$2;
-#X obj 61 617 cnv 15 610 198 empty empty GET_ATTRIBUTES 20 12 0 14
+#X text 350 445 \$2 : New value;
+#X text 348 499 \$2 : New value;
+#X msg 87 407 posX \$1 \$2;
+#X text 350 409 Set position of mass(es);
+#X text 347 464 Add force on mass(es);
+#X msg 82 458 forceX \$1 \$2;
+#X obj 61 595 cnv 15 610 245 empty empty GET_ATTRIBUTES 20 12 0 14
-261689 -66577 0;
-#X msg 147 644 massePosL;
-#X msg 147 672 masseForcesL;
-#X text 248 644 output all masses positions in a list on outlet No
+#X msg 147 622 massePosL;
+#X msg 146 696 masseForcesL;
+#X text 248 622 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
+#X text 246 697 output all masses forces in a list on outlet No 1;
+#X msg 145 734 get \$1 \$2;
+#X text 248 735 Get specific attribute;
+#X text 248 760 \$1 : Attribute type ( massesPos / massesSpeeds / massesForces
/ linksPos );
-#X text 249 773 \$2 : Id (symbol or creations numbers);
-#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 text 347 555 \$1 : Value;
+#X text 248 797 \$2 : Id (symbol or creations numbers);
+#X msg 79 268 deleteMass \$1;
+#X text 248 270 Delete a mass and associated links;
+#X text 338 287 \$1 : Creation No of mass;
+#X msg 143 817 infosL;
+#X text 246 817 Get infos on all masses and links on outlet No 2;
+#X text 347 533 \$1 : Value;
#X text 73 22 MASSES :;
#X text 66 69 They got only one physical parameter \, the value of
their;
@@ -48,21 +48,26 @@ their;
#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 578 setMobile \$1 \, setFixed \$1;
-#X text 345 578 Change mobile parameter;
-#X text 345 594 \$1 : Creation No of mass;
-#X msg 166 429 posY \$1 \$2;
-#X msg 174 480 forceY \$1 \$2;
-#X text 347 538 Set minimimum and maximum X \, Y of masses;
-#X msg 83 525 Xmin \$1 \, Xmax \$1 \, Ymin \$1 \, Ymax \$1;
-#X msg 79 214 mass \$1 \$2 \$3 \$4 \$5 \$6;
-#X text 334 271 \$4 \, \$5 \, \$6 : initial position;
-#X msg 246 429 posZ \$1 \$2;
-#X msg 83 503 forceZ \$1 \$2;
-#X msg 83 548 Zmin \$1 \, Zmax \$1;
+#X msg 81 556 setMobile \$1 \, setFixed \$1;
+#X text 345 556 Change mobile parameter;
+#X text 345 572 \$1 : Creation No of mass;
+#X msg 166 407 posY \$1 \$2;
+#X msg 174 458 forceY \$1 \$2;
+#X text 347 516 Set minimimum and maximum X \, Y of masses;
+#X msg 83 503 Xmin \$1 \, Xmax \$1 \, Ymin \$1 \, Ymax \$1;
+#X msg 79 192 mass \$1 \$2 \$3 \$4 \$5 \$6;
+#X text 334 249 \$4 \, \$5 \, \$6 : initial position;
+#X msg 246 407 posZ \$1 \$2;
+#X msg 83 481 forceZ \$1 \$2;
+#X msg 83 526 Zmin \$1 \, Zmax \$1;
#X obj 33 821 msd3D;
-#X text 350 449 \$1 : Id (symbol) or No;
-#X text 348 503 \$1 : Id (symbol) or No;
+#X text 350 427 \$1 : Id (symbol) or No;
+#X text 348 481 \$1 : Id (symbol) or No;
+#X text 247 648 output all masses x/y/z positions in a list on outlet
+No 1;
+#X msg 146 648 massePosYL;
+#X msg 147 670 massePosZL;
+#X msg 67 648 massePosXL;
#X connect 1 0 50 0;
#X connect 8 0 50 0;
#X connect 13 0 50 0;
@@ -75,7 +80,10 @@ their;
#X connect 38 0 50 0;
#X connect 44 0 50 0;
#X connect 45 0 50 0;
-#X restore 158 305 pd masses;
+#X connect 54 0 50 0;
+#X connect 55 0 50 0;
+#X connect 56 0 50 0;
+#X restore 159 305 pd masses;
#X text 12 305 HELP on masses --->;
#X text 11 336 HELP on links --->;
#X text -50 110 There are 4 types of messages for msd :;