diff options
author | Cyrille Henry <nusmuk@users.sourceforge.net> | 2011-02-23 16:49:54 +0000 |
---|---|---|
committer | Cyrille Henry <nusmuk@users.sourceforge.net> | 2011-02-23 16:49:54 +0000 |
commit | f5ddb1ea5822abb54922fb9d19c5624c2a583b68 (patch) | |
tree | 406f7e35364c026469e879503972270a7e719de0 | |
parent | 463fdb985d6be2c4875aff2d8c5febb0e69d875a (diff) |
adding pmpd, pmpd2d and pmpd3d examples
svn path=/trunk/externals/pmpd/; revision=14954
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | examples/50_simple_oscilator~.pd (renamed from examples/50-simple_oscilator~.pd) | 0 | ||||
-rw-r--r-- | examples/52_pmpd_test.pd | 92 | ||||
-rw-r--r-- | examples/53_pmpd_string.pd | 336 | ||||
-rw-r--r-- | examples/54_pmpd_wave.pd | 231 | ||||
-rw-r--r-- | examples/55_pmpd2d_test.pd | 167 | ||||
-rw-r--r-- | examples/56_pmpd2d_additive.pd | 463 | ||||
-rw-r--r-- | examples/57_pmpd2d_ball.pd | 157 | ||||
-rw-r--r-- | examples/58_pmpd2d_gravitation.pd | 213 | ||||
-rw-r--r-- | examples/59_pmpd2d_sand.pd | 303 | ||||
-rw-r--r-- | examples/sound_sable.pd | 67 |
11 files changed, 2031 insertions, 2 deletions
@@ -12,7 +12,7 @@ SOURCES = iAmbient2D.c iAmbient3D.c iCircle2D.c iCircle3D.c iCylinder3D.c iLine2 PDOBJECTS = # example patches and related files, in the 'examples' subfolder -EXAMPLES = 00_pmpd.pd 01_basics.pd 02_string.pd 03_chaos2D.pd 04_3D_exemple.pd 05_corde2D.pd 06_pyramide3D.pd 07_corde3D.pd 08_ball2D.pd 09_tutorial2D.pd 10_game.pd 11_comportement.pd 12_exitation.pd 13_plane3D.pd 14_MP_curve3d.pd 15_constant_force_field.pd 16_name_and_interactors.pd 17_rnd_mouvmnt_and_obstacles.pd 18_flipper.pd 19_vertex.pd 20_moving_vertex.pd 21_fluid_circulation_cylinder.pd 22_gaz_molecules.pd 23_test.pd 24_sand.pd 25_sand2.pd 26_sand3.pd 27_tLia.pd 28_Lia.pd 29_aglom.pd 30_falling_aglom.pd 31_paste.pd 32_Kelvin_Helmoltz_instability.pd 33_vorticity_ellipse.pd 34_cigarette_smoke.pd 35_gravitation.pd 36_3D_interactors.pd 37_hollywood_planette_explosion.pd 38_elastique_membrane_on_a_sphere.pd 39_blob.pd 40_i3D.pd 41_morfing.pd 42_tentacule.pd 43_game.pd 44_flag.pd 45_newWave.pd 46_non_linear.pd 47_scann_synth.pd 48_pmpd.pd 49_pmpd~.pd 50-simple_oscilator~.pd 51_string~.pd aglom.pd aglom2.pd aglom3.pd aglom4.pd blob.pd ch_gemwin.pd ch_uzi.pd constructor.pd explose1.pd explose2.pd fluide_mass.pd fluide_mass2.pd fluide_mass3.pd fluide_mass4.pd fluide_mass5.pd fluide_mass6.pd fluide_masse.pd fluide_masse2.pd fluide_masse3.pd fluide_masse4.pd fluide_masse5.pd fluide_masse6.pd game_line.pd gemLia.pd gemLia2.pd gemMasse.pd gemMasse2.pd gemMasse3.pd i3D.pd i3D2.pd mass_link.pd mass_link2.pd mass_link3.pd mountain.pd pd_lia.pd pd_lia2.pd pd_link.pd pd_link2.pd pd_mass.pd pd_mass2.pd pd_masse.pd pd_masse2.pd rain.pd rain1.pd sand.pd smoke.pd smoke1.pd smoke_vortex.pd tut_link.pd tut_mass.pd tut_masse.pd vortex.pd vortex2.pd +EXAMPLES = 00_pmpd.pd 01_basics.pd 02_string.pd 03_chaos2D.pd 04_3D_exemple.pd 05_corde2D.pd 06_pyramide3D.pd 07_corde3D.pd 08_ball2D.pd 09_tutorial2D.pd 10_game.pd 11_comportement.pd 12_exitation.pd 13_plane3D.pd 14_MP_curve3d.pd 15_constant_force_field.pd 16_name_and_interactors.pd 17_rnd_mouvmnt_and_obstacles.pd 18_flipper.pd 19_vertex.pd 20_moving_vertex.pd 21_fluid_circulation_cylinder.pd 22_gaz_molecules.pd 23_test.pd 24_sand.pd 25_sand2.pd 26_sand3.pd 27_tLia.pd 28_Lia.pd 29_aglom.pd 30_falling_aglom.pd 31_paste.pd 32_Kelvin_Helmoltz_instability.pd 33_vorticity_ellipse.pd 34_cigarette_smoke.pd 35_gravitation.pd 36_3D_interactors.pd 37_hollywood_planette_explosion.pd 38_elastique_membrane_on_a_sphere.pd 39_blob.pd 40_i3D.pd 41_morfing.pd 42_tentacule.pd 43_game.pd 44_flag.pd 45_newWave.pd 46_non_linear.pd 47_scann_synth.pd 48_pmpd.pd 49_pmpd~.pd 50_simple_oscilator~.pd 51_string~.pd 52_pmpd_test.pd 53_pmpd_string.pd 54_pmpd_wave.pd 55_pmpd2d_test.pd 56_pmpd2d_additive.pd 57_pmpd2d_ball.pd 58_pmpd2d_gravitation.pd 59_pmpd2d_sand.pd aglom.pd aglom2.pd aglom3.pd aglom4.pd blob.pd ch_gemwin.pd ch_uzi.pd constructor.pd explose1.pd explose2.pd fluide_mass.pd fluide_mass2.pd fluide_mass3.pd fluide_mass4.pd fluide_mass5.pd fluide_mass6.pd fluide_masse.pd fluide_masse2.pd fluide_masse3.pd fluide_masse4.pd fluide_masse5.pd fluide_masse6.pd game_line.pd gemLia.pd gemLia2.pd gemMasse.pd gemMasse2.pd gemMasse3.pd i3D.pd i3D2.pd mass_link.pd mass_link2.pd mass_link3.pd mountain.pd pd_lia.pd pd_lia2.pd pd_link.pd pd_link2.pd pd_mass.pd pd_mass2.pd pd_masse.pd pd_masse2.pd rain.pd rain1.pd sand.pd smoke.pd smoke1.pd smoke_vortex.pd tut_link.pd tut_mass.pd tut_masse.pd vortex.pd vortex2.pd sound_sable.pd # manuals and related files, in the 'manual' subfolder MANUAL = pmpd.pdf pmpd.sxw @@ -21,7 +21,7 @@ MANUAL = pmpd.pdf pmpd.sxw # list them here. This can be anything from header files, test patches, # documentation, etc. README.txt and LICENSE.txt are required and therefore # automatically included -EXTRA_DIST = pmpd.c pmpd-help.pd +EXTRA_DIST = diff --git a/examples/50-simple_oscilator~.pd b/examples/50_simple_oscilator~.pd index 6abe3d9..6abe3d9 100644 --- a/examples/50-simple_oscilator~.pd +++ b/examples/50_simple_oscilator~.pd diff --git a/examples/52_pmpd_test.pd b/examples/52_pmpd_test.pd new file mode 100644 index 0000000..c231d97 --- /dev/null +++ b/examples/52_pmpd_test.pd @@ -0,0 +1,92 @@ +#N canvas 392 22 616 594 10; +#X obj 20 33 loadbang; +#X obj 401 197 print msd; +#X obj 309 58 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 +; +#X text 329 56 ON / OFF; +#X obj 33 55 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X msg 83 113 reset; +#X msg 35 229 Xmax 100 \, Xmin 0; +#X msg 128 372 setD souple 0.01; +#X msg 18 371 setK souple 1; +#X msg 128 394 setD souple 1; +#X msg 18 393 setK souple 2; +#X obj 331 392 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 6350 1; +#X obj 354 392 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 6350 1; +#X obj 308 392 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 6350 1; +#X msg 308 538 posX fix \$1; +#X obj 401 392 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 6350 1; +#X obj 377 392 vsl 15 128 0 100 0 0 empty empty empty 0 -8 0 8 -262144 +-1 -1 6350 1; +#X msg 20 256 0 1 \, 1 2 \, 2 3 \, 3 4; +#X obj 308 347 unpack f f f f f; +#X obj 308 325 route massesPosL; +#X msg 309 103 bang \, massesPosL; +#X msg 20 278 link souple \$1 \$2 10 10; +#X obj 309 31 loadbang; +#X obj 20 77 t b b b b b; +#X text 50 55 reset; +#X text 18 10 creation : 5 masses and 4 links; +#X text 308 10 compute and get masses positions; +#X text 16 349 set rigidity and viscosity of links; +#X text 17 452 add force on all mobile masses; +#X text 443 440 move first slider; +#X text 429 453 to move the fixed mass; +#X msg 19 503 forceX mob 300; +#X msg 19 479 forceX mob -300; +#X text 307 279 display and interaction; +#X msg 51 201 mass mob 1 100 50; +#X msg 51 159 4; +#X obj 51 180 until; +#X msg 67 139 mass fix 0 100 50; +#X obj 309 167 pmpd; +#X obj 83 314 s \$0-pmpdin; +#X obj 19 421 s \$0-pmpdin; +#X obj 18 530 s \$0-pmpdin; +#X obj 319 138 r \$0-pmpdin; +#X obj 309 197 s \$0-pmpdout; +#X obj 308 302 r \$0-pmpdout; +#X obj 308 560 s \$0-pmpdin; +#X obj 309 80 metro 20; +#X text 23 566 COPYRIGHT : Nicolas Montgermont 2010; +#X connect 0 0 23 0; +#X connect 2 0 46 0; +#X connect 4 0 23 0; +#X connect 5 0 39 0; +#X connect 6 0 39 0; +#X connect 7 0 40 0; +#X connect 8 0 40 0; +#X connect 9 0 40 0; +#X connect 10 0 40 0; +#X connect 13 0 14 0; +#X connect 14 0 45 0; +#X connect 17 0 21 0; +#X connect 18 0 13 0; +#X connect 18 1 11 0; +#X connect 18 2 12 0; +#X connect 18 3 16 0; +#X connect 18 4 15 0; +#X connect 19 0 18 0; +#X connect 20 0 38 0; +#X connect 21 0 39 0; +#X connect 22 0 2 0; +#X connect 23 0 17 0; +#X connect 23 1 6 0; +#X connect 23 2 35 0; +#X connect 23 3 37 0; +#X connect 23 4 5 0; +#X connect 31 0 41 0; +#X connect 32 0 41 0; +#X connect 34 0 39 0; +#X connect 35 0 36 0; +#X connect 36 0 34 0; +#X connect 37 0 39 0; +#X connect 38 0 43 0; +#X connect 42 0 38 0; +#X connect 44 0 19 0; +#X connect 46 0 20 0; diff --git a/examples/53_pmpd_string.pd b/examples/53_pmpd_string.pd new file mode 100644 index 0000000..59c5a50 --- /dev/null +++ b/examples/53_pmpd_string.pd @@ -0,0 +1,336 @@ +#N canvas 518 31 620 260 10; +#X obj 24 54 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262131 -1 +-1; +#X text 49 54 reset; +#N canvas 0 22 610 333 creation_structure 0; +#X obj 52 15 loadbang; +#X obj 135 20 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262131 -1 +-1; +#X msg 193 65 reset; +#X text 173 21 reset; +#N canvas 77 152 608 525 masses 0; +#X obj 109 15 inlet; +#X obj 112 338 outlet; +#X obj 200 343 print; +#X obj 112 64 t b b b b; +#X obj 150 158 until 17; +#X msg 150 184 mass corde 1 50 0; +#X msg 112 276 mass zero 0 1 0; +#X msg 150 134 80; +#X text 232 275 masse nulle pour l'amortissement general; +#X text 302 90 extremite gauche no 0; +#X text 283 184 masses mobiles no 1->80; +#X text 278 220 extremite droite no 81; +#X msg 170 89 mass corde 0 100 0; +#X msg 131 218 mass corde 0 100 0; +#X connect 0 0 3 0; +#X connect 3 0 6 0; +#X connect 3 1 13 0; +#X connect 3 2 7 0; +#X connect 3 3 12 0; +#X connect 4 0 5 0; +#X connect 5 0 1 0; +#X connect 6 0 1 0; +#X connect 7 0 4 0; +#X connect 12 0 1 0; +#X connect 13 0 1 0; +#X restore 173 87 pd masses; +#N canvas 579 114 813 597 link 0; +#X obj 157 35 inlet; +#X obj 185 490 outlet; +#X msg 176 320 link souple \$1 \$2 10 10; +#X obj 236 210 + 1; +#X obj 176 293 pack f f; +#X obj 253 493 print; +#X obj 176 241 t f f f; +#X obj 176 212 f 0; +#X obj 157 64 t b b b b; +#X text 305 254 liens entre les masses mobiles; +#X text 384 406 tlink qui fait un amortissement vertical general; +#X obj 386 323 s rigidite; +#X msg 386 300 10; +#X msg 157 403 link D2 zero corde 0 0; +#X msg 266 169 0; +#X obj 203 269 + 1; +#X obj 176 188 until; +#X floatatom 267 251 5 0 0 0 - - -; +#X msg 176 165 81; +#X obj 467 324 s amort; +#X connect 0 0 8 0; +#X connect 2 0 1 0; +#X connect 3 0 7 1; +#X connect 4 0 2 0; +#X connect 6 0 4 0; +#X connect 6 1 15 0; +#X connect 6 2 3 0; +#X connect 7 0 6 0; +#X connect 7 0 17 0; +#X connect 8 0 12 0; +#X connect 8 0 13 0; +#X connect 8 1 18 0; +#X connect 8 2 14 0; +#X connect 12 0 11 0; +#X connect 12 0 19 0; +#X connect 13 0 1 0; +#X connect 14 0 7 1; +#X connect 15 0 4 1; +#X connect 16 0 7 0; +#X connect 18 0 16 0; +#X restore 154 111 pd link; +#X obj 135 42 t b b b b; +#X text 252 82 CREATION : 2 masses fixes (fix) \, 80 mobiles (corde) +\, 80 liens (souple) \, 78 tLink (D2); +#X msg 135 132 Xmax 100 \, Xmin -100; +#X obj 247 23 inlet; +#X obj 121 213 loadbang; +#X obj 121 237 s load; +#X obj 135 160 s \$0-pmpdin; +#X connect 0 0 6 0; +#X connect 1 0 6 0; +#X connect 2 0 12 0; +#X connect 4 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 8 0; +#X connect 6 1 5 0; +#X connect 6 2 4 0; +#X connect 6 3 2 0; +#X connect 8 0 12 0; +#X connect 9 0 6 0; +#X connect 10 0 11 0; +#X restore 24 76 pd creation_structure; +#N canvas 508 227 516 328 compute 0; +#X obj 27 30 gemhead; +#N canvas 735 244 537 479 corde 0; +#X obj 139 41 inlet; +#X obj 81 333 translateXYZ; +#X obj 139 167 / 12.5; +#X obj 139 190 - 4; +#X obj 81 307 separator; +#X obj 139 238 t b f; +#X obj 81 273 gemhead 45; +#X obj 204 188 / 0.2; +#X obj 139 106 unpack f f; +#X msg 81 238 0; +#X obj 81 213 loadbang; +#X obj 81 369 color 1 1 1; +#X obj 139 139 + 10; +#X obj 81 398 cube 0.02; +#X obj 139 80 route 82; +#X connect 0 0 14 0; +#X connect 1 0 11 0; +#X connect 2 0 3 0; +#X connect 3 0 5 0; +#X connect 4 0 1 0; +#X connect 5 0 6 0; +#X connect 5 1 1 1; +#X connect 6 0 4 0; +#X connect 7 0 1 2; +#X connect 8 0 12 0; +#X connect 8 1 7 0; +#X connect 9 0 6 0; +#X connect 10 0 9 0; +#X connect 11 0 13 0; +#X connect 12 0 2 0; +#X connect 14 1 8 0; +#X restore 27 252 pd corde; +#N canvas 643 123 605 590 vitesse 0; +#X obj 127 22 inlet; +#X obj 62 333 translateXYZ; +#X obj 129 200 / 12.5; +#X obj 129 223 - 4; +#X obj 62 307 separator; +#X obj 129 250 t b f; +#X obj 62 280 gemhead 45; +#X obj 62 398 cube 0.01; +#X obj 431 25 inlet; +#X obj 236 46 spigot; +#X obj 195 216 + 2; +#X obj 78 81 route 82; +#X obj 129 107 unpack f f; +#X obj 62 232 loadbang; +#X msg 62 256 0; +#X obj 129 172 + 10; +#X obj 195 193 * 200; +#X obj 62 369 color 1 0 0; +#X connect 0 0 9 0; +#X connect 1 0 17 0; +#X connect 2 0 3 0; +#X connect 3 0 5 0; +#X connect 4 0 1 0; +#X connect 5 0 6 0; +#X connect 5 1 1 1; +#X connect 6 0 4 0; +#X connect 8 0 9 1; +#X connect 9 0 11 0; +#X connect 10 0 1 2; +#X connect 11 1 12 0; +#X connect 12 0 15 0; +#X connect 12 1 16 0; +#X connect 13 0 14 0; +#X connect 14 0 6 0; +#X connect 15 0 2 0; +#X connect 16 0 10 0; +#X connect 17 0 7 0; +#X restore 121 239 pd vitesse; +#X obj 186 219 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X obj 27 53 t b b b b b b b; +#X obj 27 195 route massesPos massesSpeeds massesForces; +#X text 208 240 Afficher les vitesses en haut; +#X text 310 279 Afficher les forces en bas; +#X obj 379 185 inlet; +#X obj 355 119 gemhead; +#X obj 355 142 world_light; +#N canvas 643 123 605 590 forces 0; +#X obj 53 99 inlet; +#X obj 60 377 translateXYZ; +#X obj 139 260 / 12.5; +#X obj 139 283 - 4; +#X obj 204 261 / 12.5; +#X obj 60 351 separator; +#X obj 137 310 t b f; +#X obj 60 325 gemhead 45; +#X obj 60 434 cube 0.02; +#X obj 111 99 inlet; +#X obj 53 129 spigot; +#X obj 60 284 loadbang; +#X msg 60 306 0; +#X obj 139 207 unpack f f; +#X obj 139 232 + 10; +#X obj 204 284 - 2; +#X obj 53 180 route 0 81 82; +#X obj 204 239 * 400; +#X obj 60 405 color 0 1 0; +#X connect 0 0 10 0; +#X connect 1 0 18 0; +#X connect 2 0 3 0; +#X connect 3 0 6 0; +#X connect 4 0 15 0; +#X connect 5 0 1 0; +#X connect 6 0 7 0; +#X connect 6 1 1 1; +#X connect 7 0 5 0; +#X connect 9 0 10 1; +#X connect 10 0 16 0; +#X connect 11 0 12 0; +#X connect 12 0 7 0; +#X connect 13 0 14 0; +#X connect 13 1 17 0; +#X connect 14 0 2 0; +#X connect 15 0 1 2; +#X connect 16 3 13 0; +#X connect 17 0 4 0; +#X connect 18 0 8 0; +#X restore 215 278 pd forces; +#X msg 27 75 bang \, get massesPos \, get massesSpeeds \, get massesForces +; +#X obj 95 100 r \$0-pmpdin; +#X obj 27 136 pmpd --------------------------------; +#X connect 0 0 4 0; +#X connect 3 0 2 1; +#X connect 4 0 12 0; +#X connect 4 1 14 0; +#X connect 4 2 14 0; +#X connect 4 3 14 0; +#X connect 4 4 14 0; +#X connect 4 5 14 0; +#X connect 4 6 14 0; +#X connect 5 0 1 0; +#X connect 5 1 2 0; +#X connect 5 2 11 0; +#X connect 8 0 11 1; +#X connect 8 0 2 1; +#X connect 9 0 10 0; +#X connect 12 0 14 0; +#X connect 13 0 14 0; +#X connect 14 0 5 0; +#X restore 24 165 pd compute; +#X obj 24 143 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 328 167 hsl 128 15 0 30 0 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 0 1; +#X obj 331 94 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 0 1; +#N canvas 0 22 450 300 gem 0; +#X obj 179 135 gemwin; +#X msg 198 113 0 \, destroy; +#X msg 179 90 reset \, create \, lighting 1 \, 1; +#X obj 179 39 inlet; +#X obj 179 68 sel 1 0; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 3 0 4 0; +#X connect 4 0 2 0; +#X connect 4 1 1 0; +#X restore 24 118 pd gem; +#X obj 24 99 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 +; +#X text 44 142 display forces (green) and speeds (red); +#N canvas 0 22 450 300 forces 0; +#X msg 167 134 forceX corde \$1; +#X obj 167 89 inlet; +#X obj 167 112 / 300; +#X obj 167 157 s \$0-pmpdin; +#X connect 0 0 3 0; +#X connect 1 0 2 0; +#X connect 2 0 0 0; +#X restore 328 57 pd forces; +#X obj 331 35 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144 +-1 -1 0 1; +#N canvas 0 22 450 300 general_damping 0; +#X msg 172 143 setD D2 \$1; +#X obj 172 121 / 5; +#X obj 173 100 inlet; +#X obj 172 166 s \$0-pmpdin; +#X connect 0 0 3 0; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X restore 325 187 pd general_damping; +#X text 324 22 Send forces; +#X text 45 98 gem on/off; +#X text 24 20 1D string model; +#N canvas 873 311 611 439 force2 0; +#X obj 174 147 / 120; +#X obj 171 43 inlet; +#X msg 174 175 41 \$1 \, 42 \$1; +#X obj 191 201 / 1.5; +#X msg 191 225 39 \$1 \, 40 \$1 \, 43 \$1 \, 44 \$1; +#X msg 206 271 36 \$1 \, 37 \$1 \, 38 \$1 \, 45 \$1 \, 46 \$1 \, 47 +\$1; +#X obj 206 247 / 3; +#X obj 175 398 s \$0-pmpdin; +#X obj 171 69 t f f; +#X obj 174 100 -; +#X obj 173 124 * 10; +#X msg 174 377 forceX \$1 \$2; +#X obj 177 346 pack f f; +#X obj 176 301 unpack f f; +#X obj 176 325 + 8; +#X connect 0 0 2 0; +#X connect 0 0 3 0; +#X connect 0 0 6 0; +#X connect 1 0 8 0; +#X connect 2 0 13 0; +#X connect 3 0 4 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 5 0; +#X connect 8 0 9 1; +#X connect 8 1 9 0; +#X connect 9 0 10 0; +#X connect 10 0 0 0; +#X connect 11 0 7 0; +#X connect 12 0 11 0; +#X connect 13 0 14 0; +#X connect 13 1 12 1; +#X connect 14 0 12 0; +#X restore 328 117 pd force2; +#X text 324 79 Send forces; +#X text 323 150 global damping; +#X text 23 196 COPYRIGHT : Nicolas Montgermont 2010; +#X connect 0 0 2 0; +#X connect 4 0 3 0; +#X connect 5 0 12 0; +#X connect 6 0 16 0; +#X connect 8 0 7 0; +#X connect 11 0 10 0; diff --git a/examples/54_pmpd_wave.pd b/examples/54_pmpd_wave.pd new file mode 100644 index 0000000..3ec1d63 --- /dev/null +++ b/examples/54_pmpd_wave.pd @@ -0,0 +1,231 @@ +#N canvas 617 175 594 188 10; +#X obj 29 20 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X text 49 19 Reset; +#X obj 202 27 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#N canvas 0 22 981 585 structure_creation 0; +#X msg 681 243 mass filet 1 100 0; +#X msg 663 64 reset; +#X obj 418 25 t b b b b b b b b b b b b; +#X obj 681 201 until; +#X msg 681 170 400; +#X msg 561 378 link fil \$1 \$2 10 1; +#X msg 561 174 380; +#X obj 561 206 until; +#X obj 561 245 f 0; +#X obj 609 261 + 1; +#X msg 618 226 0; +#X obj 636 312 + 20; +#X obj 561 339 pack f f; +#X obj 561 288 t f f; +#X msg 397 151 400; +#X obj 397 189 until; +#X obj 397 231 f 0; +#X obj 445 247 + 1; +#X msg 454 212 0; +#X obj 397 292 t f f; +#X obj 452 325 mod 20; +#X obj 452 355 != 19; +#X obj 397 393 spigot; +#X obj 397 475 pack f f; +#X obj 397 424 t f f; +#X obj 472 448 + 1; +#X msg 397 505 link fil \$1 \$2 10 1; +#X msg 403 107 setFixed 0 \, setFixed 19 \, setFixed 380 \, setFixed +399; +#X obj 418 -8 inlet; +#X obj 326 61 loadbang; +#X obj 690 527 s \$0-pmpdin; +#X connect 0 0 30 0; +#X connect 1 0 30 0; +#X connect 2 5 27 0; +#X connect 2 6 14 0; +#X connect 2 7 18 0; +#X connect 2 8 6 0; +#X connect 2 9 10 0; +#X connect 2 10 4 0; +#X connect 2 11 1 0; +#X connect 3 0 0 0; +#X connect 4 0 3 0; +#X connect 5 0 30 0; +#X connect 6 0 7 0; +#X connect 7 0 8 0; +#X connect 8 0 9 0; +#X connect 8 0 13 0; +#X connect 9 0 8 1; +#X connect 10 0 8 1; +#X connect 11 0 12 1; +#X connect 12 0 5 0; +#X connect 13 0 12 0; +#X connect 13 1 11 0; +#X connect 14 0 15 0; +#X connect 15 0 16 0; +#X connect 16 0 17 0; +#X connect 16 0 19 0; +#X connect 17 0 16 1; +#X connect 18 0 16 1; +#X connect 19 0 22 0; +#X connect 19 1 20 0; +#X connect 20 0 21 0; +#X connect 21 0 22 1; +#X connect 22 0 24 0; +#X connect 23 0 26 0; +#X connect 24 0 23 0; +#X connect 24 1 25 0; +#X connect 25 0 23 1; +#X connect 26 0 30 0; +#X connect 27 0 30 0; +#X connect 28 0 2 0; +#X connect 29 0 2 0; +#X restore 29 39 pd structure_creation; +#N canvas 813 63 450 300 gem 0; +#X obj 114 171 gemwin; +#X msg 134 149 0 \, destroy; +#X msg 114 125 reset \, create \, 1 \, lighting 1; +#X obj 114 71 inlet; +#X obj 114 97 sel 1 0; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 3 0 4 0; +#X connect 4 0 2 0; +#X connect 4 1 1 0; +#X restore 30 85 pd gem; +#X obj 30 63 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 +; +#X text 200 -6 send forces; +#X text 200 7 on a row; +#N canvas 0 22 450 300 damping 0; +#X msg 151 90 setD fil \$1; +#X obj 151 70 / 8; +#X obj 151 47 inlet; +#X obj 151 113 s \$0-pmpdin; +#X connect 0 0 3 0; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X restore 301 119 pd damping; +#X obj 304 100 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144 +-1 -1 0 1; +#X text 300 79 change viscosity; +#N canvas 0 22 450 300 row 0; +#X msg 149 87 20; +#X obj 149 132 f 6; +#X obj 149 112 until; +#X obj 192 133 + 20; +#X msg 208 113 6; +#X obj 149 63 t b b; +#X msg 149 153 forceX \$1 30; +#X obj 149 38 inlet; +#X obj 149 183 s \$0-pmpdin; +#X connect 0 0 2 0; +#X connect 1 0 3 0; +#X connect 1 0 6 0; +#X connect 2 0 1 0; +#X connect 3 0 1 1; +#X connect 4 0 1 1; +#X connect 5 0 0 0; +#X connect 5 1 4 0; +#X connect 6 0 8 0; +#X connect 7 0 5 0; +#X restore 202 51 pd row; +#X obj 201 105 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X text 199 70 send forces; +#X text 50 63 Gem on/off; +#X obj 305 38 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144 +-1 -1 0 1; +#X text 300 17 change rigidity; +#N canvas 0 22 450 300 rigi 0; +#X obj 151 47 inlet; +#X obj 151 70 / 4; +#X msg 151 90 setK fil \$1; +#X obj 151 113 s \$0-pmpdin; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X restore 302 57 pd rigi; +#X text 199 83 on a point; +#N canvas 0 22 450 300 point 0; +#X msg 192 123 forceX 10 100; +#X obj 193 95 inlet; +#X obj 192 156 s \$0-pmpdin; +#X connect 0 0 2 0; +#X connect 1 0 0 0; +#X restore 201 126 pd point; +#X text 469 -2 move a corner; +#N canvas 0 22 450 300 corner 0; +#X msg 222 89 posX 0 \$1; +#X obj 222 65 / 30; +#X obj 223 32 inlet; +#X obj 222 115 s \$0-pmpdin; +#X connect 0 0 3 0; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X restore 471 155 pd corner; +#X obj 471 17 vsl 15 128 0 127 0 0 empty empty empty 0 -9 0 10 -262144 +-1 -1 0 1; +#N canvas 696 124 709 588 compute 0; +#X msg 126 130 bang \, get massesPos; +#X obj 126 27 gemhead; +#X obj 126 224 route massesPos; +#X obj 34 306 gemhead; +#X msg 34 268 0; +#X obj 126 290 unpack f f; +#X obj 34 539 translateXYZ; +#X obj 126 334 mod 20; +#X obj 126 389 - 3; +#X obj 126 363 * 0.3; +#X obj 126 257 t b a; +#X obj 197 326 / 20; +#X obj 197 356 int; +#X obj 197 383 * -0.3; +#X obj 197 410 + 3; +#X obj 34 238 loadbang; +#X obj 439 286 gemhead; +#X obj 439 349 light; +#X obj 439 318 translateXYZ 0 0 1; +#X obj 33 572 cube 0.08; +#X obj 126 58 t b b; +#X msg 171 97 bang \, bang \, bang \, bang \, bang \, bang \, bang +; +#X obj 34 443 translateXYZ 0 0 -2; +#X obj 34 477 rotateXYZ 0 20 0; +#X obj 141 153 r \$0-pmpdin; +#X obj 126 184 pmpd --------------; +#X connect 0 0 25 0; +#X connect 1 0 20 0; +#X connect 2 0 10 0; +#X connect 3 0 22 0; +#X connect 4 0 3 0; +#X connect 5 0 7 0; +#X connect 5 0 11 0; +#X connect 5 1 6 3; +#X connect 6 0 19 0; +#X connect 7 0 9 0; +#X connect 8 0 6 1; +#X connect 9 0 8 0; +#X connect 10 0 3 0; +#X connect 10 1 5 0; +#X connect 11 0 12 0; +#X connect 12 0 13 0; +#X connect 13 0 14 0; +#X connect 14 0 6 2; +#X connect 15 0 4 0; +#X connect 16 0 18 0; +#X connect 18 0 17 0; +#X connect 20 0 0 0; +#X connect 20 1 21 0; +#X connect 21 0 25 0; +#X connect 22 0 23 0; +#X connect 23 0 6 0; +#X connect 24 0 25 0; +#X connect 25 0 2 0; +#X restore 30 109 pd compute; +#X text 29 151 COPYRIGHT : Nicolas Montgermont 2010; +#X connect 0 0 3 0; +#X connect 2 0 11 0; +#X connect 5 0 4 0; +#X connect 9 0 8 0; +#X connect 12 0 19 0; +#X connect 15 0 17 0; +#X connect 22 0 21 0; diff --git a/examples/55_pmpd2d_test.pd b/examples/55_pmpd2d_test.pd new file mode 100644 index 0000000..521e3e4 --- /dev/null +++ b/examples/55_pmpd2d_test.pd @@ -0,0 +1,167 @@ +#N canvas 780 54 626 507 10; +#X obj 27 26 loadbang; +#X obj 369 155 gemwin; +#X msg 384 132 0 \, destroy; +#X text 260 26 2 DRAG THE STRUCTURE WITH THE MOUSE; +#X obj 87 27 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X msg 90 76 reset; +#X obj 27 47 t b b b b b; +#X msg 42 186 Xmax 100 \, Xmin 0 \, Ymax 100 \, Ymin 0; +#X obj 53 300 gemhead; +#X obj 53 323 t b; +#X msg 53 345 bang \, get massesPos \, get linksPos; +#N canvas 643 123 609 594 massrender 0; +#X obj 127 22 inlet; +#X obj 48 203 translateXYZ; +#X obj 127 86 / 12.5; +#X obj 127 109 - 4; +#X obj 192 87 / 12.5; +#X obj 192 110 - 4; +#X obj 48 177 separator; +#X obj 125 136 t b f; +#X obj 127 57 unpack f f f; +#X obj 48 141 gemhead 45; +#X msg 48 104 0; +#X obj 47 58 loadbang; +#X obj 48 229 circle 0.1; +#X connect 0 0 8 0; +#X connect 1 0 12 0; +#X connect 2 0 3 0; +#X connect 3 0 7 0; +#X connect 4 0 5 0; +#X connect 5 0 1 2; +#X connect 6 0 1 0; +#X connect 7 0 9 0; +#X connect 7 1 1 1; +#X connect 8 1 2 0; +#X connect 8 2 4 0; +#X connect 9 0 6 0; +#X connect 10 0 9 0; +#X connect 11 0 10 0; +#X restore 436 267 pd massrender; +#N canvas 731 296 458 308 gemmouse 0; +#X obj 189 77 gemmouse; +#X obj 189 184 pack f f; +#X obj 189 218 spigot; +#X obj 103 244 outlet; +#X obj 189 131 - 0; +#X obj 216 131 + 100; +#X obj 189 108 / 5; +#X obj 216 108 / -5; +#X obj 79 51 inlet; +#X obj 109 98 t b; +#X obj 141 120 list; +#X obj 141 41 r mouse_init; +#X connect 0 0 6 0; +#X connect 0 1 7 0; +#X connect 0 2 2 1; +#X connect 1 0 2 0; +#X connect 2 0 10 1; +#X connect 4 0 1 0; +#X connect 5 0 1 1; +#X connect 6 0 4 0; +#X connect 7 0 5 0; +#X connect 8 0 9 0; +#X connect 9 0 10 0; +#X connect 10 0 3 0; +#X connect 11 0 10 1; +#X restore 366 356 pd gemmouse; +#X obj 366 335 gemhead; +#X msg 366 377 posX fix \$1; +#X msg 366 398 posY fix \$2; +#N canvas 0 22 454 304 linkrender 0; +#X obj 127 22 inlet; +#X obj 127 86 / 12.5; +#X obj 127 109 - 4; +#X obj 187 87 / 12.5; +#X obj 187 110 - 4; +#X obj 48 177 separator; +#X obj 125 136 t b f; +#X obj 241 86 / 12.5; +#X obj 241 109 - 4; +#X obj 308 87 / 12.5; +#X obj 308 110 - 4; +#X obj 48 222 curve 2; +#X obj 155 189 pack f f 0; +#X obj 241 190 pack f f 0; +#X obj 127 57 unpack f f f f f; +#X obj 46 130 gemhead 45; +#X obj 45 44 loadbang; +#X msg 45 68 0; +#X connect 0 0 14 0; +#X connect 1 0 2 0; +#X connect 2 0 6 0; +#X connect 3 0 4 0; +#X connect 4 0 12 1; +#X connect 5 0 11 0; +#X connect 6 0 15 0; +#X connect 6 1 12 0; +#X connect 7 0 8 0; +#X connect 8 0 13 0; +#X connect 9 0 10 0; +#X connect 10 0 13 1; +#X connect 12 0 11 1; +#X connect 13 0 11 2; +#X connect 14 1 1 0; +#X connect 14 2 3 0; +#X connect 14 3 7 0; +#X connect 14 4 9 0; +#X connect 15 0 5 0; +#X connect 16 0 17 0; +#X connect 17 0 15 0; +#X restore 366 289 pd linkrender; +#X msg 194 139 50 50; +#X msg 74 96 mass fix 0 100 50 50; +#X msg 58 139 mass mob 1 100 \$1 \$2; +#X msg 58 118 40 60 \, 60 60 \, 60 40 \, 40 40; +#X obj 194 162 s mouse_init; +#X msg 27 207 link souple mob mob 10 5; +#X msg 27 230 link souple fix mob 10 5; +#X text 25 1 creation : 5 masses and 20 links; +#X text 52 281 compute and get masses and links positions; +#X text 364 315 move mass to mouse position; +#X text 365 197 display masses with gem; +#X msg 369 109 reset \, create \, 1; +#X text 261 6 1 CREATE WINDOW; +#X text 108 26 reset struct; +#X obj 90 259 s \$0-pmpdin; +#X obj 84 373 r \$0-pmpdin; +#X obj 52 419 s \$0-pmpdout; +#X obj 365 423 s \$0-pmpdin; +#X obj 366 218 r \$0-pmpdout; +#X obj 53 397 pmpd2d; +#X obj 366 244 route linksPosNo massesPos; +#X text 53 452 copyright Nicolas Montgermont 2010; +#X connect 0 0 6 0; +#X connect 2 0 1 0; +#X connect 4 0 6 0; +#X connect 5 0 31 0; +#X connect 6 0 22 0; +#X connect 6 1 17 0; +#X connect 6 1 7 0; +#X connect 6 2 20 0; +#X connect 6 3 18 0; +#X connect 6 4 5 0; +#X connect 7 0 31 0; +#X connect 8 0 9 0; +#X connect 9 0 10 0; +#X connect 10 0 36 0; +#X connect 12 0 14 0; +#X connect 12 0 15 0; +#X connect 13 0 12 0; +#X connect 14 0 34 0; +#X connect 15 0 34 0; +#X connect 17 0 21 0; +#X connect 18 0 31 0; +#X connect 19 0 31 0; +#X connect 20 0 19 0; +#X connect 22 0 23 0; +#X connect 22 0 31 0; +#X connect 23 0 31 0; +#X connect 28 0 1 0; +#X connect 32 0 36 0; +#X connect 35 0 37 0; +#X connect 36 0 33 0; +#X connect 37 0 16 0; +#X connect 37 1 11 0; diff --git a/examples/56_pmpd2d_additive.pd b/examples/56_pmpd2d_additive.pd new file mode 100644 index 0000000..e2d709c --- /dev/null +++ b/examples/56_pmpd2d_additive.pd @@ -0,0 +1,463 @@ +#N canvas 572 22 686 162 10; +#X obj 22 16 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#N canvas 596 150 954 737 synthese 0; +#X msg -35 254 \$1 50; +#X obj -35 276 line~; +#X obj -75 280 *~; +#X msg 60 254 \$1 50; +#X obj 60 276 line~; +#X obj 20 280 *~; +#X msg 153 256 \$1 50; +#X obj 153 278 line~; +#X obj 113 282 *~; +#X msg 245 254 \$1 50; +#X obj 245 276 line~; +#X obj 205 280 *~; +#X obj 62 328 dac~; +#X msg 346 257 \$1 50; +#X obj 346 279 line~; +#X obj 306 283 *~; +#X msg 441 257 \$1 50; +#X obj 441 279 line~; +#X obj 401 283 *~; +#X msg 534 259 \$1 50; +#X obj 534 281 line~; +#X obj 494 285 *~; +#X msg 626 257 \$1 50; +#X obj 626 279 line~; +#X obj 586 283 *~; +#X obj 443 331 dac~; +#X obj -77 224 osc~ 55; +#X obj 19 224 osc~ 110; +#X obj 204 225 osc~ 222; +#X obj -13 158 unpack f f; +#X obj 176 164 unpack f f; +#X obj 362 161 unpack f f; +#X obj 553 168 unpack f f; +#X msg -45 458 \$1 50; +#X obj -45 480 line~; +#X obj -85 484 *~; +#X msg 50 458 \$1 50; +#X obj 50 480 line~; +#X obj 10 484 *~; +#X msg 143 460 \$1 50; +#X obj 143 482 line~; +#X obj 103 486 *~; +#X msg 235 458 \$1 50; +#X obj 235 480 line~; +#X obj 195 484 *~; +#X obj 52 532 dac~; +#X msg 336 461 \$1 50; +#X obj 336 483 line~; +#X obj 296 487 *~; +#X msg 431 461 \$1 50; +#X obj 431 483 line~; +#X obj 391 487 *~; +#X msg 524 463 \$1 50; +#X obj 524 485 line~; +#X obj 484 489 *~; +#X msg 616 461 \$1 50; +#X obj 616 483 line~; +#X obj 576 487 *~; +#X obj 433 535 dac~; +#X obj 483 433 osc~ 1113; +#X obj 575 431 osc~ 2229; +#X obj -15 373 unpack f f; +#X obj 166 368 unpack f f; +#X obj 352 365 unpack f f; +#X obj 543 372 unpack f f; +#X obj 112 226 osc~ 165; +#X obj 305 227 osc~ 267; +#X obj 400 227 osc~ 311; +#X obj 268 74 route 1 5 9 13 17 21 25 29; +#X obj 493 229 osc~ 366; +#X obj 585 227 osc~ 421; +#X obj -87 428 osc~ 444; +#X obj 9 428 osc~ 554; +#X obj 102 430 osc~ 664; +#X obj 194 428 osc~ 776; +#X obj 295 431 osc~ 888; +#X obj 390 431 osc~ 1000; +#X obj -75 398 / 20; +#X obj 52 404 / 20; +#X obj 144 406 / 20; +#X obj 240 404 / 50; +#X obj 307 401 / 50; +#X obj 434 407 / 50; +#X obj 524 409 / 100; +#X obj 621 407 / 100; +#X obj 631 203 / 100; +#X obj 532 206 / 100; +#X obj 444 204 / 50; +#X obj 317 197 / 50; +#X obj 250 200 / 50; +#X obj 153 202 / 20; +#X obj 61 201 / 20; +#X obj -64 194 / 20; +#X obj 268 49 route massesSpeedsNo; +#X obj 268 27 r \$0-pmpdout; +#X connect 0 0 1 0; +#X connect 1 0 2 1; +#X connect 2 0 12 0; +#X connect 3 0 4 0; +#X connect 4 0 5 1; +#X connect 5 0 12 0; +#X connect 5 0 12 1; +#X connect 6 0 7 0; +#X connect 7 0 8 1; +#X connect 8 0 12 0; +#X connect 8 0 12 1; +#X connect 9 0 10 0; +#X connect 10 0 11 1; +#X connect 11 0 12 1; +#X connect 13 0 14 0; +#X connect 14 0 15 1; +#X connect 15 0 25 0; +#X connect 16 0 17 0; +#X connect 17 0 18 1; +#X connect 18 0 25 0; +#X connect 18 0 25 1; +#X connect 19 0 20 0; +#X connect 20 0 21 1; +#X connect 21 0 25 0; +#X connect 21 0 25 1; +#X connect 22 0 23 0; +#X connect 23 0 24 1; +#X connect 24 0 25 1; +#X connect 26 0 2 0; +#X connect 27 0 5 0; +#X connect 28 0 11 0; +#X connect 29 0 92 0; +#X connect 29 1 91 0; +#X connect 30 0 90 0; +#X connect 30 1 89 0; +#X connect 31 0 88 0; +#X connect 31 1 87 0; +#X connect 32 0 86 0; +#X connect 32 1 85 0; +#X connect 33 0 34 0; +#X connect 34 0 35 1; +#X connect 35 0 45 0; +#X connect 36 0 37 0; +#X connect 37 0 38 1; +#X connect 38 0 45 0; +#X connect 38 0 45 1; +#X connect 39 0 40 0; +#X connect 40 0 41 1; +#X connect 41 0 45 0; +#X connect 41 0 45 1; +#X connect 42 0 43 0; +#X connect 43 0 44 1; +#X connect 44 0 45 1; +#X connect 46 0 47 0; +#X connect 47 0 48 1; +#X connect 48 0 58 0; +#X connect 49 0 50 0; +#X connect 50 0 51 1; +#X connect 51 0 58 0; +#X connect 51 0 58 1; +#X connect 52 0 53 0; +#X connect 53 0 54 1; +#X connect 54 0 58 0; +#X connect 54 0 58 1; +#X connect 55 0 56 0; +#X connect 56 0 57 1; +#X connect 57 0 58 1; +#X connect 59 0 54 0; +#X connect 60 0 57 0; +#X connect 61 0 77 0; +#X connect 61 1 78 0; +#X connect 62 0 79 0; +#X connect 62 1 80 0; +#X connect 63 0 81 0; +#X connect 63 1 82 0; +#X connect 64 0 83 0; +#X connect 64 1 84 0; +#X connect 65 0 8 0; +#X connect 66 0 15 0; +#X connect 67 0 18 0; +#X connect 68 0 29 0; +#X connect 68 1 30 0; +#X connect 68 2 31 0; +#X connect 68 3 32 0; +#X connect 68 4 61 0; +#X connect 68 5 62 0; +#X connect 68 6 63 0; +#X connect 68 7 64 0; +#X connect 69 0 21 0; +#X connect 70 0 24 0; +#X connect 71 0 35 0; +#X connect 72 0 38 0; +#X connect 73 0 41 0; +#X connect 74 0 44 0; +#X connect 75 0 48 0; +#X connect 76 0 51 0; +#X connect 77 0 33 0; +#X connect 78 0 36 0; +#X connect 79 0 39 0; +#X connect 80 0 42 0; +#X connect 81 0 46 0; +#X connect 82 0 49 0; +#X connect 83 0 52 0; +#X connect 84 0 55 0; +#X connect 85 0 22 0; +#X connect 86 0 19 0; +#X connect 87 0 16 0; +#X connect 88 0 13 0; +#X connect 89 0 9 0; +#X connect 90 0 6 0; +#X connect 91 0 3 0; +#X connect 92 0 0 0; +#X connect 93 0 68 0; +#X connect 94 0 93 0; +#X restore 23 107 pd synthese; +#X text 40 16 Reset; +#N canvas 0 22 450 300 structure_creation 0; +#X msg 195 86 reset; +#X obj 52 15 loadbang; +#X msg 156 145 Xmax 100 \, Xmin 0 \, Ymax 100 \, Ymin 0; +#X text 238 112 Random positions and masses; +#N canvas 557 309 487 357 masses 0; +#X msg 245 215 mass mob 1 \$1 \$2 \$3; +#X obj 417 165 random 100; +#X msg 417 145 seed 1; +#X obj 342 165 random 100; +#X obj 239 146 random 100; +#X msg 342 144 seed 2; +#X msg 239 126 seed 3; +#X obj 239 166 + 100; +#X obj 245 194 pack f f f; +#X obj 42 14 inlet; +#X obj 246 283 outlet; +#X obj 268 47 loadbang; +#X text 284 101 M; +#X text 356 106 X; +#X text 437 106 Y; +#X obj 223 68 t b b; +#X obj 42 45 until; +#X obj 42 78 f; +#X obj 72 78 + 1; +#X obj 72 100 mod 30; +#X obj 90 45 sel 0; +#X connect 0 0 10 0; +#X connect 1 0 8 2; +#X connect 2 0 1 0; +#X connect 3 0 8 1; +#X connect 4 0 7 0; +#X connect 5 0 3 0; +#X connect 6 0 4 0; +#X connect 7 0 8 0; +#X connect 8 0 0 0; +#X connect 9 0 16 0; +#X connect 11 0 6 0; +#X connect 11 0 5 0; +#X connect 11 0 2 0; +#X connect 15 0 4 0; +#X connect 15 1 3 0; +#X connect 15 1 1 0; +#X connect 16 0 17 0; +#X connect 17 0 18 0; +#X connect 17 0 15 0; +#X connect 18 0 19 0; +#X connect 19 0 17 1; +#X connect 19 0 20 0; +#X connect 20 0 16 1; +#X restore 175 113 pd masses; +#N canvas 0 22 450 300 links 0; +#X obj 136 72 t b; +#X obj 136 116 + 1; +#X obj 130 191 f; +#X obj 92 171 t f b; +#X obj 91 211 pack f f; +#X msg 91 233 link souple \$1 \$2 10 0.5; +#X obj 136 23 inlet; +#X obj 91 260 outlet; +#X obj 136 48 until; +#X obj 202 112 sel 0; +#X obj 184 154 mod 29; +#X obj 136 93 f 0; +#X connect 0 0 11 0; +#X connect 1 0 10 0; +#X connect 1 0 2 1; +#X connect 2 0 4 1; +#X connect 3 0 4 0; +#X connect 3 1 2 0; +#X connect 4 0 5 0; +#X connect 5 0 7 0; +#X connect 6 0 8 0; +#X connect 8 0 0 0; +#X connect 9 0 8 1; +#X connect 10 0 9 0; +#X connect 10 0 11 1; +#X connect 11 0 1 0; +#X connect 11 0 3 0; +#X restore 137 176 pd links; +#X obj 137 62 t b b b b; +#X obj 137 15 inlet; +#X obj 137 211 s \$0-pmpdin; +#X connect 0 0 8 0; +#X connect 1 0 6 0; +#X connect 2 0 8 0; +#X connect 4 0 8 0; +#X connect 5 0 8 0; +#X connect 6 0 5 0; +#X connect 6 1 2 0; +#X connect 6 2 4 0; +#X connect 6 3 0 0; +#X connect 7 0 6 0; +#X restore 22 39 pd structure_creation; +#N canvas 0 22 763 327 gem_stuff 0; +#X msg 137 179 0 \, destroy; +#X obj 118 200 gemwin; +#X obj 118 104 inlet; +#X obj 118 129 sel 1 0; +#X msg 118 156 reset \, create \, 1; +#X obj 274 105 gemhead; +#N canvas 311 224 413 534 gemmouse2 0; +#X obj 114 29 gemmouse; +#X obj 96 266 outlet; +#X obj 114 83 - 0; +#X obj 165 97 + 100; +#X obj 114 60 / 5; +#X obj 165 74 / -5; +#X obj 32 81 t b; +#X obj 32 37 inlet; +#X obj 96 177 f; +#X obj 96 206 pack 0 0 0; +#X connect 0 0 4 0; +#X connect 0 1 5 0; +#X connect 0 2 9 2; +#X connect 2 0 8 1; +#X connect 3 0 9 1; +#X connect 4 0 2 0; +#X connect 5 0 3 0; +#X connect 6 0 8 0; +#X connect 7 0 6 0; +#X connect 8 0 9 0; +#X connect 9 0 1 0; +#X restore 274 127 pd gemmouse2; +#X msg 274 150 grabMass \$1 \$2 \$3; +#N canvas 643 123 617 602 massrender 0; +#X obj 127 22 inlet; +#X obj 62 267 translateXYZ; +#X obj 166 123 / 12.5; +#X obj 166 146 - 4; +#X obj 231 124 / 12.5; +#X obj 231 147 - 4; +#X obj 62 241 separator; +#X obj 127 57 unpack f f f; +#X msg 128 194 \$1; +#X obj 62 219 colorRGB 1 1 1; +#X obj 128 174 / 29; +#X obj 127 85 t b f; +#X obj 62 135 gemhead 45; +#X obj 62 63 loadbang; +#X msg 62 93 0; +#X obj 62 314 circle 0.1; +#X connect 0 0 7 0; +#X connect 1 0 15 0; +#X connect 2 0 3 0; +#X connect 3 0 1 1; +#X connect 4 0 5 0; +#X connect 5 0 1 2; +#X connect 6 0 1 0; +#X connect 7 0 11 0; +#X connect 7 1 2 0; +#X connect 7 2 4 0; +#X connect 8 0 9 2; +#X connect 8 0 9 3; +#X connect 9 0 6 0; +#X connect 10 0 8 0; +#X connect 11 0 12 0; +#X connect 11 1 10 0; +#X connect 12 0 9 0; +#X connect 13 0 14 0; +#X connect 14 0 12 0; +#X restore 502 153 pd massrender; +#N canvas 284 227 595 566 linkrender 0; +#X obj 261 87 inlet; +#X obj 261 179 / 12.5; +#X obj 261 202 - 4; +#X obj 315 180 / 12.5; +#X obj 315 203 - 4; +#X obj 189 288 separator; +#X obj 261 226 t b f; +#X obj 189 331 curve 2; +#X obj 375 183 / 12.5; +#X obj 375 206 - 4; +#X obj 429 184 / 12.5; +#X obj 429 207 - 4; +#X obj 291 256 pack f f; +#X msg 291 279 \$1 \$2 0; +#X obj 375 255 pack f f; +#X msg 375 278 \$1 \$2 0; +#X obj 261 131 unpack f f f f f; +#X obj 189 310 colorRGB 1 1 1; +#X obj 189 262 gemhead 45; +#X obj 189 180 loadbang; +#X msg 189 229 0; +#X connect 0 0 16 0; +#X connect 1 0 2 0; +#X connect 2 0 6 0; +#X connect 3 0 4 0; +#X connect 4 0 12 1; +#X connect 5 0 17 0; +#X connect 6 0 18 0; +#X connect 6 1 12 0; +#X connect 8 0 9 0; +#X connect 9 0 14 0; +#X connect 10 0 11 0; +#X connect 11 0 14 1; +#X connect 12 0 13 0; +#X connect 13 0 7 1; +#X connect 14 0 15 0; +#X connect 15 0 7 2; +#X connect 16 1 1 0; +#X connect 16 2 3 0; +#X connect 16 3 8 0; +#X connect 16 4 10 0; +#X connect 17 0 7 0; +#X connect 18 0 5 0; +#X connect 19 0 20 0; +#X connect 20 0 18 0; +#X restore 432 174 pd linkrender; +#X obj 273 174 s \$0-pmpdin; +#X obj 432 101 r \$0-pmpdout; +#X obj 432 124 route linksPosNo massesPos; +#X connect 0 0 1 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 3 1 0 0; +#X connect 4 0 1 0; +#X connect 5 0 6 0; +#X connect 6 0 7 0; +#X connect 7 0 10 0; +#X connect 11 0 12 0; +#X connect 12 0 9 0; +#X connect 12 1 8 0; +#X restore 23 86 pd gem_stuff; +#X obj 23 64 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1 +; +#X text 43 63 gem on/off; +#X text 196 54 1 Create window; +#X text 196 74 2 Set dsp on; +#N canvas 0 22 834 442 compute 0; +#X obj 52 69 gemhead; +#X obj 67 163 r \$0-pmpdin; +#X obj 52 216 s \$0-pmpdout; +#X obj 52 192 pmpd2d; +#X msg 50 95 bang \, get massesPos \, get linksPos \, get massesSpeeds +1 \, get massesSpeeds 5 \, get massesSpeeds 9 \, get massesSpeeds 13 +\, get massesSpeeds 17 \, get massesSpeeds 21 \, get massesSpeeds 25 +\, get massesSpeeds 29; +#X connect 0 0 4 0; +#X connect 1 0 3 0; +#X connect 3 0 2 0; +#X connect 4 0 3 0; +#X restore 23 129 pd compute; +#X text 196 94 Drag red masses for bass and white ones for high tones... +; +#X text 196 17 Additive synthesis example; +#X connect 0 0 3 0; +#X connect 5 0 4 0; diff --git a/examples/57_pmpd2d_ball.pd b/examples/57_pmpd2d_ball.pd new file mode 100644 index 0000000..44b5727 --- /dev/null +++ b/examples/57_pmpd2d_ball.pd @@ -0,0 +1,157 @@ +#N canvas 792 237 452 151 10; +#X obj 23 17 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X text 43 16 reset; +#N canvas 665 446 763 327 gem_stuff 0; +#X msg 137 179 0 \, destroy; +#X obj 118 200 gemwin; +#X obj 118 104 inlet; +#X obj 118 129 sel 1 0; +#X msg 118 156 reset \, create \, 1; +#N canvas 284 227 591 562 linkrender 0; +#X obj 150 9 inlet; +#X obj 150 101 / 12.5; +#X obj 150 124 - 4; +#X obj 204 102 / 12.5; +#X obj 204 125 - 4; +#X obj 67 265 separator; +#X obj 150 148 t b f; +#X obj 67 308 curve 2; +#X obj 264 105 / 12.5; +#X obj 264 128 - 4; +#X obj 318 106 / 12.5; +#X obj 318 129 - 4; +#X obj 180 178 pack f f; +#X msg 180 201 \$1 \$2 0; +#X obj 264 177 pack f f; +#X msg 264 200 \$1 \$2 0; +#X obj 150 53 unpack f f f f f; +#X obj 67 224 gemhead 45; +#X obj 67 116 loadbang; +#X msg 67 174 0; +#X connect 0 0 16 0; +#X connect 1 0 2 0; +#X connect 2 0 6 0; +#X connect 3 0 4 0; +#X connect 4 0 12 1; +#X connect 5 0 7 0; +#X connect 6 0 17 0; +#X connect 6 1 12 0; +#X connect 8 0 9 0; +#X connect 9 0 14 0; +#X connect 10 0 11 0; +#X connect 11 0 14 1; +#X connect 12 0 13 0; +#X connect 13 0 7 1; +#X connect 14 0 15 0; +#X connect 15 0 7 2; +#X connect 16 1 1 0; +#X connect 16 2 3 0; +#X connect 16 3 8 0; +#X connect 16 4 10 0; +#X connect 17 0 5 0; +#X connect 18 0 19 0; +#X connect 19 0 17 0; +#X restore 262 171 pd linkrender; +#X obj 262 110 r \$0-pmpdout; +#N canvas 731 296 454 304 gemmouse 0; +#X obj 189 77 gemmouse; +#X obj 189 184 pack f f; +#X obj 189 218 spigot; +#X obj 103 244 outlet; +#X obj 189 131 - 0; +#X obj 216 131 + 100; +#X obj 189 108 / 5; +#X obj 216 108 / -5; +#X obj 79 51 inlet; +#X obj 109 98 t b; +#X obj 108 139 list; +#X obj 141 42 r mouse_init; +#X connect 0 0 6 0; +#X connect 0 1 7 0; +#X connect 0 2 2 1; +#X connect 1 0 2 0; +#X connect 2 0 10 1; +#X connect 4 0 1 0; +#X connect 5 0 1 1; +#X connect 6 0 4 0; +#X connect 7 0 5 0; +#X connect 8 0 9 0; +#X connect 9 0 10 0; +#X connect 10 0 3 0; +#X connect 11 0 10 1; +#X restore 404 127 pd gemmouse; +#X obj 404 106 gemhead; +#X msg 405 147 posX fix \$1; +#X msg 406 168 posY fix \$2; +#X obj 405 194 s \$0-pmpdin; +#X obj 262 133 route linksPosNo; +#X connect 0 0 1 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 3 1 0 0; +#X connect 4 0 1 0; +#X connect 6 0 12 0; +#X connect 7 0 9 0; +#X connect 7 0 10 0; +#X connect 8 0 7 0; +#X connect 9 0 11 0; +#X connect 10 0 11 0; +#X connect 12 0 5 0; +#X restore 23 86 pd gem_stuff; +#X obj 23 64 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 +; +#X text 43 63 gem on/off; +#N canvas 487 334 635 333 creation 0; +#X obj 52 15 loadbang; +#X msg 221 71 reset; +#X msg 153 170 50 50; +#X msg 203 91 mass fix 0 100 50 50; +#X msg 169 192 Xmax 100 \, Xmin 0 \, Ymax 100 \, Ymin 0; +#X msg 186 150 mass mob 1 100 \$1 \$2; +#X obj 135 42 t b b b b b b; +#X msg 186 116 20 50 \, 23 61 \, 29 71 \, 39 77 \, 50 80 \, 61 77 \, +71 71 \, 77 61 \, 80 50 \, 77 39 \, 71 29 \, 61 23 \, 50 20 \, 39 23 +\, 29 29 \, 23 39; +#X msg 144 211 link intf mob 0 10 2.5; +#X msg 135 234 link inter mob mob 1 2.5; +#X obj 192 270 s mouse_init; +#X obj 135 261 s \$0-pmpdin; +#X obj 239 25 inlet; +#X text 303 226 all links are created with these two messages; +#X connect 0 0 6 0; +#X connect 1 0 11 0; +#X connect 2 0 10 0; +#X connect 3 0 11 0; +#X connect 4 0 11 0; +#X connect 5 0 11 0; +#X connect 6 0 9 0; +#X connect 6 1 8 0; +#X connect 6 2 2 0; +#X connect 6 2 4 0; +#X connect 6 3 7 0; +#X connect 6 4 3 0; +#X connect 6 5 1 0; +#X connect 7 0 5 0; +#X connect 8 0 11 0; +#X connect 9 0 11 0; +#X connect 12 0 6 0; +#X restore 23 40 pd creation; +#N canvas 0 22 450 300 compute 0; +#X obj 53 100 gemhead; +#X obj 53 123 t b; +#X msg 53 145 bang \, get linksPos; +#X obj 53 224 s \$0-pmpdout; +#X obj 63 174 r \$0-pmpdin; +#X obj 53 198 pmpd2d; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 3 0; +#X restore 23 111 pd compute; +#X text 164 54 create window; +#X text 164 69 and drag the structure with the mouse; +#X text 161 117 copyright Nicolas Montgermont 2010; +#X connect 0 0 5 0; +#X connect 3 0 2 0; diff --git a/examples/58_pmpd2d_gravitation.pd b/examples/58_pmpd2d_gravitation.pd new file mode 100644 index 0000000..ffc217a --- /dev/null +++ b/examples/58_pmpd2d_gravitation.pd @@ -0,0 +1,213 @@ +#N canvas 676 303 541 161 10; +#X obj 18 21 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X text 39 18 reset; +#N canvas 0 22 450 300 gem_stuff 0; +#X msg 30 89 0 \, destroy; +#X obj 30 185 gemhead; +#X obj 30 238 world_light; +#X obj 30 148 gemwin; +#X msg 30 66 reset \, dimen 800 800 \, create \, lighting 1 \, 1; +#X obj 30 212 rotateXYZ 30 20 0; +#X obj 32 10 inlet; +#X obj 32 37 sel 1 0; +#X connect 0 0 3 0; +#X connect 1 0 5 0; +#X connect 4 0 3 0; +#X connect 5 0 2 0; +#X connect 6 0 7 0; +#X connect 7 0 4 0; +#X connect 7 1 0 0; +#X restore 18 87 pd gem_stuff; +#X obj 18 69 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1 +; +#N canvas 0 22 804 395 creation 0; +#X obj 42 28 bng 20 250 50 0 empty empty empty 0 -6 0 8 -258699 -1 +-1; +#X msg 239 84 reset; +#X obj 245 32 loadbang; +#X text 68 30 reset; +#X obj 167 55 t b b b b b; +#X text 501 28 change number of mass to test performance; +#X text 501 41 (and reset afterwards); +#X obj 441 34 nbx 5 14 1 2000 1 1 empty empty empty 0 -6 0 10 -262144 +-1 -1 1681.79 256; +#X msg 185 241 Xmax 4 \, Xmin -4 \, Ymax 4 \, Ymin -4; +#X msg 167 215 setL sun 0; +#X msg 221 107 mass fix 0 100 0 0; +#X text 409 270 0.2 : rigidity \, 0 : damping \, -2 : power \, 0.4 +: Lmin; +#X text 363 109 Sun; +#X text 288 181 Initial speed; +#N canvas 900 169 769 663 masses 0; +#X obj 151 16 inlet; +#X obj 232 28 inlet; +#X obj 151 616 outlet; +#X msg 151 551 mass mob 1 \$1 \$2 \$3; +#X msg 151 307 seed 3; +#X obj 151 519 pack f f f; +#X obj 151 228 t b b b; +#X msg 243 306 seed 20; +#X msg 331 308 seed 10; +#X obj 151 327 random 10000; +#X obj 243 371 - 1; +#X obj 331 370 - 1; +#X obj 151 47 t b; +#X obj 333 52 loadbang; +#X text 263 277 X; +#X text 166 276 M; +#X text 372 278 Y; +#X obj 151 67 until; +#X obj 151 86 f; +#X obj 177 87 + 1; +#X obj 177 118 mod 1000; +#X obj 206 87 sel 0; +#X obj 243 327 random 1000; +#X obj 331 328 random 1000; +#X obj 243 348 / 50000; +#X obj 331 349 / 50000; +#X obj 151 349 / 250; +#X obj 151 371 + 185; +#X connect 0 0 12 0; +#X connect 1 0 20 1; +#X connect 3 0 2 0; +#X connect 4 0 9 0; +#X connect 5 0 3 0; +#X connect 6 0 9 0; +#X connect 6 1 22 0; +#X connect 6 2 23 0; +#X connect 7 0 22 0; +#X connect 8 0 23 0; +#X connect 9 0 26 0; +#X connect 10 0 5 1; +#X connect 11 0 5 2; +#X connect 12 0 17 0; +#X connect 13 0 7 0; +#X connect 13 0 8 0; +#X connect 13 0 4 0; +#X connect 17 0 18 0; +#X connect 18 0 19 0; +#X connect 18 0 6 0; +#X connect 19 0 20 0; +#X connect 20 0 21 0; +#X connect 20 0 18 1; +#X connect 21 0 17 1; +#X connect 22 0 24 0; +#X connect 23 0 25 0; +#X connect 24 0 10 0; +#X connect 25 0 11 0; +#X connect 26 0 27 0; +#X connect 27 0 5 0; +#X restore 203 144 pd masses; +#X text 410 289 The power of the link is -2 to simulate a gravity field +in 1/R^2; +#X text 292 146 Particules; +#X msg 185 268 link sun fix mob 0.2 0 -2 0.4; +#X msg 167 178 forceX mob 5.9; +#X obj 167 310 s \$0-pmpdin; +#X obj 166 25 inlet; +#X connect 0 0 4 0; +#X connect 1 0 19 0; +#X connect 2 0 4 0; +#X connect 4 0 9 0; +#X connect 4 0 18 0; +#X connect 4 1 8 0; +#X connect 4 1 17 0; +#X connect 4 2 14 0; +#X connect 4 3 10 0; +#X connect 4 4 1 0; +#X connect 7 0 14 1; +#X connect 8 0 19 0; +#X connect 9 0 19 0; +#X connect 10 0 19 0; +#X connect 14 0 19 0; +#X connect 17 0 19 0; +#X connect 18 0 19 0; +#X connect 20 0 4 0; +#X restore 18 43 pd creation; +#X text 116 58 gravity field simulation; +#X text 116 74 if you have cpu problem \, you can reduce the mass number +in "creation"; +#N canvas 0 22 450 300 compute 0; +#X obj 52 64 t b; +#X obj 52 41 gemhead; +#X msg 197 123 forceX mob 0.051; +#X msg 197 149 forceY mob 0.1; +#X msg 52 98 bang \, bang \, get massesPos; +#N canvas 587 210 609 429 massrender 0; +#X obj 124 5 inlet; +#X obj 317 249 translateXYZ; +#X obj 319 223 separator; +#X obj 292 63 unpack f f f; +#X obj 59 262 translateXYZ; +#X obj 123 31 route 0 1; +#X obj 290 93 t b; +#X obj 64 71 unpack f f; +#X obj 60 155 t b f; +#X obj 194 266 translateXYZ; +#X obj 175 76 unpack f f; +#X obj 191 154 t b f; +#X obj 195 294 color 1 0 0; +#X obj 318 323 square 0.015; +#X obj 194 324 square 0.04; +#X text 63 356 Sun; +#X text 195 359 Red particule; +#X text 333 359 Particule; +#X obj 58 320 sphere 0.3 30; +#X obj 59 294 color 0.3 0.3 0.3; +#X obj 318 295 color 0.3 0.3 0.3; +#X obj 314 193 gemlist; +#X obj 362 170 gemhead 45; +#X obj 102 177 gemhead 45; +#X obj 191 197 gemlist; +#X obj 60 202 gemlist; +#X obj 238 172 gemhead 40; +#X obj 191 231 separator; +#X obj 58 232 separator; +#X connect 0 0 5 0; +#X connect 1 0 20 0; +#X connect 2 0 1 0; +#X connect 3 0 6 0; +#X connect 3 1 1 1; +#X connect 3 2 1 2; +#X connect 4 0 19 0; +#X connect 5 0 7 0; +#X connect 5 1 10 0; +#X connect 5 2 3 0; +#X connect 6 0 21 0; +#X connect 7 0 8 0; +#X connect 7 1 4 2; +#X connect 8 0 25 0; +#X connect 8 1 4 1; +#X connect 9 0 12 0; +#X connect 10 0 11 0; +#X connect 10 1 9 2; +#X connect 11 0 24 0; +#X connect 11 1 9 1; +#X connect 12 0 14 0; +#X connect 19 0 18 0; +#X connect 20 0 13 0; +#X connect 21 0 2 0; +#X connect 22 0 21 1; +#X connect 23 0 25 1; +#X connect 24 0 27 0; +#X connect 25 0 28 0; +#X connect 26 0 24 1; +#X connect 27 0 9 0; +#X connect 28 0 4 0; +#X restore 52 239 pd massrender; +#X obj 52 212 route massesPos; +#X obj 63 147 r \$0-pmpdin; +#X obj 52 182 pmpd2d; +#X connect 0 0 4 0; +#X connect 1 0 0 0; +#X connect 2 0 8 0; +#X connect 3 0 8 0; +#X connect 4 0 8 0; +#X connect 6 0 5 0; +#X connect 7 0 8 0; +#X connect 8 0 6 0; +#X restore 18 107 pd compute; +#X text 120 121 copyright Nicolas Montgermont 2010; +#X connect 0 0 4 0; +#X connect 3 0 2 0; diff --git a/examples/59_pmpd2d_sand.pd b/examples/59_pmpd2d_sand.pd new file mode 100644 index 0000000..4f6bf03 --- /dev/null +++ b/examples/59_pmpd2d_sand.pd @@ -0,0 +1,303 @@ +#N canvas 915 160 636 696 10; +#X obj 363 187 gemhead; +#X obj 363 234 world_light; +#X msg 364 141 \; pd dsp 1; +#X msg 136 184 FSAA 4; +#N canvas 1144 73 300 425 massrender 0; +#X obj 112 80 inlet; +#X obj 62 311 translateXYZ; +#X obj 62 285 separator; +#X obj 62 244 gemhead 45; +#X obj 62 337 sphere 0.2 20; +#X obj 114 168 t b b; +#X obj 64 364 color; +#X msg 207 229 1 1 1; +#X obj 232 61 inlet; +#X msg 231 255 1 0 0; +#X obj 62 54 loadbang; +#X msg 62 194 0; +#X obj 112 115 unpack f f f; +#X obj 249 130 route 0; +#X connect 0 0 12 0; +#X connect 1 0 4 0; +#X connect 2 0 1 0; +#X connect 3 0 2 0; +#X connect 4 0 6 0; +#X connect 5 0 7 0; +#X connect 5 1 3 0; +#X connect 7 0 6 1; +#X connect 8 0 9 0; +#X connect 9 0 6 1; +#X connect 10 0 11 0; +#X connect 11 0 3 0; +#X connect 12 0 13 0; +#X connect 12 1 1 1; +#X connect 12 2 1 2; +#X connect 13 1 5 0; +#X restore 51 627 pd massrender; +#X obj 51 350 gemhead; +#X obj 212 397 gcanvas 80 80; +#X obj 51 328 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 +; +#X msg 51 373 get massesPos sable; +#N canvas 754 153 608 476 creation 0; +#X obj 198 405 t a; +#X obj 196 30 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X msg 207 72 reset; +#X obj 128 28 loadbang; +#X text 234 32 Reset; +#X text 263 89 Random positions and masses; +#N canvas 826 356 716 390 masses 0; +#X msg 417 145 seed 1; +#X msg 342 144 seed 2; +#X obj 43 15 inlet; +#X obj 238 362 outlet; +#X obj 419 97 loadbang; +#X obj 223 68 t b b; +#X obj 43 78 f; +#X obj 73 78 + 1; +#X msg 43 41 0; +#X msg 237 294 mass sable 1 1 \$1 \$2; +#X obj 237 274 pack f f; +#X obj 254 218 - 3; +#X obj 336 223 - 3; +#X obj 253 170 random 30; +#X obj 339 172 random 30; +#X obj 336 201 / 5; +#X obj 254 196 / 5; +#X obj 74 101 moses 32.5; +#X connect 0 0 14 0; +#X connect 1 0 13 0; +#X connect 2 0 8 0; +#X connect 4 0 1 0; +#X connect 4 0 0 0; +#X connect 5 0 13 0; +#X connect 5 1 14 0; +#X connect 6 0 7 0; +#X connect 6 0 5 0; +#X connect 7 0 17 0; +#X connect 8 0 6 0; +#X connect 9 0 3 0; +#X connect 10 0 9 0; +#X connect 11 0 10 0; +#X connect 12 0 10 1; +#X connect 13 0 16 0; +#X connect 14 0 15 0; +#X connect 15 0 12 0; +#X connect 16 0 11 0; +#X connect 17 0 6 0; +#X restore 185 93 pd masses; +#X obj 128 49 t b b b b; +#X obj 40 149 t b b b b; +#X msg 155 133 mass fixe 0 1 0 0; +#X obj 197 434 outlet; +#X obj 94 7 inlet; +#X msg 36 375 Xmax 1111 \, Xmin -1111 \, Ymax 1111 \, Ymin -1111; +#X msg 48 338 setL linkD 1000 \, setL linkG 1000 \, setL linkH 1000 +\, setL linkB 1000; +#X msg 108 256 link linkD MlinkD sable 0.01 0 1 1000 100000; +#X msg 103 276 link linkG MlinkG sable 0.01 0 1 1000 100000; +#X msg 90 295 link linkH MlinkH sable 0.01 0 1 1000 100000; +#X msg 78 315 link linkB MlinkB sable 0.01 0 1 1000 100000; +#X msg 167 113 link rebond sable sable 0.003 0.005 1 0 0.4; +#X msg 146 153 setL rebond 0.4; +#X msg 120 221 mass MlinkD 0 1 -993.8 0 \, mass MlinkG 0 1 993.8 0 +\, mass MlinkH 0 1 0 996.2 \, mass MlinkB 0 1 0 -996.2; +#X msg 129 194 setDEnv sable 0.0001; +#X connect 0 0 10 0; +#X connect 1 0 7 0; +#X connect 2 0 0 0; +#X connect 3 0 7 0; +#X connect 6 0 0 0; +#X connect 7 0 8 0; +#X connect 7 0 19 0; +#X connect 7 1 18 0; +#X connect 7 1 9 0; +#X connect 7 2 6 0; +#X connect 7 3 2 0; +#X connect 8 1 13 0; +#X connect 8 2 14 0; +#X connect 8 2 16 0; +#X connect 8 2 17 0; +#X connect 8 2 15 0; +#X connect 8 3 20 0; +#X connect 8 3 21 0; +#X connect 9 0 0 0; +#X connect 11 0 7 0; +#X connect 12 0 0 0; +#X connect 13 0 0 0; +#X connect 14 0 0 0; +#X connect 15 0 0 0; +#X connect 16 0 0 0; +#X connect 17 0 0 0; +#X connect 18 0 0 0; +#X connect 19 0 0 0; +#X connect 20 0 0 0; +#X connect 21 0 0 0; +#X restore 68 494 pd creation; +#X obj 89 515 bang~; +#X msg 89 539 get massesForces; +#N canvas 0 22 450 300 simulation_gravite 0; +#X msg 28 224 forceX sable \$1; +#X msg 142 224 forceY sable \$1; +#X obj 29 60 min 80; +#X obj 28 82 max 0; +#X obj 28 107 - 40; +#X obj 142 60 min 80; +#X obj 141 82 max 0; +#X obj 143 151 - 40; +#X obj 142 102 * -1; +#X obj 143 126 + 80; +#X obj 48 132 bang~; +#X obj 30 39 inlet; +#X obj 140 38 inlet; +#X obj 25 257 outlet; +#X obj 125 179 f; +#X obj 36 178 f; +#X obj 31 201 / 2e+06; +#X obj 145 200 / 2e+06; +#X connect 0 0 13 0; +#X connect 1 0 13 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 4 0 15 1; +#X connect 5 0 6 0; +#X connect 6 0 8 0; +#X connect 7 0 14 1; +#X connect 8 0 9 0; +#X connect 9 0 7 0; +#X connect 10 0 14 0; +#X connect 10 0 15 0; +#X connect 11 0 2 0; +#X connect 12 0 5 0; +#X connect 14 0 17 0; +#X connect 15 0 16 0; +#X connect 16 0 0 0; +#X connect 17 0 1 0; +#X restore 212 496 pd simulation_gravite; +#X obj 68 475 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 65 417 metro 1; +#X obj 65 396 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 +; +#X msg 109 145 view 0 0 40 0 0 0 0 1 0; +#X msg 119 165 perspec -0.1 0.1 -0.1 0.1 1 100; +#X obj 116 119 b; +#X obj 135 96 loadbang; +#X obj 116 95 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 363 212 rotateXYZ -30 -20 0; +#X obj 65 444 t b b; +#X msg 209 242 destroy; +#X obj 209 197 key; +#X obj 209 218 sel 27; +#X obj 364 67 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 364 90 s lb; +#X obj 364 120 lb; +#X obj 126 396 lb; +#X msg 90 396 1; +#X msg 88 61 dimen 1680 1050 \, cursor 0; +#X obj 52 282 gemwin 58; +#X msg 51 13 dimen 672 420; +#X msg 69 38 create \, lighting 1 \, 1; +#N canvas 0 22 450 300 sound 0; +#X obj 19 279 dac~; +#X obj 202 220 *~ 1; +#X obj 268 191 sound_sable 28 29; +#X obj 43 101 sound_sable 12 13; +#X obj 20 61 sound_sable 4 5; +#X obj 79 164 sound_sable 24 25; +#X obj 33 80 sound_sable 8 9; +#X obj 56 123 sound_sable 16 17; +#X obj 66 144 sound_sable 20 21; +#X obj 191 43 sound_sable 2 3; +#X obj 201 64 sound_sable 6 7; +#X obj 214 83 sound_sable 10 11; +#X obj 224 104 sound_sable 14 15; +#X obj 237 126 sound_sable 18 19; +#X obj 247 148 sound_sable 22 23; +#X obj 260 167 sound_sable 26 27; +#X obj 277 212 sound_sable 30 31; +#X obj 19 246 *~ 0.2; +#X obj 13 11 inlet; +#X obj 10 40 sound_sable 0 1; +#X connect 1 0 17 0; +#X connect 2 0 1 0; +#X connect 2 1 16 0; +#X connect 3 0 17 0; +#X connect 3 1 7 0; +#X connect 4 0 17 0; +#X connect 4 1 6 0; +#X connect 5 0 17 0; +#X connect 5 1 9 0; +#X connect 6 0 17 0; +#X connect 6 1 3 0; +#X connect 7 0 17 0; +#X connect 7 1 8 0; +#X connect 8 0 17 0; +#X connect 8 1 5 0; +#X connect 9 0 1 0; +#X connect 9 1 10 0; +#X connect 10 0 1 0; +#X connect 10 1 11 0; +#X connect 11 0 1 0; +#X connect 11 1 12 0; +#X connect 12 0 1 0; +#X connect 12 1 13 0; +#X connect 13 0 1 0; +#X connect 13 1 14 0; +#X connect 14 0 1 0; +#X connect 14 1 15 0; +#X connect 15 0 1 0; +#X connect 15 1 2 0; +#X connect 16 0 1 0; +#X connect 17 0 0 0; +#X connect 17 0 0 1; +#X connect 18 0 19 0; +#X connect 19 0 17 0; +#X connect 19 1 4 0; +#X restore 153 626 pd sound; +#X obj 51 596 route massesPosId massesForces; +#X msg 149 427 infosL; +#X obj 51 575 pmpd2d --------------------------------; +#X text 322 450 <- gravity simulation; +#X connect 0 0 21 0; +#X connect 3 0 32 0; +#X connect 5 0 8 0; +#X connect 6 0 12 0; +#X connect 6 1 12 1; +#X connect 7 0 5 0; +#X connect 8 0 38 0; +#X connect 9 0 38 0; +#X connect 10 0 11 0; +#X connect 11 0 38 0; +#X connect 12 0 38 0; +#X connect 13 0 9 0; +#X connect 14 0 22 0; +#X connect 15 0 14 0; +#X connect 16 0 32 0; +#X connect 17 0 32 0; +#X connect 18 0 16 0; +#X connect 18 0 17 0; +#X connect 18 0 3 0; +#X connect 19 0 18 0; +#X connect 20 0 18 0; +#X connect 21 0 1 0; +#X connect 22 0 38 0; +#X connect 22 1 4 1; +#X connect 23 0 32 0; +#X connect 24 0 25 0; +#X connect 25 0 23 0; +#X connect 26 0 27 0; +#X connect 28 0 2 0; +#X connect 29 0 30 0; +#X connect 30 0 15 0; +#X connect 31 0 32 0; +#X connect 33 0 32 0; +#X connect 34 0 32 0; +#X connect 36 0 4 0; +#X connect 36 1 35 0; +#X connect 37 0 38 0; +#X connect 38 0 36 0; diff --git a/examples/sound_sable.pd b/examples/sound_sable.pd new file mode 100644 index 0000000..75f48a6 --- /dev/null +++ b/examples/sound_sable.pd @@ -0,0 +1,67 @@ +#N canvas 420 100 846 647 10; +#X obj 62 56 inlet; +#X obj 179 112 outlet; +#X obj 63 159 unpack f f; +#X obj 63 231 +; +#X obj 63 182 t f f; +#X obj 63 205 *; +#X obj 128 181 t f f; +#X obj 128 204 *; +#X obj 65 453 line~; +#X obj 66 543 *~; +#X obj 143 412 random 1000; +#X obj 142 479 osc~; +#X obj 66 571 outlet~; +#X obj 65 404 min 0.1; +#X obj 181 162 unpack f f; +#X obj 181 234 +; +#X obj 181 185 t f f; +#X obj 181 208 *; +#X obj 246 184 t f f; +#X obj 246 207 *; +#X obj 61 289 max; +#X obj 143 434 / 3; +#X obj 65 87 route \$1 \$2; +#X obj 60 332 max 0; +#X obj 63 252 * 1e+06; +#X obj 180 255 * 1e+06; +#X msg 64 430 \$1 0.5; +#X obj 142 457 + 300; +#X obj 143 390 lb; +#X obj 60 312 - 0.009; +#X connect 0 0 22 0; +#X connect 2 0 4 0; +#X connect 2 1 6 0; +#X connect 3 0 24 0; +#X connect 4 0 5 0; +#X connect 4 1 5 1; +#X connect 5 0 3 0; +#X connect 6 0 7 0; +#X connect 6 1 7 1; +#X connect 7 0 3 1; +#X connect 8 0 9 0; +#X connect 9 0 12 0; +#X connect 10 0 21 0; +#X connect 11 0 9 1; +#X connect 13 0 26 0; +#X connect 14 0 16 0; +#X connect 14 1 18 0; +#X connect 15 0 25 0; +#X connect 16 0 17 0; +#X connect 16 1 17 1; +#X connect 17 0 15 0; +#X connect 18 0 19 0; +#X connect 18 1 19 1; +#X connect 19 0 15 1; +#X connect 20 0 29 0; +#X connect 21 0 27 0; +#X connect 22 0 2 0; +#X connect 22 1 14 0; +#X connect 22 2 1 0; +#X connect 23 0 13 0; +#X connect 24 0 20 0; +#X connect 25 0 20 1; +#X connect 26 0 8 0; +#X connect 27 0 11 0; +#X connect 28 0 10 0; +#X connect 29 0 23 0; |