changeset 43:0d8f90974775

Merge
author Becky Stewart <rebecca.stewart@eecs.qmul.ac.uk>
date Wed, 02 Mar 2011 16:23:51 +0000
parents 626bcdc22de4 (current diff) 5b6f63b6f76d (diff)
children fac6468026a1
files
diffstat 7 files changed, 1819 insertions(+), 767 deletions(-) [+]
line wrap: on
line diff
Binary file Ableton Project/AbletonExCel_v1.als has changed
--- a/Abletons max connection.maxpat	Wed Mar 02 16:22:37 2011 +0000
+++ b/Abletons max connection.maxpat	Wed Mar 02 16:23:51 2011 +0000
@@ -1,9 +1,9 @@
 {
 	"patcher" : 	{
 		"fileversion" : 1,
-		"rect" : [ 815.0, 97.0, 584.0, 712.0 ],
+		"rect" : [ 128.0, 300.0, 1443.0, 937.0 ],
 		"bglocked" : 0,
-		"defrect" : [ 815.0, 97.0, 584.0, 712.0 ],
+		"defrect" : [ 128.0, 300.0, 1443.0, 937.0 ],
 		"openrect" : [ 0.0, 0.0, 0.0, 0.0 ],
 		"openinpresentation" : 0,
 		"default_fontsize" : 12.0,
@@ -20,26 +20,693 @@
 		"devicewidth" : 0.0,
 		"boxes" : [ 			{
 				"box" : 				{
-					"maxclass" : "message",
-					"text" : "1 1 48",
-					"patching_rect" : [ 678.0, 240.0, 50.0, 18.0 ],
-					"id" : "obj-167",
+					"maxclass" : "button",
+					"numinlets" : 1,
+					"numoutlets" : 1,
+					"outlettype" : [ "bang" ],
+					"patching_rect" : [ 239.0, 207.0, 20.0, 20.0 ],
+					"id" : "obj-98"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "newobj",
+					"text" : "p muteChannel",
 					"fontname" : "Arial",
-					"numinlets" : 2,
-					"numoutlets" : 1,
+					"numinlets" : 1,
 					"fontsize" : 12.0,
-					"outlettype" : [ "" ]
+					"numoutlets" : 3,
+					"outlettype" : [ "float", "float", "int" ],
+					"patching_rect" : [ 515.0, 567.0, 92.0, 20.0 ],
+					"id" : "obj-96",
+					"patcher" : 					{
+						"fileversion" : 1,
+						"rect" : [ 25.0, 69.0, 640.0, 480.0 ],
+						"bglocked" : 0,
+						"defrect" : [ 25.0, 69.0, 640.0, 480.0 ],
+						"openrect" : [ 0.0, 0.0, 0.0, 0.0 ],
+						"openinpresentation" : 0,
+						"default_fontsize" : 12.0,
+						"default_fontface" : 0,
+						"default_fontname" : "Arial",
+						"gridonopen" : 0,
+						"gridsize" : [ 15.0, 15.0 ],
+						"gridsnaponopen" : 0,
+						"toolbarvisible" : 1,
+						"boxanimatetime" : 200,
+						"imprint" : 0,
+						"enablehscroll" : 1,
+						"enablevscroll" : 1,
+						"devicewidth" : 0.0,
+						"visible" : 1,
+						"boxes" : [ 							{
+								"box" : 								{
+									"maxclass" : "message",
+									"text" : "1",
+									"fontname" : "Arial",
+									"numinlets" : 2,
+									"fontsize" : 12.0,
+									"numoutlets" : 1,
+									"outlettype" : [ "" ],
+									"patching_rect" : [ 266.0, 211.0, 32.5, 18.0 ],
+									"id" : "obj-4"
+								}
+
+							}
+, 							{
+								"box" : 								{
+									"maxclass" : "number",
+									"fontname" : "Arial",
+									"numinlets" : 1,
+									"fontsize" : 12.0,
+									"numoutlets" : 2,
+									"outlettype" : [ "int", "bang" ],
+									"patching_rect" : [ 244.0, 239.0, 50.0, 20.0 ],
+									"id" : "obj-2"
+								}
+
+							}
+, 							{
+								"box" : 								{
+									"maxclass" : "newobj",
+									"text" : "t b i",
+									"fontname" : "Arial",
+									"numinlets" : 1,
+									"fontsize" : 12.0,
+									"numoutlets" : 2,
+									"outlettype" : [ "bang", "int" ],
+									"patching_rect" : [ 50.0, 100.0, 32.5, 20.0 ],
+									"id" : "obj-48"
+								}
+
+							}
+, 							{
+								"box" : 								{
+									"maxclass" : "number",
+									"fontname" : "Arial",
+									"numinlets" : 1,
+									"fontsize" : 12.0,
+									"numoutlets" : 2,
+									"outlettype" : [ "int", "bang" ],
+									"patching_rect" : [ 66.0, 136.0, 50.0, 20.0 ],
+									"id" : "obj-46"
+								}
+
+							}
+, 							{
+								"box" : 								{
+									"maxclass" : "newobj",
+									"text" : "makenote",
+									"fontname" : "Arial",
+									"numinlets" : 3,
+									"fontsize" : 12.0,
+									"numoutlets" : 2,
+									"outlettype" : [ "float", "float" ],
+									"patching_rect" : [ 50.0, 255.0, 63.0, 20.0 ],
+									"id" : "obj-40"
+								}
+
+							}
+, 							{
+								"box" : 								{
+									"maxclass" : "newobj",
+									"text" : "print",
+									"fontname" : "Arial",
+									"numinlets" : 1,
+									"fontsize" : 12.0,
+									"numoutlets" : 0,
+									"patching_rect" : [ 74.0, 255.0, 34.0, 20.0 ],
+									"id" : "obj-34"
+								}
+
+							}
+, 							{
+								"box" : 								{
+									"maxclass" : "newobj",
+									"text" : "append 0",
+									"fontname" : "Arial",
+									"numinlets" : 1,
+									"fontsize" : 12.0,
+									"numoutlets" : 1,
+									"outlettype" : [ "" ],
+									"patching_rect" : [ 50.0, 226.0, 61.0, 20.0 ],
+									"id" : "obj-33"
+								}
+
+							}
+, 							{
+								"box" : 								{
+									"maxclass" : "newobj",
+									"text" : "counter 0 0 127",
+									"fontname" : "Arial",
+									"numinlets" : 5,
+									"fontsize" : 12.0,
+									"numoutlets" : 4,
+									"outlettype" : [ "int", "", "", "int" ],
+									"patching_rect" : [ 50.0, 194.0, 94.0, 20.0 ],
+									"id" : "obj-28"
+								}
+
+							}
+, 							{
+								"box" : 								{
+									"maxclass" : "newobj",
+									"text" : "uzi 127",
+									"fontname" : "Arial",
+									"numinlets" : 2,
+									"fontsize" : 12.0,
+									"numoutlets" : 3,
+									"outlettype" : [ "bang", "bang", "int" ],
+									"patching_rect" : [ 50.0, 163.0, 49.0, 20.0 ],
+									"id" : "obj-26"
+								}
+
+							}
+, 							{
+								"box" : 								{
+									"maxclass" : "inlet",
+									"numinlets" : 0,
+									"numoutlets" : 1,
+									"outlettype" : [ "int" ],
+									"patching_rect" : [ 50.0, 40.0, 25.0, 25.0 ],
+									"id" : "obj-84",
+									"comment" : ""
+								}
+
+							}
+, 							{
+								"box" : 								{
+									"maxclass" : "outlet",
+									"numinlets" : 1,
+									"numoutlets" : 0,
+									"patching_rect" : [ 50.0, 335.0, 25.0, 25.0 ],
+									"id" : "obj-89",
+									"comment" : ""
+								}
+
+							}
+, 							{
+								"box" : 								{
+									"maxclass" : "outlet",
+									"numinlets" : 1,
+									"numoutlets" : 0,
+									"patching_rect" : [ 200.0, 341.0, 25.0, 25.0 ],
+									"id" : "obj-91",
+									"comment" : ""
+								}
+
+							}
+, 							{
+								"box" : 								{
+									"maxclass" : "outlet",
+									"numinlets" : 1,
+									"numoutlets" : 0,
+									"patching_rect" : [ 116.0, 336.0, 25.0, 25.0 ],
+									"id" : "obj-95",
+									"comment" : ""
+								}
+
+							}
+ ],
+						"lines" : [ 							{
+								"patchline" : 								{
+									"source" : [ "obj-2", 0 ],
+									"destination" : [ "obj-33", 0 ],
+									"hidden" : 0,
+									"midpoints" : [  ]
+								}
+
+							}
+, 							{
+								"patchline" : 								{
+									"source" : [ "obj-4", 0 ],
+									"destination" : [ "obj-2", 0 ],
+									"hidden" : 0,
+									"midpoints" : [  ]
+								}
+
+							}
+, 							{
+								"patchline" : 								{
+									"source" : [ "obj-48", 1 ],
+									"destination" : [ "obj-46", 0 ],
+									"hidden" : 0,
+									"midpoints" : [  ]
+								}
+
+							}
+, 							{
+								"patchline" : 								{
+									"source" : [ "obj-26", 0 ],
+									"destination" : [ "obj-28", 0 ],
+									"hidden" : 0,
+									"midpoints" : [  ]
+								}
+
+							}
+, 							{
+								"patchline" : 								{
+									"source" : [ "obj-28", 0 ],
+									"destination" : [ "obj-33", 0 ],
+									"hidden" : 0,
+									"midpoints" : [  ]
+								}
+
+							}
+, 							{
+								"patchline" : 								{
+									"source" : [ "obj-33", 0 ],
+									"destination" : [ "obj-40", 0 ],
+									"hidden" : 0,
+									"midpoints" : [  ]
+								}
+
+							}
+, 							{
+								"patchline" : 								{
+									"source" : [ "obj-48", 0 ],
+									"destination" : [ "obj-26", 0 ],
+									"hidden" : 0,
+									"midpoints" : [  ]
+								}
+
+							}
+, 							{
+								"patchline" : 								{
+									"source" : [ "obj-84", 0 ],
+									"destination" : [ "obj-48", 0 ],
+									"hidden" : 0,
+									"midpoints" : [  ]
+								}
+
+							}
+, 							{
+								"patchline" : 								{
+									"source" : [ "obj-40", 0 ],
+									"destination" : [ "obj-89", 0 ],
+									"hidden" : 0,
+									"midpoints" : [  ]
+								}
+
+							}
+, 							{
+								"patchline" : 								{
+									"source" : [ "obj-46", 0 ],
+									"destination" : [ "obj-91", 0 ],
+									"hidden" : 0,
+									"midpoints" : [  ]
+								}
+
+							}
+, 							{
+								"patchline" : 								{
+									"source" : [ "obj-40", 1 ],
+									"destination" : [ "obj-95", 0 ],
+									"hidden" : 0,
+									"midpoints" : [  ]
+								}
+
+							}
+ ]
+					}
+,
+					"saved_object_attributes" : 					{
+						"fontname" : "Arial",
+						"default_fontsize" : 12.0,
+						"globalpatchername" : "",
+						"fontface" : 0,
+						"fontsize" : 12.0,
+						"default_fontface" : 0,
+						"default_fontname" : "Arial"
+					}
+
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "comment",
+					"text" : "stopping all notes for person",
+					"linecount" : 2,
+					"fontname" : "Arial",
+					"numinlets" : 1,
+					"fontsize" : 12.0,
+					"numoutlets" : 0,
+					"patching_rect" : [ 703.0, 546.0, 150.0, 34.0 ],
+					"id" : "obj-76"
 				}
 
 			}
 , 			{
 				"box" : 				{
 					"maxclass" : "button",
-					"patching_rect" : [ 668.0, 157.0, 20.0, 20.0 ],
-					"id" : "obj-165",
 					"numinlets" : 1,
 					"numoutlets" : 1,
-					"outlettype" : [ "bang" ]
+					"outlettype" : [ "bang" ],
+					"patching_rect" : [ 633.0, 544.0, 70.0, 70.0 ],
+					"id" : "obj-66"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "newobj",
+					"text" : "unpack 0 0 0 0",
+					"fontname" : "Arial",
+					"numinlets" : 1,
+					"fontsize" : 12.0,
+					"numoutlets" : 4,
+					"outlettype" : [ "int", "int", "int", "int" ],
+					"patching_rect" : [ 632.0, 509.0, 89.0, 20.0 ],
+					"id" : "obj-61"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "toggle",
+					"numinlets" : 1,
+					"numoutlets" : 1,
+					"outlettype" : [ "int" ],
+					"patching_rect" : [ 777.0, 450.0, 20.0, 20.0 ],
+					"id" : "obj-58"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "newobj",
+					"text" : "print",
+					"fontname" : "Arial",
+					"numinlets" : 1,
+					"fontsize" : 12.0,
+					"numoutlets" : 0,
+					"patching_rect" : [ 777.0, 510.0, 34.0, 20.0 ],
+					"id" : "obj-53"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "newobj",
+					"text" : "gate",
+					"fontname" : "Arial",
+					"numinlets" : 2,
+					"fontsize" : 12.0,
+					"numoutlets" : 1,
+					"outlettype" : [ "" ],
+					"patching_rect" : [ 777.0, 483.0, 34.0, 20.0 ],
+					"id" : "obj-51"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "newobj",
+					"text" : "route /stoppedperson",
+					"fontname" : "Arial",
+					"numinlets" : 1,
+					"fontsize" : 12.0,
+					"numoutlets" : 2,
+					"outlettype" : [ "", "" ],
+					"patching_rect" : [ 632.0, 480.0, 124.0, 20.0 ],
+					"id" : "obj-45"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "newobj",
+					"text" : "udpreceive 12343",
+					"fontname" : "Arial",
+					"numinlets" : 1,
+					"fontsize" : 12.0,
+					"numoutlets" : 1,
+					"outlettype" : [ "" ],
+					"patching_rect" : [ 632.0, 446.0, 106.0, 20.0 ],
+					"id" : "obj-44"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "newobj",
+					"text" : "togedge",
+					"fontname" : "Arial",
+					"numinlets" : 1,
+					"fontsize" : 12.0,
+					"numoutlets" : 2,
+					"outlettype" : [ "bang", "bang" ],
+					"patching_rect" : [ 148.0, 176.0, 54.0, 20.0 ],
+					"id" : "obj-42"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "comment",
+					"text" : "reset all",
+					"fontname" : "Arial",
+					"numinlets" : 1,
+					"fontsize" : 12.0,
+					"numoutlets" : 0,
+					"patching_rect" : [ 507.0, 361.0, 56.0, 20.0 ],
+					"id" : "obj-36"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "flonum",
+					"fontname" : "Arial",
+					"numinlets" : 1,
+					"fontsize" : 12.0,
+					"numoutlets" : 2,
+					"outlettype" : [ "float", "bang" ],
+					"patching_rect" : [ 1293.0, 148.0, 50.0, 20.0 ],
+					"id" : "obj-63"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "button",
+					"numinlets" : 1,
+					"numoutlets" : 1,
+					"outlettype" : [ "bang" ],
+					"patching_rect" : [ 1340.0, 71.0, 20.0, 20.0 ],
+					"id" : "obj-59"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "button",
+					"numinlets" : 1,
+					"numoutlets" : 1,
+					"outlettype" : [ "bang" ],
+					"patching_rect" : [ 1301.0, 62.0, 20.0, 20.0 ],
+					"id" : "obj-57"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "message",
+					"text" : "1, 1000",
+					"fontname" : "Arial",
+					"numinlets" : 2,
+					"fontsize" : 12.0,
+					"numoutlets" : 1,
+					"outlettype" : [ "" ],
+					"patching_rect" : [ 1363.0, 99.0, 52.0, 18.0 ],
+					"id" : "obj-55"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "message",
+					"text" : "0, 1000",
+					"fontname" : "Arial",
+					"numinlets" : 2,
+					"fontsize" : 12.0,
+					"numoutlets" : 1,
+					"outlettype" : [ "" ],
+					"patching_rect" : [ 1294.0, 97.0, 51.0, 18.0 ],
+					"id" : "obj-52"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "newobj",
+					"text" : "line 0.",
+					"fontname" : "Arial",
+					"numinlets" : 3,
+					"fontsize" : 12.0,
+					"numoutlets" : 2,
+					"outlettype" : [ "", "" ],
+					"patching_rect" : [ 1292.0, 122.0, 46.0, 20.0 ],
+					"id" : "obj-50"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "newobj",
+					"text" : "metro 200",
+					"fontname" : "Arial",
+					"numinlets" : 2,
+					"fontsize" : 12.0,
+					"numoutlets" : 1,
+					"outlettype" : [ "bang" ],
+					"patching_rect" : [ 511.0, 447.0, 65.0, 20.0 ],
+					"id" : "obj-49"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "newobj",
+					"text" : "counter 0 0 4",
+					"fontname" : "Arial",
+					"numinlets" : 5,
+					"fontsize" : 12.0,
+					"numoutlets" : 4,
+					"outlettype" : [ "int", "", "", "int" ],
+					"patching_rect" : [ 511.0, 474.0, 81.0, 20.0 ],
+					"id" : "obj-47"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "button",
+					"numinlets" : 1,
+					"numoutlets" : 1,
+					"outlettype" : [ "bang" ],
+					"patching_rect" : [ 511.0, 383.0, 56.0, 56.0 ],
+					"id" : "obj-37"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "toggle",
+					"numinlets" : 1,
+					"numoutlets" : 1,
+					"outlettype" : [ "int" ],
+					"patching_rect" : [ 468.0, 160.0, 20.0, 20.0 ],
+					"id" : "obj-22"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "newobj",
+					"text" : "gate",
+					"fontname" : "Arial",
+					"numinlets" : 2,
+					"fontsize" : 12.0,
+					"numoutlets" : 1,
+					"outlettype" : [ "" ],
+					"patching_rect" : [ 482.0, 187.0, 34.0, 20.0 ],
+					"id" : "obj-12"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "comment",
+					"text" : "need to listen - changed by andrew to 1345 from 12346",
+					"linecount" : 3,
+					"fontname" : "Arial",
+					"numinlets" : 1,
+					"fontsize" : 12.0,
+					"numoutlets" : 0,
+					"patching_rect" : [ 270.0, 15.0, 150.0, 48.0 ],
+					"id" : "obj-41"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "comment",
+					"text" : "sending joe osc on 12345",
+					"fontname" : "Arial",
+					"numinlets" : 1,
+					"fontsize" : 12.0,
+					"numoutlets" : 0,
+					"patching_rect" : [ 199.0, 743.0, 150.0, 20.0 ],
+					"id" : "obj-38"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "comment",
+					"text" : "169.254.49.68",
+					"fontname" : "Arial",
+					"numinlets" : 1,
+					"fontsize" : 12.0,
+					"numoutlets" : 0,
+					"patching_rect" : [ 1184.0, 387.0, 150.0, 20.0 ],
+					"id" : "obj-24"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "message",
+					"text" : "/hello joe 1.3",
+					"fontname" : "Arial",
+					"numinlets" : 2,
+					"fontsize" : 12.0,
+					"numoutlets" : 1,
+					"outlettype" : [ "" ],
+					"patching_rect" : [ 84.0, 492.0, 79.0, 18.0 ],
+					"id" : "obj-20"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "message",
+					"text" : "host 169.254.25.239 12345",
+					"fontname" : "Arial",
+					"numinlets" : 2,
+					"fontsize" : 12.0,
+					"numoutlets" : 1,
+					"outlettype" : [ "" ],
+					"patching_rect" : [ 84.0, 708.0, 157.0, 18.0 ],
+					"id" : "obj-9"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "message",
+					"text" : "1 2 98",
+					"fontname" : "Arial",
+					"numinlets" : 2,
+					"fontsize" : 12.0,
+					"numoutlets" : 1,
+					"outlettype" : [ "" ],
+					"patching_rect" : [ 678.0, 240.0, 50.0, 18.0 ],
+					"id" : "obj-167"
+				}
+
+			}
+, 			{
+				"box" : 				{
+					"maxclass" : "button",
+					"numinlets" : 1,
+					"numoutlets" : 1,
+					"outlettype" : [ "bang" ],
+					"patching_rect" : [ 668.0, 157.0, 20.0, 20.0 ],
+					"id" : "obj-165"
 				}
 
 			}
@@ -47,12 +714,12 @@
 				"box" : 				{
 					"maxclass" : "newobj",
 					"text" : "ctlout a",
-					"patching_rect" : [ 325.0, 648.0, 49.0, 20.0 ],
-					"id" : "obj-163",
 					"fontname" : "Arial",
 					"numinlets" : 3,
+					"fontsize" : 12.0,
 					"numoutlets" : 0,
-					"fontsize" : 12.0
+					"patching_rect" : [ 325.0, 648.0, 49.0, 20.0 ],
+					"id" : "obj-163"
 				}
 
 			}
@@ -60,13 +727,12 @@
 				"box" : 				{
 					"maxclass" : "comment",
 					"text" : "map to launch scene",
-					"patching_rect" : [ 992.0, 580.0, 122.0, 20.0 ],
-					"id" : "obj-162",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 12.0,
 					"numoutlets" : 0,
-					"fontsize" : 12.0,
-					"presentation_rect" : [ 1031.0, 586.0, 0.0, 0.0 ]
+					"patching_rect" : [ 1182.0, 560.0, 122.0, 20.0 ],
+					"id" : "obj-162"
 				}
 
 			}
@@ -74,13 +740,13 @@
 				"box" : 				{
 					"maxclass" : "message",
 					"text" : "127 2 16, 0 2 16",
-					"patching_rect" : [ 894.0, 581.0, 97.0, 18.0 ],
-					"id" : "obj-161",
 					"fontname" : "Arial",
 					"numinlets" : 2,
+					"fontsize" : 12.0,
 					"numoutlets" : 1,
-					"fontsize" : 12.0,
-					"outlettype" : [ "" ]
+					"outlettype" : [ "" ],
+					"patching_rect" : [ 1084.0, 561.0, 97.0, 18.0 ],
+					"id" : "obj-161"
 				}
 
 			}
