From ca202f852e055ebfdb589aec5837537ccb3aee18 Mon Sep 17 00:00:00 2001 From: equilet Date: Wed, 23 May 2018 20:39:05 -0500 Subject: [PATCH] attempt to fix bug in hand detection for active status --- max/lib_krate/zpn_warp.maxpat | 140 ++++++++++++---------------------- 1 file changed, 47 insertions(+), 93 deletions(-) diff --git a/max/lib_krate/zpn_warp.maxpat b/max/lib_krate/zpn_warp.maxpat index 523bf89..4a5da10 100644 --- a/max/lib_krate/zpn_warp.maxpat +++ b/max/lib_krate/zpn_warp.maxpat @@ -3,13 +3,13 @@ "fileversion" : 1, "appversion" : { "major" : 7, - "minor" : 2, - "revision" : 2, + "minor" : 3, + "revision" : 5, "architecture" : "x64", "modernui" : 1 } , - "rect" : [ 519.0, 79.0, 642.0, 711.0 ], + "rect" : [ 519.0, 79.0, 762.0, 711.0 ], "bglocked" : 0, "openinpresentation" : 0, "default_fontsize" : 12.0, @@ -38,57 +38,58 @@ "subpatcher_template" : "gridded", "boxes" : [ { "box" : { - "id" : "obj-23", - "maxclass" : "newobj", + "fontface" : 0, + "fontsize" : 10.0, + "id" : "obj-17", + "linecount" : 4, + "maxclass" : "o.expr.codebox", "numinlets" : 1, "numoutlets" : 2, - "outlettype" : [ "", "FullPacket" ], - "patching_rect" : [ 179.0, 230.833328, 78.0, 22.0 ], - "style" : "", - "text" : "o.route /gate" + "outlettype" : [ "FullPacket", "FullPacket" ], + "patching_rect" : [ 409.5, 147.888885, 205.0, 64.0 ], + "presentation_rect" : [ 410.0, 148.777786, 0.0, 0.0 ], + "text" : "if(/hands != 2, \n /gesture/openclose/active = 0\n),\n/gate = (/hands == 2)" } } , { "box" : { - "fontface" : 0, - "fontsize" : 12.0, - "id" : "obj-22", - "linecount" : 2, - "maxclass" : "o.expr.codebox", + "id" : "obj-2", + "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 2, - "outlettype" : [ "FullPacket", "FullPacket" ], - "patching_rect" : [ 179.0, 174.777786, 358.0, 46.0 ], - "presentation_rect" : [ 312.5, 181.0, 0.0, 0.0 ], - "text" : "if(/hands != 2, /gesture/openclose/active = 0),\n/gate = (/hands == 2)", - "textcolor" : [ 0.0, 0.0, 0.0, 1.0 ] + "outlettype" : [ "", "FullPacket" ], + "patching_rect" : [ 502.5, 334.0, 191.0, 22.0 ], + "style" : "", + "text" : "o.select /gesture/openclose/active" } } , { "box" : { - "id" : "obj-18", + "id" : "obj-23", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "FullPacket" ], - "patching_rect" : [ 427.5, 337.0, 90.0, 22.0 ], + "patching_rect" : [ 179.0, 257.0, 78.0, 22.0 ], "style" : "", - "text" : "o.select /active" + "text" : "o.route /gate" } } , { "box" : { - "id" : "obj-17", - "maxclass" : "newobj", + "fontface" : 0, + "fontsize" : 10.0, + "id" : "obj-22", + "linecount" : 5, + "maxclass" : "o.expr.codebox", "numinlets" : 1, "numoutlets" : 2, - "outlettype" : [ "", "FullPacket" ], - "patching_rect" : [ 427.5, 309.0, 153.0, 22.0 ], - "style" : "", - "text" : "o.route /gesture/openclose" + "outlettype" : [ "FullPacket", "FullPacket" ], + "patching_rect" : [ 179.0, 174.777786, 218.0, 75.0 ], + "text" : "if(/hands == 2, \n /gesture/openclose/active = 1, \n /gesture/openclose/active = 0\n),\n/gate = (/hands == 2)" } } @@ -116,8 +117,8 @@ "fileversion" : 1, "appversion" : { "major" : 7, - "minor" : 2, - "revision" : 2, + "minor" : 3, + "revision" : 5, "architecture" : "x64", "modernui" : 1 } @@ -159,8 +160,7 @@ "numoutlets" : 2, "outlettype" : [ "FullPacket", "FullPacket" ], "patching_rect" : [ 97.0, 111.0, 92.0, 32.0 ], - "text" : "/active = 0", - "textcolor" : [ 0.0, 0.0, 0.0, 1.0 ] + "text" : "/active = 0" } } @@ -174,8 +174,7 @@ "numoutlets" : 2, "outlettype" : [ "FullPacket", "FullPacket" ], "patching_rect" : [ 39.0, 154.0, 92.0, 32.0 ], - "text" : "/active = 1", - "textcolor" : [ 0.0, 0.0, 0.0, 1.0 ] + "text" : "/active = 1" } } @@ -196,6 +195,7 @@ "box" : { "comment" : "", "id" : "obj-89", + "index" : 1, "maxclass" : "inlet", "numinlets" : 0, "numoutlets" : 1, @@ -209,6 +209,7 @@ "box" : { "comment" : "", "id" : "obj-90", + "index" : 1, "maxclass" : "outlet", "numinlets" : 1, "numoutlets" : 0, @@ -221,8 +222,6 @@ "lines" : [ { "patchline" : { "destination" : [ "obj-90", 0 ], - "disabled" : 0, - "hidden" : 0, "source" : [ "obj-1", 0 ] } @@ -230,8 +229,6 @@ , { "patchline" : { "destination" : [ "obj-1", 0 ], - "disabled" : 0, - "hidden" : 0, "source" : [ "obj-37", 1 ] } @@ -239,8 +236,6 @@ , { "patchline" : { "destination" : [ "obj-6", 0 ], - "disabled" : 0, - "hidden" : 0, "source" : [ "obj-37", 0 ] } @@ -248,8 +243,6 @@ , { "patchline" : { "destination" : [ "obj-90", 0 ], - "disabled" : 0, - "hidden" : 0, "source" : [ "obj-6", 0 ] } @@ -257,8 +250,6 @@ , { "patchline" : { "destination" : [ "obj-37", 0 ], - "disabled" : 0, - "hidden" : 0, "source" : [ "obj-89", 0 ] } @@ -304,8 +295,7 @@ "numoutlets" : 2, "outlettype" : [ "FullPacket", "FullPacket" ], "patching_rect" : [ 10.5, 527.5, 415.0, 118.0 ], - "text" : "/f0 = /hand/leftmost/finger/1/distance/to/finger/3,\n/gain = /hand/rightmost/palm/position/normalized/xyz[[2]],\n/modulator = /hand/leftmost/finger/1/distance/to/finger/5,\n/f0 = scale(/f0, 0, 1, 14, 240),\n/gain/fold = scale(/gain, 0, 1, 25., 60.),\n/modulator = scale(/modulator, 0, 1, 1., 12.333333),\n/p1/freq = /modulator * 0.5,\n/p2/freq = /modulator * 0.125", - "textcolor" : [ 0.0, 0.0, 0.0, 1.0 ] + "text" : "/f0 = /hand/leftmost/finger/1/distance/to/finger/3,\n/gain = /hand/rightmost/palm/position/normalized/xyz[[2]],\n/modulator = /hand/leftmost/finger/1/distance/to/finger/5,\n/f0 = scale(/f0, 0, 1, 14, 240),\n/gain/fold = scale(/gain, 0, 1, 25., 60.),\n/modulator = scale(/modulator, 0, 1, 1., 12.333333),\n/p1/freq = /modulator * 0.5,\n/p2/freq = /modulator * 0.125" } } @@ -316,7 +306,7 @@ "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "FullPacket", "FullPacket" ], - "patching_rect" : [ 427.5, 285.0, 193.0, 22.0 ], + "patching_rect" : [ 502.5, 301.0, 193.0, 22.0 ], "style" : "", "text" : "o.if /gesture/openclose/active == 0" } @@ -398,8 +388,7 @@ "numoutlets" : 2, "outlettype" : [ "FullPacket", "FullPacket" ], "patching_rect" : [ 10.5, 285.0, 399.5, 130.0 ], - "text" : "/f0 = /hand/leftmost/finger/1/distance/to/finger/3,\n/gain = /hand/rightmost/palm/position/normalized/xyz[[1]],\n/modulator = /hand/leftmost/finger/1/distance/to/finger/5,\n/f0 = scale(/f0, 0, 1, 14, 240),\n/gain/fold = scale(/gain, 0, 1, 25., 60.),\n/modulator = scale(/modulator, 0, 1, 1., 12.333333),\n/p1/freq = /modulator * 0.5,\n/p2/freq = /modulator * 0.125,\n/active = 1", - "textcolor" : [ 0.0, 0.0, 0.0, 1.0 ] + "text" : "/f0 = /hand/leftmost/finger/1/distance/to/finger/3,\n/gain = /hand/rightmost/palm/position/normalized/xyz[[1]],\n/modulator = /hand/leftmost/finger/1/distance/to/finger/5,\n/f0 = scale(/f0, 0, 1, 14, 240),\n/gain/fold = scale(/gain, 0, 1, 25., 60.),\n/modulator = scale(/modulator, 0, 1, 1., 12.333333),\n/p1/freq = /modulator * 0.5,\n/p2/freq = /modulator * 0.125,\n/active = 1" } } @@ -407,6 +396,7 @@ "box" : { "comment" : "", "id" : "obj-15", + "index" : 0, "maxclass" : "inlet", "numinlets" : 0, "numoutlets" : 1, @@ -420,6 +410,7 @@ "box" : { "comment" : "", "id" : "obj-16", + "index" : 0, "maxclass" : "outlet", "numinlets" : 1, "numoutlets" : 0, @@ -432,8 +423,6 @@ "lines" : [ { "patchline" : { "destination" : [ "obj-6", 1 ], - "disabled" : 0, - "hidden" : 0, "source" : [ "obj-1", 0 ] } @@ -441,17 +430,13 @@ , { "patchline" : { "destination" : [ "obj-8", 0 ], - "disabled" : 0, - "hidden" : 0, "source" : [ "obj-1", 1 ] } } , { "patchline" : { - "destination" : [ "obj-17", 0 ], - "disabled" : 0, - "hidden" : 0, + "destination" : [ "obj-2", 0 ], "source" : [ "obj-12", 0 ] } @@ -459,8 +444,6 @@ , { "patchline" : { "destination" : [ "obj-20", 0 ], - "disabled" : 0, - "hidden" : 0, "source" : [ "obj-120", 0 ] } @@ -468,35 +451,20 @@ , { "patchline" : { "destination" : [ "obj-1", 0 ], - "disabled" : 0, - "hidden" : 0, "source" : [ "obj-15", 0 ] } } , { "patchline" : { - "destination" : [ "obj-18", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-17", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-20", 0 ], - "disabled" : 0, - "hidden" : 0, - "source" : [ "obj-18", 0 ] + "destination" : [ "obj-16", 0 ], + "source" : [ "obj-2", 0 ] } } , { "patchline" : { "destination" : [ "obj-16", 0 ], - "disabled" : 0, - "hidden" : 0, "source" : [ "obj-20", 0 ] } @@ -504,8 +472,6 @@ , { "patchline" : { "destination" : [ "obj-23", 0 ], - "disabled" : 0, - "hidden" : 0, "source" : [ "obj-22", 0 ] } @@ -513,8 +479,6 @@ , { "patchline" : { "destination" : [ "obj-12", 0 ], - "disabled" : 0, - "hidden" : 0, "source" : [ "obj-23", 1 ] } @@ -522,8 +486,6 @@ , { "patchline" : { "destination" : [ "obj-6", 0 ], - "disabled" : 0, - "hidden" : 0, "source" : [ "obj-23", 0 ] } @@ -531,8 +493,6 @@ , { "patchline" : { "destination" : [ "obj-120", 0 ], - "disabled" : 0, - "hidden" : 0, "source" : [ "obj-3", 0 ] } @@ -540,8 +500,6 @@ , { "patchline" : { "destination" : [ "obj-3", 0 ], - "disabled" : 0, - "hidden" : 0, "source" : [ "obj-6", 0 ] } @@ -549,8 +507,6 @@ , { "patchline" : { "destination" : [ "obj-12", 0 ], - "disabled" : 0, - "hidden" : 0, "source" : [ "obj-8", 1 ] } @@ -558,8 +514,6 @@ , { "patchline" : { "destination" : [ "obj-9", 0 ], - "disabled" : 0, - "hidden" : 0, "source" : [ "obj-8", 0 ] } @@ -567,8 +521,6 @@ , { "patchline" : { "destination" : [ "obj-22", 0 ], - "disabled" : 0, - "hidden" : 0, "source" : [ "obj-9", 0 ] } @@ -576,13 +528,15 @@ ], "dependency_cache" : [ { "name" : "o.gather.maxpat", - "bootpath" : "~/Documents/Max 7/Packages/odot/patchers/namespace", + "bootpath" : "~/Documents/Max 7/Packages/CNMAT-odot/patchers/namespace", + "patcherrelativepath" : "../../../../../Max 7/Packages/CNMAT-odot/patchers/namespace", "type" : "JSON", "implicit" : 1 } , { "name" : "o.righttoleft.maxpat", - "bootpath" : "~/Documents/Max 7/Packages/odot/patchers/ordering", + "bootpath" : "~/Documents/Max 7/Packages/CNMAT-odot/patchers/ordering", + "patcherrelativepath" : "../../../../../Max 7/Packages/CNMAT-odot/patchers/ordering", "type" : "JSON", "implicit" : 1 } -- 2.34.1