aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis CI <zmoelnig@travis-ci.umlaeute.mur.at>2019-02-07 23:07:09 +0000
committerTravis CI <zmoelnig@travis-ci.umlaeute.mur.at>2019-02-07 23:07:09 +0000
commit458374b222dddc23df056298b1485ac5508624bd (patch)
tree1bfa1d84bacae16a4e042bb87b2b157758735492
parent336aab27be02c79cebad1b9ee1a96425222036e0 (diff)
Gem 6ea7a457bfdbafb64c4123cb12882643bcf4109f osx/x86_64
built 'master:6ea7a457bfdbafb64c4123cb12882643bcf4109f' for osx/x86_64
-rwxr-xr-xGem/Gem.pd_darwinbin5346432 -> 5346840 bytes
-rw-r--r--Gem/develop/include/Gem/Gem/GemGL.h10
-rw-r--r--Gem/develop/include/Gem/Utils/GLUtil.h2
-rw-r--r--Gem/examples/01.basic/01.redSquare.pd2
-rw-r--r--Gem/examples/01.basic/02.blueRectangle.pd2
-rw-r--r--Gem/examples/01.basic/03.disk.pd2
-rw-r--r--Gem/examples/01.basic/04.PrimTri.pd4
-rw-r--r--Gem/examples/01.basic/05.cube.pd2
-rw-r--r--Gem/examples/01.basic/06.sphere.pd2
-rw-r--r--Gem/examples/01.basic/07.cylinder.pd2
-rw-r--r--Gem/examples/01.basic/08.model.pd2
-rw-r--r--Gem/examples/01.basic/09.yelloTeapot.pd2
-rw-r--r--Gem/examples/02.advanced/00.gemwin-subpatch.pd4
-rw-r--r--Gem/examples/02.advanced/01.Separator.pd4
-rw-r--r--Gem/examples/02.advanced/02.Ortho.pd2
-rw-r--r--Gem/examples/02.advanced/03.View.pd4
-rw-r--r--Gem/examples/02.advanced/03.View_OSD.pd2
-rw-r--r--Gem/examples/02.advanced/04.Fog.pd2
-rw-r--r--Gem/examples/02.advanced/05.Stereo.pd4
-rw-r--r--Gem/examples/02.advanced/06.StereoParticle.pd2
-rw-r--r--Gem/examples/02.advanced/07.Snapshot1.pd2
-rw-r--r--Gem/examples/02.advanced/08.Snapshot2.pd4
-rw-r--r--Gem/examples/02.advanced/09.SnapshotSave.pd4
-rw-r--r--Gem/examples/02.advanced/09.SnapshotSaveHD.pd4
-rw-r--r--Gem/examples/02.advanced/10.LinearPath.pd4
-rw-r--r--Gem/examples/02.advanced/11.SplinePath.pd2
-rw-r--r--Gem/examples/02.advanced/12.Hsv.pd4
-rw-r--r--Gem/examples/02.advanced/13.ModelRescale.pd4
-rw-r--r--Gem/examples/02.advanced/14.RenderOrder.pd4
-rw-r--r--Gem/examples/02.advanced/15.GemWin.pd8
-rw-r--r--Gem/examples/02.advanced/16.vertex_program.pd2
-rw-r--r--Gem/examples/02.advanced/17.fragment_program.pd2
-rw-r--r--Gem/examples/02.advanced/18.gl_shading_language.pd6
-rw-r--r--Gem/examples/02.advanced/19.pointer.pd4
-rw-r--r--Gem/examples/02.advanced/20.double-gemhead_vs_repeat.pd2
-rw-r--r--Gem/examples/02.advanced/21.basic_LSystem.pd8
-rw-r--r--Gem/examples/02.advanced/22.double-iterative.pd4
-rw-r--r--Gem/examples/02.advanced/23.SplitScreen.pd12
-rw-r--r--Gem/examples/02.advanced/snapshotHD.pd4
-rw-r--r--Gem/examples/03.lighting/01.world_light.pd2
-rw-r--r--Gem/examples/03.lighting/02.light.pd2
-rw-r--r--Gem/examples/03.lighting/03.controlLights.pd2
-rw-r--r--Gem/examples/03.lighting/04.moveSpheres.pd4
-rw-r--r--Gem/examples/03.lighting/05.materials.pd2
-rw-r--r--Gem/examples/04.pix/01.image.pd2
-rw-r--r--Gem/examples/04.pix/02.multiimage.pd2
-rw-r--r--Gem/examples/04.pix/04.ImageInPlace.pd2
-rw-r--r--Gem/examples/04.pix/05.film.pd8
-rw-r--r--Gem/examples/04.pix/05.movie.pd4
-rw-r--r--Gem/examples/04.pix/06.PixRect.pd2
-rw-r--r--Gem/examples/04.pix/07.PixSet.pd2
-rw-r--r--Gem/examples/04.pix/08.PixDump.pd4
-rw-r--r--Gem/examples/04.pix/09.Histogram.pd4
-rw-r--r--Gem/examples/04.pix/10.PixDataSimple.pd2
-rw-r--r--Gem/examples/04.pix/11.PixDataComplex.pd2
-rw-r--r--Gem/examples/04.pix/12.add.pd2
-rw-r--r--Gem/examples/04.pix/12.blending.pd4
-rw-r--r--Gem/examples/04.pix/12.composite.pd2
-rw-r--r--Gem/examples/04.pix/12.pix_multiply.pd2
-rw-r--r--Gem/examples/04.pix/13.maskDancer.pd4
-rw-r--r--Gem/examples/04.pix/14.takeAlpha.pd2
-rw-r--r--Gem/examples/04.pix/15.pix_alpha.pd2
-rw-r--r--Gem/examples/04.pix/16.alphaGrey.pd8
-rw-r--r--Gem/examples/04.pix/16.pix_2grey.pd2
-rw-r--r--Gem/examples/04.pix/17.pix_gain.pd2
-rw-r--r--Gem/examples/04.pix/18.Curves.pd8
-rw-r--r--Gem/examples/04.pix/19.colorMatrix.pd4
-rw-r--r--Gem/examples/04.pix/20.convolve.pd4
-rw-r--r--Gem/examples/04.pix/22.biquad.pd4
-rw-r--r--Gem/examples/04.pix/23.gravity.pd4
-rw-r--r--Gem/examples/04.pix/24.time-filtering.pd2
-rw-r--r--Gem/examples/04.pix/25.buffer.pd4
-rw-r--r--Gem/examples/04.pix/26.framebuffer_readback.pd10
-rw-r--r--Gem/examples/04.pix/27.bitmap_font.pd2
-rw-r--r--Gem/examples/04.video/00.SimpleVideo.pd4
-rw-r--r--Gem/examples/04.video/01.VideoPaint.pd2
-rw-r--r--Gem/examples/04.video/02.VideoSphere.pd2
-rw-r--r--Gem/examples/04.video/03.movement_detection.pd2
-rw-r--r--Gem/examples/04.video/04.videoRTX.pd2
-rw-r--r--Gem/examples/04.video/05.buffer_rtx.pd4
-rw-r--r--Gem/examples/04.video/06.frame_diff_tracking.pd4
-rw-r--r--Gem/examples/04.video/07.bg_subtract_tracking.pd4
-rw-r--r--Gem/examples/04.video/08.color_classification.pd2
-rw-r--r--Gem/examples/05.text/01.Text.pd4
-rw-r--r--Gem/examples/05.text/01.TextNoLoadBang.pd4
-rw-r--r--Gem/examples/05.text/03.ChangeText.pd2
-rw-r--r--Gem/examples/05.text/03.ChangeTextNoLoadBang.pd2
-rw-r--r--Gem/examples/06.particle/01.simple.pd2
-rw-r--r--Gem/examples/06.particle/02.fountain.pd2
-rw-r--r--Gem/examples/06.particle/03.orbit.pd2
-rw-r--r--Gem/examples/06.particle/04.combo.pd4
-rw-r--r--Gem/examples/06.particle/05.twoSrc.pd6
-rw-r--r--Gem/examples/06.particle/06.target.pd2
-rw-r--r--Gem/examples/06.particle/07.render.pd4
-rw-r--r--Gem/examples/06.particle/08.info.pd2
-rw-r--r--Gem/examples/06.particle/09.sink.pd2
-rw-r--r--Gem/examples/07.texture/01.texture.pd4
-rw-r--r--Gem/examples/07.texture/02.TexCoord.pd4
-rw-r--r--Gem/examples/07.texture/04.moveImages.pd4
-rw-r--r--Gem/examples/07.texture/05.newWave.pd2
-rw-r--r--Gem/examples/07.texture/06.ripple.pd4
-rw-r--r--Gem/examples/07.texture/07.feedback.pd4
-rw-r--r--Gem/examples/07.texture/08.MotionBlur.pd4
-rw-r--r--Gem/examples/07.texture/09.sharedTextures.pd4
-rw-r--r--Gem/examples/07.texture/10.framebuffer.pd152
-rw-r--r--Gem/examples/07.texture/11.multiples_gemhead_in_a_framebuffer.pd4
-rw-r--r--Gem/examples/08.io/01.Mouse.pd4
-rw-r--r--Gem/examples/08.io/02.Tablet.pd6
-rw-r--r--Gem/examples/08.io/03.Orb.pd26
-rw-r--r--Gem/examples/08.io/04.UseOrb.pd2
-rw-r--r--Gem/examples/09.openGL/01.primQuad.pd4
-rw-r--r--Gem/examples/09.openGL/02.displayList.pd4
-rw-r--r--Gem/examples/09.openGL/03.stencilBuffer.pd191
-rw-r--r--Gem/examples/09.openGL/04.clearZ.pd4
-rw-r--r--Gem/examples/09.openGL/05.load_identity_matrix.pd4
-rw-r--r--Gem/examples/10.glsl/01.simple_texture.pd6
-rw-r--r--Gem/examples/10.glsl/02.primitive_distortion.pd10
-rw-r--r--Gem/examples/10.glsl/03.texture_distortion.pd6
-rw-r--r--Gem/examples/10.glsl/04.game_of_life.pd4
-rw-r--r--Gem/examples/10.glsl/05.multitexture.pd6
-rw-r--r--Gem/examples/10.glsl/05.multitexture_bis.pd4
-rw-r--r--Gem/examples/10.glsl/06.rectangle_multitexture.pd2
-rw-r--r--Gem/examples/10.glsl/07.framebuffer_and_shader.pd6
-rw-r--r--Gem/examples/10.glsl/08.multi_pass_rendering.pd4
-rw-r--r--Gem/examples/10.glsl/09.vertex_texture_fetching.pd4
-rw-r--r--Gem/examples/10.glsl/10.GPGPU_Physical_model.pd10
-rw-r--r--Gem/examples/10.glsl/11.geometry.pd6
-rw-r--r--Gem/examples/10.glsl/12.tri2fan.pd4
-rw-r--r--Gem/examples/10.glsl/13.panoramique.pd248
-rw-r--r--Gem/examples/10.glsl/14.blur.pd2
-rw-r--r--Gem/examples/10.glsl/15.bicubic_image_interpolation.pd2
-rw-r--r--Gem/examples/10.glsl/16.vertexbuffer_attributes.pd8
-rw-r--r--Gem/examples/11.obj-exporter/obj_cube.pd2
-rw-r--r--Gem/examples/11.obj-exporter/obj_exporter-help.pd4
-rw-r--r--Gem/examples/11.obj-exporter/obj_exporter.pd2
-rw-r--r--Gem/examples/12.multi_screen_projection/01.flat_projection-help.pd2
-rw-r--r--Gem/examples/12.multi_screen_projection/02.nfp-help.pd2
-rw-r--r--Gem/examples/13.recursion/01.repetition_is_futile.pd4
-rw-r--r--Gem/examples/13.recursion/02.iteration_is_insufficient.pd4
-rw-r--r--Gem/examples/13.recursion/03.recursive_spiral.pd4
-rw-r--r--Gem/examples/13.recursion/04.binary_tree.pd4
-rw-r--r--Gem/examples/13.recursion/05.n-ary_tree.pd4
-rw-r--r--Gem/examples/13.recursion/06.breaking_symmetry.pd4
-rw-r--r--Gem/examples/14.multiple_windows/01.basic_example.pd18
-rw-r--r--Gem/examples/14.multiple_windows/02.switch_context.pd4
-rw-r--r--Gem/examples/14.multiple_windows/03.texture_sharing.pd44
-rwxr-xr-xGem/gem_filmAVF.sobin55604 -> 55604 bytes
-rwxr-xr-xGem/gem_imageIO.sobin34376 -> 34376 bytes
-rwxr-xr-xGem/gem_imageJPEG.sobin50788 -> 50788 bytes
-rwxr-xr-xGem/gem_imageSGI.sobin58196 -> 58196 bytes
-rwxr-xr-xGem/gem_imageSTB.sobin210688 -> 210688 bytes
-rwxr-xr-xGem/gem_imageTIFF.sobin66320 -> 66320 bytes
-rwxr-xr-xGem/gem_modelOBJ.sobin96632 -> 96632 bytes
-rwxr-xr-xGem/gem_videoAVF.sobin61252 -> 61252 bytes
-rwxr-xr-xGem/gemcocoawindow.pd_darwinbin37104 -> 37104 bytes
-rwxr-xr-xGem/gemglutwindow.pd_darwinbin43784 -> 43784 bytes
-rwxr-xr-xGem/gemmacoswindow.pd_darwinbin37000 -> 37000 bytes
-rw-r--r--Gem/pix_drum-help.pd67
-rwxr-xr-xGem/pix_drum.pd_darwinbin26304 -> 26304 bytes
-rw-r--r--Gem/pix_fiducialtrack-help.pd4
-rwxr-xr-xGem/pix_fiducialtrack.pd_darwinbin75484 -> 75484 bytes
-rw-r--r--Gem/pix_hit-help.pd4
-rwxr-xr-xGem/pix_hit.pd_darwinbin24536 -> 24536 bytes
-rw-r--r--Gem/pix_mano-help.pd209
-rwxr-xr-xGem/pix_mano.pd_darwinbin40640 -> 40640 bytes
-rw-r--r--Gem/pix_videoDS-help.pd64
166 files changed, 914 insertions, 621 deletions
diff --git a/Gem/Gem.pd_darwin b/Gem/Gem.pd_darwin
index 89faeef..15d0b54 100755
--- a/Gem/Gem.pd_darwin
+++ b/Gem/Gem.pd_darwin
Binary files differ
diff --git a/Gem/develop/include/Gem/Gem/GemGL.h b/Gem/develop/include/Gem/Gem/GemGL.h
index ef3b250..49ac407 100644
--- a/Gem/develop/include/Gem/Gem/GemGL.h
+++ b/Gem/develop/include/Gem/Gem/GemGL.h
@@ -32,11 +32,19 @@
# define GLEW_MX
#endif
+#ifndef GEM_HAVE_GLU
+# define GLEW_NO_GLU
+#else
+#endif
+
+
#ifdef __EMSCRIPTEN__
# include <GL/glew.h>
# include <SDL/SDL_opengl.h>
# include <GL/gl.h>
-# include <GL/glu.h>
+# ifdef GEM_HAVE_GLU
+# include <GL/glu.h>
+# endif
#else
# include "Gem/glew.h"
#endif
diff --git a/Gem/develop/include/Gem/Utils/GLUtil.h b/Gem/develop/include/Gem/Utils/GLUtil.h
index fb15b25..a28377c 100644
--- a/Gem/develop/include/Gem/Utils/GLUtil.h
+++ b/Gem/develop/include/Gem/Utils/GLUtil.h
@@ -46,6 +46,8 @@ GEM_EXTERN extern int getGLdefine(const struct _symbol *name);
GEM_EXTERN extern int getGLdefine(const struct _atom *name);
GEM_EXTERN extern int getGLbitfield(int argc,
struct _atom *argv);
+GEM_EXTERN extern void gluLookAt(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble);
+GEM_EXTERN extern void gluPerspective(GLdouble, GLdouble, GLdouble, GLdouble);
diff --git a/Gem/examples/01.basic/01.redSquare.pd b/Gem/examples/01.basic/01.redSquare.pd
index c64e4a2..806a454 100644
--- a/Gem/examples/01.basic/01.redSquare.pd
+++ b/Gem/examples/01.basic/01.redSquare.pd
@@ -1,4 +1,5 @@
#N canvas 139 83 602 502 10;
+#X declare -lib Gem;
#X obj 240 186 gemhead;
#X floatatom 348 258 0 0 0 0 - - -;
#X obj 240 246 color;
@@ -49,6 +50,7 @@
#X text 386 157 red;
#X text 389 192 white;
#X text 379 260 (in degree);
+#X obj 495 5 declare -lib Gem;
#X connect 0 0 2 0;
#X connect 1 0 13 1;
#X connect 2 0 13 0;
diff --git a/Gem/examples/01.basic/02.blueRectangle.pd b/Gem/examples/01.basic/02.blueRectangle.pd
index 5d522bc..a62a8df 100644
--- a/Gem/examples/01.basic/02.blueRectangle.pd
+++ b/Gem/examples/01.basic/02.blueRectangle.pd
@@ -1,4 +1,5 @@
#N canvas 396 160 600 500 10;
+#X declare -lib Gem;
#X obj 350 159 gemhead;
#X obj 350 337 rotate;
#X floatatom 409 275 0 0 0 0 - - -;
@@ -51,6 +52,7 @@
#X text 495 146 white;
#X obj 350 219 color 0 0 1;
#X text 422 221 (blue);
+#X obj 493 6 declare -lib Gem;
#X connect 0 0 21 0;
#X connect 1 0 8 0;
#X connect 2 0 1 1;
diff --git a/Gem/examples/01.basic/03.disk.pd b/Gem/examples/01.basic/03.disk.pd
index e65fbf8..2a7e9bc 100644
--- a/Gem/examples/01.basic/03.disk.pd
+++ b/Gem/examples/01.basic/03.disk.pd
@@ -1,4 +1,5 @@
#N canvas 28 208 601 392 10;
+#X declare -lib Gem;
#X obj 274 138 gemhead;
#X floatatom 350 169 0 0 0 0 - - -;
#X obj 22 325 world_light;
@@ -46,6 +47,7 @@
#X restore 35 103 pd gemwin;
#X msg 35 79 create;
#X text 31 59 Create window and render;
+#X obj 495 5 declare -lib Gem;
#X connect 0 0 6 0;
#X connect 1 0 6 1;
#X connect 1 0 6 2;
diff --git a/Gem/examples/01.basic/04.PrimTri.pd b/Gem/examples/01.basic/04.PrimTri.pd
index 98de642..8695fd1 100644
--- a/Gem/examples/01.basic/04.PrimTri.pd
+++ b/Gem/examples/01.basic/04.PrimTri.pd
@@ -1,4 +1,5 @@
-#N canvas 173 -28 667 537 12;
+#N canvas 173 61 667 537 12;
+#X declare -lib Gem;
#X obj 306 137 gemhead;
#X obj 306 248 rotate;
#X floatatom 372 194 0 0 0 0 - - -;
@@ -50,6 +51,7 @@
#X restore 35 153 pd gemwin;
#X msg 35 129 create;
#X text 31 109 Create window and render;
+#X obj 543 6 declare -lib Gem;
#X connect 0 0 1 0;
#X connect 1 0 5 0;
#X connect 2 0 1 1;
diff --git a/Gem/examples/01.basic/05.cube.pd b/Gem/examples/01.basic/05.cube.pd
index dd5d72e..cdd91be 100644
--- a/Gem/examples/01.basic/05.cube.pd
+++ b/Gem/examples/01.basic/05.cube.pd
@@ -1,4 +1,5 @@
#N canvas 361 165 602 280 10;
+#X declare -lib Gem;
#X obj 372 91 gemhead;
#X floatatom 416 122 0 -4.5 4.5 0 - - -;
#X obj 372 197 cube;
@@ -36,6 +37,7 @@
#X restore 35 153 pd gemwin;
#X msg 35 129 create;
#X text 31 109 Create window and render;
+#X obj 495 5 declare -lib Gem;
#X connect 0 0 3 0;
#X connect 1 0 3 1;
#X connect 1 0 3 2;
diff --git a/Gem/examples/01.basic/06.sphere.pd b/Gem/examples/01.basic/06.sphere.pd
index 9117bf7..665c2ff 100644
--- a/Gem/examples/01.basic/06.sphere.pd
+++ b/Gem/examples/01.basic/06.sphere.pd
@@ -1,4 +1,5 @@
#N canvas 393 222 603 394 10;
+#X declare -lib Gem;
#X obj 275 174 gemhead;
#X floatatom 319 205 0 0 0 0 - - -;
#X obj 275 317 sphere;
@@ -44,6 +45,7 @@
#X restore 36 97 pd gemwin;
#X msg 36 73 create;
#X text 32 53 Create window and render;
+#X obj 495 5 declare -lib Gem;
#X connect 0 0 6 0;
#X connect 1 0 6 1;
#X connect 1 0 6 2;
diff --git a/Gem/examples/01.basic/07.cylinder.pd b/Gem/examples/01.basic/07.cylinder.pd
index fcc9bfe..7dcc998 100644
--- a/Gem/examples/01.basic/07.cylinder.pd
+++ b/Gem/examples/01.basic/07.cylinder.pd
@@ -1,4 +1,5 @@
#N canvas 393 222 603 394 10;
+#X declare -lib Gem;
#X obj 274 138 gemhead;
#X floatatom 318 169 0 0 0 0 - - -;
#X obj 22 325 world_light;
@@ -48,6 +49,7 @@
#X obj 94 325 world_light;
#X obj 94 283 gemhead 1;
#X obj 94 302 rotateXYZ 12 54 20;
+#X obj 495 5 declare -lib Gem;
#X connect 0 0 8 0;
#X connect 1 0 8 1;
#X connect 1 0 8 2;
diff --git a/Gem/examples/01.basic/08.model.pd b/Gem/examples/01.basic/08.model.pd
index 882095e..44f570f 100644
--- a/Gem/examples/01.basic/08.model.pd
+++ b/Gem/examples/01.basic/08.model.pd
@@ -1,4 +1,5 @@
#N canvas 348 152 673 462 12;
+#X declare -lib Gem;
#X floatatom 460 79 0 0 0 0 - - -;
#X obj 385 44 gemhead;
#X floatatom 446 179 0 0 0 0 - - -;
@@ -50,6 +51,7 @@
#X obj 385 205 rotate 0 0 1 0;
#X obj 385 134 translate 0 0 0 1;
#X obj 460 103 / 100;
+#X obj 543 6 declare -lib Gem;
#X connect 0 0 14 0;
#X connect 1 0 13 0;
#X connect 2 0 12 1;
diff --git a/Gem/examples/01.basic/09.yelloTeapot.pd b/Gem/examples/01.basic/09.yelloTeapot.pd
index 328e9b8..1e65be3 100644
--- a/Gem/examples/01.basic/09.yelloTeapot.pd
+++ b/Gem/examples/01.basic/09.yelloTeapot.pd
@@ -1,4 +1,5 @@
#N canvas 56 98 635 502 12;
+#X declare -lib Gem;
#X obj 350 226 gemhead;
#X floatatom 458 298 0 0 0 0 - - -;
#X obj 350 286 color;
@@ -51,6 +52,7 @@
#X text 32 73 Create window and render;
#X text 32 261 this is the famous;
#X text 52 294 utah teapot;
+#X obj 515 5 declare -lib Gem;
#X connect 0 0 2 0;
#X connect 1 0 6 1;
#X connect 1 0 6 2;
diff --git a/Gem/examples/02.advanced/00.gemwin-subpatch.pd b/Gem/examples/02.advanced/00.gemwin-subpatch.pd
index 5f0fc8f..4bc0123 100644
--- a/Gem/examples/02.advanced/00.gemwin-subpatch.pd
+++ b/Gem/examples/02.advanced/00.gemwin-subpatch.pd
@@ -1,4 +1,5 @@
-#N canvas 0 0 725 412 10;
+#N canvas 6 61 725 412 10;
+#X declare -lib Gem;
#N canvas 95 194 290 179 Gem.init 0;
#X obj 83 30 loadbang;
#X msg 83 67 reset;
@@ -58,4 +59,5 @@ understands.;
anymore...;
#X text 249 113 for the sake of simplicity \, from now on the examples
will use the subpatch on the left side to control the Gem-window.;
+#X obj 618 8 declare -lib Gem;
#X connect 0 0 1 0;
diff --git a/Gem/examples/02.advanced/01.Separator.pd b/Gem/examples/02.advanced/01.Separator.pd
index 06d4c7a..c3ded3c 100644
--- a/Gem/examples/02.advanced/01.Separator.pd
+++ b/Gem/examples/02.advanced/01.Separator.pd
@@ -1,4 +1,5 @@
-#N canvas 215 32 781 537 10;
+#N canvas 215 61 781 537 10;
+#X declare -lib Gem;
#X obj 607 137 separator;
#X msg 697 200 1;
#X msg 734 199 0;
@@ -100,6 +101,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 100 134 pd gemwin;
+#X obj 668 8 declare -lib Gem;
#X connect 0 0 37 0;
#X connect 1 0 30 0;
#X connect 2 0 30 0;
diff --git a/Gem/examples/02.advanced/02.Ortho.pd b/Gem/examples/02.advanced/02.Ortho.pd
index 329b2f8..d53a616 100644
--- a/Gem/examples/02.advanced/02.Ortho.pd
+++ b/Gem/examples/02.advanced/02.Ortho.pd
@@ -1,4 +1,5 @@
#N canvas 396 100 600 500 10;
+#X declare -lib Gem;
#X obj 358 140 gemhead;
#X floatatom 377 222 0 0 0 0 - - -;
#X obj 358 256 rotateXYZ;
@@ -71,6 +72,7 @@
#X restore 18 95 pd gemwin;
#X text 142 32 one model is in "perspective" mode;
#X text 159 54 the other is in "orthographic" mode;
+#X obj 488 8 declare -lib Gem;
#X connect 0 0 12 0;
#X connect 1 0 2 1;
#X connect 2 0 14 0;
diff --git a/Gem/examples/02.advanced/03.View.pd b/Gem/examples/02.advanced/03.View.pd
index 835e551..b6c6b6f 100644
--- a/Gem/examples/02.advanced/03.View.pd
+++ b/Gem/examples/02.advanced/03.View.pd
@@ -1,4 +1,5 @@
-#N canvas 55 43 729 499 10;
+#N canvas 55 61 729 499 10;
+#X declare -lib Gem;
#X obj 309 426 gemhead;
#X obj 179 426 gemhead 1;
#X obj 179 464 world_light;
@@ -72,6 +73,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 29 200 pd gemwin;
+#X obj 618 8 declare -lib Gem;
#X connect 0 0 3 0;
#X connect 1 0 2 0;
#X connect 4 0 22 0;
diff --git a/Gem/examples/02.advanced/03.View_OSD.pd b/Gem/examples/02.advanced/03.View_OSD.pd
index 8f9e547..16f755c 100644
--- a/Gem/examples/02.advanced/03.View_OSD.pd
+++ b/Gem/examples/02.advanced/03.View_OSD.pd
@@ -1,4 +1,5 @@
#N canvas 50 151 946 464 10;
+#X declare -lib Gem;
#N canvas 50 173 290 229 Gem.init 0;
#X obj 71 191 outlet;
#X obj 71 81 loadbang;
@@ -292,6 +293,7 @@ and cetera...;
#X obj 604 88 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 2
2;
#X text 632 87 <- should the view affect light position or not;
+#X obj 828 8 declare -lib Gem;
#X connect 0 0 32 0;
#X connect 2 0 11 0;
#X connect 3 0 2 0;
diff --git a/Gem/examples/02.advanced/04.Fog.pd b/Gem/examples/02.advanced/04.Fog.pd
index 28991af..327fdb9 100644
--- a/Gem/examples/02.advanced/04.Fog.pd
+++ b/Gem/examples/02.advanced/04.Fog.pd
@@ -1,4 +1,5 @@
#N canvas 275 99 721 506 10;
+#X declare -lib Gem;
#X floatatom 414 85 0 0 0 0 - - -;
#X obj 385 44 gemhead;
#X floatatom 403 165 0 0 0 0 - - -;
@@ -82,6 +83,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 40 258 pd gemwin;
+#X obj 608 8 declare -lib Gem;
#X connect 0 0 6 3;
#X connect 1 0 6 0;
#X connect 2 0 7 1;
diff --git a/Gem/examples/02.advanced/05.Stereo.pd b/Gem/examples/02.advanced/05.Stereo.pd
index ec6edc0..f2e9113 100644
--- a/Gem/examples/02.advanced/05.Stereo.pd
+++ b/Gem/examples/02.advanced/05.Stereo.pd
@@ -1,4 +1,5 @@
-#N canvas 31 50 600 504 10;
+#N canvas 31 61 600 504 10;
+#X declare -lib Gem;
#X obj 426 54 gemhead;
#X floatatom 464 134 0 0 0 0 - - -;
#X obj 464 307 gemhead 1;
@@ -81,6 +82,7 @@ stereo";
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 58 207 pd gemwin;
+#X obj 488 8 declare -lib Gem;
#X connect 0 0 6 0;
#X connect 1 0 7 2;
#X connect 2 0 3 0;
diff --git a/Gem/examples/02.advanced/06.StereoParticle.pd b/Gem/examples/02.advanced/06.StereoParticle.pd
index 80b1f06..b5c86b8 100644
--- a/Gem/examples/02.advanced/06.StereoParticle.pd
+++ b/Gem/examples/02.advanced/06.StereoParticle.pd
@@ -1,4 +1,5 @@
#N canvas 396 160 600 500 10;
+#X declare -lib Gem;
#X obj 198 50 gemhead;
#X obj 198 82 part_head;
#X obj 198 136 part_color;
@@ -72,6 +73,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 31 187 pd gemwin;
+#X obj 488 8 declare -lib Gem;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 20 0;
diff --git a/Gem/examples/02.advanced/07.Snapshot1.pd b/Gem/examples/02.advanced/07.Snapshot1.pd
index 55b7776..72ad567 100644
--- a/Gem/examples/02.advanced/07.Snapshot1.pd
+++ b/Gem/examples/02.advanced/07.Snapshot1.pd
@@ -1,4 +1,5 @@
#N canvas 396 100 600 375 10;
+#X declare -lib Gem;
#X obj 210 252 gemhead;
#X obj 210 312 model ../data/venus.obj;
#X text 117 4 snap a portion of the graphics window into a texture
@@ -74,6 +75,7 @@ drawing!;
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 30 137 pd gemwin;
+#X obj 488 8 declare -lib Gem;
#X connect 0 0 3 0;
#X connect 3 0 1 0;
#X connect 4 0 10 0;
diff --git a/Gem/examples/02.advanced/08.Snapshot2.pd b/Gem/examples/02.advanced/08.Snapshot2.pd
index ef84f34..70f894a 100644
--- a/Gem/examples/02.advanced/08.Snapshot2.pd
+++ b/Gem/examples/02.advanced/08.Snapshot2.pd
@@ -1,4 +1,5 @@
-#N canvas 389 0 635 537 10;
+#N canvas 389 61 635 537 10;
+#X declare -lib Gem;
#X obj 64 405 gemhead;
#X obj 64 509 model ../data/venus.obj;
#X text 115 2 snap a portion of the graphics window into a texture
@@ -110,6 +111,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 18 206 pd gemwin;
+#X obj 528 8 declare -lib Gem;
#X connect 0 0 25 0;
#X connect 3 0 4 0;
#X connect 4 0 11 0;
diff --git a/Gem/examples/02.advanced/09.SnapshotSave.pd b/Gem/examples/02.advanced/09.SnapshotSave.pd
index 92bc2eb..537461e 100644
--- a/Gem/examples/02.advanced/09.SnapshotSave.pd
+++ b/Gem/examples/02.advanced/09.SnapshotSave.pd
@@ -1,4 +1,5 @@
#N canvas 54 216 940 412 10;
+#X declare -lib Gem;
#N canvas 338 262 290 225 Gem.init 0;
#X obj 83 30 loadbang;
#X msg 161 76 reset;
@@ -60,7 +61,7 @@ ensure that all that you want is already rendered onto the screen.
1;
#N canvas 340 107 682 322 gemwin 0;
#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
--1 -1 1 1;
+-1 -1 0 1;
#X obj 102 161 r \$0-gemstart;
#X obj 102 182 select 1 0;
#X msg 102 214 create \, 1;
@@ -103,6 +104,7 @@ ensure that all that you want is already rendered onto the screen.
#X obj 60 362 color 0 1 0;
#X obj 60 382 sphere 0.5;
#X obj 652 326 pix_write;
+#X obj 828 8 declare -lib Gem;
#X connect 0 0 34 0;
#X connect 1 0 2 0;
#X connect 2 0 5 0;
diff --git a/Gem/examples/02.advanced/09.SnapshotSaveHD.pd b/Gem/examples/02.advanced/09.SnapshotSaveHD.pd
index b14083b..171729b 100644
--- a/Gem/examples/02.advanced/09.SnapshotSaveHD.pd
+++ b/Gem/examples/02.advanced/09.SnapshotSaveHD.pd
@@ -1,4 +1,5 @@
-#N canvas 73 51 832 392 10;
+#N canvas 73 61 832 392 10;
+#X declare -lib Gem;
#X msg 26 26 create \, 1;
#X msg 39 53 destroy;
#X obj 340 29 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
@@ -28,6 +29,7 @@ pixels);
resolution is limited by your openGL-implementation!;
#X msg 342 90 symbol /tmp/foo.tif;
#X text 485 93 <- save as another imagefile.;
+#X obj 718 8 declare -lib Gem;
#X connect 0 0 6 0;
#X connect 1 0 6 0;
#X connect 2 0 17 1;
diff --git a/Gem/examples/02.advanced/10.LinearPath.pd b/Gem/examples/02.advanced/10.LinearPath.pd
index 1a75686..bf36f59 100644
--- a/Gem/examples/02.advanced/10.LinearPath.pd
+++ b/Gem/examples/02.advanced/10.LinearPath.pd
@@ -1,4 +1,5 @@
#N canvas 372 134 624 496 10;
+#X declare -lib Gem;
#X floatatom 481 249 0 0 0 0 - - -;
#X msg 422 21 1;
#X msg 455 21 0;
@@ -8,7 +9,7 @@
#X obj 350 364 square;
#N canvas 21 297 600 400 arrays 0;
#N canvas 0 0 450 300 (subpatch) 0;
-#X array array2 15 float 0;
+#X array array2 18 float 0;
#X array array3 24 float 0;
#X coords 0 1 15 -1 400 300 1;
#X restore 63 4 graph;
@@ -70,6 +71,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 54 151 pd gemwin;
+#X obj 518 8 declare -lib Gem;
#X connect 0 0 14 0;
#X connect 1 0 12 0;
#X connect 2 0 12 0;
diff --git a/Gem/examples/02.advanced/11.SplinePath.pd b/Gem/examples/02.advanced/11.SplinePath.pd
index 3938ed8..a6c8af6 100644
--- a/Gem/examples/02.advanced/11.SplinePath.pd
+++ b/Gem/examples/02.advanced/11.SplinePath.pd
@@ -1,4 +1,5 @@
#N canvas 355 106 641 505 10;
+#X declare -lib Gem;
#X floatatom 492 288 0 0 0 0 - - -;
#X msg 421 55 1;
#X msg 461 55 0;
@@ -70,6 +71,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 33 171 pd gemwin;
+#X obj 528 8 declare -lib Gem;
#X connect 0 0 12 0;
#X connect 1 0 13 0;
#X connect 2 0 13 0;
diff --git a/Gem/examples/02.advanced/12.Hsv.pd b/Gem/examples/02.advanced/12.Hsv.pd
index 28379a2..9efc92f 100644
--- a/Gem/examples/02.advanced/12.Hsv.pd
+++ b/Gem/examples/02.advanced/12.Hsv.pd
@@ -1,4 +1,5 @@
#N canvas 433 87 762 506 12;
+#X declare -lib Gem;
#X obj 248 352 gemhead;
#X obj 248 412 color;
#X msg 559 202 1 1 1;
@@ -35,7 +36,7 @@
#X restore 26 133 pd Gem.init;
#N canvas 340 107 682 322 gemwin 0;
#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
--1 -1 1 1;
+-1 -1 0 1;
#X obj 102 161 r \$0-gemstart;
#X obj 102 182 select 1 0;
#X msg 102 214 create \, 1;
@@ -79,6 +80,7 @@
-8 0 10 -262144 -1 -1 0 1;
#X obj 532 112 hsl 128 15 0 1 0 0 \$0-value empty value -2 -8 0 10
-262144 -1 -1 0 1;
+#X obj 638 8 declare -lib Gem;
#X connect 0 0 1 0;
#X connect 1 0 4 0;
#X connect 2 0 7 0;
diff --git a/Gem/examples/02.advanced/13.ModelRescale.pd b/Gem/examples/02.advanced/13.ModelRescale.pd
index 3da2927..5ba96ea 100644
--- a/Gem/examples/02.advanced/13.ModelRescale.pd
+++ b/Gem/examples/02.advanced/13.ModelRescale.pd
@@ -1,4 +1,5 @@
-#N canvas 8 40 682 502 12;
+#N canvas 8 61 682 502 12;
+#X declare -lib Gem;
#X floatatom 241 220 0 0 0 0 - - -;
#X obj 208 268 translate;
#X msg 275 220 0 0 1;
@@ -78,6 +79,7 @@
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 34 124 pd gemwin;
#X text 228 51 before the 'open' occurs;
+#X obj 558 8 declare -lib Gem;
#X connect 0 0 1 1;
#X connect 1 0 16 0;
#X connect 2 0 1 2;
diff --git a/Gem/examples/02.advanced/14.RenderOrder.pd b/Gem/examples/02.advanced/14.RenderOrder.pd
index a199d0b..620eaa6 100644
--- a/Gem/examples/02.advanced/14.RenderOrder.pd
+++ b/Gem/examples/02.advanced/14.RenderOrder.pd
@@ -1,4 +1,5 @@
-#N canvas 0 0 986 385 10;
+#N canvas 6 61 986 385 10;
+#X declare -lib Gem;
#X text 276 35 Blue Sphere;
#N canvas 95 194 290 179 Gem.init 0;
#X obj 118 18 loadbang;
@@ -120,6 +121,7 @@ becomes "behind" \, the rendering order has to be changed. do this
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 72 168 pd gemwin;
+#X obj 878 8 declare -lib Gem;
#X connect 1 0 34 0;
#X connect 2 0 4 0;
#X connect 3 0 5 0;
diff --git a/Gem/examples/02.advanced/15.GemWin.pd b/Gem/examples/02.advanced/15.GemWin.pd
index a414b15..c86f264 100644
--- a/Gem/examples/02.advanced/15.GemWin.pd
+++ b/Gem/examples/02.advanced/15.GemWin.pd
@@ -1,4 +1,5 @@
-#N canvas 51 56 650 553 10;
+#N canvas 51 61 650 553 10;
+#X declare -lib Gem;
#X obj 53 224 gemwin;
#X obj 38 397 gemmouse;
#X obj 109 206 r gemwin_mess;
@@ -22,7 +23,7 @@
-66577 0;
#X msg 253 49 title Graphic's_Environment_for_Multimedia;
#X msg 286 94 title \$1;
-#X symbolatom 286 72 10 0 0;
+#X symbolatom 286 72 10 0 0 0 - - -;
#X text 359 94 type your own title;
#X obj 253 125 s gemwin_mess;
#X obj 247 259 cnv 15 380 120 empty empty dimensions+positioning 20
@@ -45,7 +46,7 @@
#X text 548 330 borders !;
#X obj 247 391 cnv 15 380 80 empty empty full-screen 20 0 0 14 -233017
-66577 0;
-#X obj 257 409 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
+#X obj 257 409 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
#X msg 257 428 \; gemwin_mess fullscreen \$1;
#X text 276 407 fullscreen/windowed;
@@ -55,6 +56,7 @@
#X text 458 415 dimensions & offsets;
#X text 468 432 mean nothing in;
#X text 463 448 fullscreen mode !;
+#X obj 528 518 declare -lib Gem;
#X connect 1 2 4 0;
#X connect 2 0 0 0;
#X connect 4 0 5 0;
diff --git a/Gem/examples/02.advanced/16.vertex_program.pd b/Gem/examples/02.advanced/16.vertex_program.pd
index 3d940b4..ec237d1 100644
--- a/Gem/examples/02.advanced/16.vertex_program.pd
+++ b/Gem/examples/02.advanced/16.vertex_program.pd
@@ -1,4 +1,5 @@
#N canvas 27 90 540 557 10;
+#X declare -lib Gem;
#X obj 404 142 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 235 42 gemhead;
@@ -147,6 +148,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 54 83 pd gemwin;
+#X obj 38 138 declare -lib Gem;
#X connect 0 0 26 0;
#X connect 1 0 25 0;
#X connect 2 0 41 0;
diff --git a/Gem/examples/02.advanced/17.fragment_program.pd b/Gem/examples/02.advanced/17.fragment_program.pd
index 2b1ce3b..5b5de14 100644
--- a/Gem/examples/02.advanced/17.fragment_program.pd
+++ b/Gem/examples/02.advanced/17.fragment_program.pd
@@ -1,4 +1,5 @@
#N canvas 27 90 540 557 10;
+#X declare -lib Gem;
#X obj 404 142 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 235 42 gemhead;
@@ -101,6 +102,7 @@
#X connect 1 0 0 0;
#X connect 2 0 1 0;
#X restore 70 104 pd Gem.init;
+#X obj 428 8 declare -lib Gem;
#X connect 0 0 9 0;
#X connect 1 0 20 0;
#X connect 2 0 8 0;
diff --git a/Gem/examples/02.advanced/18.gl_shading_language.pd b/Gem/examples/02.advanced/18.gl_shading_language.pd
index 2953738..2ebc459 100644
--- a/Gem/examples/02.advanced/18.gl_shading_language.pd
+++ b/Gem/examples/02.advanced/18.gl_shading_language.pd
@@ -1,4 +1,5 @@
-#N canvas 54 22 842 789 10;
+#N canvas 54 61 842 789 10;
+#X declare -lib Gem;
#X obj 225 24 gemhead 1;
#X obj 225 47 world_light;
#X obj 77 112 gemhead;
@@ -89,7 +90,7 @@ example should work;
#X obj 335 114 symbol ../data/Toon;
#N canvas 340 107 682 322 gemwin 0;
#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
--1 -1 1 1;
+-1 -1 0 1;
#X obj 102 161 r \$0-gemstart;
#X obj 102 182 select 1 0;
#X msg 102 214 create \, 1;
@@ -130,6 +131,7 @@ example should work;
#X msg 39 29 lighting \$1;
#X obj 39 10 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
;
+#X obj 738 8 declare -lib Gem;
#X connect 0 0 1 0;
#X connect 2 0 3 0;
#X connect 3 0 37 0;
diff --git a/Gem/examples/02.advanced/19.pointer.pd b/Gem/examples/02.advanced/19.pointer.pd
index 7db5c4f..25f5713 100644
--- a/Gem/examples/02.advanced/19.pointer.pd
+++ b/Gem/examples/02.advanced/19.pointer.pd
@@ -1,4 +1,5 @@
-#N canvas 102 54 864 638 10;
+#N canvas 102 61 864 638 10;
+#X declare -lib Gem;
#X obj 209 223 gemhead;
#X obj 241 277 t a a a;
#X obj 264 320 cube 1;
@@ -182,6 +183,7 @@ means that the examples below are equivalent:;
#X connect 1 0 2 0;
#X connect 2 0 0 0;
#X restore 44 36 pd Gem.init;
+#X obj 748 8 declare -lib Gem;
#X connect 0 0 13 0;
#X connect 1 0 22 0;
#X connect 1 1 2 0;
diff --git a/Gem/examples/02.advanced/20.double-gemhead_vs_repeat.pd b/Gem/examples/02.advanced/20.double-gemhead_vs_repeat.pd
index 364f002..4b55328 100644
--- a/Gem/examples/02.advanced/20.double-gemhead_vs_repeat.pd
+++ b/Gem/examples/02.advanced/20.double-gemhead_vs_repeat.pd
@@ -1,4 +1,5 @@
#N canvas 265 100 742 519 10;
+#X declare -lib Gem;
#X obj 93 144 gemhead;
#X obj 93 205 b;
#X obj 93 124 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 1
@@ -143,6 +144,7 @@ the a single [gemhead] many times;
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 53 69 pd gemwin;
+#X obj 628 8 declare -lib Gem;
#X connect 0 0 33 0;
#X connect 1 0 9 0;
#X connect 2 0 0 0;
diff --git a/Gem/examples/02.advanced/21.basic_LSystem.pd b/Gem/examples/02.advanced/21.basic_LSystem.pd
index f1b399f..5b23388 100644
--- a/Gem/examples/02.advanced/21.basic_LSystem.pd
+++ b/Gem/examples/02.advanced/21.basic_LSystem.pd
@@ -1,4 +1,5 @@
-#N canvas 515 27 647 743 10;
+#N canvas 515 61 647 743 10;
+#X declare -lib Gem;
#X obj 15 16 gemhead;
#X obj 76 483 GEMglPushMatrix;
#X obj 96 462 GEMglPopMatrix;
@@ -35,8 +36,8 @@ it to the corresponding primitives;
#X text 397 502 <- size of the system;
#X msg 15 164 F \, [ \, - \, F \, ] \, F \, [ \, + \, F \, ] \, F;
#X text 12 640 This is a basic implementation of Lindenmayer System
-(LSystem) in GEM. Wikipedia is a good place for information about
-Lsystems;
+(LSystem) in GEM. Wikipedia is a good place for information about Lsystems
+;
#X obj 15 351 gemlist;
#X obj 47 110 s \$0-gemlist;
#X obj 35 372 gemlist;
@@ -94,6 +95,7 @@ F;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X restore 377 40 pd Gem.init;
+#X obj 528 8 declare -lib Gem;
#X connect 0 0 21 0;
#X connect 3 0 24 0;
#X connect 4 0 18 0;
diff --git a/Gem/examples/02.advanced/22.double-iterative.pd b/Gem/examples/02.advanced/22.double-iterative.pd
index 218c30f..fd6a48d 100644
--- a/Gem/examples/02.advanced/22.double-iterative.pd
+++ b/Gem/examples/02.advanced/22.double-iterative.pd
@@ -1,4 +1,5 @@
-#N canvas 0 0 473 588 10;
+#N canvas 6 61 473 588 10;
+#X declare -lib Gem;
#X obj 32 103 gemhead;
#X obj 106 235 gemlist;
#X msg 106 192 20;
@@ -87,6 +88,7 @@
#X text 386 416 <- fun 2;
#X text 389 457 <- fun 3;
#X text 136 30 double iterative process;
+#X obj 368 8 declare -lib Gem;
#X connect 0 0 6 0;
#X connect 1 0 7 0;
#X connect 2 0 3 0;
diff --git a/Gem/examples/02.advanced/23.SplitScreen.pd b/Gem/examples/02.advanced/23.SplitScreen.pd
index 8c8a237..a1f6406 100644
--- a/Gem/examples/02.advanced/23.SplitScreen.pd
+++ b/Gem/examples/02.advanced/23.SplitScreen.pd
@@ -1,4 +1,5 @@
-#N canvas 26 51 799 698 10;
+#N canvas 26 61 799 698 10;
+#X declare -lib Gem;
#N canvas 22 50 213 300 Gem.init 0;
#X obj 71 191 outlet;
#X obj 71 81 loadbang;
@@ -13,7 +14,7 @@
#X restore 24 75 pd Gem.init;
#N canvas 330 97 682 322 gemwin 0;
#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
--1 -1 1 1;
+-1 -1 0 1;
#X obj 102 161 r \$0-gemstart;
#X obj 102 182 select 1 0;
#X msg 102 214 create \, 1;
@@ -245,9 +246,9 @@
1;
#X obj 263 17 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
-#X obj 263 263 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
+#X obj 263 263 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
-#X obj 588 278 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
+#X obj 588 278 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 423 540 ortho;
#X obj 246 664 square 1;
@@ -259,7 +260,8 @@
#X text 18 240 in the left-hand "screen".;
#X obj 454 23 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-262144 -1 -1 0 256;
-#X floatatom 141 549 5 0 0 0 - - -, f 5;
+#X floatatom 141 549 5 0 0 0 - - -;
+#X obj 38 298 declare -lib Gem;
#X connect 0 0 1 0;
#X connect 2 0 11 0;
#X connect 3 0 2 0;
diff --git a/Gem/examples/02.advanced/snapshotHD.pd b/Gem/examples/02.advanced/snapshotHD.pd
index 1e3d1bd..6495634 100644
--- a/Gem/examples/02.advanced/snapshotHD.pd
+++ b/Gem/examples/02.advanced/snapshotHD.pd
@@ -1,4 +1,5 @@
-#N canvas 143 49 609 575 10;
+#N canvas 143 61 609 575 10;
+#X declare -lib Gem;
#X obj 152 105 gemframebuffer;
#X obj 179 148 translateXYZ 0 0 -4;
#X obj 152 126 t a a;
@@ -49,6 +50,7 @@
#X obj 152 343 t b a b b b;
#X obj 167 374 t a b a;
#X text 453 523 (c) Jack/RYBN 2011;
+#X obj 478 8 declare -lib Gem;
#X connect 0 0 2 0;
#X connect 0 1 12 1;
#X connect 1 0 5 0;
diff --git a/Gem/examples/03.lighting/01.world_light.pd b/Gem/examples/03.lighting/01.world_light.pd
index 8987c38..8cbc58f 100644
--- a/Gem/examples/03.lighting/01.world_light.pd
+++ b/Gem/examples/03.lighting/01.world_light.pd
@@ -1,4 +1,5 @@
#N canvas 139 90 771 570 10;
+#X declare -lib Gem;
#X obj 518 59 gemhead;
#X msg 86 180 lighting 1;
#X obj 518 170 rotate;
@@ -69,6 +70,7 @@ the sphere is;
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 34 255 pd gemwin;
+#X obj 654 8 declare -lib Gem;
#X connect 0 0 2 0;
#X connect 1 0 22 0;
#X connect 2 0 7 0;
diff --git a/Gem/examples/03.lighting/02.light.pd b/Gem/examples/03.lighting/02.light.pd
index 21f8811..d76127c 100644
--- a/Gem/examples/03.lighting/02.light.pd
+++ b/Gem/examples/03.lighting/02.light.pd
@@ -1,4 +1,5 @@
#N canvas 253 63 751 605 10;
+#X declare -lib Gem;
#X obj 532 45 gemhead;
#X msg 107 177 lighting 1;
#X obj 532 156 rotate;
@@ -76,6 +77,7 @@ the sphere is;
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 32 281 pd gemwin;
+#X obj 634 8 declare -lib Gem;
#X connect 0 0 2 0;
#X connect 1 0 28 0;
#X connect 2 0 6 0;
diff --git a/Gem/examples/03.lighting/03.controlLights.pd b/Gem/examples/03.lighting/03.controlLights.pd
index 04a3dae..9209300 100644
--- a/Gem/examples/03.lighting/03.controlLights.pd
+++ b/Gem/examples/03.lighting/03.controlLights.pd
@@ -1,4 +1,5 @@
#N canvas 396 160 600 500 10;
+#X declare -lib Gem;
#X obj 373 75 gemhead;
#X msg 128 75 lighting 1;
#X msg 128 107 lighting 0;
@@ -73,6 +74,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 34 165 pd gemwin;
+#X obj 484 8 declare -lib Gem;
#X connect 0 0 3 0;
#X connect 1 0 28 0;
#X connect 2 0 28 0;
diff --git a/Gem/examples/03.lighting/04.moveSpheres.pd b/Gem/examples/03.lighting/04.moveSpheres.pd
index b2df9dd..604608b 100644
--- a/Gem/examples/03.lighting/04.moveSpheres.pd
+++ b/Gem/examples/03.lighting/04.moveSpheres.pd
@@ -1,4 +1,5 @@
-#N canvas 172 20 824 640 10;
+#N canvas 172 61 824 640 10;
+#X declare -lib Gem;
#X text 745 116 on;
#X text 782 114 off;
#X text 557 122 on;
@@ -94,6 +95,7 @@
#X restore 34 255 pd gemwin;
#X obj 444 424 sphere 1 5;
#X obj 634 416 sphere 1 20;
+#X obj 704 8 declare -lib Gem;
#X connect 4 0 35 0;
#X connect 5 0 35 0;
#X connect 8 0 21 0;
diff --git a/Gem/examples/03.lighting/05.materials.pd b/Gem/examples/03.lighting/05.materials.pd
index 9d722f5..dddd014 100644
--- a/Gem/examples/03.lighting/05.materials.pd
+++ b/Gem/examples/03.lighting/05.materials.pd
@@ -1,4 +1,5 @@
#N canvas 253 63 743 597 10;
+#X declare -lib Gem;
#X obj 349 34 gemhead;
#X obj 349 307 rotate;
#X floatatom 367 272 0 0 0 0 - - -;
@@ -70,6 +71,7 @@ the sphere is;
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 34 155 pd gemwin;
+#X obj 624 8 declare -lib Gem;
#X connect 0 0 12 0;
#X connect 1 0 13 0;
#X connect 2 0 1 1;
diff --git a/Gem/examples/04.pix/01.image.pd b/Gem/examples/04.pix/01.image.pd
index 0abd4a9..30ad9cf 100644
--- a/Gem/examples/04.pix/01.image.pd
+++ b/Gem/examples/04.pix/01.image.pd
@@ -1,4 +1,5 @@
#N canvas 452 108 681 502 12;
+#X declare -lib Gem;
#X text 172 376 click on the pix_image object to display the loaded
image with imgview;
#X obj 179 199 gemhead;
@@ -47,6 +48,7 @@ However \, pix_draw is easier to use in an example patch.;
#X obj 264 284 / 100;
#X floatatom 213 261 0 0 0 0 - - -;
#X obj 213 284 / 100;
+#X obj 552 5 declare -lib Gem;
#X connect 1 0 4 0;
#X connect 4 0 5 0;
#X connect 5 0 2 0;
diff --git a/Gem/examples/04.pix/02.multiimage.pd b/Gem/examples/04.pix/02.multiimage.pd
index 5f0c519..16b20c8 100644
--- a/Gem/examples/04.pix/02.multiimage.pd
+++ b/Gem/examples/04.pix/02.multiimage.pd
@@ -1,4 +1,5 @@
#N canvas 411 137 739 504 12;
+#X declare -lib Gem;
#X msg 345 170 1;
#X msg 345 202 0;
#X obj 278 200 gemhead;
@@ -39,6 +40,7 @@
#X text 21 209 Create window and render;
#X obj 278 313 pix_texture;
#X obj 278 335 square 3;
+#X obj 612 5 declare -lib Gem;
#X connect 0 0 6 1;
#X connect 1 0 6 1;
#X connect 2 0 6 0;
diff --git a/Gem/examples/04.pix/04.ImageInPlace.pd b/Gem/examples/04.pix/04.ImageInPlace.pd
index 72e6f0b..c704883 100644
--- a/Gem/examples/04.pix/04.ImageInPlace.pd
+++ b/Gem/examples/04.pix/04.ImageInPlace.pd
@@ -1,4 +1,5 @@
#N canvas 314 61 654 599 12;
+#X declare -lib Gem;
#X msg 489 227 1;
#X msg 489 259 0;
#X obj 375 254 gemhead;
@@ -52,6 +53,7 @@ between the various images.;
#X restore 25 113 pd gemwin;
#X msg 25 89 create;
#X text 21 69 Create window and render;
+#X obj 532 5 declare -lib Gem;
#X connect 0 0 5 1;
#X connect 1 0 5 1;
#X connect 2 0 5 0;
diff --git a/Gem/examples/04.pix/05.film.pd b/Gem/examples/04.pix/05.film.pd
index 8332716..417f1b0 100644
--- a/Gem/examples/04.pix/05.film.pd
+++ b/Gem/examples/04.pix/05.film.pd
@@ -1,4 +1,5 @@
-#N canvas 61 44 827 553 12;
+#N canvas 61 61 827 553 12;
+#X declare -lib Gem;
#X obj 90 186 gemhead;
#X floatatom 220 155 5 0 0 0 - - -;
#X msg 150 156 auto \$1;
@@ -26,8 +27,8 @@ using "pix_rgba". this will be a no-cost operation if the pix_buf already
is in RGBA.;
#X text 36 334 you might notice a significant performance-enhancement
by just turning the [pix_rgba] off (via the toggle). however \, not
-[pix_rgba] is expensive but actually the [pix_convolve] (which appears to do
-nothing when initialized with "0 0 0 0 1 0 0 0 0". When [pix_rgba]
+[pix_rgba] is expensive but actually the [pix_convolve] (which appears
+to do nothing when initialized with "0 0 0 0 1 0 0 0 0". When [pix_rgba]
is "off" \, the [pix_convolve] will be bypassed \, and therefore be
very fast.;
#X restore 635 187 pd README;
@@ -93,6 +94,7 @@ very fast.;
not RGBA \, [pix_convolve] might not be able to process the image and
therefore will do nothing \, which will dramatically "increase" performance)
;
+#X obj 682 5 declare -lib Gem;
#X connect 0 0 12 0;
#X connect 1 0 12 1;
#X connect 2 0 12 0;
diff --git a/Gem/examples/04.pix/05.movie.pd b/Gem/examples/04.pix/05.movie.pd
index a6227d3..ac950bb 100644
--- a/Gem/examples/04.pix/05.movie.pd
+++ b/Gem/examples/04.pix/05.movie.pd
@@ -1,4 +1,5 @@
-#N canvas 133 25 637 554 12;
+#N canvas 133 61 637 554 12;
+#X declare -lib Gem;
#X obj 157 59 gemhead;
#X floatatom 336 167 0 0 0 0 - - -;
#X obj 157 385 rotateXYZ;
@@ -61,6 +62,7 @@ for this;
#X restore 510 453 pd gemwin;
#X msg 510 430 create;
#X text 506 413 Create window:;
+#X obj 512 5 declare -lib Gem;
#X connect 0 0 8 0;
#X connect 1 0 8 1;
#X connect 2 0 3 0;
diff --git a/Gem/examples/04.pix/06.PixRect.pd b/Gem/examples/04.pix/06.PixRect.pd
index 93f5fba..a280d3e 100644
--- a/Gem/examples/04.pix/06.PixRect.pd
+++ b/Gem/examples/04.pix/06.PixRect.pd
@@ -1,4 +1,5 @@
#N canvas 183 99 635 638 12;
+#X declare -lib Gem;
#X obj 179 176 gemhead;
#X obj 179 587 pix_texture;
#X msg 291 536 1 0 0;
@@ -58,6 +59,7 @@
#X msg 25 89 create;
#X text 21 69 Create window and render;
#X text 118 26 draw a rectangle onto an image;
+#X obj 502 5 declare -lib Gem;
#X connect 0 0 11 0;
#X connect 1 0 3 0;
#X connect 2 0 26 2;
diff --git a/Gem/examples/04.pix/07.PixSet.pd b/Gem/examples/04.pix/07.PixSet.pd
index 19aca07..b188d55 100644
--- a/Gem/examples/04.pix/07.PixSet.pd
+++ b/Gem/examples/04.pix/07.PixSet.pd
@@ -1,4 +1,5 @@
#N canvas 243 272 754 536 10;
+#X declare -lib Gem;
#X obj 143 110 gemhead;
#X text 99 37 ========;
#X msg 149 366 quality 0;
@@ -54,6 +55,7 @@
#X restore 455 433 pd gemwin;
#X msg 455 409 create;
#X text 451 389 Create window and render;
+#X obj 642 5 declare -lib Gem;
#X connect 0 0 22 0;
#X connect 2 0 23 0;
#X connect 4 0 2 0;
diff --git a/Gem/examples/04.pix/08.PixDump.pd b/Gem/examples/04.pix/08.PixDump.pd
index a21b273..7571e2e 100644
--- a/Gem/examples/04.pix/08.PixDump.pd
+++ b/Gem/examples/04.pix/08.PixDump.pd
@@ -1,4 +1,5 @@
-#N canvas 53 47 761 536 10;
+#N canvas 53 61 761 536 10;
+#X declare -lib Gem;
#X obj 143 110 gemhead;
#X obj 143 203 pix_dump;
#X text 101 24 pix_dump;
@@ -52,6 +53,7 @@
#X msg 460 74 create;
#X text 456 54 Create window and render;
#X obj 143 135 pix_image ../data/blob2.tif;
+#X obj 652 5 declare -lib Gem;
#X connect 0 0 25 0;
#X connect 1 0 5 0;
#X connect 1 1 11 0;
diff --git a/Gem/examples/04.pix/09.Histogram.pd b/Gem/examples/04.pix/09.Histogram.pd
index 5922a8e..b3f0552 100644
--- a/Gem/examples/04.pix/09.Histogram.pd
+++ b/Gem/examples/04.pix/09.Histogram.pd
@@ -1,4 +1,5 @@
-#N canvas 0 0 764 557 10;
+#N canvas 6 61 764 557 10;
+#X declare -lib Gem;
#N canvas 412 247 681 394 tables 0;
#N canvas 0 0 450 300 (subpatch) 0;
#X array red 256 float 0;
@@ -75,6 +76,7 @@ rgb);
#X msg 25 89 create;
#X text 21 69 Create window and render;
#X obj 34 217 pix_multiimage ../data/temp*.JPG 2;
+#X obj 652 5 declare -lib Gem;
#X connect 1 0 27 0;
#X connect 2 0 9 0;
#X connect 6 0 27 1;
diff --git a/Gem/examples/04.pix/10.PixDataSimple.pd b/Gem/examples/04.pix/10.PixDataSimple.pd
index 36bb4e6..9220482 100644
--- a/Gem/examples/04.pix/10.PixDataSimple.pd
+++ b/Gem/examples/04.pix/10.PixDataSimple.pd
@@ -1,4 +1,5 @@
#N canvas 284 93 594 539 10;
+#X declare -lib Gem;
#X obj 46 186 gemwin;
#X obj 319 173 gemhead;
#X obj 258 329 pix_data;
@@ -50,6 +51,7 @@
#X obj 419 253 random 1000;
#X obj 419 270 / 1000;
#X obj 419 288 t f f;
+#X obj 482 5 declare -lib Gem;
#X connect 1 0 27 0;
#X connect 2 1 13 1;
#X connect 3 0 0 0;
diff --git a/Gem/examples/04.pix/11.PixDataComplex.pd b/Gem/examples/04.pix/11.PixDataComplex.pd
index cb8d846..d1aac8c 100644
--- a/Gem/examples/04.pix/11.PixDataComplex.pd
+++ b/Gem/examples/04.pix/11.PixDataComplex.pd
@@ -1,4 +1,5 @@
#N canvas 331 86 929 574 10;
+#X declare -lib Gem;
#X obj 30 159 gemwin;
#X obj 372 135 gemhead;
#X obj 372 164 pix_image ../data/fractal.JPG;
@@ -60,6 +61,7 @@
#X floatatom 537 423 5 0 0 0 - - -;
#X obj 537 473 * 0.2;
#X obj 537 369 f;
+#X obj 822 5 declare -lib Gem;
#X connect 1 0 2 0;
#X connect 2 0 3 1;
#X connect 3 1 14 1;
diff --git a/Gem/examples/04.pix/12.add.pd b/Gem/examples/04.pix/12.add.pd
index 2b5dc7f..e585c10 100644
--- a/Gem/examples/04.pix/12.add.pd
+++ b/Gem/examples/04.pix/12.add.pd
@@ -1,4 +1,5 @@
#N canvas 542 198 681 468 10;
+#X declare -lib Gem;
#X obj 270 175 pix_image ../data/dancer.JPG;
#X obj 270 342 pix_texture;
#X obj 270 383 square;
@@ -40,6 +41,7 @@
#X msg 25 106 create;
#X text 21 79 Create window and render;
#X text 135 60 blending \, using pixel addition;
+#X obj 572 5 declare -lib Gem;
#X connect 0 0 8 0;
#X connect 1 0 2 0;
#X connect 3 0 2 1;
diff --git a/Gem/examples/04.pix/12.blending.pd b/Gem/examples/04.pix/12.blending.pd
index 5f8f982..d97c7b1 100644
--- a/Gem/examples/04.pix/12.blending.pd
+++ b/Gem/examples/04.pix/12.blending.pd
@@ -1,4 +1,5 @@
-#N canvas 138 0 775 371 10;
+#N canvas 138 61 775 371 10;
+#X declare -lib Gem;
#X obj 254 305 pix_texture;
#X obj 290 112 gemhead 20;
#X obj 254 65 gemhead;
@@ -158,6 +159,7 @@ image and will refresh the output when banged.;
#X restore 25 113 pd gemwin;
#X msg 25 89 create;
#X text 21 69 Create window and render;
+#X obj 662 5 declare -lib Gem;
#X connect 0 0 5 0;
#X connect 1 0 16 0;
#X connect 2 0 15 0;
diff --git a/Gem/examples/04.pix/12.composite.pd b/Gem/examples/04.pix/12.composite.pd
index ce3a790..2d6ec49 100644
--- a/Gem/examples/04.pix/12.composite.pd
+++ b/Gem/examples/04.pix/12.composite.pd
@@ -1,4 +1,5 @@
#N canvas 246 168 681 468 10;
+#X declare -lib Gem;
#X obj 270 175 pix_image ../data/dancer.JPG;
#X obj 270 338 pix_texture;
#X obj 270 379 square;
@@ -41,6 +42,7 @@
#X restore 25 123 pd gemwin;
#X msg 25 105 create;
#X text 21 79 Create window and render;
+#X obj 572 5 declare -lib Gem;
#X connect 0 0 7 0;
#X connect 1 0 2 0;
#X connect 3 0 2 1;
diff --git a/Gem/examples/04.pix/12.pix_multiply.pd b/Gem/examples/04.pix/12.pix_multiply.pd
index cc1992a..01bfcda 100644
--- a/Gem/examples/04.pix/12.pix_multiply.pd
+++ b/Gem/examples/04.pix/12.pix_multiply.pd
@@ -1,4 +1,5 @@
#N canvas 58 175 600 500 10;
+#X declare -lib Gem;
#X obj 288 247 pix_image ../data/dancer.JPG;
#X obj 270 153 gemhead;
#X obj 270 188 pix_image ../data/fractal.JPG;
@@ -45,6 +46,7 @@
#X msg 25 89 create;
#X text 21 69 Create window and render;
#X obj 270 379 square 3;
+#X obj 492 5 declare -lib Gem;
#X connect 0 0 4 1;
#X connect 1 0 2 0;
#X connect 2 0 4 0;
diff --git a/Gem/examples/04.pix/13.maskDancer.pd b/Gem/examples/04.pix/13.maskDancer.pd
index 957a941..2c6b398 100644
--- a/Gem/examples/04.pix/13.maskDancer.pd
+++ b/Gem/examples/04.pix/13.maskDancer.pd
@@ -1,4 +1,5 @@
-#N canvas 4 20 600 500 10;
+#N canvas 6 61 600 500 10;
+#X declare -lib Gem;
#X obj 270 278 pix_mask;
#X obj 288 247 pix_image ../data/dancer.JPG;
#X obj 270 153 gemhead;
@@ -44,6 +45,7 @@
#X restore 25 133 pd gemwin;
#X msg 25 109 create;
#X text 21 89 Create window and render;
+#X obj 482 5 declare -lib Gem;
#X connect 0 0 3 0;
#X connect 1 0 0 1;
#X connect 2 0 4 0;
diff --git a/Gem/examples/04.pix/14.takeAlpha.pd b/Gem/examples/04.pix/14.takeAlpha.pd
index 535056c..1680e90 100644
--- a/Gem/examples/04.pix/14.takeAlpha.pd
+++ b/Gem/examples/04.pix/14.takeAlpha.pd
@@ -1,4 +1,5 @@
#N canvas 426 68 613 402 10;
+#X declare -lib Gem;
#X obj 257 92 gemhead;
#X obj 343 168 gemhead;
#X obj 257 244 pix_takealpha;
@@ -47,6 +48,7 @@
#X obj 343 210 t a a;
#X obj 257 125 pix_image ../data/temp2.JPG;
#X obj 343 190 pix_image ../data/fractalAlpha.TIF;
+#X obj 502 5 declare -lib Gem;
#X connect 0 0 19 0;
#X connect 1 0 20 0;
#X connect 2 0 10 0;
diff --git a/Gem/examples/04.pix/15.pix_alpha.pd b/Gem/examples/04.pix/15.pix_alpha.pd
index de645f2..657416a 100644
--- a/Gem/examples/04.pix/15.pix_alpha.pd
+++ b/Gem/examples/04.pix/15.pix_alpha.pd
@@ -1,4 +1,5 @@
#N canvas 78 67 719 587 10;
+#X declare -lib Gem;
#X obj 332 30 gemhead;
#X obj 332 371 pix_texture;
#X msg 375 394 4;
@@ -66,6 +67,7 @@
#X restore 25 113 pd gemwin;
#X msg 25 89 create;
#X text 21 69 Create window and render;
+#X obj 612 5 declare -lib Gem;
#X connect 0 0 3 0;
#X connect 1 0 5 0;
#X connect 2 0 5 1;
diff --git a/Gem/examples/04.pix/16.alphaGrey.pd b/Gem/examples/04.pix/16.alphaGrey.pd
index 9d5405b..620dcbf 100644
--- a/Gem/examples/04.pix/16.alphaGrey.pd
+++ b/Gem/examples/04.pix/16.alphaGrey.pd
@@ -1,4 +1,5 @@
-#N canvas 28 0 713 500 10;
+#N canvas 28 61 713 500 10;
+#X declare -lib Gem;
#X obj 135 336 pix_texture;
#X obj 135 393 square 2;
#X obj 135 171 pix_image ../data/fractalAlpha.TIF;
@@ -14,7 +15,7 @@
#X text 261 55 grey's out all pixels \, of which the alpha-channel
is above a certain threshold;
#X obj 240 269 hsl 128 15 -1 1 0 0 empty empty empty 20 8 0 8 -262144
--1 -1 3100 1;
+-1 -1 0 1;
#X msg 237 246 0;
#X msg 266 246 0.5;
#X obj 20 39 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
@@ -23,7 +24,7 @@ is above a certain threshold;
#X obj 135 139 gemhead;
#N canvas 340 107 682 322 gemwin 0;
#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
--1 -1 1 1;
+-1 -1 0 1;
#X obj 102 161 r \$0-gemstart;
#X obj 102 182 select 1 0;
#X msg 102 214 create \, 1;
@@ -62,6 +63,7 @@ is above a certain threshold;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 28 61 pd gemwin;
#X floatatom 237 288 5 -1 1 0 - - -;
+#X obj 602 5 declare -lib Gem;
#X connect 0 0 1 0;
#X connect 2 0 4 0;
#X connect 3 0 0 0;
diff --git a/Gem/examples/04.pix/16.pix_2grey.pd b/Gem/examples/04.pix/16.pix_2grey.pd
index e2552c1..1ec4f97 100644
--- a/Gem/examples/04.pix/16.pix_2grey.pd
+++ b/Gem/examples/04.pix/16.pix_2grey.pd
@@ -1,4 +1,5 @@
#N canvas 204 170 691 547 10;
+#X declare -lib Gem;
#X obj 308 140 gemhead;
#X obj 308 374 pix_texture;
#X obj 308 402 square 2;
@@ -37,6 +38,7 @@
#X text 21 159 Create window and render;
#X text 64 81 greys out all pixels (but pixel-values are still in RGBA)
;
+#X obj 582 5 declare -lib Gem;
#X connect 0 0 3 0;
#X connect 1 0 2 0;
#X connect 3 0 4 0;
diff --git a/Gem/examples/04.pix/17.pix_gain.pd b/Gem/examples/04.pix/17.pix_gain.pd
index 3149650..f956776 100644
--- a/Gem/examples/04.pix/17.pix_gain.pd
+++ b/Gem/examples/04.pix/17.pix_gain.pd
@@ -1,4 +1,5 @@
#N canvas 111 106 885 510 10;
+#X declare -lib Gem;
#X floatatom 664 182 0 0 0 0 - - -;
#X obj 664 210 / 100;
#X floatatom 610 163 0 0 0 0 - - -;
@@ -52,6 +53,7 @@ openGL-hardware-acceleration...;
#X restore 25 113 pd gemwin;
#X msg 25 89 create;
#X text 21 69 Create window and render;
+#X obj 772 5 declare -lib Gem;
#X connect 0 0 1 0;
#X connect 1 0 10 2;
#X connect 1 0 13 0;
diff --git a/Gem/examples/04.pix/18.Curves.pd b/Gem/examples/04.pix/18.Curves.pd
index ca02c91..ade6bc4 100644
--- a/Gem/examples/04.pix/18.Curves.pd
+++ b/Gem/examples/04.pix/18.Curves.pd
@@ -1,4 +1,5 @@
-#N canvas 119 33 764 634 10;
+#N canvas 119 61 764 634 10;
+#X declare -lib Gem;
#N canvas 285 0 681 629 tables 0;
#N canvas 0 0 450 300 (subpatch) 0;
#X array red 256 float 0;
@@ -26,8 +27,8 @@
#X obj 30 272 gemhead;
#X obj 30 468 pix_texture;
#N canvas 0 0 450 300 (subpatch) 0;
-#X array rgba 67 float 0;
-#X coords 0 256 66 0 256 140 1;
+#X array rgba 256 float 0;
+#X coords 0 256 255 0 256 140 1;
#X restore 217 70 graph;
#X text 78 8 pix_curve: adjust the colour of an image;
#X text 291 227 separate tables for r \, g \, b and a;
@@ -161,6 +162,7 @@ to be called....;
#X restore 16 195 pd gemwin;
#X msg 16 171 create;
#X text 12 151 Create window and render;
+#X obj 652 5 declare -lib Gem;
#X connect 1 0 29 0;
#X connect 2 0 21 0;
#X connect 13 0 28 0;
diff --git a/Gem/examples/04.pix/19.colorMatrix.pd b/Gem/examples/04.pix/19.colorMatrix.pd
index c53ab1a..ba706bb 100644
--- a/Gem/examples/04.pix/19.colorMatrix.pd
+++ b/Gem/examples/04.pix/19.colorMatrix.pd
@@ -1,4 +1,5 @@
-#N canvas 10 20 769 486 10;
+#N canvas 10 61 769 486 10;
+#X declare -lib Gem;
#X obj 252 258 gemhead;
#X obj 252 313 pix_image ../data/fractal.JPG;
#X obj 252 343 pix_colormatrix;
@@ -48,6 +49,7 @@
#X restore 46 186 pd gemwin;
#X msg 46 162 create;
#X text 42 142 Create window and render;
+#X obj 662 5 declare -lib Gem;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 6 0;
diff --git a/Gem/examples/04.pix/20.convolve.pd b/Gem/examples/04.pix/20.convolve.pd
index bf3999f..420f768 100644
--- a/Gem/examples/04.pix/20.convolve.pd
+++ b/Gem/examples/04.pix/20.convolve.pd
@@ -1,4 +1,5 @@
-#N canvas 150 20 846 728 12;
+#N canvas 150 61 846 728 12;
+#X declare -lib Gem;
#X obj 575 515 s matrix;
#X obj 502 516 s scale;
#X msg 502 483 1;
@@ -74,6 +75,7 @@
#X obj 241 571 /;
#X text 43 650 a good start for the scale is the sum of all the elements
;
+#X obj 722 685 declare -lib Gem;
#X connect 2 0 1 0;
#X connect 5 0 4 0;
#X connect 8 0 7 0;
diff --git a/Gem/examples/04.pix/22.biquad.pd b/Gem/examples/04.pix/22.biquad.pd
index 6e9934e..6e5f8cc 100644
--- a/Gem/examples/04.pix/22.biquad.pd
+++ b/Gem/examples/04.pix/22.biquad.pd
@@ -1,4 +1,5 @@
-#N canvas 269 10 753 499 10;
+#N canvas 269 61 753 499 10;
+#X declare -lib Gem;
#X msg 360 312 set;
#X floatatom 401 209 4 0 0 0 - - -;
#X floatatom 442 209 4 0 0 0 - - -;
@@ -75,6 +76,7 @@
#X msg 25 89 create;
#X text 21 69 Create window and render;
#X obj 35 247 pix_multiimage ../data/temp*.JPG 2;
+#X obj 642 5 declare -lib Gem;
#X connect 0 0 38 0;
#X connect 1 0 14 0;
#X connect 2 0 3 0;
diff --git a/Gem/examples/04.pix/23.gravity.pd b/Gem/examples/04.pix/23.gravity.pd
index 9821f94..20d828e 100644
--- a/Gem/examples/04.pix/23.gravity.pd
+++ b/Gem/examples/04.pix/23.gravity.pd
@@ -1,4 +1,5 @@
-#N canvas 0 0 626 514 10;
+#N canvas 6 61 626 514 10;
+#X declare -lib Gem;
#X floatatom 107 437 5 0 0 0 - - -;
#X floatatom 160 436 5 0 0 0 - - -;
#X floatatom 219 435 5 0 0 0 - - -;
@@ -76,6 +77,7 @@
#X restore 25 63 pd gemwin;
#X msg 25 39 create;
#X text 21 19 Create window and render;
+#X obj 512 5 declare -lib Gem;
#X connect 3 0 40 0;
#X connect 3 1 0 0;
#X connect 3 2 1 0;
diff --git a/Gem/examples/04.pix/24.time-filtering.pd b/Gem/examples/04.pix/24.time-filtering.pd
index c1ca697..4a0e402 100644
--- a/Gem/examples/04.pix/24.time-filtering.pd
+++ b/Gem/examples/04.pix/24.time-filtering.pd
@@ -1,4 +1,5 @@
#N canvas 228 84 794 352 10;
+#X declare -lib Gem;
#X floatatom 279 191 5 0 0 0 - - -;
#X obj 266 241 pix_tIIR 2 2;
#X obj 279 211 * 0.01;
@@ -63,6 +64,7 @@
#X restore 25 113 pd gemwin;
#X msg 25 89 create;
#X text 21 69 Create window and render;
+#X obj 672 5 declare -lib Gem;
#X connect 0 0 2 0;
#X connect 1 0 21 0;
#X connect 2 0 1 1;
diff --git a/Gem/examples/04.pix/25.buffer.pd b/Gem/examples/04.pix/25.buffer.pd
index 857cdaf..1c38826 100644
--- a/Gem/examples/04.pix/25.buffer.pd
+++ b/Gem/examples/04.pix/25.buffer.pd
@@ -1,4 +1,5 @@
-#N canvas 0 0 832 589 10;
+#N canvas 6 61 832 589 10;
+#X declare -lib Gem;
#X obj 62 327 gemhead;
#X obj 62 369 pix_texture;
#X obj 62 392 square 4;
@@ -89,6 +90,7 @@ pixels;
#X text 287 20 [pix_buffer];
#X msg 353 181 open ../data/fractal.JPG 5;
#X text 524 182 load an image into a certain storage-buffer;
+#X obj 722 5 declare -lib Gem;
#X connect 0 0 36 0;
#X connect 1 0 2 0;
#X connect 3 0 4 0;
diff --git a/Gem/examples/04.pix/26.framebuffer_readback.pd b/Gem/examples/04.pix/26.framebuffer_readback.pd
index 696793d..6aa3114 100644
--- a/Gem/examples/04.pix/26.framebuffer_readback.pd
+++ b/Gem/examples/04.pix/26.framebuffer_readback.pd
@@ -1,4 +1,5 @@
-#N canvas 0 0 826 651 10;
+#N canvas 6 61 826 651 10;
+#X declare -lib Gem;
#X msg 112 86 create \, 1;
#X obj 112 131 gemwin;
#X obj 311 112 pix_buffer \$0-framebuffer 2;
@@ -45,11 +46,12 @@ pix (where you can apply effects and all kind of weird things);
#X text 562 308 fetch framebuffer-pix;
#X text 535 379 apply some nifty FX;
#X text 73 597 note \, that there are more efficient ways to apply
-FX to framebuffers (notably openGL-shaders: see examples/10.glsl/
-for more information);
-#X obj 425 358 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
+FX to framebuffers (notably openGL-shaders: see examples/10.glsl/ for
+more information);
+#X obj 425 358 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 410 380 pix_kaleidoscope;
+#X obj 722 5 declare -lib Gem;
#X connect 0 0 1 0;
#X connect 3 0 4 0;
#X connect 5 0 1 0;
diff --git a/Gem/examples/04.pix/27.bitmap_font.pd b/Gem/examples/04.pix/27.bitmap_font.pd
index 6a4bb0b..877461b 100644
--- a/Gem/examples/04.pix/27.bitmap_font.pd
+++ b/Gem/examples/04.pix/27.bitmap_font.pd
@@ -1,4 +1,5 @@
#N canvas 56 222 901 508 10;
+#X declare -lib Gem;
#X obj 191 413 pix_texture;
#X obj 463 158 gemwin;
#X msg 506 135 0 \, destroy;
@@ -103,6 +104,7 @@
#X obj 191 483 rectangle 32 -2;
#X text 501 84 2 click on this patch (to focuses it) and type something
with your keyboard;
+#X obj 782 5 declare -lib Gem;
#X connect 0 0 44 0;
#X connect 2 0 1 0;
#X connect 3 0 0 0;
diff --git a/Gem/examples/04.video/00.SimpleVideo.pd b/Gem/examples/04.video/00.SimpleVideo.pd
index 7b59713..6102c57 100644
--- a/Gem/examples/04.video/00.SimpleVideo.pd
+++ b/Gem/examples/04.video/00.SimpleVideo.pd
@@ -1,4 +1,5 @@
-#N canvas 147 59 659 387 12;
+#N canvas 147 61 659 387 12;
+#X declare -lib Gem;
#X obj 134 180 cnv 15 500 40 empty empty empty 20 12 0 14 -245500 -66577
0;
#X obj 55 78 gemhead;
@@ -79,6 +80,7 @@ Mac OS X);
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 502 304 pd gemwin;
+#X obj 532 5 declare -lib Gem;
#X connect 1 0 4 0;
#X connect 3 0 2 0;
#X connect 4 0 3 0;
diff --git a/Gem/examples/04.video/01.VideoPaint.pd b/Gem/examples/04.video/01.VideoPaint.pd
index 9c38a80..70cabfa 100644
--- a/Gem/examples/04.video/01.VideoPaint.pd
+++ b/Gem/examples/04.video/01.VideoPaint.pd
@@ -1,4 +1,5 @@
#N canvas 38 374 800 574 10;
+#X declare -lib Gem;
#X obj 50 130 gemhead;
#X obj 50 493 square;
#X obj 50 371 alpha;
@@ -89,6 +90,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 503 362 pd gemwin;
+#X obj 672 5 declare -lib Gem;
#X connect 0 0 3 0;
#X connect 2 0 7 0;
#X connect 3 0 8 0;
diff --git a/Gem/examples/04.video/02.VideoSphere.pd b/Gem/examples/04.video/02.VideoSphere.pd
index 165b5c5..006f5bc 100644
--- a/Gem/examples/04.video/02.VideoSphere.pd
+++ b/Gem/examples/04.video/02.VideoSphere.pd
@@ -1,4 +1,5 @@
#N canvas 84 483 743 466 10;
+#X declare -lib Gem;
#X obj 57 215 pix_texture;
#X text 187 75 click on any of these;
#X text 40 25 texture live video onto a sphere;
@@ -77,6 +78,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 458 266 pd gemwin;
+#X obj 632 5 declare -lib Gem;
#X connect 0 0 6 0;
#X connect 3 0 6 1;
#X connect 4 0 6 2;
diff --git a/Gem/examples/04.video/03.movement_detection.pd b/Gem/examples/04.video/03.movement_detection.pd
index ef800d7..bf049e8 100644
--- a/Gem/examples/04.video/03.movement_detection.pd
+++ b/Gem/examples/04.video/03.movement_detection.pd
@@ -1,4 +1,5 @@
#N canvas 378 405 793 522 10;
+#X declare -lib Gem;
#X floatatom 227 258 6 0 0 0 - - -;
#X floatatom 280 258 6 0 0 0 - - -;
#X floatatom 339 258 6 0 0 0 - - -;
@@ -66,6 +67,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 481 376 pd gemwin;
+#X obj 682 5 declare -lib Gem;
#X connect 0 0 11 0;
#X connect 1 0 13 0;
#X connect 2 0 15 0;
diff --git a/Gem/examples/04.video/04.videoRTX.pd b/Gem/examples/04.video/04.videoRTX.pd
index 7f5bb44..deeea9a 100644
--- a/Gem/examples/04.video/04.videoRTX.pd
+++ b/Gem/examples/04.video/04.videoRTX.pd
@@ -1,4 +1,5 @@
#N canvas 67 70 636 509 10;
+#X declare -lib Gem;
#X obj 43 89 gemhead;
#X obj 190 380 pix_texture;
#X obj 43 380 pix_texture;
@@ -80,6 +81,7 @@ properties (width \, height \, colorspace) \;;
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 424 422 pd gemwin;
+#X obj 532 45 declare -lib Gem;
#X connect 0 0 20 0;
#X connect 1 0 21 0;
#X connect 2 0 24 0;
diff --git a/Gem/examples/04.video/05.buffer_rtx.pd b/Gem/examples/04.video/05.buffer_rtx.pd
index 4a29ad6..230a8ee 100644
--- a/Gem/examples/04.video/05.buffer_rtx.pd
+++ b/Gem/examples/04.video/05.buffer_rtx.pd
@@ -1,4 +1,5 @@
-#N canvas 109 48 758 483 10;
+#N canvas 109 61 758 483 10;
+#X declare -lib Gem;
#X obj 29 30 gemhead;
#X obj 29 163 pix_video;
#X obj 29 100 gemframebuffer;
@@ -79,6 +80,7 @@
#X msg 43 76 dimen 256 256;
#X obj 69 305 t b a;
#X obj 559 212 t a b;
+#X obj 652 5 declare -lib Gem;
#X connect 0 0 2 0;
#X connect 1 0 7 0;
#X connect 2 0 3 0;
diff --git a/Gem/examples/04.video/06.frame_diff_tracking.pd b/Gem/examples/04.video/06.frame_diff_tracking.pd
index 3ade8da..a09ce65 100644
--- a/Gem/examples/04.video/06.frame_diff_tracking.pd
+++ b/Gem/examples/04.video/06.frame_diff_tracking.pd
@@ -1,4 +1,5 @@
-#N canvas 42 41 639 499 10;
+#N canvas 42 61 639 499 10;
+#X declare -lib Gem;
#X obj 140 80 gemhead;
#X obj 140 271 pix_diff;
#X obj 23 397 pix_texture;
@@ -165,6 +166,7 @@ using blob detection.;
#X text 356 384 <-- render a cursor using the (x \, y) and size;
#X text 6 460 render the video of the;
#X text 6 472 frame difference;
+#X obj 526 62 declare -lib Gem;
#X connect 0 0 8 0;
#X connect 1 0 12 0;
#X connect 2 0 11 0;
diff --git a/Gem/examples/04.video/07.bg_subtract_tracking.pd b/Gem/examples/04.video/07.bg_subtract_tracking.pd
index 7527569..464ddb4 100644
--- a/Gem/examples/04.video/07.bg_subtract_tracking.pd
+++ b/Gem/examples/04.video/07.bg_subtract_tracking.pd
@@ -1,4 +1,5 @@
-#N canvas 22 22 620 460 10;
+#N canvas 22 61 620 460 10;
+#X declare -lib Gem;
#X obj 8 10 cnv 15 400 40 empty empty tracking_using_background_subtraction
20 12 0 16 -228992 -66577 0;
#X obj 179 223 pix_grey;
@@ -162,6 +163,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 483 25 pd gemwin;
+#X obj 481 75 declare -lib Gem;
#X connect 1 0 3 0;
#X connect 2 0 3 0;
#X connect 3 0 5 0;
diff --git a/Gem/examples/04.video/08.color_classification.pd b/Gem/examples/04.video/08.color_classification.pd
index dd933b2..959861e 100644
--- a/Gem/examples/04.video/08.color_classification.pd
+++ b/Gem/examples/04.video/08.color_classification.pd
@@ -1,4 +1,5 @@
#N canvas 55 233 930 428 10;
+#X declare -lib Gem;
#X obj 297 283 separator;
#X obj 297 304 pix_texture;
#X obj 96 130 gemhead 10;
@@ -92,6 +93,7 @@ at the expense of a smaller number of classified pixels.;
#X obj 65 240 pix_colorclassify;
#X text 7 385 Author: Ricardo Fabbri labmacambira.sf.net rfabbri at
gmail;
+#X obj 822 5 declare -lib Gem;
#X connect 0 0 1 0;
#X connect 1 0 10 0;
#X connect 2 0 3 0;
diff --git a/Gem/examples/05.text/01.Text.pd b/Gem/examples/05.text/01.Text.pd
index 3cde23a..2331505 100644
--- a/Gem/examples/05.text/01.Text.pd
+++ b/Gem/examples/05.text/01.Text.pd
@@ -1,4 +1,5 @@
-#N canvas 262 20 734 641 10;
+#N canvas 262 61 734 641 10;
+#X declare -lib Gem;
#X floatatom 623 223 0 0 0 0 - - -;
#X floatatom 322 240 0 0 0 0 - - -;
#X msg 490 144 1;
@@ -84,6 +85,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 34 255 pd gemwin;
+#X obj 615 11 declare -lib Gem;
#X connect 0 0 29 3;
#X connect 1 0 22 3;
#X connect 2 0 7 0;
diff --git a/Gem/examples/05.text/01.TextNoLoadBang.pd b/Gem/examples/05.text/01.TextNoLoadBang.pd
index 43bb335..322d41c 100644
--- a/Gem/examples/05.text/01.TextNoLoadBang.pd
+++ b/Gem/examples/05.text/01.TextNoLoadBang.pd
@@ -1,4 +1,5 @@
-#N canvas 262 20 734 641 10;
+#N canvas 262 61 734 641 10;
+#X declare -lib Gem;
#X floatatom 623 223 0 0 0 0 - - -;
#X floatatom 322 240 0 0 0 0 - - -;
#X msg 490 144 1;
@@ -77,6 +78,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 34 255 pd gemwin;
+#X obj 615 11 declare -lib Gem;
#X connect 0 0 29 3;
#X connect 1 0 22 3;
#X connect 2 0 7 0;
diff --git a/Gem/examples/05.text/03.ChangeText.pd b/Gem/examples/05.text/03.ChangeText.pd
index e93314e..189f160 100644
--- a/Gem/examples/05.text/03.ChangeText.pd
+++ b/Gem/examples/05.text/03.ChangeText.pd
@@ -1,4 +1,5 @@
#N canvas 262 100 734 532 10;
+#X declare -lib Gem;
#X floatatom 495 359 0 0 0 0 - - -;
#X obj 451 243 gemhead;
#X obj 451 484 text3d hello world;
@@ -70,6 +71,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 34 362 pd gemwin;
+#X obj 615 11 declare -lib Gem;
#X connect 0 0 17 2;
#X connect 1 0 15 0;
#X connect 4 0 2 0;
diff --git a/Gem/examples/05.text/03.ChangeTextNoLoadBang.pd b/Gem/examples/05.text/03.ChangeTextNoLoadBang.pd
index bb01724..4af3e93 100644
--- a/Gem/examples/05.text/03.ChangeTextNoLoadBang.pd
+++ b/Gem/examples/05.text/03.ChangeTextNoLoadBang.pd
@@ -1,4 +1,5 @@
#N canvas 262 100 734 532 10;
+#X declare -lib Gem;
#X floatatom 495 359 0 0 0 0 - - -;
#X obj 451 243 gemhead;
#X obj 451 484 text3d hello world;
@@ -62,6 +63,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 34 255 pd gemwin;
+#X obj 615 11 declare -lib Gem;
#X connect 0 0 17 2;
#X connect 1 0 15 0;
#X connect 4 0 2 0;
diff --git a/Gem/examples/06.particle/01.simple.pd b/Gem/examples/06.particle/01.simple.pd
index a618273..e31177a 100644
--- a/Gem/examples/06.particle/01.simple.pd
+++ b/Gem/examples/06.particle/01.simple.pd
@@ -1,4 +1,5 @@
#N canvas 509 196 487 398 10;
+#X declare -lib Gem;
#X obj 167 160 gemhead;
#X obj 167 192 part_head;
#X obj 167 328 part_draw;
@@ -59,6 +60,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 37 65 pd gemwin;
+#X obj 372 7 declare -lib Gem;
#X connect 0 0 1 0;
#X connect 1 0 10 0;
#X connect 8 0 10 2;
diff --git a/Gem/examples/06.particle/02.fountain.pd b/Gem/examples/06.particle/02.fountain.pd
index a12a37d..308d6e8 100644
--- a/Gem/examples/06.particle/02.fountain.pd
+++ b/Gem/examples/06.particle/02.fountain.pd
@@ -1,4 +1,5 @@
#N canvas 396 160 600 500 10;
+#X declare -lib Gem;
#X obj 198 50 gemhead;
#X obj 198 82 part_head;
#X obj 198 136 part_color;
@@ -69,6 +70,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 34 176 pd gemwin;
+#X obj 492 7 declare -lib Gem;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 6 0;
diff --git a/Gem/examples/06.particle/03.orbit.pd b/Gem/examples/06.particle/03.orbit.pd
index 2791db1..6d48a89 100644
--- a/Gem/examples/06.particle/03.orbit.pd
+++ b/Gem/examples/06.particle/03.orbit.pd
@@ -1,4 +1,5 @@
#N canvas 396 160 600 500 10;
+#X declare -lib Gem;
#X obj 198 50 gemhead;
#X obj 198 82 part_head;
#X obj 198 136 part_color;
@@ -70,6 +71,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 34 255 pd gemwin;
+#X obj 492 7 declare -lib Gem;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 20 0;
diff --git a/Gem/examples/06.particle/04.combo.pd b/Gem/examples/06.particle/04.combo.pd
index 37d9afd..670d9d0 100644
--- a/Gem/examples/06.particle/04.combo.pd
+++ b/Gem/examples/06.particle/04.combo.pd
@@ -1,4 +1,5 @@
-#N canvas 125 39 600 634 10;
+#N canvas 125 61 600 634 10;
+#X declare -lib Gem;
#X obj 41 197 gemwin;
#X msg 41 39 create;
#X msg 58 68 destroy;
@@ -66,6 +67,7 @@
#X connect 6 0 2 0;
#X connect 6 1 5 0;
#X restore 85 327 pd alternate;
+#X obj 492 7 declare -lib Gem;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 34 0;
diff --git a/Gem/examples/06.particle/05.twoSrc.pd b/Gem/examples/06.particle/05.twoSrc.pd
index 5884f75..c966db4 100644
--- a/Gem/examples/06.particle/05.twoSrc.pd
+++ b/Gem/examples/06.particle/05.twoSrc.pd
@@ -1,4 +1,5 @@
-#N canvas 336 24 600 774 10;
+#N canvas 336 61 600 774 10;
+#X declare -lib Gem;
#X obj 198 50 gemhead;
#X obj 198 82 part_head;
#X obj 198 136 part_color;
@@ -143,8 +144,9 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 34 255 pd gemwin;
-#X obj 375 392 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
+#X obj 375 392 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
+#X obj 492 7 declare -lib Gem;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 12 0;
diff --git a/Gem/examples/06.particle/06.target.pd b/Gem/examples/06.particle/06.target.pd
index 35237ad..7eda6ae 100644
--- a/Gem/examples/06.particle/06.target.pd
+++ b/Gem/examples/06.particle/06.target.pd
@@ -1,4 +1,5 @@
#N canvas 396 160 600 500 10;
+#X declare -lib Gem;
#X obj 198 50 gemhead;
#X obj 198 82 part_head;
#X obj 198 447 part_draw;
@@ -62,6 +63,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 34 255 pd gemwin;
+#X obj 492 7 declare -lib Gem;
#X connect 0 0 1 0;
#X connect 1 0 13 0;
#X connect 3 0 11 0;
diff --git a/Gem/examples/06.particle/07.render.pd b/Gem/examples/06.particle/07.render.pd
index 8fd3c0c..fd95139 100644
--- a/Gem/examples/06.particle/07.render.pd
+++ b/Gem/examples/06.particle/07.render.pd
@@ -1,4 +1,5 @@
-#N canvas 136 52 487 571 10;
+#N canvas 136 61 487 571 10;
+#X declare -lib Gem;
#X obj 167 53 gemhead;
#X obj 167 81 part_head;
#X text 293 262 set the number per frame;
@@ -68,6 +69,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 36 148 pd gemwin;
+#X obj 372 7 declare -lib Gem;
#X connect 0 0 1 0;
#X connect 1 0 14 0;
#X connect 7 0 9 2;
diff --git a/Gem/examples/06.particle/08.info.pd b/Gem/examples/06.particle/08.info.pd
index 5b00adb..3a08a78 100644
--- a/Gem/examples/06.particle/08.info.pd
+++ b/Gem/examples/06.particle/08.info.pd
@@ -1,4 +1,5 @@
#N canvas 22 71 611 571 10;
+#X declare -lib Gem;
#X obj 169 18 gemhead;
#X obj 168 85 part_head;
#X text 278 259 set the number per frame;
@@ -80,6 +81,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 34 255 pd gemwin;
+#X obj 492 7 declare -lib Gem;
#X connect 0 0 24 0;
#X connect 1 0 7 0;
#X connect 4 0 6 2;
diff --git a/Gem/examples/06.particle/09.sink.pd b/Gem/examples/06.particle/09.sink.pd
index d22b5ac..796bcd6 100644
--- a/Gem/examples/06.particle/09.sink.pd
+++ b/Gem/examples/06.particle/09.sink.pd
@@ -1,4 +1,5 @@
#N canvas 424 93 600 500 10;
+#X declare -lib Gem;
#X obj 198 50 gemhead;
#X obj 198 82 part_head;
#X obj 198 136 part_color;
@@ -77,6 +78,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 34 255 pd gemwin;
+#X obj 492 6 declare -lib Gem;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 6 0;
diff --git a/Gem/examples/07.texture/01.texture.pd b/Gem/examples/07.texture/01.texture.pd
index da6dedc..2373f0b 100644
--- a/Gem/examples/07.texture/01.texture.pd
+++ b/Gem/examples/07.texture/01.texture.pd
@@ -1,4 +1,5 @@
-#N canvas 180 41 560 399 10;
+#N canvas 180 61 560 399 10;
+#X declare -lib Gem;
#X floatatom 369 147 0 0 0 0 - - -;
#X obj 325 202 pix_image ../data/fractal.JPG;
#X obj 325 245 pix_texture;
@@ -52,6 +53,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 60 170 pd gemwin;
+#X obj 444 11 declare -lib Gem;
#X connect 0 0 3 1;
#X connect 1 0 2 0;
#X connect 2 0 4 0;
diff --git a/Gem/examples/07.texture/02.TexCoord.pd b/Gem/examples/07.texture/02.TexCoord.pd
index 951c700..4b538e6 100644
--- a/Gem/examples/07.texture/02.TexCoord.pd
+++ b/Gem/examples/07.texture/02.TexCoord.pd
@@ -1,4 +1,5 @@
-#N canvas 127 46 642 483 10;
+#N canvas 127 61 642 483 10;
+#X declare -lib Gem;
#X obj 251 46 gemhead;
#X obj 251 424 square;
#X obj 251 369 pix_coordinate;
@@ -58,6 +59,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 34 255 pd gemwin;
+#X obj 534 11 declare -lib Gem;
#X connect 0 0 4 0;
#X connect 2 0 1 0;
#X connect 3 0 2 0;
diff --git a/Gem/examples/07.texture/04.moveImages.pd b/Gem/examples/07.texture/04.moveImages.pd
index 8107c0c..0ebd71b 100644
--- a/Gem/examples/07.texture/04.moveImages.pd
+++ b/Gem/examples/07.texture/04.moveImages.pd
@@ -1,4 +1,5 @@
-#N canvas 180 41 816 619 10;
+#N canvas 180 61 816 619 10;
+#X declare -lib Gem;
#X text 730 64 on;
#X text 767 62 off;
#X text 513 71 on;
@@ -105,6 +106,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 34 255 pd gemwin;
+#X obj 4 11 declare -lib Gem;
#X connect 4 0 18 0;
#X connect 5 0 25 0;
#X connect 6 0 33 0;
diff --git a/Gem/examples/07.texture/05.newWave.pd b/Gem/examples/07.texture/05.newWave.pd
index 52c631b..1fa1d59 100644
--- a/Gem/examples/07.texture/05.newWave.pd
+++ b/Gem/examples/07.texture/05.newWave.pd
@@ -1,4 +1,5 @@
#N canvas 110 90 876 486 10;
+#X declare -lib Gem;
#X text 653 313 Inlet 1: gemlist;
#X obj 209 277 gemhead;
#X floatatom 622 130 5 0 0 2 size - -;
@@ -136,6 +137,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 502 402 pd gemwin;
+#X obj 744 461 declare -lib Gem;
#X connect 1 0 73 0;
#X connect 2 0 57 1;
#X connect 3 0 36 0;
diff --git a/Gem/examples/07.texture/06.ripple.pd b/Gem/examples/07.texture/06.ripple.pd
index a329550..64b207a 100644
--- a/Gem/examples/07.texture/06.ripple.pd
+++ b/Gem/examples/07.texture/06.ripple.pd
@@ -1,4 +1,5 @@
-#N canvas 153 39 582 638 10;
+#N canvas 153 61 582 638 10;
+#X declare -lib Gem;
#X obj 299 39 openpanel;
#X msg 34 50 dimen 640 480;
#X obj 174 115 gemhead;
@@ -80,6 +81,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 34 185 pd gemwin;
+#X obj 454 611 declare -lib Gem;
#X connect 0 0 10 0;
#X connect 1 0 32 0;
#X connect 2 0 22 0;
diff --git a/Gem/examples/07.texture/07.feedback.pd b/Gem/examples/07.texture/07.feedback.pd
index a402cfe..1ce9673 100644
--- a/Gem/examples/07.texture/07.feedback.pd
+++ b/Gem/examples/07.texture/07.feedback.pd
@@ -1,4 +1,5 @@
-#N canvas 4 50 630 424 10;
+#N canvas 6 61 630 424 10;
+#X declare -lib Gem;
#X msg 320 121 snap;
#X obj 320 68 gemhead 15;
#X obj 39 64 gemhead 10;
@@ -71,6 +72,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 455 355 pd gemwin;
+#X obj 524 11 declare -lib Gem;
#X connect 0 0 10 0;
#X connect 1 0 19 0;
#X connect 2 0 3 0;
diff --git a/Gem/examples/07.texture/08.MotionBlur.pd b/Gem/examples/07.texture/08.MotionBlur.pd
index ca5e121..36b7e82 100644
--- a/Gem/examples/07.texture/08.MotionBlur.pd
+++ b/Gem/examples/07.texture/08.MotionBlur.pd
@@ -1,4 +1,5 @@
-#N canvas 13 0 1023 406 10;
+#N canvas 13 61 1023 406 10;
+#X declare -lib Gem;
#X obj 33 260 world_light;
#X msg 282 164 bang;
#X obj 282 144 metro 500;
@@ -108,6 +109,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 47 160 pd gemwin;
+#X obj 914 11 declare -lib Gem;
#X connect 1 0 19 0;
#X connect 2 0 1 0;
#X connect 3 0 2 0;
diff --git a/Gem/examples/07.texture/09.sharedTextures.pd b/Gem/examples/07.texture/09.sharedTextures.pd
index bd8cb84..b739fc7 100644
--- a/Gem/examples/07.texture/09.sharedTextures.pd
+++ b/Gem/examples/07.texture/09.sharedTextures.pd
@@ -1,4 +1,5 @@
-#N canvas 180 41 1035 404 10;
+#N canvas 180 61 1035 404 10;
+#X declare -lib Gem;
#X floatatom 370 259 0 0 0 0 - - -;
#X obj 325 122 pix_image ../data/fractal.JPG;
#X obj 325 155 pix_texture;
@@ -62,6 +63,7 @@
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 91 191 pd gemwin;
+#X obj 914 11 declare -lib Gem;
#X connect 0 0 3 1;
#X connect 1 0 2 0;
#X connect 2 0 6 0;
diff --git a/Gem/examples/07.texture/10.framebuffer.pd b/Gem/examples/07.texture/10.framebuffer.pd
index 7717e47..bf73cc0 100644
--- a/Gem/examples/07.texture/10.framebuffer.pd
+++ b/Gem/examples/07.texture/10.framebuffer.pd
@@ -1,90 +1,91 @@
-#N canvas 446 42 834 667 10;
-#X obj 202 83 gemhead 20;
-#X obj 491 166 gemhead;
-#X floatatom 532 391 5 0 0 0 - - -;
-#X floatatom 481 392 5 0 0 0 - - -;
-#X obj 581 389 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
+#N canvas 226 61 834 813 10;
+#X declare -lib Gem;
+#X obj 272 83 gemhead 20;
+#X obj 561 166 gemhead;
+#X floatatom 602 391 5 0 0 0 - - -;
+#X floatatom 551 392 5 0 0 0 - - -;
+#X obj 651 389 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
-262144 -1 -1 0 256;
-#X msg 286 97 dim 320 240;
-#X msg 286 117 dim 256 256;
-#X obj 278 634 rotateXYZ;
-#X floatatom 334 617 5 0 0 0 - - -;
-#X floatatom 346 636 5 0 0 0 - - -;
-#X floatatom 295 617 5 0 0 0 - - -;
-#X floatatom 299 443 5 0 0 0 - - -;
-#X floatatom 348 443 5 0 0 0 - - -;
-#X floatatom 250 443 5 0 0 0 - - -;
-#X obj 278 333 separator;
-#X obj -56 319 gemhead 1;
-#X obj -56 339 world_light;
-#X msg 286 137 dim 512 512;
-#X floatatom 507 322 5 0 0 0 - - -;
-#X floatatom 582 333 5 0 0 0 - - -;
-#X msg 289 45 color 0 0 1 0;
-#X msg 286 157 dim 1024 1024;
-#X msg 289 69 color 0 0 0 0;
-#X obj 203 507 rotateXYZ;
-#X floatatom 226 490 5 0 0 0 - - -;
-#X floatatom 269 490 5 0 0 0 - - -;
-#X floatatom 318 496 5 0 0 0 - - -;
-#X msg -21 72 color 0 0 0 0;
-#X obj 278 554 t a b;
-#X msg -33 51 color 0 1 1 0;
-#X msg -12 121 lighting \$1;
-#X obj -12 100 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
-1;
-#X floatatom 554 433 5 0 0 0 - - -;
-#X obj 202 302 t a a;
-#X obj 202 355 color 1 1 1;
-#X obj 203 413 pix_texture;
-#X msg 406 94 mode \$1;
-#X obj 406 67 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+#X msg 356 97 dim 320 240;
+#X msg 356 117 dim 256 256;
+#X obj 348 634 rotateXYZ;
+#X floatatom 404 617 5 0 0 0 - - -;
+#X floatatom 416 636 5 0 0 0 - - -;
+#X floatatom 365 617 5 0 0 0 - - -;
+#X floatatom 369 443 5 0 0 0 - - -;
+#X floatatom 418 443 5 0 0 0 - - -;
+#X floatatom 320 443 5 0 0 0 - - -;
+#X obj 348 333 separator;
+#X obj 14 319 gemhead 1;
+#X obj 14 339 world_light;
+#X msg 356 137 dim 512 512;
+#X floatatom 577 322 5 0 0 0 - - -;
+#X floatatom 652 333 5 0 0 0 - - -;
+#X msg 359 45 color 0 0 1 0;
+#X msg 356 157 dim 1024 1024;
+#X msg 359 69 color 0 0 0 0;
+#X obj 273 507 rotateXYZ;
+#X floatatom 296 490 5 0 0 0 - - -;
+#X floatatom 339 490 5 0 0 0 - - -;
+#X floatatom 388 496 5 0 0 0 - - -;
+#X msg 49 72 color 0 0 0 0;
+#X obj 348 554 t a b;
+#X msg 37 51 color 0 1 1 0;
+#X msg 58 121 lighting \$1;
+#X obj 58 100 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X floatatom 624 433 5 0 0 0 - - -;
+#X obj 272 302 t a a;
+#X obj 272 355 color 1 1 1;
+#X obj 273 413 pix_texture;
+#X msg 476 94 mode \$1;
+#X obj 476 67 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
;
-#X obj 203 467 translateXYZ -0.5 -0.8 -1;
-#X msg 229 374 open data/fractal.JPG;
-#X floatatom 376 507 5 0 0 0 - - -;
-#X msg 289 10 type FLOAT;
-#X obj 460 131 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+#X obj 273 467 translateXYZ -0.5 -0.8 -1;
+#X msg 299 374 open data/fractal.JPG;
+#X floatatom 446 507 5 0 0 0 - - -;
+#X msg 359 10 type FLOAT;
+#X obj 530 131 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X floatatom 342 281 5 0 0 0 - - -;
-#X obj 203 527 sphere 0.4;
-#X obj 491 357 rotateXYZ 28 0 200;
-#X obj 491 431 square 2;
-#X obj 491 410 translateXYZ 0 0 1.53;
-#X obj 202 281 translateXYZ 0 0 -4;
-#X obj 278 681 cube 0.57;
-#X obj 278 527 translateXYZ 2 0 -1;
-#X obj 202 135 color 0 1 0;
-#X obj 179 195 cnv 15 400 60 empty empty empty 20 12 0 14 -233017 -66577
+#X floatatom 412 281 5 0 0 0 - - -;
+#X obj 273 527 sphere 0.4;
+#X obj 561 357 rotateXYZ 28 0 200;
+#X obj 561 431 square 2;
+#X obj 561 410 translateXYZ 0 0 1.53;
+#X obj 272 281 translateXYZ 0 0 -4;
+#X obj 348 681 cube 0.57;
+#X obj 348 527 translateXYZ 2 0 -1;
+#X obj 272 135 color 0 1 0;
+#X obj 249 195 cnv 15 400 60 empty empty empty 20 12 0 14 -233017 -66577
0;
-#X obj 202 200 gemframebuffer;
-#X obj 491 233 pix_texture;
-#X obj -56 410 gemhead;
-#X obj -56 459 teapot 0.3;
-#X obj -56 435 translateXYZ -3 3 0;
-#X text -52 726 this example renders a scene (cube and sphere) into
+#X obj 272 200 gemframebuffer;
+#X obj 561 233 pix_texture;
+#X obj 14 410 gemhead;
+#X obj 14 459 teapot 0.3;
+#X obj 14 435 translateXYZ -3 3 0;
+#X text 18 726 this example renders a scene (cube and sphere) into
a framebuffer \, which is then used as a texture onto a square. teapot
and square live in a "meta"-world in relation to cube and sphere.;
-#X obj 362 575 % 360;
-#X obj 308 575 i;
-#X obj 491 265 t a b;
-#X obj 567 286 + 1;
-#X obj 334 575 + 5;
-#X obj 521 286 i 200;
-#X obj 595 286 % 3600;
-#X obj 582 313 / 10;
-#X text 435 65 <-- click me to change between normalized(0) and rectangle(1)
+#X obj 432 575 % 360;
+#X obj 378 575 i;
+#X obj 561 265 t a b;
+#X obj 637 286 + 1;
+#X obj 404 575 + 5;
+#X obj 591 286 i 200;
+#X obj 665 286 % 3600;
+#X obj 652 313 / 10;
+#X text 505 65 <-- click me to change between normalized(0) and rectangle(1)
textures.;
-#X text 399 717 you need framebuffer support on your gfx-card;
-#X text 395 738 (and its driver!);
-#X obj 202 394 pix_image ../data/fractal.JPG;
+#X text 469 717 you need framebuffer support on your gfx-card;
+#X text 465 738 (and its driver!);
+#X obj 272 394 pix_image ../data/fractal.JPG;
#N canvas 87 154 247 179 Gem.init 0;
#X obj 118 46 loadbang;
#X msg 118 81 reset;
#X obj 118 113 outlet;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
-#X restore -3 160 pd Gem.init;
+#X restore 67 160 pd Gem.init;
#N canvas 340 107 682 322 gemwin 0;
#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
-1 -1 0 1;
@@ -124,7 +125,8 @@ textures.;
#X connect 15 0 16 0;
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
-#X restore -33 177 pd gemwin;
+#X restore 37 177 pd gemwin;
+#X obj 704 11 declare -lib Gem;
#X connect 0 0 51 0;
#X connect 1 0 54 0;
#X connect 2 0 47 2;
diff --git a/Gem/examples/07.texture/11.multiples_gemhead_in_a_framebuffer.pd b/Gem/examples/07.texture/11.multiples_gemhead_in_a_framebuffer.pd
index 6738415..1e4a7e5 100644
--- a/Gem/examples/07.texture/11.multiples_gemhead_in_a_framebuffer.pd
+++ b/Gem/examples/07.texture/11.multiples_gemhead_in_a_framebuffer.pd
@@ -1,4 +1,5 @@
#N canvas 39 70 764 536 10;
+#X declare -lib Gem;
#X obj 108 279 cnv 15 300 80 empty empty empty 20 12 0 14 -233017 -66577
0;
#X obj 112 112 cnv 15 300 60 empty empty empty 20 12 0 14 -233017 -66577
@@ -46,7 +47,7 @@ single framebuffer;
#X restore 625 90 pd Gem.init;
#N canvas 340 107 682 322 gemwin 0;
#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
--1 -1 1 1;
+-1 -1 0 1;
#X obj 102 161 r \$0-gemstart;
#X obj 102 182 select 1 0;
#X msg 102 214 create \, 1;
@@ -87,6 +88,7 @@ single framebuffer;
#X msg 595 63 color \$1 \$1 \$1;
#X obj 595 44 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
0.5;
+#X obj 654 501 declare -lib Gem;
#X connect 2 0 12 0;
#X connect 3 0 13 0;
#X connect 4 0 16 0;
diff --git a/Gem/examples/08.io/01.Mouse.pd b/Gem/examples/08.io/01.Mouse.pd
index fcf7d93..c1bf0fc 100644
--- a/Gem/examples/08.io/01.Mouse.pd
+++ b/Gem/examples/08.io/01.Mouse.pd
@@ -1,4 +1,5 @@
#N canvas 396 160 600 500 10;
+#X declare -lib Gem;
#X text 303 95 left button;
#X obj 302 193 spigot;
#X floatatom 391 324 0 0 0 0 - - -;
@@ -27,7 +28,7 @@
#X restore 64 238 pd Gem.init;
#N canvas 340 107 682 322 gemwin 0;
#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
--1 -1 1 1;
+-1 -1 0 1;
#X obj 102 161 r \$0-gemstart;
#X obj 102 182 select 1 0;
#X msg 102 214 create \, 1;
@@ -66,6 +67,7 @@
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 34 255 pd gemwin;
#X obj 338 143 gemmouse 2 2;
+#X obj 491 4 declare -lib Gem;
#X connect 1 0 9 0;
#X connect 2 0 8 2;
#X connect 3 0 7 0;
diff --git a/Gem/examples/08.io/02.Tablet.pd b/Gem/examples/08.io/02.Tablet.pd
index c633ee7..61147f5 100644
--- a/Gem/examples/08.io/02.Tablet.pd
+++ b/Gem/examples/08.io/02.Tablet.pd
@@ -1,14 +1,15 @@
#N canvas 308 107 688 553 10;
+#X declare -lib Gem;
#X msg 197 266 bang;
#X obj 375 326 spigot;
-#X floatatom 448 437 0 0 0;
+#X floatatom 448 437 0 0 0 0 - - -;
#X obj 12 444 gemwin;
#X msg 26 150 create;
#X obj 197 299 gemhead;
#X msg 38 179 destroy;
#X msg 63 227 1;
#X msg 70 251 0;
-#X floatatom 375 438 0 0 0;
+#X floatatom 375 438 0 0 0 0 - - -;
#X obj 197 358 translateXYZ;
#X obj 375 382 - 1;
#X obj 375 410 * 4;
@@ -75,6 +76,7 @@ rotation variables.;
#X connect 4 0 2 0;
#X connect 5 0 2 0;
#X restore 61 417 pd Gem.init;
+#X obj 581 4 declare -lib Gem;
#X connect 0 0 5 0;
#X connect 1 0 0 0;
#X connect 1 0 27 0;
diff --git a/Gem/examples/08.io/03.Orb.pd b/Gem/examples/08.io/03.Orb.pd
index 6e50d58..d8d38d7 100644
--- a/Gem/examples/08.io/03.Orb.pd
+++ b/Gem/examples/08.io/03.Orb.pd
@@ -1,13 +1,14 @@
#N canvas 396 160 600 500 10;
+#X declare -lib Gem;
#X text 52 292 x pos;
#X text 94 292 y pos;
#X obj 234 146 gemorb 2;
-#X floatatom 82 267 0 0 0;
-#X floatatom 117 267 0 0 0;
-#X floatatom 152 267 0 0 0;
-#X floatatom 202 271 0 0 0;
-#X floatatom 237 271 0 0 0;
-#X floatatom 272 271 0 0 0;
+#X floatatom 82 267 0 0 0 0 - - -;
+#X floatatom 117 267 0 0 0 0 - - -;
+#X floatatom 152 267 0 0 0 0 - - -;
+#X floatatom 202 271 0 0 0 0 - - -;
+#X floatatom 237 271 0 0 0 0 - - -;
+#X floatatom 272 271 0 0 0 0 - - -;
#X text 133 90 the outputs of gemorb are:;
#X text 134 292 z pos;
#X text 197 293 x rot;
@@ -15,13 +16,13 @@
#X text 279 293 z rot;
#X obj 91 230 unpack 0 0 0;
#X obj 204 230 unpack 0 0 0;
-#X floatatom 333 270 0 0 0;
-#X floatatom 368 270 0 0 0;
-#X floatatom 403 270 0 0 0;
+#X floatatom 333 270 0 0 0 0 - - -;
+#X floatatom 368 270 0 0 0 0 - - -;
+#X floatatom 403 270 0 0 0 0 - - -;
#X obj 385 231 unpack 0 0 0 0 0 0;
-#X floatatom 448 271 0 0 0;
-#X floatatom 483 271 0 0 0;
-#X floatatom 518 271 0 0 0;
+#X floatatom 448 271 0 0 0 0 - - -;
+#X floatatom 483 271 0 0 0 0 - - -;
+#X floatatom 518 271 0 0 0 0 - - -;
#X text 133 111 position;
#X text 224 110 rotation;
#X text 317 109 button status;
@@ -34,6 +35,7 @@
#X text 94 56 The argument should be the serial port number of the
orb;
#X text 255 17 gemorb;
+#X obj 491 4 declare -lib Gem;
#X connect 2 0 14 0;
#X connect 2 1 15 0;
#X connect 2 2 19 0;
diff --git a/Gem/examples/08.io/04.UseOrb.pd b/Gem/examples/08.io/04.UseOrb.pd
index cecdfa4..a3d66d1 100644
--- a/Gem/examples/08.io/04.UseOrb.pd
+++ b/Gem/examples/08.io/04.UseOrb.pd
@@ -1,4 +1,5 @@
#N canvas 396 160 600 366 10;
+#X declare -lib Gem;
#X obj 41 324 gemwin;
#X msg 70 111 create;
#X obj 223 109 gemhead;
@@ -60,6 +61,7 @@
#X connect 10 0 1 2;
#X connect 12 0 0 0;
#X restore 338 89 pd process;
+#X obj 491 4 declare -lib Gem;
#X connect 1 0 0 0;
#X connect 2 0 12 0;
#X connect 3 0 0 0;
diff --git a/Gem/examples/09.openGL/01.primQuad.pd b/Gem/examples/09.openGL/01.primQuad.pd
index da187b2..b3e9f93 100644
--- a/Gem/examples/09.openGL/01.primQuad.pd
+++ b/Gem/examples/09.openGL/01.primQuad.pd
@@ -1,4 +1,5 @@
-#N canvas 50 20 769 629 10;
+#N canvas 50 61 769 629 10;
+#X declare -lib Gem;
#X obj 469 17 gemhead;
#X obj 468 504 GEMglEnd;
#X obj 469 233 GEMglColor4f 1 0 0 0;
@@ -79,6 +80,7 @@ values.;
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 74 187 pd gemwin;
+#X obj 26 549 declare -lib Gem;
#X connect 0 0 9 0;
#X connect 1 0 17 0;
#X connect 2 0 3 0;
diff --git a/Gem/examples/09.openGL/02.displayList.pd b/Gem/examples/09.openGL/02.displayList.pd
index d6ec2e6..4e58e0a 100644
--- a/Gem/examples/09.openGL/02.displayList.pd
+++ b/Gem/examples/09.openGL/02.displayList.pd
@@ -1,4 +1,5 @@
-#N canvas 76 58 1137 553 10;
+#N canvas 76 61 1137 553 10;
+#X declare -lib Gem;
#X obj 366 251 GEMglGenLists 1;
#X obj 336 418 GEMglNewList;
#X obj 147 432 GEMglCallList;
@@ -148,6 +149,7 @@ recompiled. You have to do that by hand!;
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 89 116 pd gemwin;
+#X obj 1026 9 declare -lib Gem;
#X connect 0 1 14 0;
#X connect 1 0 10 0;
#X connect 3 0 0 0;
diff --git a/Gem/examples/09.openGL/03.stencilBuffer.pd b/Gem/examples/09.openGL/03.stencilBuffer.pd
index 44f1e61..94f4967 100644
--- a/Gem/examples/09.openGL/03.stencilBuffer.pd
+++ b/Gem/examples/09.openGL/03.stencilBuffer.pd
@@ -1,113 +1,115 @@
-#N canvas 431 30 849 872 10;
-#X obj 39 330 GEMglEnable;
-#X floatatom 125 332 5 0 0 0 - - -;
-#X obj 111 282 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+#N canvas 431 61 849 900 10;
+#X declare -lib Gem;
+#X obj 39 337 GEMglEnable;
+#X floatatom 125 339 5 0 0 0 - - -;
+#X obj 111 289 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
-#X obj 111 305 GLdefine GL_STENCIL_TEST;
-#X obj 129 280 loadbang;
-#X obj 104 382 GLdefine GL_STENCIL_BUFFER_BIT;
-#X obj 166 361 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+#X obj 111 312 GLdefine GL_STENCIL_TEST;
+#X obj 129 287 loadbang;
+#X obj 104 389 GLdefine GL_STENCIL_BUFFER_BIT;
+#X obj 166 368 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
-#X floatatom 119 407 5 0 0 0 - - -;
-#X obj 104 359 loadbang;
-#X obj 39 249 GEMglClearStencil 0;
-#X obj 39 407 GEMglClear;
-#X obj 39 33 gemhead 45;
-#X obj 39 506 GEMglStencilFunc;
-#X msg 146 480 1;
-#X obj 75 436 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+#X floatatom 119 414 5 0 0 0 - - -;
+#X obj 104 366 loadbang;
+#X obj 39 256 GEMglClearStencil 0;
+#X obj 39 414 GEMglClear;
+#X obj 39 40 gemhead 45;
+#X obj 39 513 GEMglStencilFunc;
+#X msg 146 487 1;
+#X obj 75 443 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
-#X obj 74 459 GLdefine GL_ALWAYS;
-#X obj 96 436 loadbang;
-#X floatatom 100 480 5 0 0 0 - - -;
-#X obj 39 586 GEMglStencilOp;
-#X floatatom 156 581 5 0 0 0 - - -;
-#X obj 70 486 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+#X obj 74 466 GLdefine GL_ALWAYS;
+#X obj 96 443 loadbang;
+#X floatatom 100 487 5 0 0 0 - - -;
+#X obj 39 593 GEMglStencilOp;
+#X floatatom 156 588 5 0 0 0 - - -;
+#X obj 70 493 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
-#X obj 70 552 GLdefine GL_REPLACE;
-#X obj 95 530 loadbang;
-#X obj 239 743 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+#X obj 70 559 GLdefine GL_REPLACE;
+#X obj 95 537 loadbang;
+#X obj 239 750 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
-#X obj 170 742 loadbang;
-#X obj 39 810 GEMglClear;
-#X floatatom 156 812 5 0 0 0 - - -;
-#X obj 145 788 GLdefine GL_DEPTH_BUFFER_BIT;
-#X obj 126 743 t b b;
-#X obj 490 287 GEMglStencilFunc;
-#X msg 597 263 1;
-#X obj 525 220 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+#X obj 170 749 loadbang;
+#X obj 39 817 GEMglClear;
+#X floatatom 156 819 5 0 0 0 - - -;
+#X obj 145 795 GLdefine GL_DEPTH_BUFFER_BIT;
+#X obj 126 750 t b b;
+#X obj 490 294 GEMglStencilFunc;
+#X msg 597 270 1;
+#X obj 525 227 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
-#X obj 546 218 loadbang;
-#X floatatom 535 264 5 0 0 0 - - -;
-#X obj 525 241 GLdefine GL_NOTEQUAL;
-#X obj 490 396 color 1 0 0;
-#X obj 490 659 GEMglStencilFunc;
-#X msg 597 634 1;
-#X obj 525 594 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+#X obj 546 225 loadbang;
+#X floatatom 535 271 5 0 0 0 - - -;
+#X obj 525 248 GLdefine GL_NOTEQUAL;
+#X obj 490 403 color 1 0 0;
+#X obj 490 666 GEMglStencilFunc;
+#X msg 597 641 1;
+#X obj 525 601 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
-#X obj 547 592 loadbang;
-#X floatatom 536 638 5 0 0 0 - - -;
-#X obj 490 709 rotateXYZ 0 0 45;
-#X obj 525 615 GLdefine GL_EQUAL;
-#X obj 490 685 color 1 1 0;
-#X obj 126 766 GLdefine GL_COLOR_BUFFER_BIT;
-#X obj 490 365 GEMglStencilOp;
-#X floatatom 601 364 5 0 0 0 - - -;
-#X obj 521 310 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+#X obj 547 599 loadbang;
+#X floatatom 536 645 5 0 0 0 - - -;
+#X obj 490 716 rotateXYZ 0 0 45;
+#X obj 525 622 GLdefine GL_EQUAL;
+#X obj 490 692 color 1 1 0;
+#X obj 126 773 GLdefine GL_COLOR_BUFFER_BIT;
+#X obj 490 372 GEMglStencilOp;
+#X floatatom 601 371 5 0 0 0 - - -;
+#X obj 521 317 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
-#X obj 544 307 loadbang;
-#X obj 521 331 GLdefine GL_KEEP;
-#X floatatom 58 144 5 0 0 0 - - -;
-#X floatatom 97 144 5 0 0 0 - - -;
-#X obj 39 187 colorRGB 0 0 1;
-#X obj 126 810 |;
-#X floatatom 587 830 5 0 0 0 - - -;
-#X obj 569 782 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+#X obj 544 314 loadbang;
+#X obj 521 338 GLdefine GL_KEEP;
+#X floatatom 58 151 5 0 0 0 - - -;
+#X floatatom 97 151 5 0 0 0 - - -;
+#X obj 39 194 colorRGB 0 0 1;
+#X obj 126 817 |;
+#X floatatom 587 837 5 0 0 0 - - -;
+#X obj 569 789 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
-#X obj 569 805 GLdefine GL_STENCIL_TEST;
-#X obj 587 780 loadbang;
-#X obj 490 830 GEMglDisable;
-#X text 67 212 allow \, clear and configure stencil buffer;
-#X obj 39 695 circle 1.5;
-#X text 131 685 draw in all buffer;
-#X text 104 840 clear color and depth buffer;
-#X text 488 189 draw where the stencil buffer is not 1;
-#X obj 490 423 square 3;
-#X text 522 565 draw where the stencil buffer is 1;
-#X obj 529 21 gemhead 10;
-#X floatatom 562 41 5 0 0 0 - - -;
-#X floatatom 602 41 5 0 0 0 - - -;
-#X floatatom 642 41 5 0 0 0 - - -;
-#X obj 529 87 world_light;
-#X obj 529 62 rotateXYZ 0 0 0;
-#X obj 39 167 rotateXYZ;
-#X text 151 144 <- play with this.;
-#X text 238 858 (c) Cyrille Henry 2006;
-#X obj 39 56 t a b;
-#X obj 74 78 i;
-#X obj 122 56 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+#X obj 569 812 GLdefine GL_STENCIL_TEST;
+#X obj 587 787 loadbang;
+#X obj 490 837 GEMglDisable;
+#X text 67 219 allow \, clear and configure stencil buffer;
+#X obj 39 702 circle 1.5;
+#X text 131 692 draw in all buffer;
+#X text 104 847 clear color and depth buffer;
+#X text 488 196 draw where the stencil buffer is not 1;
+#X obj 490 430 square 3;
+#X text 522 572 draw where the stencil buffer is 1;
+#X obj 529 28 gemhead 10;
+#X floatatom 562 48 5 0 0 0 - - -;
+#X floatatom 602 48 5 0 0 0 - - -;
+#X floatatom 642 48 5 0 0 0 - - -;
+#X obj 529 94 world_light;
+#X obj 529 69 rotateXYZ 0 0 0;
+#X obj 39 174 rotateXYZ;
+#X text 151 151 <- play with this.;
+#X text 238 865 (c) Cyrille Henry 2006;
+#X obj 39 63 t a b;
+#X obj 74 85 i;
+#X obj 122 63 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
;
-#X obj 103 78 + 0;
-#X obj 74 123 t f f;
-#X obj 74 100 spigot;
-#X obj 104 673 teapot 1.5;
-#X obj 39 657 spigot;
-#X obj 104 654 spigot;
-#X obj 79 610 loadbang;
-#X obj 147 632 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+#X obj 103 85 + 0;
+#X obj 74 130 t f f;
+#X obj 74 107 spigot;
+#X obj 104 680 teapot 1.5;
+#X obj 39 664 spigot;
+#X obj 104 661 spigot;
+#X obj 79 617 loadbang;
+#X obj 147 639 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X obj 82 634 == 0;
-#X msg 147 611 0;
-#X obj 131 77 % 360;
-#X obj 490 754 sphere 1.2 25;
-#X obj 36 6 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1;
+#X obj 82 641 == 0;
+#X msg 147 618 0;
+#X obj 131 84 % 360;
+#X obj 490 761 sphere 1.2 25;
+#X obj 39 13 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
#N canvas 87 154 247 179 Gem.init 0;
#X obj 118 46 loadbang;
#X obj 118 113 outlet;
#X msg 118 81 reset \, lighting 1;
#X connect 0 0 2 0;
#X connect 2 0 1 0;
-#X restore 372 38 pd Gem.init;
+#X restore 372 45 pd Gem.init;
#N canvas 340 107 682 322 gemwin 0;
#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
-1 -1 0 1;
@@ -147,7 +149,8 @@
#X connect 15 0 16 0;
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
-#X restore 342 55 pd gemwin;
+#X restore 342 62 pd gemwin;
+#X obj 716 16 declare -lib Gem;
#X connect 0 0 10 0;
#X connect 2 0 3 0;
#X connect 3 0 1 0;
diff --git a/Gem/examples/09.openGL/04.clearZ.pd b/Gem/examples/09.openGL/04.clearZ.pd
index e4947ff..62586f6 100644
--- a/Gem/examples/09.openGL/04.clearZ.pd
+++ b/Gem/examples/09.openGL/04.clearZ.pd
@@ -1,4 +1,5 @@
-#N canvas 0 0 710 401 10;
+#N canvas 6 61 710 401 10;
+#X declare -lib Gem;
#X obj 111 162 loadbang;
#X obj 44 209 GEMglClear;
#X obj 111 186 GLdefine GL_DEPTH_BUFFER_BIT;
@@ -16,6 +17,7 @@
buffer test \, but not quite the same...;
#X text 176 213 <- clear Depth buffer \, so that you can draw anything
even if it is behind something else;
+#X obj 596 9 declare -lib Gem;
#X connect 0 0 2 0;
#X connect 1 0 5 0;
#X connect 2 0 1 1;
diff --git a/Gem/examples/09.openGL/05.load_identity_matrix.pd b/Gem/examples/09.openGL/05.load_identity_matrix.pd
index 2db138a..dc8498d 100644
--- a/Gem/examples/09.openGL/05.load_identity_matrix.pd
+++ b/Gem/examples/09.openGL/05.load_identity_matrix.pd
@@ -1,4 +1,5 @@
-#N canvas 0 0 784 537 10;
+#N canvas 6 61 650 591 10;
+#X declare -lib Gem;
#X obj 64 47 gemhead;
#X obj 96 94 gemlist_info;
#X floatatom 177 138 5 0 0 0 - - -;
@@ -42,6 +43,7 @@ of the "load identity" object that resets the transformation;
#X text 211 457 <- move the object regarding the camera position (this
is normally done automatically by the gemwin \, but since we have reset
the transformation matrix we have to do it ourselves...);
+#X obj 506 9 declare -lib Gem;
#X connect 0 0 7 0;
#X connect 1 4 5 0;
#X connect 5 0 2 0;
diff --git a/Gem/examples/10.glsl/01.simple_texture.pd b/Gem/examples/10.glsl/01.simple_texture.pd
index 2d1c6ba..7ee3de6 100644
--- a/Gem/examples/10.glsl/01.simple_texture.pd
+++ b/Gem/examples/10.glsl/01.simple_texture.pd
@@ -1,4 +1,5 @@
#N canvas 486 82 722 633 10;
+#X declare -lib Gem;
#X obj 76 22 gemhead;
#X obj 76 367 glsl_program;
#X obj 169 329 print linking;
@@ -13,7 +14,7 @@
#X msg 106 154 open texture.frag;
#X obj 76 197 glsl_fragment;
#X text 215 459 <- load texture;
-#X obj 106 535 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
+#X obj 106 535 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 76 489 pix_image img1.jpg;
#X msg 103 460 open img2.jpg;
@@ -41,7 +42,7 @@
#X restore 566 142 pd Gem.init;
#N canvas 340 107 682 322 gemwin 0;
#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
--1 -1 1 1;
+-1 -1 0 1;
#X obj 102 161 r \$0-gemstart;
#X obj 102 182 select 1 0;
#X msg 102 214 create \, 1;
@@ -88,6 +89,7 @@
#X floatatom 192 372 0 0 0 0 - - -;
#X msg 151 308 link \$1;
#X obj 151 259 change;
+#X obj 604 13 declare -lib Gem;
#X connect 0 0 11 0;
#X connect 1 0 3 0;
#X connect 1 1 38 0;
diff --git a/Gem/examples/10.glsl/02.primitive_distortion.pd b/Gem/examples/10.glsl/02.primitive_distortion.pd
index dd3ca85..07a3180 100644
--- a/Gem/examples/10.glsl/02.primitive_distortion.pd
+++ b/Gem/examples/10.glsl/02.primitive_distortion.pd
@@ -1,17 +1,18 @@
-#N canvas 228 49 587 690 10;
+#N canvas 228 61 587 690 10;
+#X declare -lib Gem;
#X obj 74 19 gemhead;
#X msg 29 100 print;
#X obj 74 362 glsl_program;
#X obj 215 141 change;
#X msg 98 333 print;
-#X floatatom 215 164 2 0 0 0 ID - -, f 2;
+#X floatatom 215 164 2 0 0 0 ID - -;
#X obj 164 312 print linking;
#X obj 74 122 glsl_vertex;
#X obj 74 551 pix_texture;
#X obj 74 44 alpha;
#X obj 101 497 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
-#X floatatom 292 302 5 0 0 0 - - -, f 5;
+#X floatatom 292 302 5 0 0 0 - - -;
#X msg 101 475 0;
#X msg 292 323 K \$1;
#X obj 74 594 sphere 2 30;
@@ -92,7 +93,7 @@ move all vertices separately;
#X msg 101 517 rectangle \$1;
#X obj 74 180 glsl_fragment;
#X obj 162 202 change;
-#X floatatom 162 225 2 0 0 0 ID - -, f 2;
+#X floatatom 162 225 2 0 0 0 ID - -;
#X obj 162 244 pack 0 0;
#X msg 162 291 link \$1 \$2;
#X msg 198 100 open \$1.frag;
@@ -100,6 +101,7 @@ move all vertices separately;
#X obj 166 63 t s s;
#X msg 88 100 open \$1.vert;
#X text 423 651 ch 2007;
+#X obj 389 43 declare -lib Gem;
#X connect 0 0 9 0;
#X connect 1 0 7 0;
#X connect 2 0 22 0;
diff --git a/Gem/examples/10.glsl/03.texture_distortion.pd b/Gem/examples/10.glsl/03.texture_distortion.pd
index be30c96..33e3c64 100644
--- a/Gem/examples/10.glsl/03.texture_distortion.pd
+++ b/Gem/examples/10.glsl/03.texture_distortion.pd
@@ -1,4 +1,5 @@
-#N canvas 10 10 552 667 10;
+#N canvas 10 61 552 667 10;
+#X declare -lib Gem;
#X text 381 660 ch 20007;
#X obj 74 -1 gemhead;
#X msg 29 80 print;
@@ -64,7 +65,7 @@ and distort the texture this with value;
#X restore 384 41 pd Gem.init;
#N canvas 340 107 682 322 gemwin 0;
#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
--1 -1 1 1;
+-1 -1 0 1;
#X obj 102 161 r \$0-gemstart;
#X obj 102 182 select 1 0;
#X msg 102 214 create \, 1;
@@ -103,6 +104,7 @@ and distort the texture this with value;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 354 58 pd gemwin;
#X msg 124 542 rectangle \$1;
+#X obj 384 23 declare -lib Gem;
#X connect 1 0 18 0;
#X connect 2 0 15 0;
#X connect 3 0 33 0;
diff --git a/Gem/examples/10.glsl/04.game_of_life.pd b/Gem/examples/10.glsl/04.game_of_life.pd
index 16ccb57..1aced3e 100644
--- a/Gem/examples/10.glsl/04.game_of_life.pd
+++ b/Gem/examples/10.glsl/04.game_of_life.pd
@@ -1,4 +1,5 @@
-#N canvas 10 10 599 681 10;
+#N canvas 10 61 599 681 10;
+#X declare -lib Gem;
#X obj 316 488 pix_snap2tex;
#X msg 356 461 0 0;
#X msg 402 460 500 500;
@@ -92,6 +93,7 @@ of the shader is used for next frame input;
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 52 117 pd gemwin;
+#X obj 484 13 declare -lib Gem;
#X connect 0 0 4 0;
#X connect 1 0 0 1;
#X connect 2 0 0 2;
diff --git a/Gem/examples/10.glsl/05.multitexture.pd b/Gem/examples/10.glsl/05.multitexture.pd
index 58a507d..c329a7d 100644
--- a/Gem/examples/10.glsl/05.multitexture.pd
+++ b/Gem/examples/10.glsl/05.multitexture.pd
@@ -1,4 +1,5 @@
-#N canvas 10 10 930 667 10;
+#N canvas 10 61 930 667 10;
+#X declare -lib Gem;
#X obj 76 5 gemhead;
#X obj 75 429 glsl_program;
#X obj 149 268 pack 0 0;
@@ -91,7 +92,7 @@ mixes 2 textures;
#X restore 395 47 pd Gem.init;
#N canvas 340 107 682 322 gemwin 0;
#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
--1 -1 1 1;
+-1 -1 0 1;
#X obj 102 161 r \$0-gemstart;
#X obj 102 182 select 1 0;
#X msg 102 214 create \, 1;
@@ -135,6 +136,7 @@ mixes 2 textures;
#X msg 220 591 texunit 2 \, rectangle 0;
#X msg 491 409 texunit 0 \, rectangle 0;
#X msg 716 409 texunit 1 \, rectangle 0;
+#X obj 793 7 declare -lib Gem;
#X connect 0 0 11 0;
#X connect 1 0 56 0;
#X connect 1 1 39 0;
diff --git a/Gem/examples/10.glsl/05.multitexture_bis.pd b/Gem/examples/10.glsl/05.multitexture_bis.pd
index a727b04..2ec6887 100644
--- a/Gem/examples/10.glsl/05.multitexture_bis.pd
+++ b/Gem/examples/10.glsl/05.multitexture_bis.pd
@@ -1,4 +1,5 @@
#N canvas 207 200 1100 637 10;
+#X declare -lib Gem;
#X obj 76 5 gemhead;
#X obj 75 429 glsl_program;
#X obj 149 268 pack 0 0;
@@ -76,7 +77,7 @@ mixes 2 textures;
#X restore 395 47 pd Gem.init;
#N canvas 340 107 682 322 gemwin 0;
#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
--1 -1 1 1;
+-1 -1 0 1;
#X obj 102 161 r \$0-gemstart;
#X obj 102 182 select 1 0;
#X msg 102 214 create \, 1;
@@ -133,6 +134,7 @@ mixes 2 textures;
#X msg 471 402 rectangle 0;
#X msg 462 313 open img1.jpg;
#X obj 443 342 pix_image img1.jpg;
+#X obj 983 7 declare -lib Gem;
#X connect 0 0 11 0;
#X connect 1 0 48 0;
#X connect 1 1 30 0;
diff --git a/Gem/examples/10.glsl/06.rectangle_multitexture.pd b/Gem/examples/10.glsl/06.rectangle_multitexture.pd
index 235e888..ce2c58b 100644
--- a/Gem/examples/10.glsl/06.rectangle_multitexture.pd
+++ b/Gem/examples/10.glsl/06.rectangle_multitexture.pd
@@ -1,4 +1,5 @@
#N canvas 511 97 648 675 10;
+#X declare -lib Gem;
#X obj 279 76 gemhead;
#X obj 295 208 loadbang;
#X obj 279 251 pix_texture;
@@ -140,6 +141,7 @@ for crossfading);
#X text 292 186 images have different sizes;
#X msg 139 507 mix_factor \$1;
#X obj 37 646 square 4;
+#X obj 543 647 declare -lib Gem;
#X connect 0 0 61 0;
#X connect 1 0 3 0;
#X connect 3 0 2 0;
diff --git a/Gem/examples/10.glsl/07.framebuffer_and_shader.pd b/Gem/examples/10.glsl/07.framebuffer_and_shader.pd
index b59a1af..5a5fa7b 100644
--- a/Gem/examples/10.glsl/07.framebuffer_and_shader.pd
+++ b/Gem/examples/10.glsl/07.framebuffer_and_shader.pd
@@ -1,4 +1,5 @@
-#N canvas 1 25 1126 659 10;
+#N canvas 30 77 1126 659 10;
+#X declare -lib Gem;
#X obj 9 470 translateXYZ 0 0 -4;
#X obj 9 234 ortho;
#X floatatom 83 538 5 0 0 0 - - -;
@@ -298,7 +299,7 @@ and multitextures;
#X restore 760 47 pd Gem.init;
#N canvas 340 107 682 322 gemwin 0;
#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
--1 -1 1 1;
+-1 -1 0 1;
#X obj 102 161 r \$0-gemstart;
#X obj 102 182 select 1 0;
#X msg 102 214 create \, 1;
@@ -343,6 +344,7 @@ and multitextures;
#X msg 867 255 K \$1 \, texture1 2 \, texture2 3;
#X text 880 276 texture1==base;
#X text 882 294 texture2==deformation;
+#X obj 1004 13 declare -lib Gem;
#X connect 0 0 5 0;
#X connect 1 0 18 0;
#X connect 3 0 2 0;
diff --git a/Gem/examples/10.glsl/08.multi_pass_rendering.pd b/Gem/examples/10.glsl/08.multi_pass_rendering.pd
index ac97f0a..a0a004f 100644
--- a/Gem/examples/10.glsl/08.multi_pass_rendering.pd
+++ b/Gem/examples/10.glsl/08.multi_pass_rendering.pd
@@ -1,4 +1,5 @@
#N canvas 208 184 980 477 10;
+#X declare -lib Gem;
#X obj 42 315 square 4;
#X obj 42 199 translateXYZ 0 0 -4;
#X obj 671 399 pix_texture;
@@ -246,7 +247,7 @@
#X restore 99 394 pd Gem.init;
#N canvas 340 107 682 322 gemwin 0;
#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
--1 -1 1 1;
+-1 -1 0 1;
#X obj 102 161 r \$0-gemstart;
#X obj 102 182 select 1 0;
#X msg 102 214 create \, 1;
@@ -292,6 +293,7 @@
#X obj 353 291 pix_texture;
#X msg 666 209 rectangle 0;
#X msg 691 378 rectangle 0;
+#X obj 99 376 declare -lib Gem;
#X connect 1 0 13 0;
#X connect 2 0 3 0;
#X connect 4 0 52 0;
diff --git a/Gem/examples/10.glsl/09.vertex_texture_fetching.pd b/Gem/examples/10.glsl/09.vertex_texture_fetching.pd
index 665b9a2..d03c0f6 100644
--- a/Gem/examples/10.glsl/09.vertex_texture_fetching.pd
+++ b/Gem/examples/10.glsl/09.vertex_texture_fetching.pd
@@ -1,4 +1,5 @@
-#N canvas 239 0 785 526 10;
+#N canvas 239 61 690 677 10;
+#X declare -lib Gem;
#X obj 504 69 gemhead;
#X obj 576 346 pack 0 0;
#X obj 597 326 t b f;
@@ -102,6 +103,7 @@ able to run this patch.;
1024;
#X msg 44 439 rectangle 0 \, quality 0;
#X obj 520 437 loadbang;
+#X obj 563 7 declare -lib Gem;
#X connect 0 0 15 0;
#X connect 1 0 3 0;
#X connect 2 0 1 0;
diff --git a/Gem/examples/10.glsl/10.GPGPU_Physical_model.pd b/Gem/examples/10.glsl/10.GPGPU_Physical_model.pd
index af34621..04253b1 100644
--- a/Gem/examples/10.glsl/10.GPGPU_Physical_model.pd
+++ b/Gem/examples/10.glsl/10.GPGPU_Physical_model.pd
@@ -1,5 +1,6 @@
-#N struct 1002-xy-pad-knob-1 float x0 float y0 float id;
+#N struct 1071-xy-pad-knob-1 float x0 float y0 float id;
#N canvas 75 218 764 482 10;
+#X declare -lib Gem;
#X obj 27 380 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
-1 0;
#X floatatom 185 212 5 0 0 0 - - -;
@@ -796,7 +797,7 @@
#X restore 66 188 pd Gem.init;
#N canvas 341 104 682 322 gemwin 0;
#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
--1 -1 1 1;
+-1 -1 0 1;
#X obj 102 161 r \$0-gemstart;
#X obj 102 182 select 1 0;
#X msg 102 214 create \, 1;
@@ -1113,7 +1114,7 @@ y0(0:90)(0:90) x0(0:90)(10:100) y0(0:90)(10:100) x0(0:90)(0:90) y0(0:90)(10:100)
#X obj 304 74 cnv 10 12 12 empty empty empty 20 12 0 14 -99865 -66577
0;
#N canvas 493 264 450 300 \$0-work 0;
-#X scalar 1002-xy-pad-knob-1 71.2205 45 900 \;;
+#X scalar 1071-xy-pad-knob-1 45 45 900 \;;
#X coords 0 100 100 0 100 100 1;
#X restore 260 30 pd \$0-work;
#X obj 451 532 wrap;
@@ -1184,7 +1185,7 @@ y0(0:90)(0:90) x0(0:90)(10:100) y0(0:90)(10:100) x0(0:90)(0:90) y0(0:90)(10:100)
#X coords 0 -1 1 1 100 100 2 260 30;
#X restore 445 290 pd \$0-pad;
#X obj 445 151 vsl 15 128 0 1 0 0 empty \$0-force force 0 -9 0 10 -262144
--1 -1 7400 1;
+-1 -1 0 1;
#X obj 538 152 vsl 15 128 0 1 0 0 empty \$0-direction direction 0 -9
0 10 -262144 -1 -1 0 1;
#N canvas 424 571 337 368 wind-control. 0;
@@ -1232,6 +1233,7 @@ of 64x92 masses \, and 64x92x12 links at 50x20 Hz. (about 7e+07 links/sec
on a CPU) (My GPU is old \, this patch performs 10 to 50 times faster
on a good GPU);
#X obj 606 346 s qqt_noise;
+#X obj 654 13 declare -lib Gem;
#X connect 0 0 5 0;
#X connect 2 0 1 0;
#X connect 9 0 10 0;
diff --git a/Gem/examples/10.glsl/11.geometry.pd b/Gem/examples/10.glsl/11.geometry.pd
index 1cebc5e..a11d428 100644
--- a/Gem/examples/10.glsl/11.geometry.pd
+++ b/Gem/examples/10.glsl/11.geometry.pd
@@ -1,4 +1,5 @@
-#N canvas 197 25 552 632 10;
+#N canvas 197 61 552 632 10;
+#X declare -lib Gem;
#X floatatom 132 447 9 0 0 0 ID - -;
#X floatatom 132 279 9 0 0 0 ID - -;
#X obj 150 506 print linking;
@@ -45,7 +46,7 @@ vertex shader. coordinate are in 2d.;
#X restore 366 247 pd Gem.init;
#N canvas 340 107 682 322 gemwin 0;
#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
--1 -1 1 1;
+-1 -1 0 1;
#X obj 102 161 r \$0-gemstart;
#X obj 102 182 select 1 0;
#X msg 102 214 create \, 1;
@@ -85,6 +86,7 @@ vertex shader. coordinate are in 2d.;
#X restore 336 264 pd gemwin;
#X msg 233 206 set -1;
#X obj 182 176 t b b b b;
+#X obj 444 13 declare -lib Gem;
#X connect 0 0 3 0;
#X connect 1 0 3 2;
#X connect 3 0 6 0;
diff --git a/Gem/examples/10.glsl/12.tri2fan.pd b/Gem/examples/10.glsl/12.tri2fan.pd
index c681b1b..84ccdf4 100644
--- a/Gem/examples/10.glsl/12.tri2fan.pd
+++ b/Gem/examples/10.glsl/12.tri2fan.pd
@@ -1,4 +1,5 @@
-#N canvas 17 56 785 745 10;
+#N canvas 17 61 785 745 10;
+#X declare -lib Gem;
#X floatatom 286 440 9 0 0 0 ID - -;
#X floatatom 249 264 9 0 0 0 ID - -;
#X obj 296 500 print linking;
@@ -96,6 +97,7 @@ which depend on the normal of the original primitive;
#X obj 552 635 pack f f;
#X obj 520 611 t f f;
#X msg 552 655 force \$1 \$2 0.3;
+#X obj 674 13 declare -lib Gem;
#X connect 0 0 3 0;
#X connect 1 0 3 2;
#X connect 3 0 6 0;
diff --git a/Gem/examples/10.glsl/13.panoramique.pd b/Gem/examples/10.glsl/13.panoramique.pd
index c0ccbd2..9b1adb2 100644
--- a/Gem/examples/10.glsl/13.panoramique.pd
+++ b/Gem/examples/10.glsl/13.panoramique.pd
@@ -1,8 +1,9 @@
-#N canvas 189 90 1107 660 10;
-#X msg 17 91 create \, 1;
-#X msg 30 114 0 \, destroy;
-#X obj 160 405 pix_texture;
-#X obj 169 165 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+#N canvas 189 90 1107 668 10;
+#X declare -lib Gem;
+#X msg 17 131 create \, 1;
+#X msg 30 154 0 \, destroy;
+#X obj 160 445 pix_texture;
+#X obj 169 205 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#N canvas 38 51 792 790 glsl 0;
#X obj 78 339 glsl_vertex;
@@ -70,16 +71,16 @@
#X connect 27 2 26 0;
#X connect 28 0 0 0;
#X connect 29 0 9 0;
-#X restore 160 182 pd glsl;
-#X obj 175 245 loadbang;
-#X obj 160 288 pix_image;
-#X msg 174 379 rectangle 1;
-#X obj 174 358 loadbang;
-#X obj 160 317 pix_info 0 0 0;
-#X msg 238 148 sizeX \$1;
-#X msg 253 169 sizeY \$1;
-#X obj 353 406 pix_texture;
-#X obj 362 166 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+#X restore 160 222 pd glsl;
+#X obj 175 285 loadbang;
+#X obj 160 328 pix_image;
+#X msg 174 419 rectangle 1;
+#X obj 174 398 loadbang;
+#X obj 160 357 pix_info 0 0 0;
+#X msg 238 188 sizeX \$1;
+#X msg 253 209 sizeY \$1;
+#X obj 353 446 pix_texture;
+#X obj 362 206 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#N canvas 38 51 792 790 glsl 0;
#X obj 78 339 glsl_vertex;
@@ -147,16 +148,16 @@
#X connect 27 2 26 0;
#X connect 28 0 0 0;
#X connect 29 0 9 0;
-#X restore 353 183 pd glsl;
-#X obj 368 246 loadbang;
-#X obj 353 289 pix_image;
-#X msg 367 378 rectangle 1;
-#X obj 367 359 loadbang;
-#X obj 353 318 pix_info 0 0 0;
-#X msg 431 144 sizeX \$1;
-#X msg 446 170 sizeY \$1;
-#X obj 552 407 pix_texture;
-#X obj 561 167 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+#X restore 353 223 pd glsl;
+#X obj 368 286 loadbang;
+#X obj 353 329 pix_image;
+#X msg 367 418 rectangle 1;
+#X obj 367 399 loadbang;
+#X obj 353 358 pix_info 0 0 0;
+#X msg 431 184 sizeX \$1;
+#X msg 446 210 sizeY \$1;
+#X obj 552 447 pix_texture;
+#X obj 561 207 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#N canvas 38 51 792 790 glsl 0;
#X obj 78 339 glsl_vertex;
@@ -224,19 +225,19 @@
#X connect 27 2 26 0;
#X connect 28 0 0 0;
#X connect 29 0 9 0;
-#X restore 552 184 pd glsl;
-#X obj 567 247 loadbang;
-#X obj 552 290 pix_image;
-#X msg 566 379 rectangle 1;
-#X obj 566 360 loadbang;
-#X obj 552 319 pix_info 0 0 0;
-#X msg 614 148 sizeX \$1;
-#X msg 633 166 sizeY \$1;
-#X obj 160 427 translateXYZ -3 0 0;
-#X obj 352 426 translateXYZ -1 0 0;
-#X obj 551 427 translateXYZ 1 0 0;
-#X obj 747 408 pix_texture;
-#X obj 756 168 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+#X restore 552 224 pd glsl;
+#X obj 567 287 loadbang;
+#X obj 552 330 pix_image;
+#X msg 566 419 rectangle 1;
+#X obj 566 400 loadbang;
+#X obj 552 359 pix_info 0 0 0;
+#X msg 614 188 sizeX \$1;
+#X msg 633 206 sizeY \$1;
+#X obj 160 467 translateXYZ -3 0 0;
+#X obj 352 466 translateXYZ -1 0 0;
+#X obj 551 467 translateXYZ 1 0 0;
+#X obj 747 448 pix_texture;
+#X obj 756 208 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#N canvas 38 51 792 790 glsl 0;
#X obj 78 339 glsl_vertex;
@@ -304,106 +305,107 @@
#X connect 27 2 26 0;
#X connect 28 0 0 0;
#X connect 29 0 9 0;
-#X restore 747 185 pd glsl;
-#X obj 762 248 loadbang;
-#X obj 747 291 pix_image;
-#X msg 761 380 rectangle 1;
-#X obj 761 361 loadbang;
-#X obj 747 320 pix_info 0 0 0;
-#X msg 825 146 sizeX \$1;
-#X msg 840 172 sizeY \$1;
-#X obj 746 428 translateXYZ 3 0 0;
-#X floatatom 199 68 5 0 0 0 - - -;
-#X msg 199 87 dZ \$1;
-#X obj 17 430 s shaders;
-#X obj 206 205 s init_shader;
-#X obj 399 204 s init_shader;
-#X obj 600 204 s init_shader;
-#X obj 794 206 s init_shader;
-#X obj 399 124 r shaders;
-#X obj 598 126 r shaders;
-#X obj 793 127 r shaders;
-#X obj 160 506 rectangle 1 0.75;
-#X obj 352 507 rectangle 1 0.75;
-#X obj 551 508 rectangle 1 0.75;
-#X obj 746 509 rectangle 1 0.75;
-#X obj 160 463 translateXYZ 0 0 0;
-#X obj 201 446 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
+#X restore 747 225 pd glsl;
+#X obj 762 288 loadbang;
+#X obj 747 331 pix_image;
+#X msg 761 420 rectangle 1;
+#X obj 761 401 loadbang;
+#X obj 747 360 pix_info 0 0 0;
+#X msg 825 186 sizeX \$1;
+#X msg 840 212 sizeY \$1;
+#X obj 746 468 translateXYZ 3 0 0;
+#X floatatom 199 108 5 0 0 0 - - -;
+#X msg 199 127 dZ \$1;
+#X obj 17 470 s shaders;
+#X obj 206 245 s init_shader;
+#X obj 399 244 s init_shader;
+#X obj 600 244 s init_shader;
+#X obj 794 246 s init_shader;
+#X obj 399 164 r shaders;
+#X obj 598 166 r shaders;
+#X obj 793 167 r shaders;
+#X obj 160 546 rectangle 1 0.75;
+#X obj 352 547 rectangle 1 0.75;
+#X obj 551 548 rectangle 1 0.75;
+#X obj 746 549 rectangle 1 0.75;
+#X obj 160 503 translateXYZ 0 0 0;
+#X obj 201 486 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
-262144 -1 -1 0.12 256;
-#X obj 259 446 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
+#X obj 259 486 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
-262144 -1 -1 -0.06 256;
-#X obj 352 465 translateXYZ 0 0 0;
-#X obj 393 448 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
+#X obj 352 505 translateXYZ 0 0 0;
+#X obj 393 488 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
-262144 -1 -1 0 256;
-#X obj 451 448 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
+#X obj 451 488 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
-262144 -1 -1 0 256;
-#X obj 551 466 translateXYZ 0 0 0;
-#X obj 592 449 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
+#X obj 551 506 translateXYZ 0 0 0;
+#X obj 592 489 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
-262144 -1 -1 -0.11 256;
-#X obj 650 449 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
+#X obj 650 489 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
-262144 -1 -1 -0.03 256;
-#X obj 746 465 translateXYZ 0 0 0;
-#X obj 787 448 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
+#X obj 746 505 translateXYZ 0 0 0;
+#X obj 787 488 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
-262144 -1 -1 -0.18 256;
-#X obj 845 448 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
+#X obj 845 488 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
-262144 -1 -1 -0.05 256;
-#X obj 160 -30 gemhead 10;
-#X obj 353 -29 gemhead 20;
-#X obj 552 -28 gemhead 30;
-#X obj 747 -27 gemhead 40;
-#X obj 160 104 alpha;
-#X obj 353 103 alpha;
-#X obj 552 99 alpha;
-#X obj 747 102 alpha;
-#X msg 256 113 ShadeL \$1;
-#X obj 199 25 r init_shader;
-#X obj 256 92 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
+#X obj 160 10 gemhead 10;
+#X obj 353 11 gemhead 20;
+#X obj 552 12 gemhead 30;
+#X obj 747 13 gemhead 40;
+#X obj 160 144 alpha;
+#X obj 353 143 alpha;
+#X obj 552 139 alpha;
+#X obj 747 142 alpha;
+#X msg 256 153 ShadeL \$1;
+#X obj 199 65 r init_shader;
+#X obj 256 132 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
-262144 -1 -1 0 256;
-#X msg 447 93 ShadeL \$1;
-#X obj 447 72 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
+#X msg 447 133 ShadeL \$1;
+#X obj 447 112 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
-262144 -1 -1 39 256;
-#X msg 634 95 ShadeL \$1;
-#X obj 634 74 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
+#X msg 634 135 ShadeL \$1;
+#X obj 634 114 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
-262144 -1 -1 35 256;
-#X msg 831 93 ShadeL \$1;
-#X obj 831 72 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
+#X msg 831 133 ShadeL \$1;
+#X obj 831 112 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
-262144 -1 -1 23 256;
-#X msg 212 486 -1;
-#X msg 269 485 -0.75;
-#X text 163 486 invert;
-#X msg 406 485 -1;
-#X msg 463 484 -0.75;
-#X text 357 485 invert;
-#X msg 605 488 -1;
-#X msg 662 487 -0.75;
-#X text 556 488 invert;
-#X msg 800 489 -1;
-#X msg 857 488 -0.75;
-#X text 751 489 invert;
-#X obj 17 218 gemwin;
-#X obj 37 168 loadbang;
-#X obj 160 -8 scaleXYZ 4 4 1;
-#X obj 353 -8 scaleXYZ 4 4 1;
-#X obj 552 -4 scaleXYZ 4 4 1;
-#X obj 747 -5 scaleXYZ 4 4 1;
-#X text 21 548 This patch allow multiples images to be assembled in
+#X msg 212 526 -1;
+#X msg 269 525 -0.75;
+#X text 163 526 invert;
+#X msg 406 525 -1;
+#X msg 463 524 -0.75;
+#X text 357 525 invert;
+#X msg 605 528 -1;
+#X msg 662 527 -0.75;
+#X text 556 528 invert;
+#X msg 800 529 -1;
+#X msg 857 528 -0.75;
+#X text 751 529 invert;
+#X obj 17 258 gemwin;
+#X obj 37 208 loadbang;
+#X obj 160 32 scaleXYZ 4 4 1;
+#X obj 353 32 scaleXYZ 4 4 1;
+#X obj 552 36 scaleXYZ 4 4 1;
+#X obj 747 35 scaleXYZ 4 4 1;
+#X text 21 588 This patch allow multiples images to be assembled in
order to create a panoramic image.;
-#X text 20 575 A shader distord the image to correct distance distortion
+#X text 20 615 A shader distord the image to correct distance distortion
\, and allow a fade between 2 images;
-#X text 17 602 "dz" depend on the angles between images.;
-#X text 462 579 copyright cyrille Henry and iem.;
-#X text 463 596 This development was supported by the COMEDIA project
+#X text 17 642 "dz" depend on the angles between images.;
+#X text 462 619 copyright cyrille Henry and iem.;
+#X text 463 636 This development was supported by the COMEDIA project
;
-#X floatatom 18 354 5 0 0 0 - - -;
-#X msg 18 373 dZ \$1;
-#X obj 18 311 r init_shader;
-#X msg 18 333 1.62;
-#X msg 199 47 1.38;
-#X msg 37 192 dimen 1024 256;
-#X msg 177 264 thread 0 \, open cam1.jpg;
-#X msg 370 265 thread 0 \, open cam2.jpg;
-#X msg 569 266 thread 0 \, open cam3.jpg;
-#X msg 764 267 thread 0 \, open cam4.jpg;
+#X floatatom 18 394 5 0 0 0 - - -;
+#X msg 18 413 dZ \$1;
+#X obj 18 351 r init_shader;
+#X msg 18 373 1.62;
+#X msg 199 87 1.38;
+#X msg 37 232 dimen 1024 256;
+#X msg 177 304 thread 0 \, open cam1.jpg;
+#X msg 370 305 thread 0 \, open cam2.jpg;
+#X msg 569 306 thread 0 \, open cam3.jpg;
+#X msg 764 307 thread 0 \, open cam4.jpg;
+#X obj 964 623 declare -lib Gem;
#X connect 0 0 101 0;
#X connect 1 0 101 0;
#X connect 2 0 32 0;
diff --git a/Gem/examples/10.glsl/14.blur.pd b/Gem/examples/10.glsl/14.blur.pd
index 645d1aa..e2c7905 100644
--- a/Gem/examples/10.glsl/14.blur.pd
+++ b/Gem/examples/10.glsl/14.blur.pd
@@ -1,4 +1,5 @@
#N canvas 481 142 778 497 10;
+#X declare -lib Gem;
#X obj 16 74 gemhead;
#X obj 16 130 gemframebuffer;
#X obj 129 13 loadbang;
@@ -135,6 +136,7 @@ frame 20 \,;
#X text 556 67 motion blur;
#X obj 557 226 * 1;
#X text 640 129 angle (radian);
+#X obj 663 7 declare -lib Gem;
#X connect 0 0 1 0;
#X connect 1 0 3 0;
#X connect 1 1 28 0;
diff --git a/Gem/examples/10.glsl/15.bicubic_image_interpolation.pd b/Gem/examples/10.glsl/15.bicubic_image_interpolation.pd
index e77e971..dd0d6de 100644
--- a/Gem/examples/10.glsl/15.bicubic_image_interpolation.pd
+++ b/Gem/examples/10.glsl/15.bicubic_image_interpolation.pd
@@ -1,4 +1,5 @@
#N canvas 22 145 681 529 10;
+#X declare -lib Gem;
#X obj 232 189 gemhead;
#X obj 232 356 pix_noise 5 5;
#X obj 232 446 pix_texture;
@@ -36,6 +37,7 @@
image interpolation. Bicubic interpolation offer a smoother surface
than obtain with bilinear interpolation. But since it need 16 sample
to compute the interpolation \, it is quite slow.;
+#X obj 563 7 declare -lib Gem;
#X connect 0 0 15 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
diff --git a/Gem/examples/10.glsl/16.vertexbuffer_attributes.pd b/Gem/examples/10.glsl/16.vertexbuffer_attributes.pd
index 770347b..563d097 100644
--- a/Gem/examples/10.glsl/16.vertexbuffer_attributes.pd
+++ b/Gem/examples/10.glsl/16.vertexbuffer_attributes.pd
@@ -1,4 +1,5 @@
-#N canvas 375 67 983 713 10;
+#N canvas 375 67 860 713 10;
+#X declare -lib Gem;
#N canvas 1 89 450 300 fps 0;
#X obj 46 -61 gemhead;
#X obj 46 -21 realtime;
@@ -17,7 +18,7 @@
#X connect 6 0 7 0;
#X connect 7 0 5 0;
#X restore 806 149 pd fps;
-#X floatatom 806 172 5 0 0 1 fps - -, f 5;
+#X floatatom 806 172 5 0 0 1 fps - -;
#N canvas 5 76 450 300 gemwin 0;
#X obj 132 246 gemwin;
#X obj 67 89 outlet;
@@ -54,7 +55,7 @@
#X connect 13 1 12 0;
#X connect 14 0 15 0;
#X restore 577 115 pd gemwin;
-#X msg 577 96 destroy;
+#X msg 577 96 create;
#X text 573 75 Create window:;
#X msg 184 350 link \$1 \$2;
#X obj 154 264 glsl_vertex;
@@ -190,6 +191,7 @@ and frag files;
#X connect 6 0 4 0;
#X restore 184 330 pd modulelist;
#X msg 272 416 bang;
+#X obj 753 7 declare -lib Gem;
#X connect 0 0 1 0;
#X connect 2 0 3 0;
#X connect 3 0 2 0;
diff --git a/Gem/examples/11.obj-exporter/obj_cube.pd b/Gem/examples/11.obj-exporter/obj_cube.pd
index 0d069e7..182789a 100644
--- a/Gem/examples/11.obj-exporter/obj_cube.pd
+++ b/Gem/examples/11.obj-exporter/obj_cube.pd
@@ -1,4 +1,4 @@
-#N canvas 511 83 666 689 12;
+#N canvas 511 83 713 781 12;
#X obj 18 14 inlet;
#X obj 18 35 t a a;
#X obj 50 98 spigot 0;
diff --git a/Gem/examples/11.obj-exporter/obj_exporter-help.pd b/Gem/examples/11.obj-exporter/obj_exporter-help.pd
index 543a2b2..3ff8360 100644
--- a/Gem/examples/11.obj-exporter/obj_exporter-help.pd
+++ b/Gem/examples/11.obj-exporter/obj_exporter-help.pd
@@ -1,4 +1,5 @@
#N canvas 58 106 645 381 12;
+#X declare -lib Gem;
#X obj 35 90 gemhead;
#X obj 35 175 translateXYZ 0 0 0.1;
#X obj 35 153 rotateXYZ 1 5 9;
@@ -55,8 +56,9 @@
#X obj 241 303 rotateXYZ 30 30 30;
#X obj 241 282 translateXYZ 2 1 2;
#X obj 35 59 gemwin;
-#X text 236 16 Here is a way to create obj file in Gem.;
+#X text 216 16 Here is a way to create obj file in Gem.;
#X obj 307 64 model;
+#X obj 516 15 declare -lib Gem;
#X connect 0 0 7 0;
#X connect 1 0 3 0;
#X connect 2 0 1 0;
diff --git a/Gem/examples/11.obj-exporter/obj_exporter.pd b/Gem/examples/11.obj-exporter/obj_exporter.pd
index d233d50..00e7fb2 100644
--- a/Gem/examples/11.obj-exporter/obj_exporter.pd
+++ b/Gem/examples/11.obj-exporter/obj_exporter.pd
@@ -1,4 +1,4 @@
-#N canvas 166 167 375 605 12;
+#N canvas 166 167 419 624 12;
#X obj 90 9 inlet;
#X obj 51 108 gemhead;
#X obj 51 150 delay 0;
diff --git a/Gem/examples/12.multi_screen_projection/01.flat_projection-help.pd b/Gem/examples/12.multi_screen_projection/01.flat_projection-help.pd
index fbf7189..6d812a7 100644
--- a/Gem/examples/12.multi_screen_projection/01.flat_projection-help.pd
+++ b/Gem/examples/12.multi_screen_projection/01.flat_projection-help.pd
@@ -1,4 +1,5 @@
#N canvas 365 180 996 500 10;
+#X declare -lib Gem;
#X obj 39 307 r render;
#X obj 39 437 pix_texture;
#X obj 110 353 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
@@ -20,6 +21,7 @@ to the computer.;
create a single image.;
#X text 305 159 geometry screen and geometry computer can be different
\, but should define the same number of screen.;
+#X obj 878 16 declare -lib Gem;
#X connect 0 0 10 0;
#X connect 1 0 5 0;
#X connect 2 0 3 0;
diff --git a/Gem/examples/12.multi_screen_projection/02.nfp-help.pd b/Gem/examples/12.multi_screen_projection/02.nfp-help.pd
index 6a8404d..1b71b3a 100644
--- a/Gem/examples/12.multi_screen_projection/02.nfp-help.pd
+++ b/Gem/examples/12.multi_screen_projection/02.nfp-help.pd
@@ -1,4 +1,5 @@
#N canvas 321 188 996 584 10;
+#X declare -lib Gem;
#X obj 27 231 gemhead;
#X obj 27 298 gemframebuffer;
#X obj 27 348 translateXYZ 0 0 -4;
@@ -27,6 +28,7 @@
#X obj 703 44 nfp_curved_wall 3;
#X text 52 43 load;
#X text 104 42 save;
+#X obj 842 6 declare -lib Gem;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 1 1 16 0;
diff --git a/Gem/examples/13.recursion/01.repetition_is_futile.pd b/Gem/examples/13.recursion/01.repetition_is_futile.pd
index 2fe7232..250142a 100644
--- a/Gem/examples/13.recursion/01.repetition_is_futile.pd
+++ b/Gem/examples/13.recursion/01.repetition_is_futile.pd
@@ -1,4 +1,5 @@
-#N canvas 0 0 602 516 10;
+#N canvas 6 61 542 516 10;
+#X declare -lib Gem;
#X obj 14 66 gemwin;
#X obj 14 9 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
;
@@ -36,6 +37,7 @@ with just 4 circles the repetition is painfully obvious \, and if we
wanted more the duplication would be painfully tedious.;
#X text 170 177 There is a powerful way to avoid this pain \, however
\, using recursion.;
+#X obj 430 9 declare -lib Gem;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
diff --git a/Gem/examples/13.recursion/02.iteration_is_insufficient.pd b/Gem/examples/13.recursion/02.iteration_is_insufficient.pd
index fad24c1..e161cac 100644
--- a/Gem/examples/13.recursion/02.iteration_is_insufficient.pd
+++ b/Gem/examples/13.recursion/02.iteration_is_insufficient.pd
@@ -1,4 +1,5 @@
-#N canvas 0 0 602 259 10;
+#N canvas 6 61 602 259 10;
+#X declare -lib Gem;
#X obj 14 66 gemwin;
#X obj 14 9 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
;
@@ -22,6 +23,7 @@ structure \, without branches. Iteration has solved one problem \,
only to present us with another: what if we want a branching structure?
;
#X text 170 187 Recursion is an elegant solution to this problem.;
+#X obj 470 9 declare -lib Gem;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
diff --git a/Gem/examples/13.recursion/03.recursive_spiral.pd b/Gem/examples/13.recursion/03.recursive_spiral.pd
index 2783fc8..7c64e36 100644
--- a/Gem/examples/13.recursion/03.recursive_spiral.pd
+++ b/Gem/examples/13.recursion/03.recursive_spiral.pd
@@ -1,4 +1,5 @@
-#N canvas 3 2 602 516 10;
+#N canvas 6 61 602 516 10;
+#X declare -lib Gem;
#X obj 14 66 gemwin;
#X obj 14 9 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
;
@@ -44,6 +45,7 @@ depth \, and recurse (after decrementing the maximum depth).;
less elegant than the iterative solution with [repeat] \, and it is
-- for non-branching structures. The power of recursion comes from
the ease with which branching structures can be created.;
+#X obj 497 15 declare -lib Gem;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
diff --git a/Gem/examples/13.recursion/04.binary_tree.pd b/Gem/examples/13.recursion/04.binary_tree.pd
index ef8f69f..01dcd99 100644
--- a/Gem/examples/13.recursion/04.binary_tree.pd
+++ b/Gem/examples/13.recursion/04.binary_tree.pd
@@ -1,4 +1,5 @@
-#N canvas 3 2 602 516 10;
+#N canvas 6 61 602 516 10;
+#X declare -lib Gem;
#X obj 14 66 gemwin;
#X obj 14 9 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
;
@@ -53,6 +54,7 @@ to a maximums depth of recursion.;
#X text 170 137 Be careful not to increase the max-depth too much:
the splitting at each recursion leads to an exponential increase in
the number of circles to be drawn.;
+#X obj 497 15 declare -lib Gem;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
diff --git a/Gem/examples/13.recursion/05.n-ary_tree.pd b/Gem/examples/13.recursion/05.n-ary_tree.pd
index 91d0565..308f5e5 100644
--- a/Gem/examples/13.recursion/05.n-ary_tree.pd
+++ b/Gem/examples/13.recursion/05.n-ary_tree.pd
@@ -1,4 +1,5 @@
-#N canvas 3 2 600 605 10;
+#N canvas 6 61 600 605 10;
+#X declare -lib Gem;
#X obj 14 66 gemwin;
#X obj 14 9 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
;
@@ -43,6 +44,7 @@ Trying to use it with an external counter leads to re-entrancy bugs
\, because the [repeat] is retriggered before the counter has finished
\, which messes up the counter's internal state. [nrepeat] is a "repeat
with a built in counter" \, which is re-entrancy safe.;
+#X obj 440 9 declare -lib Gem;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
diff --git a/Gem/examples/13.recursion/06.breaking_symmetry.pd b/Gem/examples/13.recursion/06.breaking_symmetry.pd
index c409aaf..e5aeefc 100644
--- a/Gem/examples/13.recursion/06.breaking_symmetry.pd
+++ b/Gem/examples/13.recursion/06.breaking_symmetry.pd
@@ -1,4 +1,5 @@
-#N canvas 4 2 673 560 10;
+#N canvas 6 61 673 560 10;
+#X declare -lib Gem;
#X obj 14 66 gemwin;
#X obj 14 9 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
;
@@ -354,6 +355,7 @@ the geos according to the transformations. Allowing different parameters
for each transformation means we can create non-symmetric structures
with some sort of self-similarity.;
#X msg 48 13 create;
+#X obj 560 9 declare -lib Gem;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 25 0;
diff --git a/Gem/examples/14.multiple_windows/01.basic_example.pd b/Gem/examples/14.multiple_windows/01.basic_example.pd
index 0b168d7..7e9f8d7 100644
--- a/Gem/examples/14.multiple_windows/01.basic_example.pd
+++ b/Gem/examples/14.multiple_windows/01.basic_example.pd
@@ -1,4 +1,5 @@
#N canvas 60 711 828 296 10;
+#X declare -lib Gem;
#X obj 88 241 gemwin 20 a;
#X obj 295 79 square;
#X obj 295 49 color 1 0 0 1;
@@ -7,23 +8,24 @@
#X obj 94 25 gemhead a;
#X msg 88 199 title a \, create \, 1;
#X msg 268 199 title b \, create \, 1;
-#X obj 223 158 b;
#X obj 223 138 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X text 240 136 create window;
-#X text 405 85 You can have multiple window and display different
-things on each.;
+#X text 405 85 You can have multiple window and display different things
+on each.;
#X obj 268 241 gemwin 20 b;
#X text 405 119 Basically \, use [gemwin fps context_name] to create
a named context then use [gemhead context_name] to render to this context
only.;
#X obj 295 27 gemhead b;
+#X obj 710 6 declare -lib Gem;
+#X obj 223 158 t b b;
#X connect 2 0 1 0;
#X connect 4 0 3 0;
#X connect 5 0 4 0;
#X connect 6 0 0 0;
-#X connect 7 0 12 0;
-#X connect 8 0 6 0;
-#X connect 8 0 7 0;
-#X connect 9 0 8 0;
-#X connect 14 0 2 0;
+#X connect 7 0 11 0;
+#X connect 8 0 15 0;
+#X connect 13 0 2 0;
+#X connect 15 0 6 0;
+#X connect 15 1 7 0;
diff --git a/Gem/examples/14.multiple_windows/02.switch_context.pd b/Gem/examples/14.multiple_windows/02.switch_context.pd
index eed7da9..f3b9e20 100644
--- a/Gem/examples/14.multiple_windows/02.switch_context.pd
+++ b/Gem/examples/14.multiple_windows/02.switch_context.pd
@@ -1,4 +1,5 @@
#N canvas 62 735 655 237 10;
+#X declare -lib Gem;
#X obj 33 129 gemwin 20 a;
#X obj 396 181 square;
#X obj 396 159 color 0 0 1 1;
@@ -13,8 +14,9 @@
#X text 185 24 1 create windows;
#X text 411 24 2 switch between rendering context;
#X msg 475 106 set \$1;
-#X floatatom 475 88 5 0 0 0 - - -, f 5;
+#X floatatom 475 88 5 0 0 0 - - -;
#X msg 168 87 title b \, create \, 1 \, view 1 1 6;
+#X obj 40 206 declare -lib Gem;
#X connect 2 0 1 0;
#X connect 3 0 0 0;
#X connect 4 0 3 0;
diff --git a/Gem/examples/14.multiple_windows/03.texture_sharing.pd b/Gem/examples/14.multiple_windows/03.texture_sharing.pd
index 2864ac1..62f80cd 100644
--- a/Gem/examples/14.multiple_windows/03.texture_sharing.pd
+++ b/Gem/examples/14.multiple_windows/03.texture_sharing.pd
@@ -1,11 +1,11 @@
#N canvas 224 736 1147 233 10;
+#X declare -lib Gem;
#X obj 33 169 gemwin 20 a;
#X obj 396 181 square;
-#X obj 168 46 b;
-#X obj 168 26 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+#X obj 141 26 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 396 37 gemhead a;
-#X text 185 24 1 create windows;
+#X text 158 24 1 create windows;
#X obj 396 104 pix_texture;
#X obj 596 181 square;
#X obj 596 155 pix_texture;
@@ -15,7 +15,7 @@
#X obj 168 169 gemwin 20 b;
#X msg 596 4 context a;
#X msg 669 4 context b;
-#X msg 90 118 destroy;
+#X msg 80 118 destroy;
#X text 731 150 on Linux \, this is only supported by [gemglutwindow].
;
#X text 730 98 support for texture sharing is limited by Operating
@@ -23,19 +23,23 @@ System \, ggraphics hardware \, openGL implementation and the windowing
backend.;
#X msg 33 87 title a \, create \, 1;
#X msg 168 117 title b \, create \, 1;
-#X connect 2 0 18 0;
-#X connect 2 0 19 0;
-#X connect 3 0 2 0;
-#X connect 4 0 9 0;
-#X connect 6 0 1 0;
-#X connect 6 1 8 1;
-#X connect 8 0 7 0;
-#X connect 9 0 6 0;
-#X connect 10 0 8 0;
-#X connect 11 0 10 0;
-#X connect 13 0 11 0;
-#X connect 14 0 11 0;
-#X connect 15 0 12 0;
-#X connect 15 0 0 0;
-#X connect 18 0 0 0;
-#X connect 19 0 12 0;
+#X obj 1030 16 declare -lib Gem;
+#X obj 141 46 t b b;
+#X obj 80 141 t a a;
+#X connect 2 0 20 0;
+#X connect 3 0 8 0;
+#X connect 5 0 1 0;
+#X connect 5 1 7 1;
+#X connect 7 0 6 0;
+#X connect 8 0 5 0;
+#X connect 9 0 7 0;
+#X connect 10 0 9 0;
+#X connect 12 0 10 0;
+#X connect 13 0 10 0;
+#X connect 14 0 21 0;
+#X connect 17 0 0 0;
+#X connect 18 0 11 0;
+#X connect 20 0 17 0;
+#X connect 20 1 18 0;
+#X connect 21 0 0 0;
+#X connect 21 1 11 0;
diff --git a/Gem/gem_filmAVF.so b/Gem/gem_filmAVF.so
index 6a815fc..ef1b5cd 100755
--- a/Gem/gem_filmAVF.so
+++ b/Gem/gem_filmAVF.so
Binary files differ
diff --git a/Gem/gem_imageIO.so b/Gem/gem_imageIO.so
index 189640a..40f1e41 100755
--- a/Gem/gem_imageIO.so
+++ b/Gem/gem_imageIO.so
Binary files differ
diff --git a/Gem/gem_imageJPEG.so b/Gem/gem_imageJPEG.so
index 5b96bbf..214ea04 100755
--- a/Gem/gem_imageJPEG.so
+++ b/Gem/gem_imageJPEG.so
Binary files differ
diff --git a/Gem/gem_imageSGI.so b/Gem/gem_imageSGI.so
index 0c4a448..b14e7f9 100755
--- a/Gem/gem_imageSGI.so
+++ b/Gem/gem_imageSGI.so
Binary files differ
diff --git a/Gem/gem_imageSTB.so b/Gem/gem_imageSTB.so
index 1fb6228..afdfe9a 100755
--- a/Gem/gem_imageSTB.so
+++ b/Gem/gem_imageSTB.so
Binary files differ
diff --git a/Gem/gem_imageTIFF.so b/Gem/gem_imageTIFF.so
index 13b6e76..5bd7108 100755
--- a/Gem/gem_imageTIFF.so
+++ b/Gem/gem_imageTIFF.so
Binary files differ
diff --git a/Gem/gem_modelOBJ.so b/Gem/gem_modelOBJ.so
index b6040af..595d00e 100755
--- a/Gem/gem_modelOBJ.so
+++ b/Gem/gem_modelOBJ.so
Binary files differ
diff --git a/Gem/gem_videoAVF.so b/Gem/gem_videoAVF.so
index 45ddbdb..e86559c 100755
--- a/Gem/gem_videoAVF.so
+++ b/Gem/gem_videoAVF.so
Binary files differ
diff --git a/Gem/gemcocoawindow.pd_darwin b/Gem/gemcocoawindow.pd_darwin
index a533cd3..2d1b940 100755
--- a/Gem/gemcocoawindow.pd_darwin
+++ b/Gem/gemcocoawindow.pd_darwin
Binary files differ
diff --git a/Gem/gemglutwindow.pd_darwin b/Gem/gemglutwindow.pd_darwin
index 186c580..b86945e 100755
--- a/Gem/gemglutwindow.pd_darwin
+++ b/Gem/gemglutwindow.pd_darwin
Binary files differ
diff --git a/Gem/gemmacoswindow.pd_darwin b/Gem/gemmacoswindow.pd_darwin
index b02a05f..135f4a3 100755
--- a/Gem/gemmacoswindow.pd_darwin
+++ b/Gem/gemmacoswindow.pd_darwin
Binary files differ
diff --git a/Gem/pix_drum-help.pd b/Gem/pix_drum-help.pd
index b4f76b3..8704d24 100644
--- a/Gem/pix_drum-help.pd
+++ b/Gem/pix_drum-help.pd
@@ -1,4 +1,5 @@
-#N canvas 496 25 656 859 10;
+#N canvas 496 61 656 859 10;
+#X declare -lib Gem;
#X obj 7 360 pix_drum;
#X obj 7 424 pix_texture;
#N canvas 593 327 562 332 inlet1 0;
@@ -110,21 +111,7 @@
#X obj 7 297 gemhead 1;
#X obj 7 318 pix_video;
#X obj 7 339 pix_grey;
-#N canvas 716 528 225 177 gemwin 0;
-#X obj 61 138 gemwin;
-#X msg 46 83 create \, 1;
-#X msg 142 99 0 \, destroy;
-#X obj 24 12 loadbang;
-#X obj 24 38 t b b b;
-#X msg 126 65 dimen 320 240;
-#X connect 1 0 0 0;
-#X connect 2 0 0 0;
-#X connect 3 0 4 0;
-#X connect 4 1 1 0;
-#X connect 4 2 5 0;
-#X connect 5 0 0 0;
-#X restore 407 29 pd gemwin;
-#N canvas 730 589 294 136 presets 0;
+#N canvas 730 619 294 136 presets 0;
#X obj 21 54 r refresh;
#X msg 21 73 \; ver-dim 240 \; hor-dim 320 \; dimen 320 240 \;;
#X obj 39 14 loadbang;
@@ -227,10 +214,52 @@ peak.;
#X text 12 756 This object was programmed as part of the Silent Percussion
Project \, for use in the Silent Drum Controller. For more information:
http://www.jaimeoliver.pe/drum;
+#X obj 538 828 declare -lib Gem;
+#N canvas 716 528 356 251 gemwin 0;
+#X obj 181 178 gemwin;
+#X msg 166 123 create \, 1;
+#X msg 262 139 0 \, destroy;
+#X obj 234 22 loadbang;
+#X msg 246 105 dimen 320 240;
+#X obj 100 101 tgl 18 0 \$0-win \$0-win empty 17 7 0 10 -262144 -1
+-1 0 1;
+#X obj 11 23 inlet;
+#X obj 11 46 t a a;
+#X obj 11 69 route create destroy;
+#X obj 11 92 t b;
+#X obj 11 115 f 1;
+#X obj 11 138 t f;
+#X msg 11 161 set \$1;
+#X obj 41 92 t b;
+#X obj 41 115 f 0;
+#X obj 156 23 r \$0-win;
+#X obj 156 46 route float;
+#X obj 156 69 select 1 0;
+#X connect 1 0 0 0;
+#X connect 2 0 0 0;
+#X connect 3 0 4 0;
+#X connect 4 0 0 0;
+#X connect 6 0 7 0;
+#X connect 7 0 8 0;
+#X connect 7 1 0 0;
+#X connect 8 0 9 0;
+#X connect 8 1 13 0;
+#X connect 9 0 10 0;
+#X connect 10 0 11 0;
+#X connect 11 0 12 0;
+#X connect 12 0 5 0;
+#X connect 13 0 14 0;
+#X connect 14 0 11 0;
+#X connect 15 0 16 0;
+#X connect 16 0 17 0;
+#X connect 17 0 1 0;
+#X connect 17 1 2 0;
+#X coords 0 -1 1 1 85 20 1 100 100;
+#X restore 406 21 pd gemwin;
#X connect 0 0 1 0;
-#X connect 0 1 29 0;
-#X connect 0 2 30 0;
-#X connect 1 0 41 0;
+#X connect 0 1 28 0;
+#X connect 0 2 29 0;
+#X connect 1 0 40 0;
#X connect 2 0 0 1;
#X connect 3 0 0 2;
#X connect 4 0 5 0;
diff --git a/Gem/pix_drum.pd_darwin b/Gem/pix_drum.pd_darwin
index db89747..fd0127c 100755
--- a/Gem/pix_drum.pd_darwin
+++ b/Gem/pix_drum.pd_darwin
Binary files differ
diff --git a/Gem/pix_fiducialtrack-help.pd b/Gem/pix_fiducialtrack-help.pd
index d890ec4..f929f33 100644
--- a/Gem/pix_fiducialtrack-help.pd
+++ b/Gem/pix_fiducialtrack-help.pd
@@ -1,5 +1,6 @@
#N canvas 23 75 787 476 10;
-#X text 452 8 GEM object;
+#X declare -lib Gem;
+#X text 599 8 GEM object;
#X obj 9 317 cnv 15 430 100 empty empty empty 20 12 0 14 -233017 -66577
0;
#X text 40 319 Inlets:;
@@ -81,6 +82,7 @@ the "open"-message. The default file is "all.trees";
#X obj 451 107 pix_threshold_bernsen 16 16;
#X msg 520 64 dimen 256 256;
#X obj 451 222 pix_fiducialtrack all.trees;
+#X obj 667 9 declare -lib Gem;
#X connect 10 0 11 0;
#X connect 11 0 10 0;
#X connect 14 0 24 0;
diff --git a/Gem/pix_fiducialtrack.pd_darwin b/Gem/pix_fiducialtrack.pd_darwin
index fba1c66..7bda684 100755
--- a/Gem/pix_fiducialtrack.pd_darwin
+++ b/Gem/pix_fiducialtrack.pd_darwin
Binary files differ
diff --git a/Gem/pix_hit-help.pd b/Gem/pix_hit-help.pd
index a4e574b..aa04a74 100644
--- a/Gem/pix_hit-help.pd
+++ b/Gem/pix_hit-help.pd
@@ -1,4 +1,5 @@
-#N canvas 1494 239 690 594 10;
+#N canvas 95 168 690 594 10;
+#X declare -lib Gem;
#X text 452 8 GEM object;
#X obj 9 173 cnv 15 430 345 empty empty empty 20 12 0 14 -233017 -66577
0;
@@ -110,6 +111,7 @@ can be a circle \, a rectangle or a line.;
#X msg 510 236 circle 1 0.2 0.2 0.15;
#X obj 535 280 route 0 1 2;
#X msg 510 254 line 2 0.7 0.1 0.8 0.9;
+#X obj 548 8 declare -lib Gem;
#X connect 13 0 14 0;
#X connect 14 0 13 0;
#X connect 17 0 19 0;
diff --git a/Gem/pix_hit.pd_darwin b/Gem/pix_hit.pd_darwin
index 0a6c4bb..96177e1 100755
--- a/Gem/pix_hit.pd_darwin
+++ b/Gem/pix_hit.pd_darwin
Binary files differ
diff --git a/Gem/pix_mano-help.pd b/Gem/pix_mano-help.pd
index 4f1de5a..192744c 100644
--- a/Gem/pix_mano-help.pd
+++ b/Gem/pix_mano-help.pd
@@ -1,33 +1,34 @@
-#N canvas 326 0 854 742 10;
-#X obj 556 -8 bng 15 250 50 0 refresh_var empty load-presets 17 7 0
+#N canvas 265 116 854 813 10;
+#X declare -lib Gem;
+#X obj 556 62 bng 15 250 50 0 refresh_var empty load-presets 17 7 0
10 -257985 -1 -1;
-#X obj 161 116 pix_grey;
-#X floatatom 117 -50 5 0 0 1 bottom bottom -;
-#X floatatom 152 -33 5 0 0 1 top top -;
-#X obj 161 156 pix_texture;
-#X obj 152 19 t b f;
-#X floatatom 194 -14 5 0 0 1 right right -;
-#X obj 194 19 t b f;
-#X floatatom 235 1 5 0 0 1 left left -;
-#X obj 235 19 t b f;
-#X obj 35 16 t b f;
-#X obj 15 43 pack f f f;
-#X obj 73 16 t b f;
-#X floatatom 35 -17 5 0 0 1 thresh thresh -;
-#X obj 304 19 t b f;
-#X obj 345 19 t b f;
-#X floatatom 15 -33 5 0 0 1 mode mode -;
-#X floatatom 73 -2 5 0 0 1 tip_scalar tip_scalar -;
-#X floatatom 273 -58 5 0 0 1 pix_avg pix_avg -;
-#X floatatom 304 -42 5 0 0 1 pix_tip pix_tip -;
-#X floatatom 345 -27 5 0 0 1 min_entry_size min_entry_size -;
-#X obj 384 20 t b f;
-#X floatatom 384 -12 5 0 0 1 min_perim min_perim -;
-#X floatatom 424 3 5 0 0 1 pix_samp pix_samp -;
-#X obj 424 20 t b f;
-#X obj 273 47 pack f f f f f;
-#X obj 161 76 gemhead 1;
-#X obj 161 96 pix_video;
+#X obj 161 186 pix_grey;
+#X floatatom 117 20 5 0 0 1 bottom bottom -;
+#X floatatom 152 37 5 0 0 1 top top -;
+#X obj 161 226 pix_texture;
+#X obj 152 89 t b f;
+#X floatatom 194 56 5 0 0 1 right right -;
+#X obj 194 89 t b f;
+#X floatatom 235 71 5 0 0 1 left left -;
+#X obj 235 89 t b f;
+#X obj 35 86 t b f;
+#X obj 15 113 pack f f f;
+#X obj 73 86 t b f;
+#X floatatom 35 53 5 0 0 1 thresh thresh -;
+#X obj 304 89 t b f;
+#X obj 345 89 t b f;
+#X floatatom 15 37 5 0 0 1 mode mode -;
+#X floatatom 73 68 5 0 0 1 tip_scalar tip_scalar -;
+#X floatatom 273 12 5 0 0 1 pix_avg pix_avg -;
+#X floatatom 304 28 5 0 0 1 pix_tip pix_tip -;
+#X floatatom 345 43 5 0 0 1 min_entry_size min_entry_size -;
+#X obj 384 90 t b f;
+#X floatatom 384 58 5 0 0 1 min_perim min_perim -;
+#X floatatom 424 73 5 0 0 1 pix_samp pix_samp -;
+#X obj 424 90 t b f;
+#X obj 273 117 pack f f f f f;
+#X obj 161 146 gemhead 1;
+#X obj 161 166 pix_video;
#N canvas 0 0 450 300 print 0;
#X obj 131 36 inlet;
#X obj 131 57 spigot;
@@ -43,7 +44,7 @@
#X connect 4 0 5 0;
#X connect 5 0 1 1;
#X coords 0 -1 1 1 60 23 2 100 100;
-#X restore 32 204 pd print;
+#X restore 32 274 pd print;
#N canvas 0 0 450 300 print 0;
#X obj 131 36 inlet;
#X obj 131 57 spigot;
@@ -59,7 +60,7 @@
#X connect 4 0 5 0;
#X connect 5 0 1 1;
#X coords 0 -1 1 1 60 23 2 100 100;
-#X restore 100 204 pd print;
+#X restore 100 274 pd print;
#N canvas 0 0 450 300 print 0;
#X obj 131 36 inlet;
#X obj 131 57 spigot;
@@ -75,7 +76,7 @@
#X connect 4 0 5 0;
#X connect 5 0 1 1;
#X coords 0 -1 1 1 60 23 2 100 100;
-#X restore 167 204 pd print;
+#X restore 167 274 pd print;
#N canvas 0 0 450 300 print 0;
#X obj 131 36 inlet;
#X obj 131 57 spigot;
@@ -91,7 +92,7 @@
#X connect 4 0 5 0;
#X connect 5 0 1 1;
#X coords 0 -1 1 1 60 23 2 100 100;
-#X restore 235 204 pd print;
+#X restore 235 274 pd print;
#N canvas 0 0 450 300 print 0;
#X obj 131 36 inlet;
#X obj 131 57 spigot;
@@ -107,7 +108,7 @@
#X connect 4 0 5 0;
#X connect 5 0 1 1;
#X coords 0 -1 1 1 60 23 2 100 100;
-#X restore 301 204 pd print;
+#X restore 301 274 pd print;
#N canvas 0 0 450 300 print 0;
#X obj 131 36 inlet;
#X obj 131 57 spigot;
@@ -123,21 +124,48 @@
#X connect 4 0 5 0;
#X connect 5 0 1 1;
#X coords 0 -1 1 1 60 23 2 100 100;
-#X restore 369 204 pd print;
-#N canvas 716 528 225 177 gemwin 0;
-#X obj 61 138 gemwin;
-#X msg 46 83 create \, 1;
-#X msg 142 99 0 \, destroy;
-#X obj 24 12 loadbang;
-#X obj 24 38 t b b b;
-#X msg 126 65 dimen 320 240;
+#X restore 369 274 pd print;
+#N canvas 716 528 356 251 gemwin 0;
+#X obj 181 178 gemwin;
+#X msg 166 123 create \, 1;
+#X msg 262 139 0 \, destroy;
+#X obj 234 22 loadbang;
+#X msg 246 105 dimen 320 240;
+#X obj 100 101 tgl 18 0 \$0-win \$0-win empty 17 7 0 10 -262144 -1
+-1 0 1;
+#X obj 11 23 inlet;
+#X obj 11 46 t a a;
+#X obj 11 69 route create destroy;
+#X obj 11 92 t b;
+#X obj 11 115 f 1;
+#X obj 11 138 t f;
+#X msg 11 161 set \$1;
+#X obj 41 92 t b;
+#X obj 41 115 f 0;
+#X obj 156 23 r \$0-win;
+#X obj 156 46 route float;
+#X obj 156 69 select 1 0;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 4 0;
-#X connect 4 1 1 0;
-#X connect 4 2 5 0;
-#X connect 5 0 0 0;
-#X restore 556 -49 pd gemwin;
+#X connect 4 0 0 0;
+#X connect 6 0 7 0;
+#X connect 7 0 8 0;
+#X connect 7 1 0 0;
+#X connect 8 0 9 0;
+#X connect 8 1 13 0;
+#X connect 9 0 10 0;
+#X connect 10 0 11 0;
+#X connect 11 0 12 0;
+#X connect 12 0 5 0;
+#X connect 13 0 14 0;
+#X connect 14 0 11 0;
+#X connect 15 0 16 0;
+#X connect 16 0 17 0;
+#X connect 17 0 1 0;
+#X connect 17 1 2 0;
+#X coords 0 -1 1 1 85 20 1 100 100;
+#X restore 556 21 pd gemwin;
#N canvas 621 151 306 719 graphs-outlet2 0;
#N canvas 0 22 450 300 (subpatch) 0;
#X array x 150 float 1;
@@ -222,7 +250,7 @@
#X connect 19 0 8 1;
#X connect 20 0 9 1;
#X connect 21 0 10 0;
-#X restore 100 265 pd graphs-outlet2;
+#X restore 100 335 pd graphs-outlet2;
#N canvas 0 0 450 300 print 0;
#X obj 131 36 inlet;
#X obj 131 57 spigot;
@@ -238,7 +266,7 @@
#X connect 3 0 4 0;
#X connect 4 0 1 1;
#X coords 0 -1 1 1 60 23 2 100 100;
-#X restore 100 238 pd print;
+#X restore 100 308 pd print;
#N canvas 178 290 743 248 presets 0;
#X text 280 16 head;
#X text 229 16 bottom;
@@ -306,77 +334,78 @@ at 320x240.;
#X connect 31 0 13 0;
#X connect 31 0 12 0;
#X connect 34 0 27 0;
-#X restore 556 -30 pd presets;
-#X text 456 52 inlet 1;
-#X text 458 71 mode 0: regular function (others used for debugging)
+#X restore 556 40 pd presets;
+#X text 456 122 inlet 1;
+#X text 458 141 mode 0: regular function (others used for debugging)
;
-#X text 457 83 thresh: threshold for contrast step;
-#X text 459 200 pix_avg: number of pixels to average the contour;
-#X text 458 234 min_entry_size: minimum entry size to be considered
+#X text 457 153 thresh: threshold for contrast step;
+#X text 459 270 pix_avg: number of pixels to average the contour;
+#X text 458 304 min_entry_size: minimum entry size to be considered
as a hand;
-#X text 458 256 min_perim: minimum perimeter to be considered a hand
+#X text 458 326 min_perim: minimum perimeter to be considered a hand
;
-#X text 459 308 OUTLETS;
-#X text 459 374 outlet 2: elements in the smoothed contour;
-#X text 460 408 outlet 3: peaks found in the contour;
-#X text 460 449 outlet 4: valleys found in the contour;
-#X text 460 491 outlet 5: contours found;
-#X text 461 542 outlet 6: end of algorithm report;
-#X text 457 148 inlet 2: defines the bounds of the area of analysis
+#X text 459 378 OUTLETS;
+#X text 459 444 outlet 2: elements in the smoothed contour;
+#X text 460 478 outlet 3: peaks found in the contour;
+#X text 460 519 outlet 4: valleys found in the contour;
+#X text 460 561 outlet 5: contours found;
+#X text 461 612 outlet 6: end of algorithm report;
+#X text 457 218 inlet 2: defines the bounds of the area of analysis
;
-#X text 484 160 bottom \, top \, right \, left;
-#X text 457 181 inlet 3: parameters of contour analysis;
-#X text 458 212 pix_tip: number of contiguous pixels higher than tip_scalar
+#X text 484 230 bottom \, top \, right \, left;
+#X text 457 251 inlet 3: parameters of contour analysis;
+#X text 458 282 pix_tip: number of contiguous pixels higher than tip_scalar
to consider something a peak or valley;
-#X text 482 118 mode \, thresh \, tip_scalar;
-#X text 457 94 tip scalar: scalar of maximum angle to consider something
+#X text 482 188 mode \, thresh \, tip_scalar;
+#X text 457 164 tip scalar: scalar of maximum angle to consider something
a peak or valley;
-#X text 458 267 pix_samp: period of sampling of the averaged contour
+#X text 458 337 pix_samp: period of sampling of the averaged contour
;
-#X text 483 281 pix_avg \, pix_tip \, min_entry_size \, min_perim \,
+#X text 483 351 pix_avg \, pix_tip \, min_entry_size \, min_perim \,
pix_samp;
-#X text 460 592 order of outlets: 1 2 5 3 4 6;
-#X text 460 340 outlet 1: elements in the raw contour (only in mode
+#X text 460 662 order of outlets: 1 2 5 3 4 6;
+#X text 460 410 outlet 1: elements in the raw contour (only in mode
2);
-#X text 60 301 pix_mano is an object that tracks light reflecting objects
+#X text 60 371 pix_mano is an object that tracks light reflecting objects
(eg. hands) over a light absorbing background (eg. black cloth). Light
reflecting objects need to enter the video frame from one of the sides
to be recognized. For example \, a white circle in the center will
not be recognized as there is no entry point in the borders of the
frame.;
-#X text 58 426 Roughly \, the object works by setting a threshold to
+#X text 58 496 Roughly \, the object works by setting a threshold to
discriminate between black and white pixels. shapes formed of white
pixels are analyzed in the order of largest entry section.;
-#X text 581 628 support information in www.jaimeoliver.pe;
-#X text 59 483 For each object an analysis of its contour is achieved.
+#X text 581 698 support information in www.jaimeoliver.pe;
+#X text 59 553 For each object an analysis of its contour is achieved.
(see graph option in outlet two while entering your hand into the frame).
The contours formed by a hand are averaged for smoothing and sampled
\, and then are plotted as x \, y coordinates and variation in angle
with respect to the previous sampled point. An analysis of this contour
provides tips (positive peaks) and valleys (negative peaks);
-#X text 76 576 This object was programmed as part of the Silent Percussion
+#X text 76 646 This object was programmed as part of the Silent Percussion
Project \, for use in the MANO Controller. For more information: http://www.jaimeoliver.pe
;
-#X obj 117 47 pack f f f f;
-#X text 695 642 jaime.oliver@gmail.com;
-#X text 715 657 joliverl-2010 v0.01;
-#X obj 161 136 pix_mano;
-#X text 460 326 outlet 0: the analyzed video image;
-#X obj 161 176 rectangle 5.33 4;
-#X text 60 383 Although this version is fully functional \, there are
+#X obj 117 117 pack f f f f;
+#X text 695 712 jaime.oliver@gmail.com;
+#X text 715 727 joliverl-2010 v0.01;
+#X obj 161 206 pix_mano;
+#X text 460 396 outlet 0: the analyzed video image;
+#X obj 161 246 rectangle 5.33 4;
+#X text 60 453 Although this version is fully functional \, there are
still a few bugs to work on and optimizations to be achieved. It is
still in an experimental level;
-#X text 476 353 [index \, x coordinate \, y coordinate \, angle];
-#X text 475 387 [index \, x coordinate \, y coordinate \, angle];
-#X text 476 421 [index of contour \, index of tip \, position (x \,
+#X text 476 423 [index \, x coordinate \, y coordinate \, angle];
+#X text 475 457 [index \, x coordinate \, y coordinate \, angle];
+#X text 476 491 [index of contour \, index of tip \, position (x \,
y) \, magnitude \, angle \, position in contour];
-#X text 476 462 [index of contour \, index of tip \, position (x \,
+#X text 476 532 [index of contour \, index of tip \, position (x \,
y) \, magnitude \, angle \, position in contour];
-#X text 476 504 [index of contour \, entry_point (x \, y) \, area \,
+#X text 476 574 [index of contour \, entry_point (x \, y) \, area \,
direction \, center (x \, y) \, perimeter \, entr_size \, bounds: right
(x \, y) \, left (x \, y) \, top (x \, y) \, bottom (x \, y).];
-#X text 477 555 if there were any contours = 1;
-#X text 477 565 if there were no contours = 0;
+#X text 477 625 if there were any contours = 1;
+#X text 477 635 if there were no contours = 0;
+#X obj 538 768 declare -lib Gem;
#X connect 1 0 68 0;
#X connect 2 0 65 0;
#X connect 3 0 5 0;
diff --git a/Gem/pix_mano.pd_darwin b/Gem/pix_mano.pd_darwin
index cd38ee9..078d822 100755
--- a/Gem/pix_mano.pd_darwin
+++ b/Gem/pix_mano.pd_darwin
Binary files differ
diff --git a/Gem/pix_videoDS-help.pd b/Gem/pix_videoDS-help.pd
deleted file mode 100644
index 2975f15..0000000
--- a/Gem/pix_videoDS-help.pd
+++ /dev/null
@@ -1,64 +0,0 @@
-#N canvas 306 199 651 488 10;
-#X obj 14 204 gemhead;
-#X msg 221 66 open 0;
-#X msg 221 41 enumerate;
-#X msg 221 92 close;
-#X obj 14 401 pix_texture;
-#X obj 14 431 rectangle 4 3;
-#X obj 220 18 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
-;
-#X msg 224 158 dialog format;
-#X msg 224 182 dialog crossbar;
-#X msg 224 205 dialog source;
-#X msg 224 228 dialog display;
-#X msg 224 265 dv res full;
-#X msg 224 288 dv res half;
-#X msg 225 311 dv res quarter;
-#X msg 224 335 dv res dc;
-#X text 309 13 enable/disable;
-#X text 308 40 list available devices;
-#X text 310 67 open device N;
-#X text 311 96 close the device;
-#X text 354 158 display format dialog;
-#X text 356 133 display all configuration dialogs;
-#X text 354 182 display crossbar dialog;
-#X text 355 208 display source dialog;
-#X text 355 231 display display dialog;
-#X text 356 267 (DV only) set decode res to full;
-#X text 356 288 (DV only) set decode res to half;
-#X text 356 310 (DV only) set decode res to quarter;
-#X text 355 335 (DV only) set decode res to dc;
-#X text 12 -13 pix_videoDS;
-#X text 127 -13 Live video capture using DirectShow (Windows only)
-;
-#X msg 224 132 dialog;
-#X obj 21 116 gemwin;
-#X msg 21 35 create;
-#X obj 123 66 tgl 30 0 empty empty empty 20 8 0 8 -262144 -1 -1 0 1
-;
-#X msg 37 68 destroy;
-#X msg 225 393 colorspace \$1;
-#X symbolatom 225 373 6 0 0 0 - - -;
-#X text 283 372 RGBA|YUV|Grey;
-#X obj 14 371 pix_video;
-#X connect 0 0 38 0;
-#X connect 1 0 38 0;
-#X connect 2 0 38 0;
-#X connect 3 0 38 0;
-#X connect 4 0 5 0;
-#X connect 6 0 38 0;
-#X connect 7 0 38 0;
-#X connect 8 0 38 0;
-#X connect 9 0 38 0;
-#X connect 10 0 38 0;
-#X connect 11 0 38 0;
-#X connect 12 0 38 0;
-#X connect 13 0 38 0;
-#X connect 14 0 38 0;
-#X connect 30 0 38 0;
-#X connect 32 0 31 0;
-#X connect 33 0 31 0;
-#X connect 34 0 31 0;
-#X connect 35 0 38 0;
-#X connect 36 0 35 0;
-#X connect 38 0 4 0;