@@ -89,12 +755,12 @@
 					"maxclass" : "comment",
 					"text" : "launch scene and move to next scene. (different scenes are different drum loop)",
 					"linecount" : 7,
-					"patching_rect" : [ 334.0, 529.285706, 67.0, 86.0 ],
-					"id" : "obj-144",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 9.836608,
 					"numoutlets" : 0,
-					"fontsize" : 9.836608
+					"patching_rect" : [ 334.0, 529.285706, 72.0, 86.0 ],
+					"id" : "obj-144"
 				}
 
 			}
@@ -103,13 +769,13 @@
 					"maxclass" : "message",
 					"text" : "127 2 16, 0 2 16",
 					"linecount" : 2,
-					"patching_rect" : [ 325.0, 497.0, 60.0, 32.0 ],
-					"id" : "obj-141",
 					"fontname" : "Arial",
 					"numinlets" : 2,
+					"fontsize" : 12.0,
 					"numoutlets" : 1,
-					"fontsize" : 12.0,
-					"outlettype" : [ "" ]
+					"outlettype" : [ "" ],
+					"patching_rect" : [ 325.0, 497.0, 62.0, 32.0 ],
+					"id" : "obj-141"
 				}
 
 			}
@@ -118,16 +784,15 @@
 					"maxclass" : "comment",
 					"text" : "IAC Driver Bus should be set to output 'a' under MIDI settings.",
 					"linecount" : 2,
+					"fontname" : "Arial",
+					"textcolor" : [ 1.0, 1.0, 1.0, 1.0 ],
+					"frgb" : [ 1.0, 1.0, 1.0, 1.0 ],
+					"numinlets" : 1,
+					"fontsize" : 14.012403,
+					"numoutlets" : 0,
+					"bgcolor" : [ 0.811765, 0.372549, 0.372549, 1.0 ],
 					"patching_rect" : [ 12.0, 67.37207, 220.0, 39.0 ],
-					"frgb" : [ 1.0, 1.0, 1.0, 1.0 ],
-					"id" : "obj-139",
-					"fontname" : "Arial",
-					"numinlets" : 1,
-					"bgcolor" : [ 0.811765, 0.372549, 0.372549, 1.0 ],
-					"numoutlets" : 0,
-					"textcolor" : [ 1.0, 1.0, 1.0, 1.0 ],
-					"fontsize" : 14.012403,
-					"presentation_rect" : [ 15.0, 67.37207, 0.0, 0.0 ]
+					"id" : "obj-139"
 				}
 
 			}
@@ -135,30 +800,29 @@
 				"box" : 				{
 					"maxclass" : "comment",
 					"text" : "to Ableton",
-					"patching_rect" : [ 405.0, 670.0, 67.0, 20.0 ],
-					"id" : "obj-138",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 12.0,
 					"numoutlets" : 0,
-					"fontsize" : 12.0
+					"patching_rect" : [ 405.0, 670.0, 67.0, 20.0 ],
+					"id" : "obj-138"
 				}
 
 			}
 , 			{
 				"box" : 				{
 					"maxclass" : "comment",
-					"text" : "We listen on port 12346.",
-					"linecount" : 2,
-					"patching_rect" : [ 401.0, 2.37207, 103.0, 39.0 ],
+					"text" : "We listen to JOe on port 12346.(or 5)",
+					"linecount" : 3,
+					"fontname" : "Arial",
+					"textcolor" : [ 1.0, 1.0, 1.0, 1.0 ],
 					"frgb" : [ 1.0, 1.0, 1.0, 1.0 ],
-					"id" : "obj-135",
-					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 14.012403,
+					"numoutlets" : 0,
 					"bgcolor" : [ 0.811765, 0.372549, 0.372549, 1.0 ],
-					"numoutlets" : 0,
-					"textcolor" : [ 1.0, 1.0, 1.0, 1.0 ],
-					"fontsize" : 14.012403,
-					"presentation_rect" : [ 997.0, 240.37207, 0.0, 0.0 ]
+					"patching_rect" : [ 401.0, 2.37207, 123.0, 55.0 ],
+					"id" : "obj-135"
 				}
 
 			}
@@ -166,13 +830,12 @@
 				"box" : 				{
 					"maxclass" : "comment",
 					"text" : "CC2",
-					"patching_rect" : [ 686.0, 583.0, 35.0, 20.0 ],
-					"id" : "obj-134",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 12.0,
 					"numoutlets" : 0,
-					"fontsize" : 12.0,
-					"presentation_rect" : [ 785.0, 566.0, 0.0, 0.0 ]
+					"patching_rect" : [ 876.0, 563.0, 35.0, 20.0 ],
+					"id" : "obj-134"
 				}
 
 			}
@@ -180,12 +843,12 @@
 				"box" : 				{
 					"maxclass" : "comment",
 					"text" : "CC1",
-					"patching_rect" : [ 686.0, 556.0, 35.0, 20.0 ],
-					"id" : "obj-133",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 12.0,
 					"numoutlets" : 0,
-					"fontsize" : 12.0
+					"patching_rect" : [ 876.0, 536.0, 35.0, 20.0 ],
+					"id" : "obj-133"
 				}
 
 			}
@@ -193,13 +856,12 @@
 				"box" : 				{
 					"maxclass" : "comment",
 					"text" : "Inst 3",
-					"patching_rect" : [ 836.0, 529.0, 43.0, 20.0 ],
-					"id" : "obj-131",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 12.0,
 					"numoutlets" : 0,
-					"fontsize" : 12.0,
-					"presentation_rect" : [ 935.0, 512.0, 0.0, 0.0 ]
+					"patching_rect" : [ 1026.0, 509.0, 43.0, 20.0 ],
+					"id" : "obj-131"
 				}
 
 			}
@@ -207,13 +869,12 @@
 				"box" : 				{
 					"maxclass" : "comment",
 					"text" : "Inst 2",
-					"patching_rect" : [ 784.0, 529.0, 43.0, 20.0 ],
-					"id" : "obj-130",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 12.0,
 					"numoutlets" : 0,
-					"fontsize" : 12.0,
-					"presentation_rect" : [ 883.0, 512.0, 0.0, 0.0 ]
+					"patching_rect" : [ 974.0, 509.0, 43.0, 20.0 ],
+					"id" : "obj-130"
 				}
 
 			}
@@ -221,12 +882,12 @@
 				"box" : 				{
 					"maxclass" : "comment",
 					"text" : "Inst 1",
-					"patching_rect" : [ 730.0, 529.0, 43.0, 20.0 ],
-					"id" : "obj-129",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 12.0,
 					"numoutlets" : 0,
-					"fontsize" : 12.0
+					"patching_rect" : [ 920.0, 509.0, 43.0, 20.0 ],
+					"id" : "obj-129"
 				}
 
 			}
@@ -234,14 +895,13 @@
 				"box" : 				{
 					"maxclass" : "message",
 					"text" : "50 2 3",
-					"patching_rect" : [ 836.0, 583.0, 44.0, 18.0 ],
-					"id" : "obj-126",
 					"fontname" : "Arial",
 					"numinlets" : 2,
+					"fontsize" : 12.0,
 					"numoutlets" : 1,
-					"fontsize" : 12.0,
 					"outlettype" : [ "" ],
-					"presentation_rect" : [ 934.0, 566.0, 0.0, 0.0 ]
+					"patching_rect" : [ 1026.0, 563.0, 44.0, 18.0 ],
+					"id" : "obj-126"
 				}
 
 			}
@@ -249,14 +909,13 @@
 				"box" : 				{
 					"maxclass" : "message",
 					"text" : "50 1 3",
-					"patching_rect" : [ 836.0, 556.0, 44.0, 18.0 ],
-					"id" : "obj-127",
 					"fontname" : "Arial",
 					"numinlets" : 2,
+					"fontsize" : 12.0,
 					"numoutlets" : 1,
-					"fontsize" : 12.0,
 					"outlettype" : [ "" ],
-					"presentation_rect" : [ 934.0, 541.0, 0.0, 0.0 ]
+					"patching_rect" : [ 1026.0, 536.0, 44.0, 18.0 ],
+					"id" : "obj-127"
 				}
 
 			}
@@ -264,14 +923,13 @@
 				"box" : 				{
 					"maxclass" : "message",
 					"text" : "50 2 2",
-					"patching_rect" : [ 784.0, 583.0, 44.0, 18.0 ],
-					"id" : "obj-124",
 					"fontname" : "Arial",
 					"numinlets" : 2,
+					"fontsize" : 12.0,
 					"numoutlets" : 1,
-					"fontsize" : 12.0,
 					"outlettype" : [ "" ],
-					"presentation_rect" : [ 881.0, 566.0, 0.0, 0.0 ]
+					"patching_rect" : [ 974.0, 563.0, 44.0, 18.0 ],
+					"id" : "obj-124"
 				}
 
 			}
@@ -279,14 +937,13 @@
 				"box" : 				{
 					"maxclass" : "message",
 					"text" : "50 1 2",
-					"patching_rect" : [ 784.0, 556.0, 44.0, 18.0 ],
-					"id" : "obj-125",
 					"fontname" : "Arial",
 					"numinlets" : 2,
+					"fontsize" : 12.0,
 					"numoutlets" : 1,
-					"fontsize" : 12.0,
 					"outlettype" : [ "" ],
-					"presentation_rect" : [ 881.0, 541.0, 0.0, 0.0 ]
+					"patching_rect" : [ 974.0, 536.0, 44.0, 18.0 ],
+					"id" : "obj-125"
 				}
 
 			}
@@ -294,14 +951,13 @@
 				"box" : 				{
 					"maxclass" : "message",
 					"text" : "50 2 1",
-					"patching_rect" : [ 730.0, 583.0, 44.0, 18.0 ],
-					"id" : "obj-123",
 					"fontname" : "Arial",
 					"numinlets" : 2,
+					"fontsize" : 12.0,
 					"numoutlets" : 1,
-					"fontsize" : 12.0,
 					"outlettype" : [ "" ],
-					"presentation_rect" : [ 829.0, 566.0, 0.0, 0.0 ]
+					"patching_rect" : [ 920.0, 563.0, 44.0, 18.0 ],
+					"id" : "obj-123"
 				}
 
 			}
@@ -309,13 +965,13 @@
 				"box" : 				{
 					"maxclass" : "message",
 					"text" : "50 1 1",
-					"patching_rect" : [ 730.0, 556.0, 44.0, 18.0 ],
-					"id" : "obj-122",
 					"fontname" : "Arial",
 					"numinlets" : 2,
+					"fontsize" : 12.0,
 					"numoutlets" : 1,
-					"fontsize" : 12.0,
-					"outlettype" : [ "" ]
+					"outlettype" : [ "" ],
+					"patching_rect" : [ 920.0, 536.0, 44.0, 18.0 ],
+					"id" : "obj-122"
 				}
 
 			}
@@ -323,12 +979,12 @@
 				"box" : 				{
 					"maxclass" : "newobj",
 					"text" : "ctlout a",
-					"patching_rect" : [ 784.0, 622.0, 49.0, 20.0 ],
-					"id" : "obj-120",
 					"fontname" : "Arial",
 					"numinlets" : 3,
+					"fontsize" : 12.0,
 					"numoutlets" : 0,
-					"fontsize" : 12.0
+					"patching_rect" : [ 974.0, 602.0, 49.0, 20.0 ],
+					"id" : "obj-120"
 				}
 
 			}
@@ -337,12 +993,12 @@
 					"maxclass" : "comment",
 					"text" : "For setting up the mapping in Ableton:",
 					"linecount" : 2,
-					"patching_rect" : [ 680.0, 479.191315, 135.0, 40.0 ],
-					"id" : "obj-119",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 14.350855,
 					"numoutlets" : 0,
-					"fontsize" : 14.350855
+					"patching_rect" : [ 870.0, 459.191345, 135.0, 40.0 ],
+					"id" : "obj-119"
 				}
 
 			}
@@ -350,12 +1006,12 @@
 				"box" : 				{
 					"maxclass" : "comment",
 					"text" : "Send chord changes 68ms early.",
-					"patching_rect" : [ 197.0, 385.92392, 167.0, 18.0 ],
-					"id" : "obj-115",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 10.29036,
 					"numoutlets" : 0,
-					"fontsize" : 10.29036
+					"patching_rect" : [ 197.0, 385.92392, 167.0, 18.0 ],
+					"id" : "obj-115"
 				}
 
 			}
@@ -364,15 +1020,15 @@
 					"maxclass" : "comment",
 					"text" : "IP address for Joe needs to be set below",
 					"linecount" : 2,
+					"fontname" : "Arial",
+					"textcolor" : [ 1.0, 1.0, 1.0, 1.0 ],
+					"frgb" : [ 1.0, 1.0, 1.0, 1.0 ],
+					"numinlets" : 1,
+					"fontsize" : 22.117697,
+					"numoutlets" : 0,
+					"bgcolor" : [ 0.811765, 0.372549, 0.372549, 1.0 ],
 					"patching_rect" : [ 12.0, 6.492308, 226.0, 57.0 ],
-					"frgb" : [ 1.0, 1.0, 1.0, 1.0 ],
-					"id" : "obj-113",
-					"fontname" : "Arial",
-					"numinlets" : 1,
-					"bgcolor" : [ 0.811765, 0.372549, 0.372549, 1.0 ],
-					"numoutlets" : 0,
-					"textcolor" : [ 1.0, 1.0, 1.0, 1.0 ],
-					"fontsize" : 22.117697
+					"id" : "obj-113"
 				}
 
 			}
@@ -380,15 +1036,15 @@
 				"box" : 				{
 					"maxclass" : "comment",
 					"text" : "to Joe",
+					"fontname" : "Arial",
+					"textcolor" : [ 1.0, 1.0, 1.0, 1.0 ],
+					"frgb" : [ 1.0, 1.0, 1.0, 1.0 ],
+					"numinlets" : 1,
+					"fontsize" : 14.012403,
+					"numoutlets" : 0,
+					"bgcolor" : [ 0.811765, 0.372549, 0.372549, 1.0 ],
 					"patching_rect" : [ 120.0, 520.37207, 50.0, 23.0 ],
-					"frgb" : [ 1.0, 1.0, 1.0, 1.0 ],
-					"id" : "obj-111",
-					"fontname" : "Arial",
-					"numinlets" : 1,
-					"bgcolor" : [ 0.811765, 0.372549, 0.372549, 1.0 ],
-					"numoutlets" : 0,
-					"textcolor" : [ 1.0, 1.0, 1.0, 1.0 ],
-					"fontsize" : 14.012403
+					"id" : "obj-111"
 				}
 
 			}
@@ -396,13 +1052,13 @@
 				"box" : 				{
 					"maxclass" : "newobj",
 					"text" : "delay 68",
-					"patching_rect" : [ 127.0, 414.0, 56.0, 20.0 ],
-					"id" : "obj-109",
 					"fontname" : "Arial",
 					"numinlets" : 2,
+					"fontsize" : 12.0,
 					"numoutlets" : 1,
-					"fontsize" : 12.0,
-					"outlettype" : [ "bang" ]
+					"outlettype" : [ "bang" ],
+					"patching_rect" : [ 127.0, 414.0, 56.0, 20.0 ],
+					"id" : "obj-109"
 				}
 
 			}
@@ -410,13 +1066,13 @@
 				"box" : 				{
 					"maxclass" : "newobj",
 					"text" : "delay 400",
-					"patching_rect" : [ 127.0, 375.0, 63.0, 20.0 ],
-					"id" : "obj-108",
 					"fontname" : "Arial",
 					"numinlets" : 2,
+					"fontsize" : 12.0,
 					"numoutlets" : 1,
-					"fontsize" : 12.0,
-					"outlettype" : [ "bang" ]
+					"outlettype" : [ "bang" ],
+					"patching_rect" : [ 127.0, 375.0, 63.0, 20.0 ],
+					"id" : "obj-108"
 				}
 
 			}
@@ -424,23 +1080,23 @@
 				"box" : 				{
 					"maxclass" : "comment",
 					"text" : "final beat",
-					"patching_rect" : [ 146.0, 340.0, 59.0, 20.0 ],
-					"id" : "obj-107",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 12.0,
 					"numoutlets" : 0,
-					"fontsize" : 12.0
+					"patching_rect" : [ 146.0, 340.0, 59.0, 20.0 ],
+					"id" : "obj-107"
 				}
 
 			}
 , 			{
 				"box" : 				{
 					"maxclass" : "button",
-					"patching_rect" : [ 126.0, 340.0, 20.0, 20.0 ],
-					"id" : "obj-105",
 					"numinlets" : 1,
 					"numoutlets" : 1,
-					"outlettype" : [ "bang" ]
+					"outlettype" : [ "bang" ],
+					"patching_rect" : [ 126.0, 340.0, 20.0, 20.0 ],
+					"id" : "obj-105"
 				}
 
 			}
@@ -448,14 +1104,13 @@
 				"box" : 				{
 					"maxclass" : "newobj",
 					"text" : "+ 1",
-					"patching_rect" : [ 52.0, 363.756714, 26.5, 17.0 ],
-					"id" : "obj-94",
 					"fontname" : "Arial",
 					"numinlets" : 2,
+					"fontsize" : 9.108685,
 					"numoutlets" : 1,
-					"fontsize" : 9.108685,
 					"outlettype" : [ "int" ],
-					"presentation_rect" : [ 619.0, 546.756714, 0.0, 0.0 ]
+					"patching_rect" : [ 52.0, 363.756714, 26.5, 17.0 ],
+					"id" : "obj-94"
 				}
 
 			}
@@ -463,43 +1118,43 @@
 				"box" : 				{
 					"maxclass" : "newobj",
 					"text" : "+ 1",
-					"patching_rect" : [ 86.0, 362.756714, 26.5, 17.0 ],
-					"id" : "obj-93",
 					"fontname" : "Arial",
 					"numinlets" : 2,
+					"fontsize" : 9.108685,
 					"numoutlets" : 1,
-					"fontsize" : 9.108685,
-					"outlettype" : [ "int" ]
+					"outlettype" : [ "int" ],
+					"patching_rect" : [ 86.0, 362.756714, 26.5, 17.0 ],
+					"id" : "obj-93"
 				}
 
 			}
 , 			{
 				"box" : 				{
 					"maxclass" : "number",
+					"fontname" : "Arial",
+					"triangle" : 0,
+					"numinlets" : 1,
+					"fontsize" : 12.0,
+					"numoutlets" : 2,
+					"outlettype" : [ "int", "bang" ],
+					"ignoreclick" : 1,
 					"patching_rect" : [ 86.0, 386.0, 17.996094, 20.0 ],
-					"id" : "obj-92",
-					"fontname" : "Arial",
-					"numinlets" : 1,
-					"numoutlets" : 2,
-					"fontsize" : 12.0,
-					"triangle" : 0,
-					"outlettype" : [ "int", "bang" ],
-					"ignoreclick" : 1
+					"id" : "obj-92"
 				}
 
 			}
 , 			{
 				"box" : 				{
 					"maxclass" : "number",
+					"fontname" : "Arial",
+					"triangle" : 0,
+					"numinlets" : 1,
+					"fontsize" : 12.0,
+					"numoutlets" : 2,
+					"outlettype" : [ "int", "bang" ],
+					"ignoreclick" : 1,
 					"patching_rect" : [ 52.0, 386.0, 31.0, 20.0 ],
-					"id" : "obj-90",
-					"fontname" : "Arial",
-					"numinlets" : 1,
-					"numoutlets" : 2,
-					"fontsize" : 12.0,
-					"triangle" : 0,
-					"outlettype" : [ "int", "bang" ],
-					"ignoreclick" : 1
+					"id" : "obj-90"
 				}
 
 			}
@@ -507,13 +1162,13 @@
 				"box" : 				{
 					"maxclass" : "newobj",
 					"text" : "% 4",
-					"patching_rect" : [ 86.0, 342.84613, 26.5, 17.0 ],
-					"id" : "obj-88",
 					"fontname" : "Arial",
 					"numinlets" : 2,
+					"fontsize" : 9.108685,
 					"numoutlets" : 1,
-					"fontsize" : 9.108685,
-					"outlettype" : [ "int" ]
+					"outlettype" : [ "int" ],
+					"patching_rect" : [ 86.0, 342.84613, 26.5, 17.0 ],
+					"id" : "obj-88"
 				}
 
 			}
@@ -521,27 +1176,27 @@
 				"box" : 				{
 					"maxclass" : "newobj",
 					"text" : "/ 4",
-					"patching_rect" : [ 52.0, 342.84613, 26.5, 17.0 ],
-					"id" : "obj-87",
 					"fontname" : "Arial",
 					"numinlets" : 2,
+					"fontsize" : 9.164513,
 					"numoutlets" : 1,
-					"fontsize" : 9.164513,
-					"outlettype" : [ "int" ]
+					"outlettype" : [ "int" ],
+					"patching_rect" : [ 52.0, 342.84613, 26.5, 17.0 ],
+					"id" : "obj-87"
 				}
 
 			}
 , 			{
 				"box" : 				{
 					"maxclass" : "newobj",
-					"text" : "loadmess 16",
-					"patching_rect" : [ 110.0, 242.0, 79.0, 20.0 ],
-					"id" : "obj-86",
+					"text" : "loadmess 8",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 12.0,
 					"numoutlets" : 1,
-					"fontsize" : 12.0,
-					"outlettype" : [ "" ]
+					"outlettype" : [ "" ],
+					"patching_rect" : [ 110.0, 242.0, 79.0, 20.0 ],
+					"id" : "obj-86"
 				}
 
 			}
@@ -549,12 +1204,12 @@
 				"box" : 				{
 					"maxclass" : "comment",
 					"text" : "bars per chord & drum loop",
-					"patching_rect" : [ 161.0, 265.0, 158.0, 20.0 ],
-					"id" : "obj-85",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 12.0,
 					"numoutlets" : 0,
-					"fontsize" : 12.0
+					"patching_rect" : [ 161.0, 265.0, 158.0, 20.0 ],
+					"id" : "obj-85"
 				}
 
 			}
@@ -562,26 +1217,26 @@
 				"box" : 				{
 					"maxclass" : "newobj",
 					"text" : "expr $i1*4 - 1",
-					"patching_rect" : [ 110.0, 289.374817, 70.0, 18.0 ],
-					"id" : "obj-83",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 10.024733,
 					"numoutlets" : 1,
-					"fontsize" : 10.024733,
-					"outlettype" : [ "" ]
+					"outlettype" : [ "" ],
+					"patching_rect" : [ 110.0, 289.374817, 70.0, 18.0 ],
+					"id" : "obj-83"
 				}
 
 			}
 , 			{
 				"box" : 				{
 					"maxclass" : "number",
-					"patching_rect" : [ 110.0, 265.0, 50.0, 20.0 ],
-					"id" : "obj-80",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 12.0,
 					"numoutlets" : 2,
-					"fontsize" : 12.0,
-					"outlettype" : [ "int", "bang" ]
+					"outlettype" : [ "int", "bang" ],
+					"patching_rect" : [ 110.0, 265.0, 50.0, 20.0 ],
+					"id" : "obj-80"
 				}
 
 			}
@@ -589,36 +1244,36 @@
 				"box" : 				{
 					"maxclass" : "newobj",
 					"text" : "counter 0 63",
-					"patching_rect" : [ 52.0, 312.0, 77.0, 20.0 ],
-					"id" : "obj-78",
 					"fontname" : "Arial",
 					"numinlets" : 5,
+					"fontsize" : 12.0,
 					"numoutlets" : 4,
-					"fontsize" : 12.0,
-					"outlettype" : [ "int", "", "", "int" ]
+					"outlettype" : [ "int", "", "", "int" ],
+					"patching_rect" : [ 52.0, 312.0, 77.0, 20.0 ],
+					"id" : "obj-78"
 				}
 
 			}
 , 			{
 				"box" : 				{
 					"maxclass" : "led",
+					"blinktime" : 234,
+					"numinlets" : 1,
+					"numoutlets" : 1,
+					"outlettype" : [ "int" ],
 					"patching_rect" : [ 78.0, 228.0, 28.0, 28.0 ],
-					"id" : "obj-75",
-					"numinlets" : 1,
-					"blinktime" : 234,
-					"numoutlets" : 1,
-					"outlettype" : [ "int" ]
+					"id" : "obj-75"
 				}
 
 			}
 , 			{
 				"box" : 				{
 					"maxclass" : "toggle",
-					"patching_rect" : [ 41.0, 168.0, 20.0, 20.0 ],
-					"id" : "obj-74",
 					"numinlets" : 1,
 					"numoutlets" : 1,
-					"outlettype" : [ "int" ]
+					"outlettype" : [ "int" ],
+					"patching_rect" : [ 41.0, 168.0, 20.0, 20.0 ],
+					"id" : "obj-74"
 				}
 
 			}
@@ -626,12 +1281,12 @@
 				"box" : 				{
 					"maxclass" : "comment",
 					"text" : "nearly 128 BPM",
-					"patching_rect" : [ 110.0, 205.0, 99.0, 20.0 ],
-					"id" : "obj-72",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 12.0,
 					"numoutlets" : 0,
-					"fontsize" : 12.0
+					"patching_rect" : [ 110.0, 205.0, 99.0, 20.0 ],
+					"id" : "obj-72"
 				}
 
 			}
@@ -639,13 +1294,13 @@
 				"box" : 				{
 					"maxclass" : "newobj",
 					"text" : "metro 468",
-					"patching_rect" : [ 41.0, 205.0, 65.0, 20.0 ],
-					"id" : "obj-70",
 					"fontname" : "Arial",
 					"numinlets" : 2,
+					"fontsize" : 12.0,
 					"numoutlets" : 1,
-					"fontsize" : 12.0,
-					"outlettype" : [ "bang" ]
+					"outlettype" : [ "bang" ],
+					"patching_rect" : [ 41.0, 205.0, 65.0, 20.0 ],
+					"id" : "obj-70"
 				}
 
 			}
@@ -654,12 +1309,12 @@
 					"maxclass" : "comment",
 					"text" : "Clock to change drum loop and chord",
 					"linecount" : 2,
-					"patching_rect" : [ 13.0, 125.0, 150.0, 34.0 ],
-					"id" : "obj-69",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 12.0,
 					"numoutlets" : 0,
-					"fontsize" : 12.0
+					"patching_rect" : [ 13.0, 125.0, 150.0, 34.0 ],
+					"id" : "obj-69"
 				}
 
 			}
@@ -667,12 +1322,12 @@
 				"box" : 				{
 					"maxclass" : "comment",
 					"text" : "Simulate Kinect input",
-					"patching_rect" : [ 981.0, 16.441864, 164.0, 26.0 ],
-					"id" : "obj-67",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 16.599777,
 					"numoutlets" : 0,
-					"fontsize" : 16.599777
+					"patching_rect" : [ 981.0, 16.441864, 164.0, 26.0 ],
+					"id" : "obj-67"
 				}
 
 			}
@@ -680,13 +1335,13 @@
 				"box" : 				{
 					"maxclass" : "newobj",
 					"text" : "p delay note-offs for instrument 1",
-					"patching_rect" : [ 401.0, 248.944763, 186.0, 20.0 ],
-					"id" : "obj-65",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 12.0,
 					"numoutlets" : 1,
-					"fontsize" : 12.0,
 					"outlettype" : [ "" ],
+					"patching_rect" : [ 466.0, 307.944763, 186.0, 20.0 ],
+					"id" : "obj-65",
 					"patcher" : 					{
 						"fileversion" : 1,
 						"rect" : [ 25.0, 69.0, 640.0, 480.0 ],
@@ -710,12 +1365,12 @@
 								"box" : 								{
 									"maxclass" : "comment",
 									"text" : "pitch vel chan",
-									"patching_rect" : [ 208.0, 461.0, 96.0, 20.0 ],
-									"id" : "obj-5",
 									"fontname" : "Arial",
 									"numinlets" : 1,
+									"fontsize" : 12.0,
 									"numoutlets" : 0,
-									"fontsize" : 12.0
+									"patching_rect" : [ 208.0, 461.0, 96.0, 20.0 ],
+									"id" : "obj-5"
 								}
 
 							}
@@ -723,12 +1378,12 @@
 								"box" : 								{
 									"maxclass" : "comment",
 									"text" : "pitch vel chan",
-									"patching_rect" : [ 161.0, 57.0, 86.0, 20.0 ],
-									"id" : "obj-2",
 									"fontname" : "Arial",
 									"numinlets" : 1,
+									"fontsize" : 12.0,
 									"numoutlets" : 0,
-									"fontsize" : 12.0
+									"patching_rect" : [ 161.0, 57.0, 86.0, 20.0 ],
+									"id" : "obj-2"
 								}
 
 							}
@@ -736,13 +1391,13 @@
 								"box" : 								{
 									"maxclass" : "newobj",
 									"text" : "zl rev",
-									"patching_rect" : [ 192.0, 414.055237, 39.0, 20.0 ],
-									"id" : "obj-62",
 									"fontname" : "Arial",
 									"numinlets" : 2,
+									"fontsize" : 12.0,
 									"numoutlets" : 2,
-									"fontsize" : 12.0,
-									"outlettype" : [ "", "" ]
+									"outlettype" : [ "", "" ],
+									"patching_rect" : [ 192.0, 414.055237, 39.0, 20.0 ],
+									"id" : "obj-62"
 								}
 
 							}
@@ -750,12 +1405,12 @@
 								"box" : 								{
 									"maxclass" : "comment",
 									"text" : "chan vel pitch",
-									"patching_rect" : [ 208.0, 389.566895, 73.0, 17.0 ],
-									"id" : "obj-61",
 									"fontname" : "Arial",
 									"numinlets" : 1,
+									"fontsize" : 9.106835,
 									"numoutlets" : 0,
-									"fontsize" : 9.106835
+									"patching_rect" : [ 208.0, 389.566895, 73.0, 17.0 ],
+									"id" : "obj-61"
 								}
 
 							}
@@ -763,13 +1418,13 @@
 								"box" : 								{
 									"maxclass" : "newobj",
 									"text" : "prepend 1",
-									"patching_rect" : [ 192.0, 367.055237, 65.0, 20.0 ],
-									"id" : "obj-59",
 									"fontname" : "Arial",
 									"numinlets" : 1,
+									"fontsize" : 12.0,
 									"numoutlets" : 1,
-									"fontsize" : 12.0,
-									"outlettype" : [ "" ]
+									"outlettype" : [ "" ],
+									"patching_rect" : [ 192.0, 367.055237, 65.0, 20.0 ],
+									"id" : "obj-59"
 								}
 
 							}
@@ -777,13 +1432,13 @@
 								"box" : 								{
 									"maxclass" : "newobj",
 									"text" : "pack 0 0",
-									"patching_rect" : [ 192.0, 310.055237, 56.0, 20.0 ],
-									"id" : "obj-58",
 									"fontname" : "Arial",
 									"numinlets" : 2,
+									"fontsize" : 12.0,
 									"numoutlets" : 1,
-									"fontsize" : 12.0,
-									"outlettype" : [ "" ]
+									"outlettype" : [ "" ],
+									"patching_rect" : [ 192.0, 310.055237, 56.0, 20.0 ],
+									"id" : "obj-58"
 								}
 
 							}
@@ -791,13 +1446,13 @@
 								"box" : 								{
 									"maxclass" : "newobj",
 									"text" : "pipe 100",
-									"patching_rect" : [ 50.0, 337.055237, 57.0, 20.0 ],
-									"id" : "obj-57",
 									"fontname" : "Arial",
 									"numinlets" : 2,
+									"fontsize" : 12.0,
 									"numoutlets" : 1,
-									"fontsize" : 12.0,
-									"outlettype" : [ "" ]
+									"outlettype" : [ "" ],
+									"patching_rect" : [ 50.0, 337.055237, 57.0, 20.0 ],
+									"id" : "obj-57"
 								}
 
 							}
@@ -805,13 +1460,13 @@
 								"box" : 								{
 									"maxclass" : "newobj",
 									"text" : "pack 0 0",
-									"patching_rect" : [ 50.0, 310.055237, 56.0, 20.0 ],
-									"id" : "obj-56",
 									"fontname" : "Arial",
 									"numinlets" : 2,
+									"fontsize" : 12.0,
 									"numoutlets" : 1,
-									"fontsize" : 12.0,
-									"outlettype" : [ "" ]
+									"outlettype" : [ "" ],
+									"patching_rect" : [ 50.0, 310.055237, 56.0, 20.0 ],
+									"id" : "obj-56"
 								}
 
 							}
@@ -819,12 +1474,12 @@
 								"box" : 								{
 									"maxclass" : "comment",
 									"text" : "chan vel pitch",
-									"patching_rect" : [ 157.0, 164.629944, 79.0, 19.0 ],
-									"id" : "obj-53",
 									"fontname" : "Arial",
 									"numinlets" : 1,
+									"fontsize" : 10.536201,
 									"numoutlets" : 0,
-									"fontsize" : 10.536201
+									"patching_rect" : [ 157.0, 164.629944, 79.0, 19.0 ],
+									"id" : "obj-53"
 								}
 
 							}
@@ -832,12 +1487,12 @@
 								"box" : 								{
 									"maxclass" : "comment",
 									"text" : "vel pitch",
-									"patching_rect" : [ 148.0, 217.055237, 55.0, 20.0 ],
-									"id" : "obj-51",
 									"fontname" : "Arial",
 									"numinlets" : 1,
+									"fontsize" : 12.0,
 									"numoutlets" : 0,
-									"fontsize" : 12.0
+									"patching_rect" : [ 148.0, 217.055237, 55.0, 20.0 ],
+									"id" : "obj-51"
 								}
 
 							}
@@ -845,13 +1500,13 @@
 								"box" : 								{
 									"maxclass" : "newobj",
 									"text" : "if $i1!=0 then $i1 else out2 0",
-									"patching_rect" : [ 50.0, 277.055237, 161.0, 20.0 ],
-									"id" : "obj-24",
 									"fontname" : "Arial",
 									"numinlets" : 1,
+									"fontsize" : 12.0,
 									"numoutlets" : 2,
-									"fontsize" : 12.0,
-									"outlettype" : [ "", "" ]
+									"outlettype" : [ "", "" ],
+									"patching_rect" : [ 50.0, 277.055237, 161.0, 20.0 ],
+									"id" : "obj-24"
 								}
 
 							}
@@ -859,13 +1514,13 @@
 								"box" : 								{
 									"maxclass" : "newobj",
 									"text" : "unpack 0 0",
-									"patching_rect" : [ 131.0, 238.055237, 69.0, 20.0 ],
-									"id" : "obj-22",
 									"fontname" : "Arial",
 									"numinlets" : 1,
+									"fontsize" : 12.0,
 									"numoutlets" : 2,
-									"fontsize" : 12.0,
-									"outlettype" : [ "int", "int" ]
+									"outlettype" : [ "int", "int" ],
+									"patching_rect" : [ 131.0, 238.055237, 69.0, 20.0 ],
+									"id" : "obj-22"
 								}
 
 							}
@@ -874,12 +1529,12 @@
 									"maxclass" : "comment",
 									"text" : "Instrument 1 is monophonic with glide: this bit of patching delays the note-offs slightly",
 									"linecount" : 3,
-									"patching_rect" : [ 155.0, 100.0, 147.0, 42.0 ],
-									"id" : "obj-20",
 									"fontname" : "Arial",
 									"numinlets" : 1,
+									"fontsize" : 10.385214,
 									"numoutlets" : 0,
-									"fontsize" : 10.385214
+									"patching_rect" : [ 155.0, 100.0, 147.0, 42.0 ],
+									"id" : "obj-20"
 								}
 
 							}
@@ -887,13 +1542,13 @@
 								"box" : 								{
 									"maxclass" : "newobj",
 									"text" : "zl rev",
-									"patching_rect" : [ 131.0, 145.055237, 39.0, 20.0 ],
-									"id" : "obj-12",
 									"fontname" : "Arial",
 									"numinlets" : 2,
+									"fontsize" : 12.0,
 									"numoutlets" : 2,
-									"fontsize" : 12.0,
-									"outlettype" : [ "", "" ]
+									"outlettype" : [ "", "" ],
+									"patching_rect" : [ 131.0, 145.055237, 39.0, 20.0 ],
+									"id" : "obj-12"
 								}
 
 							}
@@ -901,24 +1556,24 @@
 								"box" : 								{
 									"maxclass" : "newobj",
 									"text" : "route 1",
-									"patching_rect" : [ 131.0, 185.055237, 48.0, 20.0 ],
-									"id" : "obj-4",
 									"fontname" : "Arial",
 									"numinlets" : 1,
+									"fontsize" : 12.0,
 									"numoutlets" : 2,
-									"fontsize" : 12.0,
-									"outlettype" : [ "", "" ]
+									"outlettype" : [ "", "" ],
+									"patching_rect" : [ 131.0, 185.055237, 48.0, 20.0 ],
+									"id" : "obj-4"
 								}
 
 							}
 , 							{
 								"box" : 								{
 									"maxclass" : "inlet",
-									"patching_rect" : [ 131.0, 40.0, 25.0, 25.0 ],
-									"id" : "obj-63",
 									"numinlets" : 0,
 									"numoutlets" : 1,
 									"outlettype" : [ "" ],
+									"patching_rect" : [ 131.0, 40.0, 25.0, 25.0 ],
+									"id" : "obj-63",
 									"comment" : ""
 								}
 
@@ -926,10 +1581,10 @@
 , 							{
 								"box" : 								{
 									"maxclass" : "outlet",
+									"numinlets" : 1,
+									"numoutlets" : 0,
 									"patching_rect" : [ 192.0, 494.055237, 25.0, 25.0 ],
 									"id" : "obj-64",
-									"numinlets" : 1,
-									"numoutlets" : 0,
 									"comment" : ""
 								}
 
@@ -937,8 +1592,107 @@
  ],
 						"lines" : [ 							{
 								"patchline" : 								{
-									"source" : [ "obj-12", 0 ],
-									"destination" : [ "obj-4", 0 ],
+									"source" : [ "obj-62", 0 ],
+									"destination" : [ "obj-64", 0 ],
+									"hidden" : 0,
+									"midpoints" : [  ]
+								}
+
+							}
+, 							{
+								"patchline" : 								{
+									"source" : [ "obj-63", 0 ],
+									"destination" : [ "obj-12", 0 ],
+									"hidden" : 0,
+									"midpoints" : [  ]
+								}
+
+							}
+, 							{
+								"patchline" : 								{
+									"source" : [ "obj-59", 0 ],
+									"destination" : [ "obj-62", 0 ],
+									"hidden" : 0,
+									"midpoints" : [  ]
+								}
+
+							}
+, 							{
+								"patchline" : 								{
+									"source" : [ "obj-4", 1 ],
+									"destination" : [ "obj-62", 1 ],
+									"hidden" : 0,
+									"midpoints" : [ 169.5, 212.055237, 301.0, 212.055237, 301.0, 409.055237, 221.5, 409.055237 ]
+								}
+
+							}
+, 							{
+								"patchline" : 								{
+									"source" : [ "obj-58", 0 ],
+									"destination" : [ "obj-59", 0 ],
+									"hidden" : 0,
+									"midpoints" : [  ]
+								}
+
+							}
+, 							{
+								"patchline" : 								{
+									"source" : [ "obj-57", 0 ],
+									"destination" : [ "obj-59", 0 ],
+									"hidden" : 0,
+									"midpoints" : [  ]
+								}
+
+							}
+, 							{
+								"patchline" : 								{
+									"source" : [ "obj-22", 1 ],
+									"destination" : [ "obj-58", 1 ],
+									"hidden" : 0,
+									"midpoints" : [  ]
+								}
+
+							}
+, 							{
+								"patchline" : 								{
+									"source" : [ "obj-24", 1 ],
+									"destination" : [ "obj-58", 0 ],
+									"hidden" : 0,
+									"midpoints" : [  ]
+								}
+
+							}
+, 							{
+								"patchline" : 								{
+									"source" : [ "obj-56", 0 ],
+									"destination" : [ "obj-57", 0 ],
+									"hidden" : 0,
+									"midpoints" : [  ]
+								}
+
+							}
+, 							{
+								"patchline" : 								{
+									"source" : [ "obj-24", 0 ],
+									"destination" : [ "obj-56", 0 ],
+									"hidden" : 0,
+									"midpoints" : [  ]
+								}
+
+							}
+, 							{
+								"patchline" : 								{
+									"source" : [ "obj-22", 1 ],
+									"destination" : [ "obj-56", 1 ],
+									"hidden" : 0,
+									"midpoints" : [  ]
+								}
+
+							}
+, 							{
+								"patchline" : 								{
+									"source" : [ "obj-22", 0 ],
+									"destination" : [ "obj-24", 0 ],
 									"hidden" : 0,
 									"midpoints" : [  ]
 								}
@@ -955,107 +1709,8 @@
 							}
 , 							{
 								"patchline" : 								{
-									"source" : [ "obj-22", 0 ],
-									"destination" : [ "obj-24", 0 ],
-									"hidden" : 0,
-									"midpoints" : [  ]
-								}
-
-							}
-, 							{
-								"patchline" : 								{
-									"source" : [ "obj-22", 1 ],
-									"destination" : [ "obj-56", 1 ],
-									"hidden" : 0,
-									"midpoints" : [  ]
-								}
-
-							}
-, 							{
-								"patchline" : 								{
-									"source" : [ "obj-24", 0 ],
-									"destination" : [ "obj-56", 0 ],
-									"hidden" : 0,
-									"midpoints" : [  ]
-								}
-
-							}
-, 							{
-								"patchline" : 								{
-									"source" : [ "obj-56", 0 ],
-									"destination" : [ "obj-57", 0 ],
-									"hidden" : 0,
-									"midpoints" : [  ]
-								}
-
-							}
-, 							{
-								"patchline" : 								{
-									"source" : [ "obj-24", 1 ],
-									"destination" : [ "obj-58", 0 ],
-									"hidden" : 0,
-									"midpoints" : [  ]
-								}
-
-							}
-, 							{
-								"patchline" : 								{
-									"source" : [ "obj-22", 1 ],
-									"destination" : [ "obj-58", 1 ],
-									"hidden" : 0,
-									"midpoints" : [  ]
-								}
-
-							}
-, 							{
-								"patchline" : 								{
-									"source" : [ "obj-57", 0 ],
-									"destination" : [ "obj-59", 0 ],
-									"hidden" : 0,
-									"midpoints" : [  ]
-								}
-
-							}
-, 							{
-								"patchline" : 								{
-									"source" : [ "obj-58", 0 ],
-									"destination" : [ "obj-59", 0 ],
-									"hidden" : 0,
-									"midpoints" : [  ]
-								}
-
-							}
-, 							{
-								"patchline" : 								{
-									"source" : [ "obj-4", 1 ],
-									"destination" : [ "obj-62", 1 ],
-									"hidden" : 0,
-									"midpoints" : [ 169.5, 212.055237, 301.0, 212.055237, 301.0, 409.055237, 221.5, 409.055237 ]
-								}
-
-							}
-, 							{
-								"patchline" : 								{
-									"source" : [ "obj-59", 0 ],
-									"destination" : [ "obj-62", 0 ],
-									"hidden" : 0,
-									"midpoints" : [  ]
-								}
-
-							}
-, 							{
-								"patchline" : 								{
-									"source" : [ "obj-63", 0 ],
-									"destination" : [ "obj-12", 0 ],
-									"hidden" : 0,
-									"midpoints" : [  ]
-								}
-
-							}
-, 							{
-								"patchline" : 								{
-									"source" : [ "obj-62", 0 ],
-									"destination" : [ "obj-64", 0 ],
+									"source" : [ "obj-12", 0 ],
+									"destination" : [ "obj-4", 0 ],
 									"hidden" : 0,
 									"midpoints" : [  ]
 								}
@@ -1065,12 +1720,12 @@
 					}
 ,
 					"saved_object_attributes" : 					{
+						"fontname" : "Arial",
 						"default_fontsize" : 12.0,
-						"fontname" : "Arial",
 						"globalpatchername" : "",
 						"fontface" : 0,
+						"fontsize" : 12.0,
 						"default_fontface" : 0,
-						"fontsize" : 12.0,
 						"default_fontname" : "Arial"
 					}
 
@@ -1081,12 +1736,12 @@
 				"box" : 				{
 					"maxclass" : "newobj",
 					"text" : "udpsend localhost 12344",
-					"patching_rect" : [ 998.0, 214.0, 144.0, 20.0 ],
-					"id" : "obj-32",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 12.0,
 					"numoutlets" : 0,
-					"fontsize" : 12.0
+					"patching_rect" : [ 998.0, 214.0, 144.0, 20.0 ],
+					"id" : "obj-32"
 				}
 
 			}
@@ -1094,13 +1749,13 @@
 				"box" : 				{
 					"maxclass" : "newobj",
 					"text" : "prepend /person",
-					"patching_rect" : [ 998.0, 174.0, 98.0, 20.0 ],
-					"id" : "obj-31",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 12.0,
 					"numoutlets" : 1,
-					"fontsize" : 12.0,
-					"outlettype" : [ "" ]
+					"outlettype" : [ "" ],
+					"patching_rect" : [ 998.0, 174.0, 98.0, 20.0 ],
+					"id" : "obj-31"
 				}
 
 			}
@@ -1108,87 +1763,89 @@
 				"box" : 				{
 					"maxclass" : "newobj",
 					"text" : "pak i f f f",
-					"patching_rect" : [ 998.0, 95.0, 59.5, 20.0 ],
-					"id" : "obj-30",
 					"fontname" : "Arial",
 					"numinlets" : 4,
+					"fontsize" : 12.0,
 					"numoutlets" : 1,
-					"fontsize" : 12.0,
-					"outlettype" : [ "" ]
+					"outlettype" : [ "" ],
+					"patching_rect" : [ 998.0, 95.0, 59.5, 20.0 ],
+					"id" : "obj-30"
 				}
 
 			}
 , 			{
 				"box" : 				{
 					"maxclass" : "flonum",
-					"patching_rect" : [ 1084.0, 50.0, 80.0, 20.0 ],
-					"id" : "obj-29",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 12.0,
 					"numoutlets" : 2,
-					"fontsize" : 12.0,
-					"outlettype" : [ "float", "bang" ]
+					"outlettype" : [ "float", "bang" ],
+					"patching_rect" : [ 1084.0, 50.0, 80.0, 20.0 ],
+					"id" : "obj-29"
 				}
 
 			}
 , 			{
 				"box" : 				{
 					"maxclass" : "flonum",
-					"patching_rect" : [ 1030.0, 50.0, 50.0, 20.0 ],
-					"id" : "obj-27",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 12.0,
 					"numoutlets" : 2,
-					"fontsize" : 12.0,
-					"outlettype" : [ "float", "bang" ]
+					"outlettype" : [ "float", "bang" ],
+					"patching_rect" : [ 1030.0, 50.0, 50.0, 20.0 ],
+					"id" : "obj-27"
 				}
 
 			}
 , 			{
 				"box" : 				{
 					"maxclass" : "flonum",
-					"patching_rect" : [ 977.0, 50.0, 50.0, 20.0 ],
-					"id" : "obj-25",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 12.0,
 					"numoutlets" : 2,
-					"fontsize" : 12.0,
-					"outlettype" : [ "float", "bang" ]
+					"outlettype" : [ "float", "bang" ],
+					"patching_rect" : [ 977.0, 50.0, 50.0, 20.0 ],
+					"id" : "obj-25"
 				}
 
 			}
 , 			{
 				"box" : 				{
 					"maxclass" : "number",
-					"patching_rect" : [ 923.0, 50.0, 50.0, 20.0 ],
-					"id" : "obj-23",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"minimum" : 0,
+					"fontsize" : 12.0,
 					"numoutlets" : 2,
-					"fontsize" : 12.0,
-					"outlettype" : [ "int", "bang" ]
+					"outlettype" : [ "int", "bang" ],
+					"maximum" : 2,
+					"patching_rect" : [ 923.0, 50.0, 50.0, 20.0 ],
+					"id" : "obj-23"
 				}
 
 			}
 , 			{
 				"box" : 				{
 					"maxclass" : "button",
-					"patching_rect" : [ 414.0, 466.0, 20.0, 20.0 ],
-					"id" : "obj-21",
 					"numinlets" : 1,
 					"numoutlets" : 1,
-					"outlettype" : [ "bang" ]
+					"outlettype" : [ "bang" ],
+					"patching_rect" : [ 414.0, 466.0, 20.0, 20.0 ],
+					"id" : "obj-21"
 				}
 
 			}
 , 			{
 				"box" : 				{
 					"maxclass" : "button",
-					"patching_rect" : [ 325.0, 436.0, 20.0, 20.0 ],
-					"id" : "obj-19",
 					"numinlets" : 1,
 					"numoutlets" : 1,
-					"outlettype" : [ "bang" ]
+					"outlettype" : [ "bang" ],
+					"patching_rect" : [ 325.0, 436.0, 20.0, 20.0 ],
+					"id" : "obj-19"
 				}
 
 			}
@@ -1196,13 +1853,13 @@
 				"box" : 				{
 					"maxclass" : "newobj",
 					"text" : "flush",
-					"patching_rect" : [ 401.0, 497.0, 49.0, 20.0 ],
-					"id" : "obj-17",
 					"fontname" : "Arial",
 					"numinlets" : 2,
+					"fontsize" : 12.0,
 					"numoutlets" : 2,
-					"fontsize" : 12.0,
-					"outlettype" : [ "int", "int" ]
+					"outlettype" : [ "int", "int" ],
+					"patching_rect" : [ 401.0, 497.0, 49.0, 20.0 ],
+					"id" : "obj-17"
 				}
 
 			}
@@ -1210,26 +1867,26 @@
 				"box" : 				{
 					"maxclass" : "message",
 					"text" : "/chord",
-					"patching_rect" : [ 72.0, 522.0, 44.0, 18.0 ],
-					"id" : "obj-16",
 					"fontname" : "Arial",
 					"numinlets" : 2,
+					"fontsize" : 12.0,
 					"numoutlets" : 1,
-					"fontsize" : 12.0,
-					"outlettype" : [ "" ]
+					"outlettype" : [ "" ],
+					"patching_rect" : [ 72.0, 522.0, 44.0, 18.0 ],
+					"id" : "obj-16"
 				}
 
 			}
 , 			{
 				"box" : 				{
 					"maxclass" : "newobj",
-					"text" : "udpsend localhost 12345",
-					"patching_rect" : [ 72.0, 546.0, 144.0, 20.0 ],
-					"id" : "obj-10",
+					"text" : "udpsend 169.254.25.239 12346",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 12.0,
 					"numoutlets" : 0,
-					"fontsize" : 12.0
+					"patching_rect" : [ 72.0, 546.0, 181.0, 20.0 ],
+					"id" : "obj-10"
 				}
 
 			}
@@ -1237,28 +1894,27 @@
 				"box" : 				{
 					"maxclass" : "newobj",
 					"text" : "unpack 0 0 0",
-					"patching_rect" : [ 401.0, 413.0, 79.0, 20.0 ],
-					"id" : "obj-7",
 					"fontname" : "Arial",
 					"numinlets" : 1,
+					"fontsize" : 12.0,
 					"numoutlets" : 3,
-					"fontsize" : 12.0,
-					"outlettype" : [ "int", "int", "int" ]
+					"outlettype" : [ "int", "int", "int" ],
+					"patching_rect" : [ 401.0, 413.0, 79.0, 20.0 ],
+					"id" : "obj-7"
 				}
 
 			}
 , 			{
 				"box" : 				{
 					"maxclass" : "message",
-					"text" : "82 127 2",
-					"linecount" : 2,
-					"patching_rect" : [ 345.0, 243.0, 50.0, 32.0 ],
-					"id" : "obj-6",
+					"text" : "79 0 1",
 					"fontname" : "Arial",
 					"numinlets" : 2,
+					"fontsize" : 12.0,
 					"numoutlets" : 1,
-					"fontsize" : 12.0,
-					"outlettype" : [ "" ]
+					"outlettype" : [ "" ],
+					"patching_rect" : [ 345.0, 243.0, 50.0, 18.0 ],
+					"id" : "obj-6"
 				}
 
 			}
@@ -1266,12 +1922,12 @@
 				"box" : 				{
 					"maxclass" : "newobj",
 					"text" : "ctlout a",
-					"patching_rect" : [ 694.0, 193.387756, 52.0, 21.0 ],
-					"id" : "obj-2",
 					"fontname" : "Arial",
 					"numinlets" : 3,
+					"fontsize" : 12.88093,
 					"numoutlets" : 0,
-					"fontsize" : 12.88093
+					"patching_rect" : [ 694.0, 193.387756, 52.0, 21.0 ],
+					"id" : "obj-2"
 				}
 
 			}
@@ -1280,12 +1936,12 @@
 					"maxclass" : "comment",
 					"text" : "OSC input is routed to instruments 1-3.",
 					"linecount" : 2,
-					"patching_rect" : [ 528.0, 31.91593, 176.0, 45.0 ],
-					"id" : "obj-54",
 					"fontname" : "Arial Bold",
 					"numinlets" : 1,
+					"fontsize" : 16.935125,
 					"numoutlets" : 0,
-					"fontsize" : 16.935125
+					"patching_rect" : [ 528.0, 31.91593, 176.0, 45.0 ],
+					"id" : "obj-54"
 				}
 
 			}
@@ -1293,12 +1949,12 @@
 				"box" : 				{
 					"maxclass" : "comment",
 					"text" : "value, CC number, channel",
-					"patching_rect" : [ 738.0, 159.794876, 120.0, 16.0 ],
-					"id" : "obj-43",
 					"fontname" : "Arial Bold",
 					"numinlets" : 1,
+					"fontsize" : 8.46547,
 					"numoutlets" : 0,
-					"fontsize" : 8.46547
+					"patching_rect" : [ 738.0, 159.794876, 120.0, 16.0 ],
+					"id" : "obj-43"
 				}
 
 			}
@@ -1306,13 +1962,13 @@
 				"box" : 				{
 					"maxclass" : "newobj",
 					"text" : "zl rev",
-					"patching_rect" : [ 694.0, 156.25, 39.0, 19.0 ],
-					"id" : "obj-39",
 					"fontname" : "Arial Bold",
 					"numinlets" : 2,
+					"fontsize" : 11.134259,
 					"numoutlets" : 2,
-					"fontsize" : 11.134259,
-					"outlettype" : [ "", "" ]
+					"outlettype" : [ "", "" ],
+					"patching_rect" : [ 694.0, 156.25, 39.0, 19.0 ],
+					"id" : "obj-39"
 				}
 
 			}
@@ -1321,12 +1977,12 @@
 					"maxclass" : "comment",
 					"text" : "Route MIDI data from Joe to the three instruments.",
 					"linecount" : 5,
-					"patching_rect" : [ 327.0, 107.0, 71.0, 64.0 ],
-					"id" : "obj-35",
 					"fontname" : "Arial Bold",
 					"numinlets" : 1,
+					"fontsize" : 10.0,
 					"numoutlets" : 0,
-					"fontsize" : 10.0
+					"patching_rect" : [ 327.0, 107.0, 71.0, 64.0 ],
+					"id" : "obj-35"
 				}
 
 			}
@@ -1334,13 +1990,13 @@
 				"box" : 				{
 					"maxclass" : "newobj",
 					"text" : "fromsymbol",
-					"patching_rect" : [ 401.0, 218.0, 68.0, 18.0 ],
-					"id" : "obj-15",
 					"fontname" : "Arial Bold",
 					"numinlets" : 1,
+					"fontsize" : 10.0,
 					"numoutlets" : 1,
-					"fontsize" : 10.0,
-					"outlettype" : [ "" ]
+					"outlettype" : [ "" ],
+					"patching_rect" : [ 401.0, 218.0, 68.0, 18.0 ],
+					"id" : "obj-15"
 				}
 
 			}
@@ -1348,12 +2004,12 @@
 				"box" : 				{
 					"maxclass" : "newobj",
 					"text" : "print unhandled_osc",
-					"patching_rect" : [ 495.0, 157.0, 109.0, 18.0 ],
-					"id" : "obj-14",
 					"fontname" : "Arial Bold",
 					"numinlets" : 1,
+					"fontsize" : 10.0,
 					"numoutlets" : 0,
-					"fontsize" : 10.0
+					"patching_rect" : [ 495.0, 245.0, 109.0, 18.0 ],
+					"id" : "obj-14"
 				}
 
 			}
@@ -1362,12 +2018,12 @@
 					"maxclass" : "comment",
 					"text" : "From tim's Grid mapping.\nIn form: channel, CC number, value",
 					"linecount" : 2,
-					"patching_rect" : [ 702.0, 100.703423, 155.0, 27.0 ],
-					"id" : "obj-13",
 					"fontname" : "Arial Bold",
 					"numinlets" : 1,
+					"fontsize" : 8.716659,
 					"numoutlets" : 0,
-					"fontsize" : 8.716659
+					"patching_rect" : [ 702.0, 100.703423, 155.0, 27.0 ],
+					"id" : "obj-13"
 				}
 
 			}
@@ -1375,12 +2031,12 @@
 				"box" : 				{
 					"maxclass" : "comment",
 					"text" : "From Joe as one big string",
-					"patching_rect" : [ 417.0, 116.231461, 105.0, 15.0 ],
-					"id" : "obj-11",
 					"fontname" : "Arial Bold",
 					"numinlets" : 1,
+					"fontsize" : 7.352522,
 					"numoutlets" : 0,
-					"fontsize" : 7.352522
+					"patching_rect" : [ 417.0, 116.231461, 105.0, 15.0 ],
+					"id" : "obj-11"
 				}
 
 			}
@@ -1388,13 +2044,13 @@
 				"box" : 				{
 					"maxclass" : "newobj",
 					"text" : "route /cc",
-					"patching_rect" : [ 694.0, 132.480774, 55.0, 19.0 ],
-					"id" : "obj-8",
 					"fontname" : "Arial Bold",
 					"numinlets" : 1,
+					"fontsize" : 10.605745,
 					"numoutlets" : 2,
-					"fontsize" : 10.605745,
-					"outlettype" : [ "", "" ]
+					"outlettype" : [ "", "" ],
+					"patching_rect" : [ 694.0, 132.480774, 55.0, 19.0 ],
+					"id" : "obj-8"
 				}
 
 			}
@@ -1402,27 +2058,27 @@
 				"box" : 				{
 					"maxclass" : "newobj",
 					"text" : "route /pitch_vel_chan",
-					"patching_rect" : [ 401.0, 133.0, 113.0, 18.0 ],
-					"id" : "obj-5",
 					"fontname" : "Arial Bold",
 					"numinlets" : 1,
+					"fontsize" : 10.0,
 					"numoutlets" : 2,
-					"fontsize" : 10.0,
-					"outlettype" : [ "", "" ]
+					"outlettype" : [ "", "" ],
+					"patching_rect" : [ 401.0, 133.0, 113.0, 18.0 ],
+					"id" : "obj-5"
 				}
 
 			}
 , 			{
 				"box" : 				{
 					"maxclass" : "newobj",
-					"text" : "udpreceive 12346",
-					"patching_rect" : [ 399.0, 42.0, 94.0, 18.0 ],
-					"id" : "obj-3",
+					"text" : "udpreceive 12345",
 					"fontname" : "Arial Bold",
 					"numinlets" : 1,
+					"fontsize" : 10.0,
 					"numoutlets" : 1,
-					"fontsize" : 10.0,
-					"outlettype" : [ "" ]
+					"outlettype" : [ "" ],
+					"patching_rect" : [ 399.0, 42.0, 94.0, 18.0 ],
+					"id" : "obj-3"
 				}
 
 			}
@@ -1430,155 +2086,20 @@
 				"box" : 				{
 					"maxclass" : "newobj",
 					"text" : "noteout a",
-					"patching_rect" : [ 401.0, 648.0, 79.0, 20.0 ],
-					"id" : "obj-1",
 					"fontname" : "Arial",
 					"numinlets" : 3,
+					"fontsize" : 12.0,
 					"numoutlets" : 0,
-					"fontsize" : 12.0
+					"patching_rect" : [ 401.0, 648.0, 79.0, 20.0 ],
+					"id" : "obj-1"
 				}
 
 			}
  ],
 		"lines" : [ 			{
 				"patchline" : 				{
-					"source" : [ "obj-8", 0 ],
-					"destination" : [ "obj-167", 1 ],
-					"hidden" : 0,
-					"midpoints" : [  ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-8", 0 ],
-					"destination" : [ "obj-165", 0 ],
-					"hidden" : 0,
-					"midpoints" : [  ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-141", 0 ],
-					"destination" : [ "obj-163", 0 ],
-					"hidden" : 0,
-					"midpoints" : [  ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-19", 0 ],
-					"destination" : [ "obj-141", 0 ],
-					"hidden" : 0,
-					"midpoints" : [  ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-161", 0 ],
-					"destination" : [ "obj-120", 0 ],
-					"hidden" : 0,
-					"midpoints" : [  ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-127", 0 ],
-					"destination" : [ "obj-120", 0 ],
-					"hidden" : 0,
-					"midpoints" : [  ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-126", 0 ],
-					"destination" : [ "obj-120", 0 ],
-					"hidden" : 0,
-					"midpoints" : [  ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-125", 0 ],
-					"destination" : [ "obj-120", 0 ],
-					"hidden" : 0,
-					"midpoints" : [  ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-124", 0 ],
-					"destination" : [ "obj-120", 0 ],
-					"hidden" : 0,
-					"midpoints" : [  ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-122", 0 ],
-					"destination" : [ "obj-120", 0 ],
-					"hidden" : 0,
-					"midpoints" : [  ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-123", 0 ],
-					"destination" : [ "obj-120", 0 ],
-					"hidden" : 0,
-					"midpoints" : [  ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-108", 0 ],
-					"destination" : [ "obj-19", 0 ],
-					"hidden" : 0,
-					"midpoints" : [ 136.5, 402.0, 334.5, 402.0 ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-16", 0 ],
-					"destination" : [ "obj-10", 0 ],
-					"hidden" : 0,
-					"midpoints" : [  ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-105", 0 ],
-					"destination" : [ "obj-108", 0 ],
-					"hidden" : 0,
-					"midpoints" : [  ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-108", 0 ],
-					"destination" : [ "obj-109", 0 ],
-					"hidden" : 0,
-					"midpoints" : [  ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-70", 0 ],
-					"destination" : [ "obj-75", 0 ],
+					"source" : [ "obj-42", 1 ],
+					"destination" : [ "obj-98", 0 ],
 					"hidden" : 0,
 					"midpoints" : [  ]
 				}
@@ -1587,97 +2108,7 @@
 , 			{
 				"patchline" : 				{
 					"source" : [ "obj-74", 0 ],
-					"destination" : [ "obj-70", 0 ],
-					"hidden" : 0,
-					"midpoints" : [  ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-70", 0 ],
-					"destination" : [ "obj-78", 0 ],
-					"hidden" : 0,
-					"midpoints" : [  ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-78", 3 ],
-					"destination" : [ "obj-105", 0 ],
-					"hidden" : 0,
-					"midpoints" : [  ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-80", 0 ],
-					"destination" : [ "obj-83", 0 ],
-					"hidden" : 0,
-					"midpoints" : [  ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-83", 0 ],
-					"destination" : [ "obj-78", 4 ],
-					"hidden" : 0,
-					"midpoints" : [  ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-78", 0 ],
-					"destination" : [ "obj-87", 0 ],
-					"hidden" : 0,
-					"midpoints" : [  ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-78", 0 ],
-					"destination" : [ "obj-88", 0 ],
-					"hidden" : 0,
-					"midpoints" : [  ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-94", 0 ],
-					"destination" : [ "obj-90", 0 ],
-					"hidden" : 0,
-					"midpoints" : [  ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-87", 0 ],
-					"destination" : [ "obj-94", 0 ],
-					"hidden" : 0,
-					"midpoints" : [  ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-93", 0 ],
-					"destination" : [ "obj-92", 0 ],
-					"hidden" : 0,
-					"midpoints" : [  ]
-				}
-
-			}
-, 			{
-				"patchline" : 				{
-					"source" : [ "obj-88", 0 ],
-					"destination" : [ "obj-93", 0 ],
+					"destination" : [ "obj-42", 0 ],
 					"hidden" : 0,
 					"midpoints" : [  ]
 				}
@@ -1694,8 +2125,8 @@
 			}
 , 			{
 				"patchline" : 				{
-					"source" : [ "obj-15", 0 ],
-					"destination" : [ "obj-65", 0 ],
+					"source" : [ "obj-47", 0 ],
+					"destination" : [ "obj-96", 0 ],
 					"hidden" : 0,
 					"midpoints" : [  ]
 				}
@@ -1703,8 +2134,8 @@
 			}
 , 			{
 				"patchline" : 				{
-					"source" : [ "obj-65", 0 ],
-					"destination" : [ "obj-7", 0 ],
+					"source" : [ "obj-61", 0 ],
+					"destination" : [ "obj-96", 0 ],
 					"hidden" : 0,
 					"midpoints" : [  ]
 				}
@@ -1712,8 +2143,8 @@
 			}
 , 			{
 				"patchline" : 				{
-					"source" : [ "obj-5", 1 ],
-					"destination" : [ "obj-14", 0 ],
+					"source" : [ "obj-96", 0 ],
+					"destination" : [ "obj-1", 0 ],
 					"hidden" : 0,
 					"midpoints" : [  ]
 				}
@@ -1721,8 +2152,71 @@
 			}
 , 			{
 				"patchline" : 				{
-					"source" : [ "obj-5", 0 ],
-					"destination" : [ "obj-15", 0 ],
+					"source" : [ "obj-96", 2 ],
+					"destination" : [ "obj-1", 2 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-96", 1 ],
+					"destination" : [ "obj-1", 1 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-61", 0 ],
+					"destination" : [ "obj-66", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-45", 0 ],
+					"destination" : [ "obj-61", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-44", 0 ],
+					"destination" : [ "obj-45", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-44", 0 ],
+					"destination" : [ "obj-51", 1 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-58", 0 ],
+					"destination" : [ "obj-51", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-51", 0 ],
+					"destination" : [ "obj-53", 0 ],
 					"hidden" : 0,
 					"midpoints" : [  ]
 				}
@@ -1748,8 +2242,8 @@
 			}
 , 			{
 				"patchline" : 				{
-					"source" : [ "obj-8", 0 ],
-					"destination" : [ "obj-39", 0 ],
+					"source" : [ "obj-20", 0 ],
+					"destination" : [ "obj-10", 0 ],
 					"hidden" : 0,
 					"midpoints" : [  ]
 				}
@@ -1757,8 +2251,8 @@
 			}
 , 			{
 				"patchline" : 				{
-					"source" : [ "obj-39", 0 ],
-					"destination" : [ "obj-2", 0 ],
+					"source" : [ "obj-9", 0 ],
+					"destination" : [ "obj-10", 0 ],
 					"hidden" : 0,
 					"midpoints" : [  ]
 				}
@@ -1766,8 +2260,8 @@
 			}
 , 			{
 				"patchline" : 				{
-					"source" : [ "obj-15", 0 ],
-					"destination" : [ "obj-6", 1 ],
+					"source" : [ "obj-16", 0 ],
+					"destination" : [ "obj-10", 0 ],
 					"hidden" : 0,
 					"midpoints" : [  ]
 				}
@@ -1775,8 +2269,8 @@
 			}
 , 			{
 				"patchline" : 				{
-					"source" : [ "obj-7", 2 ],
-					"destination" : [ "obj-1", 2 ],
+					"source" : [ "obj-29", 0 ],
+					"destination" : [ "obj-30", 3 ],
 					"hidden" : 0,
 					"midpoints" : [  ]
 				}
@@ -1784,8 +2278,8 @@
 			}
 , 			{
 				"patchline" : 				{
-					"source" : [ "obj-7", 1 ],
-					"destination" : [ "obj-17", 1 ],
+					"source" : [ "obj-27", 0 ],
+					"destination" : [ "obj-30", 2 ],
 					"hidden" : 0,
 					"midpoints" : [  ]
 				}
@@ -1793,8 +2287,8 @@
 			}
 , 			{
 				"patchline" : 				{
-					"source" : [ "obj-7", 0 ],
-					"destination" : [ "obj-17", 0 ],
+					"source" : [ "obj-25", 0 ],
+					"destination" : [ "obj-30", 1 ],
 					"hidden" : 0,
 					"midpoints" : [  ]
 				}
@@ -1802,8 +2296,8 @@
 			}
 , 			{
 				"patchline" : 				{
-					"source" : [ "obj-17", 0 ],
-					"destination" : [ "obj-1", 0 ],
+					"source" : [ "obj-23", 0 ],
+					"destination" : [ "obj-30", 0 ],
 					"hidden" : 0,
 					"midpoints" : [  ]
 				}
@@ -1811,8 +2305,8 @@
 			}
 , 			{
 				"patchline" : 				{
-					"source" : [ "obj-19", 0 ],
-					"destination" : [ "obj-16", 0 ],
+					"source" : [ "obj-30", 0 ],
+					"destination" : [ "obj-31", 0 ],
 					"hidden" : 0,
 					"midpoints" : [  ]
 				}
@@ -1820,7 +2314,16 @@
 			}
 , 			{
 				"patchline" : 				{
-					"source" : [ "obj-19", 0 ],
+					"source" : [ "obj-31", 0 ],
+					"destination" : [ "obj-32", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-21", 0 ],
 					"destination" : [ "obj-17", 0 ],
 					"hidden" : 0,
 					"midpoints" : [  ]
@@ -1838,7 +2341,7 @@
 			}
 , 			{
 				"patchline" : 				{
-					"source" : [ "obj-21", 0 ],
+					"source" : [ "obj-19", 0 ],
 					"destination" : [ "obj-17", 0 ],
 					"hidden" : 0,
 					"midpoints" : [  ]
@@ -1847,8 +2350,8 @@
 			}
 , 			{
 				"patchline" : 				{
-					"source" : [ "obj-31", 0 ],
-					"destination" : [ "obj-32", 0 ],
+					"source" : [ "obj-19", 0 ],
+					"destination" : [ "obj-16", 0 ],
 					"hidden" : 0,
 					"midpoints" : [  ]
 				}
@@ -1856,8 +2359,8 @@
 			}
 , 			{
 				"patchline" : 				{
-					"source" : [ "obj-30", 0 ],
-					"destination" : [ "obj-31", 0 ],
+					"source" : [ "obj-17", 0 ],
+					"destination" : [ "obj-1", 0 ],
 					"hidden" : 0,
 					"midpoints" : [  ]
 				}
@@ -1865,8 +2368,8 @@
 			}
 , 			{
 				"patchline" : 				{
-					"source" : [ "obj-23", 0 ],
-					"destination" : [ "obj-30", 0 ],
+					"source" : [ "obj-7", 0 ],
+					"destination" : [ "obj-17", 0 ],
 					"hidden" : 0,
 					"midpoints" : [  ]
 				}
@@ -1874,8 +2377,8 @@
 			}
 , 			{
 				"patchline" : 				{
-					"source" : [ "obj-25", 0 ],
-					"destination" : [ "obj-30", 1 ],
+					"source" : [ "obj-7", 1 ],
+					"destination" : [ "obj-17", 1 ],
 					"hidden" : 0,
 					"midpoints" : [  ]
 				}
@@ -1883,8 +2386,8 @@
 			}
 , 			{
 				"patchline" : 				{
-					"source" : [ "obj-27", 0 ],
-					"destination" : [ "obj-30", 2 ],
+					"source" : [ "obj-7", 2 ],
+					"destination" : [ "obj-1", 2 ],
 					"hidden" : 0,
 					"midpoints" : [  ]
 				}
@@ -1892,8 +2395,386 @@
 			}
 , 			{
 				"patchline" : 				{
-					"source" : [ "obj-29", 0 ],
-					"destination" : [ "obj-30", 3 ],
+					"source" : [ "obj-15", 0 ],
+					"destination" : [ "obj-6", 1 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-39", 0 ],
+					"destination" : [ "obj-2", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-8", 0 ],
+					"destination" : [ "obj-39", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-5", 0 ],
+					"destination" : [ "obj-15", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-15", 0 ],
+					"destination" : [ "obj-65", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-88", 0 ],
+					"destination" : [ "obj-93", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-93", 0 ],
+					"destination" : [ "obj-92", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-87", 0 ],
+					"destination" : [ "obj-94", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-94", 0 ],
+					"destination" : [ "obj-90", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-78", 0 ],
+					"destination" : [ "obj-88", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-78", 0 ],
+					"destination" : [ "obj-87", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-83", 0 ],
+					"destination" : [ "obj-78", 4 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-80", 0 ],
+					"destination" : [ "obj-83", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-78", 3 ],
+					"destination" : [ "obj-105", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-70", 0 ],
+					"destination" : [ "obj-78", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-74", 0 ],
+					"destination" : [ "obj-70", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-70", 0 ],
+					"destination" : [ "obj-75", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-108", 0 ],
+					"destination" : [ "obj-109", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-105", 0 ],
+					"destination" : [ "obj-108", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-108", 0 ],
+					"destination" : [ "obj-19", 0 ],
+					"hidden" : 0,
+					"midpoints" : [ 136.5, 402.0, 334.5, 402.0 ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-123", 0 ],
+					"destination" : [ "obj-120", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-122", 0 ],
+					"destination" : [ "obj-120", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-124", 0 ],
+					"destination" : [ "obj-120", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-125", 0 ],
+					"destination" : [ "obj-120", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-126", 0 ],
+					"destination" : [ "obj-120", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-127", 0 ],
+					"destination" : [ "obj-120", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-161", 0 ],
+					"destination" : [ "obj-120", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-19", 0 ],
+					"destination" : [ "obj-141", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-141", 0 ],
+					"destination" : [ "obj-163", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-8", 0 ],
+					"destination" : [ "obj-165", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-8", 0 ],
+					"destination" : [ "obj-167", 1 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-15", 0 ],
+					"destination" : [ "obj-7", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-5", 1 ],
+					"destination" : [ "obj-12", 1 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-12", 0 ],
+					"destination" : [ "obj-14", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-22", 0 ],
+					"destination" : [ "obj-12", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-47", 2 ],
+					"destination" : [ "obj-49", 0 ],
+					"hidden" : 0,
+					"midpoints" : [ 561.833313, 508.0, 611.0, 508.0, 611.0, 452.0, 520.5, 452.0 ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-49", 0 ],
+					"destination" : [ "obj-47", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-37", 0 ],
+					"destination" : [ "obj-49", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-59", 0 ],
+					"destination" : [ "obj-55", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-57", 0 ],
+					"destination" : [ "obj-52", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-55", 0 ],
+					"destination" : [ "obj-50", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-52", 0 ],
+					"destination" : [ "obj-50", 0 ],
+					"hidden" : 0,
+					"midpoints" : [  ]
+				}
+
+			}
+, 			{
+				"patchline" : 				{
+					"source" : [ "obj-50", 0 ],
+					"destination" : [ "obj-63", 0 ],
 					"hidden" : 0,
 					"midpoints" : [  ]
 				}
--- a/README	Wed Mar 02 16:22:37 2011 +0000
+++ b/README	Wed Mar 02 16:23:51 2011 +0000
@@ -7,3 +7,11 @@
 
 # if you quit the interpreter without stopping, 
 # need to find and kill the process
+
+
+
+import grid_mapper
+grid_mapper.joe = etc
+grid_mapper.start()
+
+
--- a/Specification.txt	Wed Mar 02 16:22:37 2011 +0000
+++ b/Specification.txt	Wed Mar 02 16:23:51 2011 +0000
@@ -43,6 +43,9 @@
 i0 - identifier of person
 f1, f2, f3 - x, y, z of person
 
+/stopperson i0
+sent when person i0 leaves the view
+
 Send OSC to Joe: (defined above)
 
 
--- a/of/testApp.cpp	Wed Mar 02 16:22:37 2011 +0000
+++ b/of/testApp.cpp	Wed Mar 02 16:23:51 2011 +0000
@@ -21,13 +21,21 @@
   // 	ofEnableAlphaBlending();
    ofSetLineWidth(12);
 
+
 	
 	anubis.loadImage("images/anubis-wall-mask.gif");
 	
 	franklinBook.loadFont("frabk.ttf", 32);
 
 	sender.setup( HOST, PORT );
+	stopSender.setup( HOST, STOPPORT );
 	
+	maxTorsoValues[0] = 0;
+	maxTorsoValues[1] = 0;
+	maxTorsoValues[2] = 0;
+	double timeNow = ofGetElapsedTimeMillis();
+	for (int user = 0;user < NUMBER_OF_USERS;user++)
+	lastRecordedTime[user] = timeNow;
 }
 
 //--------------------------------------------------------------
@@ -36,6 +44,7 @@
 	// update the open ni context and user tracker
 	context.update();
 	user.update();
+
 	
 }
 
@@ -45,15 +54,33 @@
 	ofxTrackedUser* tracked = user.getTrackedUser(userID);
 	
 
-	
-	if (fabs(torso[userID][0] - tracked->left_upper_torso.end.x) + fabs(torso[userID][1] - tracked->left_upper_torso.end.y) > 0.1 && tracked->left_upper_torso.end.x > 0) {
-	userPresent[userID] = true;
+	double timeNow = ofGetElapsedTimeMillis();
+
+		
+		
+		
+		if ((fabs(torso[userID][0] - tracked->left_upper_torso.end.x) + fabs(torso[userID][1] - tracked->left_upper_torso.end.y) > 0.1 && tracked->left_upper_torso.end.x > 0 )){
+			//printf("tracking time %d and last recorded %d\n", timeNow, lastRecordedTime[userID]);
+		userPresent[userID] = true;
+		lastRecordedTime[userID] = timeNow ;
 		torso[userID][0] = tracked->left_upper_torso.end.x;
 		torso[userID][1] = tracked->left_upper_torso.end.y;
 		torso[userID][2] = tracked->left_upper_torso.end.z;
-	}else
-	{
+		
+		checkTorsoMaxima(userID);
+		
+		//recent track, low distance but do nothing yet
+	}
+	else if(userPresent[userID] && 	(timeNow - lastRecordedTime[userID]) > 500 ){
+		//not recent track => stopped
 		userPresent[userID] = false;
+		printf("user %i has STOPPED!\n", userID);
+		torso[userID][0] = tracked->left_upper_torso.end.x;
+		torso[userID][1] = tracked->left_upper_torso.end.y;
+		torso[userID][2] = tracked->left_upper_torso.end.z;
+		
+		sendStopMessageForUser(userID);
+
 	}
 	ofSetColor(0x00FF00);
 	outputString = "HeadX : ";
@@ -62,18 +89,35 @@
 
 }
 
+void testApp::checkTorsoMaxima(int id){
+	for (int h = 0; h < 3;h++){
+	if (torso[id][h] > maxTorsoValues[h])
+		maxTorsoValues[h] = torso[id][h];
+	}
+}
+
 void testApp::sendDataViaOSC(int userID){
 
 	ofxOscMessage m;
 	m.setAddress( "/person" );
 	m.addIntArg( userID );
-	m.addFloatArg( torso[userID][0] );
-	m.addFloatArg( torso[userID][1] );
-	m.addFloatArg( torso[userID][2] );
+	m.addFloatArg( torso[userID][0]/maxTorsoValues[0] );
+	m.addFloatArg( torso[userID][1] /maxTorsoValues[1]);
+	m.addFloatArg( torso[userID][2] /maxTorsoValues[2]);
 	sender.sendMessage( m );
 
 }
 
+void testApp::sendStopMessageForUser(int userID){
+	ofxOscMessage m;
+	m.setAddress( "/stoppedperson" );
+	m.addIntArg( userID );
+	m.addFloatArg( torso[userID][0]/maxTorsoValues[0] );
+	m.addFloatArg( torso[userID][1] /maxTorsoValues[1]);
+	m.addFloatArg( torso[userID][2] /maxTorsoValues[2]);
+	stopSender.sendMessage( m );
+}
+
 //--------------------------------------------------------------
 void testApp::draw(){
 		ofBackground(238,238,224);
@@ -96,6 +140,7 @@
 	for(int i = 0; i < user.getNumTrackedUsers(); ++i) {
 		ofxTrackedUser* tracked = user.getTrackedUser(i);
 		if(tracked != NULL) {
+
 			
 		
 		//andrews code
@@ -136,19 +181,31 @@
 			}
 			
 			//end andrew
-			
+
 			info << i << " neck pos: "
 				 << tracked->left_lower_arm.end.x << " " 
 				 << tracked->left_lower_arm.end.y << " "
 				 << tracked->neck.begin.z << endl; 
+
 			
 			if (tracked->neck.begin.x != 0)
 
+
 			ofSetColor(139,0,0,100);
             
 			ofNoFill();
 			float w = ofGetWidth();
 			float h = ofGetHeight();
+
+
+//		ofBezier(tracked->neck.begin.x,tracked->neck.begin.y,tracked->neck.end.x,tracked->neck.end.y,tracked->left_lower_arm.begin.x,tracked->left_lower_arm.begin.y,tracked->left_lower_arm.end.x,/*tracked->left_lower_arm.end.y*/ w);
+//		ofBezier(tracked->neck.begin.x,tracked->neck.begin.y,tracked->neck.end.x,tracked->neck.end.y,tracked->right_lower_arm.begin.x,tracked->right_lower_arm.begin.y,tracked->right_lower_arm.end.x,/*tracked->right_lower_arm.end.y*/ w);
+//		ofBezier(tracked->neck.begin.x,tracked->neck.begin.y,tracked->neck.end.x,tracked->neck.end.y,tracked->left_lower_leg.begin.x,tracked->left_lower_leg.begin.y,tracked->left_lower_leg.end.x,/*tracked->left_lower_leg.end.y*/ h);
+//		ofBezier(tracked->neck.begin.x,tracked->neck.begin.y,tracked->neck.end.x,tracked->neck.end.y,tracked->right_lower_leg.begin.x,tracked->right_lower_leg.begin.y,tracked->right_lower_leg.end.x,/*tracked->right_lower_leg.end.y*/ h);
+
+		//acid smiley	
+		ofFill();
+=======
             ofBezier(tracked->neck.begin.x,
                      tracked->neck.begin.y,
                      tracked->neck.end.x,
@@ -185,6 +242,7 @@
                     tracked->right_lower_leg.end.x,
                     /*tracked->right_lower_leg.end.y*/ h);
 		ofFill();
+
 		ofSetColor(255,255,100);
 		ofCircle(tracked->neck.begin.x,tracked->neck.begin.y,30);
 		ofSetColor(0);
@@ -196,9 +254,29 @@
 		ofCircle(tracked->neck.begin.x-10.0f,tracked->neck.begin.y,6);
 			
 //		anubis.draw(tracked->neck.begin.x,tracked->neck.begin.y);	
-		
+
+
+ofBezier(tracked->neck.begin.x,tracked->neck.begin.y,tracked->neck.end.x,tracked->neck.end.y,tracked->left_lower_arm.begin.x,tracked->left_lower_arm.begin.y,tracked->left_lower_arm.end.x,/*tracked->left_lower_arm.end.y*/ w);
+ofBezier(tracked->neck.begin.x,tracked->neck.begin.y,tracked->neck.end.x,tracked->neck.end.y,tracked->right_lower_arm.begin.x,tracked->right_lower_arm.begin.y,tracked->right_lower_arm.end.x,/*tracked->right_lower_arm.end.y*/ w);
+ofBezier(tracked->neck.begin.x,tracked->neck.begin.y,tracked->neck.end.x,tracked->neck.end.y,tracked->left_lower_leg.begin.x,tracked->left_lower_leg.begin.y,tracked->left_lower_leg.end.x,/*tracked->left_lower_leg.end.y*/ h);
+ofBezier(tracked->neck.begin.x,tracked->neck.begin.y,tracked->neck.end.x,tracked->neck.end.y,tracked->right_lower_leg.begin.x,tracked->right_lower_leg.begin.y,tracked->right_lower_leg.end.x,/*tracked->right_lower_leg.end.y*/ h);
+ofFill();
+ofSetColor(255,255,100);
+	ofCircle(tracked->neck.begin.x,tracked->neck.begin.y,30);
+ofSetColor(0);
+ofCircle(tracked->neck.begin.x,tracked->neck.begin.y,35);
+ofSetColor(255,255,100);
+	ofCircle(tracked->neck.begin.x,tracked->neck.begin.y,30);
+	ofSetColor(0);
+ofCircle(tracked->neck.begin.x+10.0f,tracked->neck.begin.y,6);
+ofCircle(tracked->neck.begin.x-10.0f,tracked->neck.begin.y,6);
+
+		}
+	}
+=======
         }
     }
+>>>>>>> other
 	
 	//faint rectangle?
 	ofFill();
--- a/of/testApp.h	Wed Mar 02 16:22:37 2011 +0000
+++ b/of/testApp.h	Wed Mar 02 16:23:51 2011 +0000
@@ -7,9 +7,10 @@
 #include "ofMain.h"
 #include "ofxOpenNI.h"
 #include "ofxOsc.h"
-
+#define NUMBER_OF_USERS 6
 #define HOST "localhost"
-#define PORT 12346
+#define PORT 12344
+#define STOPPORT 12343
 
 class testApp : public ofBaseApp{
 
@@ -33,17 +34,21 @@
 		ofxUserGenerator user;
 		ofxImageGenerator image;
 		//ofImage Davy;
+	void sendStopMessageForUser(int userID);
 	
 		ofImage anubis;
 		bool drawIt;
+	
+	float maxTorsoValues[3];
+	void checkTorsoMaxima(int id);
 
-
+	double lastRecordedTime[6];//x,y,and z of the head
 	float torso[6][3];//x,y,and z of the head
 	bool userPresent[6];
 	
 	ofTrueTypeFont franklinBook;
 	string outputString;
-	ofxOscSender sender;
+	ofxOscSender sender, stopSender;
 	
 };
 #endif
--- a/tim_grid_mapper/grid_mapper.py	Wed Mar 02 16:22:37 2011 +0000
+++ b/tim_grid_mapper/grid_mapper.py	Wed Mar 02 16:23:51 2011 +0000
@@ -18,9 +18,18 @@
                  # make noise).
 
 #### OSC OPTIONS - THESE NEED TO BE SET MANUALLY ####
-my_port = 12344 # to receive OSC messages
-joe     = ('localhost', 12345)
-ableton = ('localhost', 12346)
+my_port = 12343 # to receive OSC messages from kinect
+
+debugging = True # display incoming packets
+
+# Both joe and ableton ip addresses are now read from the file ip_addresses.txt
+# which is written to by the set_ip_addresses() function.
+
+#joe     = ('localhost', 12346)#changed by andrew - python sending to joe 
+#ableton = ('localhost', 12345)#changed by andrew - max receiving from Joe
+ip_address_file = 'ip_addresses.txt'
+ableton = None ### THESE WILL BE SET AUTOMATICALLY BELOW
+joe = None     ### DO NOT CHANGE THEM HERE
 
 ### Constants for grid mapping:
 # The range of values that the input coordinates and output values may take:
@@ -93,7 +102,7 @@
 	message = OSCMessage(address)
 	message.extend(data)
 	client.sendto(message, ableton)
-	print('\n==OSC Output "%s" to Ableton %s:==\n    %s' % (address, ableton, data))
+#	print('\n==OSC Output "%s" to Ableton %s:==\n    %s' % (address, ableton, data))
 	
 
 
@@ -115,13 +124,23 @@
 	currently_playing[channel] = None
 
 
+def stopperson_handler(address, tags, data, clinet_address):
+	''' Handles OSC input matching 'stopperson'
+	
+	Called when a person leaves the screen.
+	'''
+	flush(data[0])
+
 def person_handler(address, tags, data, client_address):
 	''' Handles OSC input matching the 'person' tag.
 	
 	`data` should be in form [person_id, x, y, z]
 	'''
+	if debugging:
+		print('Received packet:')
+		print(str(data))
 	pitch, velocity, channel, cc1, cc2 = grid_map(*data)
-	
+	channel = channel + 1 
 	cc1, cc2 = int(round(cc1)), int(round(cc2))
 	if cc1 != last_value_sent[(channel, 1)]:
 		send_to_ableton([channel, 1, cc1], '/cc')
@@ -129,7 +148,7 @@
 	if cc2 != last_value_sent[(channel, 2)]:
 		send_to_ableton([channel, 2, cc2], '/cc')
 		last_value_sent[(channel, 2)] = cc2		
-
+	
 	
 	## Format data for Joe - done using Specification.txt on 2011-02-15
 	
@@ -217,18 +236,12 @@
 def start():
 	'''Set up OSC servers and start the program running.
 	'''
-	global joe, ableton, server
-	if joe[1] == "THIS_MUST_BE_SET":
-		joe_port = input("Enter port number on %s for Joe's synth software: " % joe[0])
-		joe = (joe[0], joe_port)
-	
-	if ableton[1] == "THIS_MUST_BE_SET":
-		ableton_port = input("Enter port number on %s for Ableton: " % ableton[0])
-		ableton = (ableton[0], ableton_port)
-
+	global server
+	set_ip_addresses()
 	server = ThreadingOSCServer(('localhost', my_port))
 	# Register OSC callbacks:
 	server.addMsgHandler('/person', person_handler)
+	server.addMsgHandler('/stopperson', stopperson_handler)
 	t = Thread(target=server.serve_forever)
 	t.start()
 	if server.running and t.is_alive():
@@ -250,13 +263,77 @@
 		else:
 			print('Error: server has been told to close but is still running.')
 
+
+def get_ip_addresses_from_file(filename=ip_address_file):
+	'''Load up ip addresses from a file in the format saved by the 
+	set_ip_addresses function.
+	'''
+	f = open(filename, 'r')
+	lines = f.readlines()
+	global ableton, joe
+	ableton = eval(lines[1].split('#')[0].strip()) # set ableton
+	joe = eval(lines[2].split('#')[0].strip()) # set joe
+	if not ableton:
+		print('Failed to set IP for Ableton from file.')
+		
+	if not joe:
+		print('Failed to set IP for Joe from file.')
+	f.close()
+	
+
+
+def set_ip_addresses(save_file=ip_address_file):
+	'''Manually set IP addresses based on input from user. IPs are then saved to
+	a file.
+	'''
+	global joe, ableton
+	if not joe: joe = ('localhost', 12346)
+	if not ableton: ableton = ('localhost', 12345)
+	# set joe
+	try:
+		new_joe = eval(raw_input("Enter IP address and port for Joe in form: "+str(joe)+' or leave blank to keep that address.\n'))
+	except:
+		new_joe = None
+	if new_joe: joe = new_joe
+	print("Address for Joe: "+str(joe)+"\n")
+	# set ableton
+	try:
+		new_ableton = eval(raw_input('Enter IP address and port for Ableton in form: '+str(ableton)+' or leave blank to keep that address.\n'))
+	except:
+		new_ableton = None
+	if new_ableton: ableton = new_ableton
+	print('Address for Ableton: '+str(ableton)+'\n')
+	# save to file
+	if new_ableton or new_joe:
+		print('Writing new addresses to file %s.' % save_file)
+		try:
+			f = open(save_file, 'w')
+			f.write(
+'''# This is a cache. These addresses will be overridden by Python if you set something different. Do not leave comments here they will be overridden
+%s # set Ableton IP and port
+%s     # set Joe's processing IP and port
+''' % (str(ableton),str(joe))
+			)
+			f.flush()
+			f.close()
+		except IOError:
+			print('SAVE FAILED.')
+			
+
+
+
+
+get_ip_addresses_from_file(ip_address_file)
+
+
 if __name__=='__main__':
 	start()
 	while True:
 		try:
-			print(repr(input()))
+			print(eval(input()))
 		except Exception as e:
 			print('Caught %s:' % repr(e))
 			exception = e
 			trace = traceback.format_exc()
 			print('Exception saved as `exception`. Stack trace saved as `trace`.')
+