diff --git a/hss-distributed-server.maxpat b/hss-distributed-server.maxpat index 6716ebe..fee52f5 100644 --- a/hss-distributed-server.maxpat +++ b/hss-distributed-server.maxpat @@ -10,7 +10,7 @@ } , "classnamespace" : "box", - "rect" : [ 34.0, 100.0, 1422.0, 813.0 ], + "rect" : [ 29.0, 100.0, 1429.0, 813.0 ], "bglocked" : 0, "openinpresentation" : 0, "default_fontsize" : 12.0, @@ -40,19 +40,120 @@ "assistshowspatchername" : 0, "boxes" : [ { "box" : { - "id" : "obj-126", + "id" : "obj-47", "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 1070.0, 169.0, 61.0, 22.0 ], - "text" : "list.slice 1" + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 914.0, 294.0, 32.0, 22.0 ], + "text" : "print" } } , { "box" : { - "id" : "obj-125", + "id" : "obj-23", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 1215.5, 220.0, 82.0, 22.0 ], + "presentation_linecount" : 2, + "text" : "getSection $1" + } + + } +, { + "box" : { + "id" : "obj-3", + "linecount" : 2, + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 1222.0, 96.0, 95.0, 35.0 ], + "presentation_linecount" : 3, + "text" : "readPiece HSSPieces.json" + } + + } +, { + "box" : { + "id" : "obj-200", + "items" : "DefaultSetting", + "maxclass" : "umenu", + "numinlets" : 1, + "numoutlets" : 3, + "outlettype" : [ "int", "", "" ], + "parameter_enable" : 0, + "patching_rect" : [ 1162.0, 188.0, 126.0, 22.0 ], + "pattrmode" : 1, + "varname" : "currentPiece" + } + + } +, { + "box" : { + "id" : "obj-188", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 809.5, 121.5, 51.0, 20.0 ], + "text" : "Valence" + } + + } +, { + "box" : { + "id" : "obj-187", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 720.5, 53.5, 49.0, 20.0 ], + "text" : "Arousal" + } + + } +, { + "box" : { + "id" : "obj-185", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 612.5, 139.0, 89.0, 22.0 ], + "text" : "displayknob $1" + } + + } +, { + "box" : { + "id" : "obj-182", + "items" : [ "Create", "Presets", ",", "Navigate", "Space" ], + "maxclass" : "umenu", + "numinlets" : 1, + "numoutlets" : 3, + "outlettype" : [ "int", "", "" ], + "parameter_enable" : 0, + "patching_rect" : [ 612.5, 90.0, 128.0, 22.0 ] + } + + } +, { + "box" : { + "id" : "obj-181", + "int" : 1, + "maxclass" : "gswitch2", + "numinlets" : 2, + "numoutlets" : 2, + "outlettype" : [ "", "" ], + "parameter_enable" : 0, + "patching_rect" : [ 858.5, 149.0, 39.0, 32.0 ] + } + + } +, { + "box" : { + "id" : "obj-180", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, @@ -68,7 +169,7 @@ } , "classnamespace" : "box", - "rect" : [ 0.0, 0.0, 640.0, 480.0 ], + "rect" : [ 59.0, 119.0, 640.0, 480.0 ], "bglocked" : 0, "openinpresentation" : 0, "default_fontsize" : 12.0, @@ -98,124 +199,124 @@ "assistshowspatchername" : 0, "boxes" : [ { "box" : { - "id" : "obj-122", + "id" : "obj-177", "maxclass" : "newobj", "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 141.0, 154.0, 53.0, 22.0 ], - "text" : "list.nth 2" - } - - } -, { - "box" : { - "id" : "obj-116", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 50.0, 143.0, 55.0, 22.0 ], - "text" : "list.join 1" - } - - } -, { - "box" : { - "id" : "obj-114", - "maxclass" : "newobj", - "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 140.0, 128.0, 147.0, 22.0 ], - "text" : "fromsymbol @separator ::" + "patching_rect" : [ 50.0, 193.0, 61.0, 22.0 ], + "text" : "pack f f" } } , { "box" : { - "id" : "obj-113", + "id" : "obj-173", + "maxclass" : "newobj", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "float" ], + "patching_rect" : [ 92.0, 163.0, 29.5, 22.0 ], + "text" : "!- 1." + } + + } +, { + "box" : { + "id" : "obj-172", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "float", "float" ], + "patching_rect" : [ 50.0, 130.0, 61.0, 22.0 ], + "text" : "unpack f f" + } + + } +, { + "box" : { + "id" : "obj-168", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 2, "outlettype" : [ "", "" ], - "patching_rect" : [ 140.0, 100.0, 61.0, 22.0 ], - "text" : "list.slice 1" + "patching_rect" : [ 50.0, 100.0, 75.0, 22.0 ], + "text" : "route mouse" } } , { "box" : { "comment" : "", - "id" : "obj-123", + "id" : "obj-178", "index" : 1, "maxclass" : "inlet", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 140.0, 40.0, 30.0, 30.0 ] + "patching_rect" : [ 50.0, 40.0, 30.0, 30.0 ] } } , { "box" : { "comment" : "", - "id" : "obj-124", + "id" : "obj-179", "index" : 1, "maxclass" : "outlet", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 50.0, 244.134766000000013, 30.0, 30.0 ] + "patching_rect" : [ 50.0, 275.0, 30.0, 30.0 ] } } ], "lines" : [ { "patchline" : { - "destination" : [ "obj-114", 0 ], - "source" : [ "obj-113", 0 ] + "destination" : [ "obj-172", 0 ], + "source" : [ "obj-168", 0 ] } } , { "patchline" : { - "destination" : [ "obj-116", 1 ], - "source" : [ "obj-113", 1 ] + "destination" : [ "obj-173", 0 ], + "source" : [ "obj-172", 1 ] } } , { "patchline" : { - "destination" : [ "obj-122", 0 ], - "source" : [ "obj-114", 0 ] + "destination" : [ "obj-177", 0 ], + "source" : [ "obj-172", 0 ] } } , { "patchline" : { - "destination" : [ "obj-124", 0 ], - "source" : [ "obj-116", 0 ] + "destination" : [ "obj-177", 1 ], + "source" : [ "obj-173", 0 ] } } , { "patchline" : { - "destination" : [ "obj-116", 0 ], - "source" : [ "obj-122", 0 ] + "destination" : [ "obj-179", 0 ], + "source" : [ "obj-177", 0 ] } } , { "patchline" : { - "destination" : [ "obj-113", 0 ], - "source" : [ "obj-123", 0 ] + "destination" : [ "obj-168", 0 ], + "source" : [ "obj-178", 0 ] } } ] } , - "patching_rect" : [ 941.0, 98.0, 19.0, 22.0 ], + "patching_rect" : [ 878.5, 188.0, 55.0, 22.0 ], "saved_object_attributes" : { "description" : "", "digest" : "", @@ -223,20 +324,481 @@ "tags" : "" } , - "text" : "p" + "text" : "p mouse" } } , { "box" : { - "id" : "obj-110", + "id" : "obj-165", + "int" : 1, + "maxclass" : "gswitch2", + "numinlets" : 2, + "numoutlets" : 2, + "outlettype" : [ "", "" ], + "parameter_enable" : 0, + "patching_rect" : [ 751.5, 149.0, 39.0, 32.0 ] + } + + } +, { + "box" : { + "id" : "obj-164", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 1053.0, 55.0, 178.0, 22.0 ], - "presentation_linecount" : 3, - "text" : "get DefaultSetting::networkData" + "patching_rect" : [ 806.5, 188.0, 47.0, 22.0 ], + "text" : "clearall" + } + + } +, { + "box" : { + "id" : "obj-160", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patcher" : { + "fileversion" : 1, + "appversion" : { + "major" : 8, + "minor" : 6, + "revision" : 2, + "architecture" : "x64", + "modernui" : 1 + } +, + "classnamespace" : "box", + "rect" : [ 84.0, 144.0, 640.0, 480.0 ], + "bglocked" : 0, + "openinpresentation" : 0, + "default_fontsize" : 12.0, + "default_fontface" : 0, + "default_fontname" : "Arial", + "gridonopen" : 1, + "gridsize" : [ 15.0, 15.0 ], + "gridsnaponopen" : 1, + "objectsnaponopen" : 1, + "statusbarvisible" : 2, + "toolbarvisible" : 1, + "lefttoolbarpinned" : 0, + "toptoolbarpinned" : 0, + "righttoolbarpinned" : 0, + "bottomtoolbarpinned" : 0, + "toolbars_unpinned_last_save" : 0, + "tallnewobj" : 0, + "boxanimatetime" : 200, + "enablehscroll" : 1, + "enablevscroll" : 1, + "devicewidth" : 0.0, + "description" : "", + "digest" : "", + "tags" : "", + "style" : "", + "subpatcher_template" : "", + "assistshowspatchername" : 0, + "boxes" : [ { + "box" : { + "id" : "obj-157", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 234.0, 189.0, 45.0, 22.0 ], + "text" : "store 5" + } + + } +, { + "box" : { + "id" : "obj-156", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 188.0, 189.0, 45.0, 22.0 ], + "text" : "store 4" + } + + } +, { + "box" : { + "id" : "obj-155", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 142.0, 189.0, 45.0, 22.0 ], + "text" : "store 3" + } + + } +, { + "box" : { + "id" : "obj-154", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 97.0, 189.0, 45.0, 22.0 ], + "text" : "store 2" + } + + } +, { + "box" : { + "id" : "obj-153", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 50.0, 189.0, 45.0, 22.0 ], + "text" : "store 1" + } + + } +, { + "box" : { + "id" : "obj-150", + "maxclass" : "newobj", + "numinlets" : 2, + "numoutlets" : 2, + "outlettype" : [ "bang", "" ], + "patching_rect" : [ 234.0, 158.0, 34.0, 22.0 ], + "text" : "sel 1" + } + + } +, { + "box" : { + "id" : "obj-149", + "maxclass" : "newobj", + "numinlets" : 2, + "numoutlets" : 2, + "outlettype" : [ "bang", "" ], + "patching_rect" : [ 188.0, 158.0, 34.0, 22.0 ], + "text" : "sel 1" + } + + } +, { + "box" : { + "id" : "obj-148", + "maxclass" : "newobj", + "numinlets" : 2, + "numoutlets" : 2, + "outlettype" : [ "bang", "" ], + "patching_rect" : [ 142.0, 158.0, 34.0, 22.0 ], + "text" : "sel 1" + } + + } +, { + "box" : { + "id" : "obj-147", + "maxclass" : "newobj", + "numinlets" : 2, + "numoutlets" : 2, + "outlettype" : [ "bang", "" ], + "patching_rect" : [ 97.0, 158.0, 34.0, 22.0 ], + "text" : "sel 1" + } + + } +, { + "box" : { + "id" : "obj-146", + "maxclass" : "newobj", + "numinlets" : 2, + "numoutlets" : 2, + "outlettype" : [ "bang", "" ], + "patching_rect" : [ 50.0, 158.0, 34.0, 22.0 ], + "text" : "sel 1" + } + + } +, { + "box" : { + "id" : "obj-145", + "maxclass" : "newobj", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "int" ], + "patching_rect" : [ 233.0, 131.0, 36.0, 22.0 ], + "text" : "> 0.8" + } + + } +, { + "box" : { + "id" : "obj-144", + "maxclass" : "newobj", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "int" ], + "patching_rect" : [ 187.0, 131.0, 36.0, 22.0 ], + "text" : "> 0.8" + } + + } +, { + "box" : { + "id" : "obj-143", + "maxclass" : "newobj", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "int" ], + "patching_rect" : [ 142.0, 131.0, 36.0, 22.0 ], + "text" : "> 0.8" + } + + } +, { + "box" : { + "id" : "obj-142", + "maxclass" : "newobj", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "int" ], + "patching_rect" : [ 96.0, 131.0, 36.0, 22.0 ], + "text" : "> 0.8" + } + + } +, { + "box" : { + "id" : "obj-141", + "maxclass" : "newobj", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "int" ], + "patching_rect" : [ 50.0, 131.0, 36.0, 22.0 ], + "text" : "> 0.8" + } + + } +, { + "box" : { + "id" : "obj-140", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 5, + "outlettype" : [ "float", "float", "float", "float", "float" ], + "patching_rect" : [ 50.0, 100.0, 202.0, 22.0 ], + "text" : "unpack f f f f f" + } + + } +, { + "box" : { + "comment" : "", + "id" : "obj-158", + "index" : 1, + "maxclass" : "inlet", + "numinlets" : 0, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 50.0, 40.0, 30.0, 30.0 ] + } + + } +, { + "box" : { + "comment" : "", + "id" : "obj-159", + "index" : 1, + "maxclass" : "outlet", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 136.200012000000015, 271.0, 30.0, 30.0 ] + } + + } + ], + "lines" : [ { + "patchline" : { + "destination" : [ "obj-141", 0 ], + "source" : [ "obj-140", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-142", 0 ], + "source" : [ "obj-140", 1 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-143", 0 ], + "source" : [ "obj-140", 2 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-144", 0 ], + "source" : [ "obj-140", 3 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-145", 0 ], + "source" : [ "obj-140", 4 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-146", 0 ], + "source" : [ "obj-141", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-147", 0 ], + "source" : [ "obj-142", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-148", 0 ], + "source" : [ "obj-143", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-149", 0 ], + "source" : [ "obj-144", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-150", 0 ], + "source" : [ "obj-145", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-153", 0 ], + "source" : [ "obj-146", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-154", 0 ], + "source" : [ "obj-147", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-155", 0 ], + "source" : [ "obj-148", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-156", 0 ], + "source" : [ "obj-149", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-157", 0 ], + "source" : [ "obj-150", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-159", 0 ], + "source" : [ "obj-153", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-159", 0 ], + "source" : [ "obj-154", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-159", 0 ], + "source" : [ "obj-155", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-159", 0 ], + "source" : [ "obj-156", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-159", 0 ], + "source" : [ "obj-157", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-140", 0 ], + "source" : [ "obj-158", 0 ] + } + + } + ] + } +, + "patching_rect" : [ 751.5, 188.0, 45.0, 22.0 ], + "saved_object_attributes" : { + "description" : "", + "digest" : "", + "globalpatchername" : "", + "tags" : "" + } +, + "text" : "p store" + } + + } +, { + "box" : { + "clickmoveinactive" : 0, + "displayknob" : 1, + "filternodeschanges" : 1, + "id" : "obj-132", + "knobcolor" : [ 0.929411764705882, 0.929411764705882, 0.352941176470588, 0.79 ], + "maxclass" : "nodes", + "mousemode" : 2, + "nodenumber" : 5, + "nodesnames" : [ "1", "2", "3", "4", "5" ], + "nsize" : [ 0.1, 0.1, 0.1, 0.1, 0.1 ], + "numinlets" : 1, + "numoutlets" : 3, + "outlettype" : [ "", "", "" ], + "parameter_enable" : 0, + "patching_rect" : [ 771.5, 8.5, 126.0, 115.0 ], + "varname" : "nodes", + "xplace" : [ 0.5, 0.1, 0.9, 0.9, 0.1 ], + "yplace" : [ 0.5, 0.1, 0.1, 0.9, 0.9 ] } } @@ -247,165 +809,10 @@ "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 1240.0, 384.0, 64.0, 22.0 ], - "presentation_linecount" : 3, + "patching_rect" : [ 1151.0, 96.0, 64.0, 22.0 ], "text" : "writePiece" } - } -, { - "box" : { - "id" : "obj-84", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 735.5, 173.0, 50.0, 22.0 ], - "text" : "0" - } - - } -, { - "box" : { - "id" : "obj-82", - "maxclass" : "toggle", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "int" ], - "parameter_enable" : 0, - "patching_rect" : [ 719.0, 55.0, 24.0, 24.0 ] - } - - } -, { - "box" : { - "id" : "obj-80", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 719.0, 92.0, 83.0, 22.0 ], - "text" : "radiogroup $1" - } - - } -, { - "box" : { - "id" : "obj-77", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 719.0, 126.0, 57.0, 22.0 ], - "text" : "universal" - } - - } -, { - "box" : { - "disabled" : [ 0 ], - "flagmode" : 1, - "id" : "obj-76", - "itemtype" : 0, - "maxclass" : "radiogroup", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "parameter_enable" : 0, - "patching_rect" : [ 603.0, 126.0, 18.0, 18.0 ], - "size" : 1, - "value" : 0 - } - - } -, { - "box" : { - "disabled" : [ 0 ], - "id" : "obj-75", - "itemtype" : 0, - "maxclass" : "radiogroup", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "parameter_enable" : 0, - "patching_rect" : [ 658.0, 179.0, 18.0, 18.0 ], - "size" : 1, - "value" : 0 - } - - } -, { - "box" : { - "disabled" : [ 0 ], - "id" : "obj-74", - "itemtype" : 0, - "maxclass" : "radiogroup", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "parameter_enable" : 0, - "patching_rect" : [ 548.0, 179.0, 18.0, 18.0 ], - "size" : 1, - "value" : 0 - } - - } -, { - "box" : { - "disabled" : [ 0 ], - "id" : "obj-73", - "itemtype" : 0, - "maxclass" : "radiogroup", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "parameter_enable" : 0, - "patching_rect" : [ 658.0, 71.0, 18.0, 18.0 ], - "size" : 1, - "value" : 0 - } - - } -, { - "box" : { - "disabled" : [ 0 ], - "id" : "obj-72", - "itemtype" : 0, - "maxclass" : "radiogroup", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "parameter_enable" : 0, - "patching_rect" : [ 548.0, 71.0, 18.0, 18.0 ], - "size" : 1, - "value" : 0 - } - - } -, { - "box" : { - "angle" : 270.0, - "bgcolor" : [ 0.2, 0.2, 0.2, 1.0 ], - "id" : "obj-71", - "maxclass" : "panel", - "mode" : 0, - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 548.0, 71.0, 128.0, 128.0 ], - "proportion" : 0.5 - } - - } -, { - "box" : { - "id" : "obj-59", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 941.0, 131.0, 148.0, 22.0 ], - "text" : "route networkData" - } - } , { "box" : { @@ -425,7 +832,7 @@ } , "classnamespace" : "box", - "rect" : [ 267.0, 100.0, 1095.0, 811.0 ], + "rect" : [ 170.0, 100.0, 1244.0, 670.0 ], "bglocked" : 0, "openinpresentation" : 0, "default_fontsize" : 12.0, @@ -453,114 +860,101 @@ "style" : "", "subpatcher_template" : "", "assistshowspatchername" : 0, - "visible" : 1, "boxes" : [ { "box" : { - "id" : "obj-187", + "id" : "obj-35", "maxclass" : "newobj", + "numinlets" : 2, + "numoutlets" : 2, + "outlettype" : [ "", "" ], + "patching_rect" : [ 411.199999999999989, 109.0, 55.0, 22.0 ], + "text" : "zl.slice 3" + } + + } +, { + "box" : { + "id" : "obj-27", + "maxclass" : "button", "numinlets" : 1, "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 557.0, 743.0, 99.0, 22.0 ], - "text" : "prepend readNet" + "outlettype" : [ "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 51.0, 54.0, 24.0, 24.0 ] } } , { "box" : { - "id" : "obj-188", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "", "", "" ], - "patching_rect" : [ 557.0, 690.0, 154.0, 22.0 ], - "restore" : [ "Macintosh HD:/Users/Shared/Max 8/Library/healing-soundscapes/" ], - "saved_object_attributes" : { - "parameter_enable" : 0, - "parameter_mappable" : 0 - } -, - "text" : "pattr @bindto path @thru 0", - "varname" : "u793060539[3]" - } - - } -, { - "box" : { - "id" : "obj-189", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "bang", "temp.txt" ], - "patching_rect" : [ 557.0, 663.0, 120.0, 22.0 ], - "text" : "t b temp.txt" - } - - } -, { - "box" : { - "id" : "obj-190", - "maxclass" : "newobj", + "id" : "obj-24", + "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 557.0, 717.0, 120.0, 22.0 ], - "text" : "sprintf symout %s%s" + "patching_rect" : [ 324.75, 231.0, 69.0, 22.0 ], + "text" : "train 10000" } } , { "box" : { - "id" : "obj-186", + "id" : "obj-21", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 720.0, 743.0, 81.0, 22.0 ], - "text" : "prepend write" + "patching_rect" : [ 17.0, 210.0, 92.0, 22.0 ], + "text" : "prepend predict" } } , { "box" : { - "id" : "obj-183", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "", "", "" ], - "patching_rect" : [ 720.0, 690.0, 154.0, 22.0 ], - "restore" : [ "Macintosh HD:/Users/Shared/Max 8/Library/healing-soundscapes/" ], - "saved_object_attributes" : { - "parameter_enable" : 0, - "parameter_mappable" : 0 - } -, - "text" : "pattr @bindto path @thru 0", - "varname" : "u793060539[2]" - } - - } -, { - "box" : { - "id" : "obj-184", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "bang", "temp.txt" ], - "patching_rect" : [ 720.0, 663.0, 120.0, 22.0 ], - "text" : "t b temp.txt" - } - - } -, { - "box" : { - "id" : "obj-185", - "maxclass" : "newobj", + "id" : "obj-11", + "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 720.0, 717.0, 120.0, 22.0 ], - "text" : "sprintf symout %s%s" + "patching_rect" : [ 267.75, 163.0, 107.0, 22.0 ], + "presentation_linecount" : 2, + "text" : "script start 2 96 48" + } + + } +, { + "box" : { + "id" : "obj-4", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 359.75, 357.0, 86.0, 22.0 ], + "text" : "dump_weights" + } + + } +, { + "box" : { + "id" : "obj-38", + "maxclass" : "newobj", + "numinlets" : 4, + "numoutlets" : 4, + "outlettype" : [ "", "", "", "" ], + "patching_rect" : [ 232.75, 320.0, 210.0, 22.0 ], + "text" : "route list weights training_done" + } + + } +, { + "box" : { + "comment" : "", + "id" : "obj-191", + "index" : 1, + "maxclass" : "inlet", + "numinlets" : 0, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 17.0, 6.0, 30.0, 30.0 ] } } @@ -571,87 +965,8 @@ "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 137.0, 112.0, 54.0, 22.0 ], - "text" : "deferlow" - } - - } -, { - "box" : { - "id" : "obj-176", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 489.0, 555.0, 100.0, 22.0 ], - "text" : "prepend writeNet" - } - - } -, { - "box" : { - "id" : "obj-177", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "", "", "" ], - "patching_rect" : [ 489.0, 502.0, 154.0, 22.0 ], - "restore" : [ "Macintosh HD:/Users/Shared/Max 8/Library/healing-soundscapes/" ], - "saved_object_attributes" : { - "parameter_enable" : 0, - "parameter_mappable" : 0 - } -, - "text" : "pattr @bindto path @thru 0", - "varname" : "u793060539[1]" - } - - } -, { - "box" : { - "id" : "obj-178", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "bang", "temp.txt" ], - "patching_rect" : [ 489.0, 475.0, 120.0, 22.0 ], - "text" : "t b temp.txt" - } - - } -, { - "box" : { - "id" : "obj-179", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 489.0, 529.0, 120.0, 22.0 ], - "text" : "sprintf symout %s%s" - } - - } -, { - "box" : { - "id" : "obj-168", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "bang", "bang", "bang" ], - "patching_rect" : [ 317.0, 522.0, 42.0, 22.0 ], - "text" : "t b b b" - } - - } -, { - "box" : { - "id" : "obj-165", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 230.0, 580.0, 103.0, 22.0 ], - "text" : "pull_from_coll net" + "patching_rect" : [ 232.75, 114.0, 19.0, 22.0 ], + "text" : "t l" } } @@ -662,7 +977,7 @@ "numinlets" : 2, "numoutlets" : 5, "outlettype" : [ "dictionary", "", "", "", "" ], - "patching_rect" : [ 251.0, 626.0, 61.0, 22.0 ], + "patching_rect" : [ 296.75, 531.0, 61.0, 22.0 ], "saved_object_attributes" : { "embed" : 0, "legacy" : 0, @@ -673,144 +988,16 @@ "text" : "dict" } - } -, { - "box" : { - "id" : "obj-167", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 340.0, 580.0, 35.0, 22.0 ], - "text" : "clear" - } - - } -, { - "box" : { - "id" : "obj-164", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "bang", "dump", "reset" ], - "patching_rect" : [ 317.0, 488.0, 151.0, 22.0 ], - "text" : "t b dump reset" - } - - } -, { - "box" : { - "id" : "obj-162", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 531.0, 346.0, 80.0, 22.0 ], - "text" : "prepend read" - } - - } -, { - "box" : { - "id" : "obj-150", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "", "", "" ], - "patching_rect" : [ 532.0, 117.0, 145.0, 22.0 ], - "restore" : [ "Macintosh HD:/Users/Shared/Max 8/Library/healing-soundscapes/" ], - "saved_object_attributes" : { - "parameter_enable" : 0, - "parameter_mappable" : 0 - } -, - "text" : "pattr path @autorestore 0", - "varname" : "path" - } - - } -, { - "box" : { - "id" : "obj-149", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 484.0, 85.0, 67.0, 22.0 ], - "save" : [ "#N", "thispatcher", ";", "#Q", "end", ";" ], - "text" : "thispatcher" - } - - } -, { - "box" : { - "id" : "obj-148", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 484.0, 43.0, 87.0, 22.0 ], - "text" : "loadmess path" - } - - } -, { - "box" : { - "id" : "obj-122", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "bang", "" ], - "patching_rect" : [ 485.5, 312.0, 54.0, 22.0 ], - "text" : "sel done" - } - - } -, { - "box" : { - "id" : "obj-121", - "maxclass" : "newobj", - "numinlets" : 3, - "numoutlets" : 3, - "outlettype" : [ "", "", "" ], - "patching_rect" : [ 485.5, 282.0, 110.0, 22.0 ], - "text" : "route train writeNet" - } - - } -, { - "box" : { - "id" : "obj-113", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 309.0, 103.0, 55.0, 22.0 ], - "text" : "zl.slice 2" - } - } , { "box" : { "id" : "obj-99", "maxclass" : "newobj", - "numinlets" : 5, - "numoutlets" : 5, - "outlettype" : [ "", "", "", "", "" ], - "patching_rect" : [ 137.0, 53.0, 191.0, 22.0 ], - "text" : "routepass train addPat clear piece" - } - - } -, { - "box" : { - "id" : "obj-97", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 142.0, 355.5, 69.0, 22.0 ], - "text" : "viewsource" + "numinlets" : 6, + "numoutlets" : 6, + "outlettype" : [ "", "", "", "", "", "" ], + "patching_rect" : [ 176.0, 55.0, 313.0, 22.0 ], + "text" : "routepass predict train clear_data set_weights data_point" } } @@ -822,7 +1009,7 @@ "maxclass" : "outlet", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 228.0, 731.0, 30.0, 30.0 ] + "patching_rect" : [ 232.75, 611.0, 30.0, 30.0 ] } } @@ -830,152 +1017,12 @@ "box" : { "comment" : "", "id" : "obj-94", - "index" : 1, - "maxclass" : "inlet", - "numinlets" : 0, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 137.0, 4.0, 30.0, 30.0 ] - } - - } -, { - "box" : { - "id" : "obj-93", - "linecount" : 2, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 478.0, 4.0, 238.0, 33.0 ], - "text" : "get 5 presets at 20 parameters for 4 corners and 1 midpoint from piecemaker.js" - } - - } -, { - "box" : { - "comment" : "", - "id" : "obj-87", "index" : 2, "maxclass" : "inlet", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 686.0, 475.0, 30.0, 30.0 ] - } - - } -, { - "box" : { - "id" : "obj-85", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "bang", "bang", "" ], - "patching_rect" : [ 686.0, 544.0, 83.0, 22.0 ], - "text" : "t b b l" - } - - } -, { - "box" : { - "id" : "obj-83", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 786.0, 629.0, 62.0, 22.0 ], - "text" : "append cr" - } - - } -, { - "box" : { - "id" : "obj-82", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 750.0, 603.0, 55.0, 22.0 ], - "text" : "zl.slice 1" - } - - } -, { - "box" : { - "id" : "obj-78", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 5, - "outlettype" : [ "dictionary", "", "", "", "" ], - "patching_rect" : [ 686.0, 516.0, 61.0, 22.0 ], - "saved_object_attributes" : { - "embed" : 0, - "legacy" : 0, - "parameter_enable" : 0, - "parameter_mappable" : 0 - } -, - "text" : "dict" - } - - } -, { - "box" : { - "id" : "obj-76", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "", "bang", "int" ], - "patching_rect" : [ 786.0, 779.0, 40.0, 22.0 ], - "text" : "text" - } - - } -, { - "box" : { - "id" : "obj-73", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 750.0, 575.0, 47.0, 22.0 ], - "text" : "dict.iter" - } - - } -, { - "box" : { - "id" : "obj-68", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 383.0, 608.0, 45.0, 22.0 ], - "text" : "t l l" - } - - } -, { - "box" : { - "id" : "obj-67", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "int" ], - "patching_rect" : [ 409.0, 661.0, 29.5, 22.0 ], - "text" : "- 1" - } - - } -, { - "box" : { - "id" : "obj-64", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 383.0, 690.0, 45.0, 22.0 ], - "text" : "zl.slice" + "patching_rect" : [ 176.0, 6.0, 30.0, 30.0 ] } } @@ -988,7 +1035,7 @@ "candicane6" : [ 0.733333333333333, 0.035294117647059, 0.788235294117647, 1.0 ], "candicane7" : [ 0.87843137254902, 0.243137254901961, 0.145098039215686, 1.0 ], "candicane8" : [ 0.027450980392157, 0.447058823529412, 0.501960784313725, 1.0 ], - "candycane" : 22, + "candycane" : 12, "contdata" : 1, "id" : "obj-61", "maxclass" : "multislider", @@ -996,9 +1043,9 @@ "numoutlets" : 2, "outlettype" : [ "", "" ], "parameter_enable" : 0, - "patching_rect" : [ 228.0, 370.0, 738.0, 90.0 ], + "patching_rect" : [ 232.75, 421.0, 738.0, 90.0 ], "setminmax" : [ 0.0, 1.0 ], - "size" : 88 + "size" : 96 } } @@ -1011,7 +1058,7 @@ "candicane6" : [ 0.733333333333333, 0.035294117647059, 0.788235294117647, 1.0 ], "candicane7" : [ 0.87843137254902, 0.243137254901961, 0.145098039215686, 1.0 ], "candicane8" : [ 0.027450980392157, 0.447058823529412, 0.501960784313725, 1.0 ], - "candycane" : 22, + "candycane" : 12, "contdata" : 1, "id" : "obj-55", "maxclass" : "multislider", @@ -1019,560 +1066,9 @@ "numoutlets" : 2, "outlettype" : [ "", "" ], "parameter_enable" : 0, - "patching_rect" : [ 345.0, 169.0, 738.0, 90.0 ], + "patching_rect" : [ 447.199999999999989, 149.0, 738.0, 90.0 ], "setminmax" : [ 0.0, 1.0 ], - "size" : 88 - } - - } -, { - "box" : { - "id" : "obj-21", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 409.0, 635.0, 50.0, 22.0 ], - "text" : "zl.sub #" - } - - } -, { - "box" : { - "id" : "obj-20", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 340.0, 690.0, 35.0, 22.0 ], - "text" : "reset" - } - - } -, { - "box" : { - "id" : "obj-17", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "", "clear" ], - "patching_rect" : [ 383.0, 739.0, 66.0, 22.0 ], - "text" : "my-LtoColl" - } - - } -, { - "box" : { - "id" : "obj-16", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 383.0, 572.0, 55.0, 22.0 ], - "text" : "route set" - } - - } -, { - "box" : { - "id" : "obj-13", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 4, - "outlettype" : [ "", "", "", "" ], - "patching_rect" : [ 383.0, 771.0, 50.5, 22.0 ], - "saved_object_attributes" : { - "embed" : 0, - "precision" : 6 - } -, - "text" : "coll net" - } - - } -, { - "box" : { - "id" : "obj-10", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "", "bang", "int" ], - "patching_rect" : [ 383.0, 529.0, 40.0, 22.0 ], - "text" : "text" - } - - } -, { - "box" : { - "id" : "obj-4", - "maxclass" : "newobj", - "numinlets" : 0, - "numoutlets" : 0, - "patcher" : { - "fileversion" : 1, - "appversion" : { - "major" : 8, - "minor" : 6, - "revision" : 2, - "architecture" : "x64", - "modernui" : 1 - } -, - "classnamespace" : "box", - "rect" : [ 84.0, 144.0, 640.0, 480.0 ], - "bglocked" : 0, - "openinpresentation" : 0, - "default_fontsize" : 12.0, - "default_fontface" : 0, - "default_fontname" : "Arial", - "gridonopen" : 1, - "gridsize" : [ 15.0, 15.0 ], - "gridsnaponopen" : 1, - "objectsnaponopen" : 1, - "statusbarvisible" : 2, - "toolbarvisible" : 1, - "lefttoolbarpinned" : 0, - "toptoolbarpinned" : 0, - "righttoolbarpinned" : 0, - "bottomtoolbarpinned" : 0, - "toolbars_unpinned_last_save" : 0, - "tallnewobj" : 0, - "boxanimatetime" : 200, - "enablehscroll" : 1, - "enablevscroll" : 1, - "devicewidth" : 0.0, - "description" : "", - "digest" : "", - "tags" : "", - "style" : "", - "subpatcher_template" : "", - "assistshowspatchername" : 0, - "boxes" : [ { - "box" : { - "fontname" : "Arial", - "fontsize" : 9.0, - "id" : "obj-10", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 37.0, 212.0, 407.0, 17.0 ], - "text" : "2. this will cause an output at the left outlet which is the current response to that input" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 9.0, - "id" : "obj-11", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 37.0, 193.0, 407.0, 17.0 ], - "text" : "1. in the left inlet put a list of floats with the same length as the number of inputs" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-12", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 25.0, 175.0, 310.0, 20.0 ], - "text" : "to use the network:" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 9.0, - "id" : "obj-13", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 49.0, 142.0, 407.0, 17.0 ], - "text" : "(the right oultet repsonds with \"train done\" when the cycles are complete)" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 9.0, - "id" : "obj-14", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 38.0, 128.0, 407.0, 17.0 ], - "text" : "5. send the \"train\" message with an argument specifying the number of training cycles" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 9.0, - "id" : "obj-15", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 38.0, 114.0, 407.0, 17.0 ], - "text" : "4. repeat steps 1-3 for each pattern you want to train" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 9.0, - "id" : "obj-16", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 38.0, 100.0, 407.0, 17.0 ], - "text" : "3. send in the \"addPat\" message" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 9.0, - "id" : "obj-17", - "linecount" : 2, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 38.0, 74.0, 407.0, 27.0 ], - "text" : "2. in the right inlet put a list of floats with the same length as the number of outputs and is the desired response to the last input you provided to the left inlet (above)" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 9.0, - "id" : "obj-18", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 48.0, 61.0, 407.0, 17.0 ], - "text" : "(this will cause an output at the left outlet which is the current response to that input)" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 9.0, - "id" : "obj-19", - "linecount" : 3, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 74.0, 390.0, 366.0, 37.0 ], - "text" : "for advanced users the int args may be followed optionally by two float args to specify the training parameters: learning rate (default 0.25) and activation function offset (default 0.01)." - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 9.0, - "id" : "obj-20", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 74.0, 292.0, 365.0, 17.0 ], - "text" : "if there are none arguments start with ints as outlined below" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 9.0, - "id" : "obj-21", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 74.0, 366.0, 365.0, 17.0 ], - "text" : "the final int arg specifies the number nodes at the output from the network" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 9.0, - "id" : "obj-22", - "linecount" : 2, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 74.0, 341.0, 365.0, 27.0 ], - "text" : "this may be followed by any number of optional ints specifying the number of nodes in each hidden layer" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 9.0, - "id" : "obj-23", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 74.0, 328.0, 365.0, 17.0 ], - "text" : "the first int arg specifies the number of nodes at the inputs to the network" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 9.0, - "id" : "obj-24", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 74.0, 315.0, 365.0, 17.0 ], - "text" : "at least two int args are required specifying the network structure" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 9.0, - "id" : "obj-25", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 74.0, 279.0, 365.0, 17.0 ], - "text" : "if there is only one this is the network file" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 9.0, - "id" : "obj-26", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 74.0, 266.0, 365.0, 17.0 ], - "text" : "if there are two symbol args these are network and pattern files in that order" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 9.0, - "id" : "obj-27", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 74.0, 253.0, 365.0, 17.0 ], - "text" : "two optional symbol args to specify network and pattern files to load" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-28", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 63.0, 236.0, 329.0, 20.0 ], - "text" : "args:" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 9.0, - "id" : "obj-29", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 37.0, 47.0, 407.0, 17.0 ], - "text" : "1. in the left inlet put a list of floats with the same length as the number of inputs" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-46", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 25.0, 29.0, 310.0, 20.0 ], - "text" : "to train the network:" - } - - } - ], - "lines" : [ ] - } -, - "patching_rect" : [ 22.0, 585.0, 82.0, 22.0 ], - "saved_object_attributes" : { - "description" : "", - "digest" : "", - "globalpatchername" : "", - "tags" : "" - } -, - "text" : "p how-to-train" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-3", - "linecount" : 2, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 27.0, 169.0, 185.0, 33.0 ], - "text" : "clear everything or init the patterns/network separately" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 9.0, - "id" : "obj-8", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 240.0, 346.0, 100.0, 17.0 ], - "text" : "output pattern" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-9", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 345.0, 133.0, 80.0, 20.0 ], - "text" : "target pattern" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-30", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 13.0, 400.0, 198.0, 20.0 ], - "text" : "read and write i/o pattern files" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-31", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 25.0, 258.0, 82.0, 22.0 ], - "text" : "initPatterns" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-32", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 25.0, 233.0, 81.0, 22.0 ], - "text" : "initNetwork" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-33", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 10.0, 449.0, 58.0, 22.0 ], - "text" : "readPat" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-34", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 10.0, 424.0, 64.0, 22.0 ], - "text" : "writePat" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-35", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 14.0, 362.0, 56.0, 22.0 ], - "text" : "readNet" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-36", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 13.0, 335.0, 64.0, 22.0 ], - "text" : "writeNet" + "size" : 96 } } @@ -1585,36 +1081,8 @@ "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 25.0, 209.0, 42.0, 22.0 ], - "text" : "clear" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-39", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 9.0, 103.0, 84.0, 22.0 ], - "text" : "train 10000" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-40", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 9.0, 76.0, 53.0, 22.0 ], - "text" : "addPat" + "patching_rect" : [ 17.0, 255.0, 65.0, 22.0 ], + "text" : "clear_data" } } @@ -1635,7 +1103,7 @@ "numoutlets" : 2, "outlettype" : [ "", "" ], "parameter_enable" : 0, - "patching_rect" : [ 228.0, 169.0, 79.0, 90.0 ], + "patching_rect" : [ 17.0, 101.0, 79.0, 90.0 ], "setminmax" : [ 0.0, 1.0 ], "size" : 2 } @@ -1645,146 +1113,29 @@ "box" : { "id" : "obj-44", "maxclass" : "newobj", - "numinlets" : 2, + "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "" ], - "patching_rect" : [ 228.0, 282.0, 136.0, 22.0 ], - "text" : "mxj nnLists 2 88 88", + "patching_rect" : [ 232.75, 282.0, 301.0, 22.0 ], + "saved_object_attributes" : { + "args" : [ 2, 96, 48 ], + "autostart" : 1, + "defer" : 0, + "node_bin_path" : "", + "npm_bin_path" : "", + "watch" : 1 + } +, + "text" : "node.script tf.js @watch 1 @autostart 1 @args 2 96 48", "varname" : "nnLists" } - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-45", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 13.0, 313.0, 199.0, 20.0 ], - "text" : "read and write network files" - } - - } -, { - "box" : { - "fontname" : "Arial", - "fontsize" : 12.0, - "id" : "obj-48", - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 230.0, 131.0, 75.0, 20.0 ], - "text" : "input pattern" - } - } ], "lines" : [ { "patchline" : { - "destination" : [ "obj-16", 0 ], - "source" : [ "obj-10", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-164", 0 ], - "midpoints" : [ 403.0, 561.0, 441.5, 561.0, 441.5, 480.0, 326.5, 480.0 ], - "source" : [ "obj-10", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-43", 0 ], - "source" : [ "obj-113", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-55", 0 ], - "source" : [ "obj-113", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-122", 0 ], - "source" : [ "obj-121", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-162", 0 ], - "source" : [ "obj-121", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-178", 0 ], - "source" : [ "obj-122", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-149", 0 ], - "source" : [ "obj-148", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-150", 0 ], - "source" : [ "obj-149", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-68", 0 ], - "source" : [ "obj-16", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-10", 0 ], - "source" : [ "obj-162", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-10", 0 ], - "source" : [ "obj-164", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-168", 0 ], - "source" : [ "obj-164", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-17", 0 ], - "midpoints" : [ 458.5, 723.0, 392.5, 723.0 ], - "source" : [ "obj-164", 2 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-166", 0 ], - "source" : [ "obj-165", 0 ] + "destination" : [ "obj-44", 0 ], + "source" : [ "obj-11", 0 ] } } @@ -1794,86 +1145,6 @@ "source" : [ "obj-166", 0 ] } - } -, { - "patchline" : { - "destination" : [ "obj-166", 0 ], - "midpoints" : [ 349.5, 614.0, 260.5, 614.0 ], - "source" : [ "obj-167", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-165", 0 ], - "midpoints" : [ 338.0, 574.0, 239.5, 574.0 ], - "source" : [ "obj-168", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-166", 0 ], - "midpoints" : [ 326.5, 566.5, 260.5, 566.5 ], - "source" : [ "obj-168", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-167", 0 ], - "source" : [ "obj-168", 2 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-13", 0 ], - "source" : [ "obj-17", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-13", 0 ], - "source" : [ "obj-17", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-44", 0 ], - "source" : [ "obj-176", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-179", 0 ], - "source" : [ "obj-177", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-177", 0 ], - "source" : [ "obj-178", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-179", 1 ], - "source" : [ "obj-178", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-176", 0 ], - "source" : [ "obj-179", 0 ] - } - } , { "patchline" : { @@ -1884,84 +1155,14 @@ } , { "patchline" : { - "destination" : [ "obj-185", 0 ], - "source" : [ "obj-183", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-183", 0 ], - "source" : [ "obj-184", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-185", 1 ], - "source" : [ "obj-184", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-186", 0 ], - "source" : [ "obj-185", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-76", 0 ], - "source" : [ "obj-186", 0 ] + "destination" : [ "obj-43", 0 ], + "source" : [ "obj-191", 0 ] } } , { "patchline" : { "destination" : [ "obj-44", 0 ], - "source" : [ "obj-187", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-190", 0 ], - "source" : [ "obj-188", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-188", 0 ], - "source" : [ "obj-189", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-190", 1 ], - "source" : [ "obj-189", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-187", 0 ], - "source" : [ "obj-190", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-17", 0 ], - "source" : [ "obj-20", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-67", 0 ], "source" : [ "obj-21", 0 ] } @@ -1969,48 +1170,21 @@ , { "patchline" : { "destination" : [ "obj-44", 0 ], - "hidden" : 1, - "source" : [ "obj-31", 0 ] + "source" : [ "obj-24", 0 ] } } , { "patchline" : { - "destination" : [ "obj-44", 0 ], - "hidden" : 1, - "source" : [ "obj-32", 0 ] + "destination" : [ "obj-43", 0 ], + "source" : [ "obj-27", 0 ] } } , { "patchline" : { - "destination" : [ "obj-44", 0 ], - "hidden" : 1, - "source" : [ "obj-33", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-44", 0 ], - "hidden" : 1, - "source" : [ "obj-34", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-44", 0 ], - "hidden" : 1, - "source" : [ "obj-35", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-44", 0 ], - "hidden" : 1, - "source" : [ "obj-36", 0 ] + "destination" : [ "obj-55", 0 ], + "source" : [ "obj-35", 1 ] } } @@ -2024,45 +1198,43 @@ } , { "patchline" : { - "destination" : [ "obj-44", 0 ], - "hidden" : 1, - "source" : [ "obj-39", 0 ] + "destination" : [ "obj-166", 0 ], + "source" : [ "obj-38", 1 ] } } , { "patchline" : { - "destination" : [ "obj-44", 0 ], - "hidden" : 1, - "source" : [ "obj-40", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-44", 0 ], - "source" : [ "obj-43", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-121", 0 ], - "source" : [ "obj-44", 1 ] + "destination" : [ "obj-4", 0 ], + "source" : [ "obj-38", 2 ] } } , { "patchline" : { "destination" : [ "obj-61", 0 ], - "source" : [ "obj-44", 0 ] + "source" : [ "obj-38", 0 ] } } , { "patchline" : { - "destination" : [ "obj-44", 1 ], - "source" : [ "obj-55", 0 ] + "destination" : [ "obj-44", 0 ], + "source" : [ "obj-4", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-21", 0 ], + "source" : [ "obj-43", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-38", 0 ], + "source" : [ "obj-44", 0 ] } } @@ -2072,111 +1244,26 @@ "source" : [ "obj-61", 0 ] } - } -, { - "patchline" : { - "destination" : [ "obj-17", 0 ], - "source" : [ "obj-64", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-64", 1 ], - "source" : [ "obj-67", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-21", 0 ], - "source" : [ "obj-68", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-64", 0 ], - "source" : [ "obj-68", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-82", 0 ], - "source" : [ "obj-73", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-85", 0 ], - "source" : [ "obj-78", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-83", 0 ], - "source" : [ "obj-82", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-76", 0 ], - "source" : [ "obj-83", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-184", 0 ], - "source" : [ "obj-85", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-189", 0 ], - "midpoints" : [ 695.5, 614.0, 566.5, 614.0 ], - "source" : [ "obj-85", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-73", 0 ], - "source" : [ "obj-85", 2 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-78", 0 ], - "source" : [ "obj-87", 0 ] - } - } , { "patchline" : { "destination" : [ "obj-99", 0 ], - "midpoints" : [ 146.5, 42.0, 146.5, 42.0 ], "source" : [ "obj-94", 0 ] } } , { "patchline" : { - "destination" : [ "obj-44", 0 ], - "source" : [ "obj-97", 0 ] + "destination" : [ "obj-181", 0 ], + "order" : 1, + "source" : [ "obj-99", 4 ] } } , { "patchline" : { - "destination" : [ "obj-113", 0 ], - "source" : [ "obj-99", 4 ] + "destination" : [ "obj-181", 0 ], + "source" : [ "obj-99", 3 ] } } @@ -2200,11 +1287,19 @@ "source" : [ "obj-99", 0 ] } + } +, { + "patchline" : { + "destination" : [ "obj-35", 0 ], + "order" : 0, + "source" : [ "obj-99", 4 ] + } + } ] } , - "patching_rect" : [ 1167.0, 497.0, 115.0, 22.0 ], + "patching_rect" : [ 878.5, 227.0, 115.0, 22.0 ], "saved_object_attributes" : { "description" : "", "digest" : "", @@ -2224,22 +1319,10 @@ "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 976.0, 224.0, 117.0, 22.0 ], + "patching_rect" : [ 1268.0, 268.0, 117.0, 22.0 ], "text" : "-> djster_webcontrol" } - } -, { - "box" : { - "id" : "obj-31", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 1144.0, 545.0, 34.0, 22.0 ], - "text" : "write" - } - } , { "box" : { @@ -2248,7 +1331,7 @@ "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "bang" ], - "patching_rect" : [ 1169.0, 165.0, 58.0, 22.0 ], + "patching_rect" : [ 1196.0, 271.0, 58.0, 22.0 ], "text" : "loadbang" } @@ -2260,7 +1343,7 @@ "numinlets" : 2, "numoutlets" : 5, "outlettype" : [ "dictionary", "", "", "", "" ], - "patching_rect" : [ 1117.0, 583.0, 61.0, 22.0 ], + "patching_rect" : [ 1191.0, 159.0, 91.0, 22.0 ], "saved_object_attributes" : { "embed" : 0, "legacy" : 0, @@ -2268,7 +1351,7 @@ "parameter_mappable" : 0 } , - "text" : "dict" + "text" : "dict HSSPieces" } } @@ -2277,9 +1360,9 @@ "id" : "obj-29", "maxclass" : "newobj", "numinlets" : 2, - "numoutlets" : 3, - "outlettype" : [ "", "", "" ], - "patching_rect" : [ 1117.0, 447.0, 119.0, 22.0 ], + "numoutlets" : 4, + "outlettype" : [ "", "", "", "" ], + "patching_rect" : [ 1028.0, 159.0, 153.0, 22.0 ], "saved_object_attributes" : { "filename" : "hss.piecemaker.js", "parameter_enable" : 0 @@ -2296,62 +1379,7 @@ "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "" ], - "patching_rect" : [ 1117.0, 306.0, 94.0, 79.0 ] - } - - } -, { - "box" : { - "id" : "obj-24", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 1112.0, 202.0, 47.0, 22.0 ], - "text" : "dict.iter" - } - - } -, { - "box" : { - "id" : "obj-22", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 1053.0, 26.0, 117.0, 22.0 ], - "text" : "get DefaultSetting::1" - } - - } -, { - "box" : { - "id" : "obj-57", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 923.0, 26.0, 122.0, 22.0 ], - "text" : "read HSSPieces.json" - } - - } -, { - "box" : { - "id" : "obj-55", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 5, - "outlettype" : [ "dictionary", "", "", "", "" ], - "patching_rect" : [ 923.0, 69.0, 91.0, 22.0 ], - "saved_object_attributes" : { - "embed" : 0, - "legacy" : 0, - "parameter_enable" : 0, - "parameter_mappable" : 0 - } -, - "text" : "dict HSSPieces" + "patching_rect" : [ 1028.0, 18.0, 94.0, 79.0 ] } } @@ -2361,7 +1389,7 @@ "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 1242.0, 119.0, 150.0, 20.0 ], + "patching_rect" : [ 1191.0, 781.0, 150.0, 20.0 ], "presentation" : 1, "presentation_rect" : [ 349.0, 18.5, 34.0, 20.0 ], "saved_attribute_attributes" : { @@ -2381,7 +1409,7 @@ "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 1242.0, 94.0, 150.0, 20.0 ], + "patching_rect" : [ 1191.0, 756.0, 150.0, 20.0 ], "presentation" : 1, "presentation_rect" : [ 262.0, 18.5, 33.0, 20.0 ], "saved_attribute_attributes" : { @@ -2673,7 +1701,7 @@ "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 1242.0, 16.0, 150.0, 20.0 ], + "patching_rect" : [ 1191.0, 678.0, 150.0, 20.0 ], "presentation" : 1, "presentation_rect" : [ 794.0, 18.5, 75.0, 20.0 ], "saved_attribute_attributes" : { @@ -2710,7 +1738,7 @@ "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 1242.0, 42.0, 150.0, 20.0 ], + "patching_rect" : [ 1191.0, 704.0, 150.0, 20.0 ], "presentation" : 1, "presentation_rect" : [ 74.0, 18.5, 53.0, 20.0 ], "saved_attribute_attributes" : { @@ -2730,7 +1758,7 @@ "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 1242.0, 67.0, 150.0, 20.0 ], + "patching_rect" : [ 1191.0, 729.0, 150.0, 20.0 ], "presentation" : 1, "presentation_rect" : [ 10.0, 18.0, 28.0, 20.0 ], "saved_attribute_attributes" : { @@ -2743,35 +1771,6 @@ "text" : "Init:" } - } -, { - "box" : { - "bubble" : 1, - "fontname" : "Arial", - "fontsize" : 11.0, - "id" : "obj-121", - "linecount" : 2, - "maxclass" : "comment", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 700.0, 242.0, 137.0, 35.0 ], - "text" : "Read preset file and activate first preset" - } - - } -, { - "box" : { - "id" : "obj-120", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 646.0, 249.0, 46.0, 22.0 ], - "presentation" : 1, - "presentation_rect" : [ 299.0, 17.5, 46.0, 22.0 ], - "text" : "read, 1" - } - } , { "box" : { @@ -2788,13 +1787,14 @@ , { "box" : { "bubble" : 1, + "bubbleside" : 2, "fontname" : "Arial", "fontsize" : 11.0, "id" : "obj-118", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 700.0, 217.0, 137.0, 23.0 ], + "patching_rect" : [ 1036.0, 271.0, 137.0, 38.0 ], "text" : "Write presets to file" } @@ -2806,24 +1806,12 @@ "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 632.0, 217.0, 56.0, 22.0 ], + "patching_rect" : [ 1080.0, 311.0, 56.0, 22.0 ], "presentation" : 1, "presentation_rect" : [ 385.0, 17.5, 56.0, 22.0 ], "text" : "writejson" } - } -, { - "box" : { - "id" : "obj-115", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 632.0, 282.0, 70.0, 22.0 ], - "text" : "pvar DJster" - } - } , { "box" : { @@ -2833,6 +1821,11 @@ "numoutlets" : 4, "outlettype" : [ "", "", "", "" ], "patching_rect" : [ 225.0, 65.0, 56.0, 22.0 ], + "restore" : { + "currentPiece" : [ "DefaultSetting" ], + "nodes" : [ 0.5, 0.5, 0.1, 1, 0.1, 0.1, 0.1, 1, 0.9, 0.1, 0.1, 1, 0.9, 0.9, 0.1, 1, 0.1, 0.9, 0.1, 1 ] + } +, "text" : "autopattr", "varname" : "u761045005" } @@ -2871,14 +1864,16 @@ , { "box" : { "bubble" : 1, + "bubbleside" : 3, "fontname" : "Arial", "fontsize" : 11.0, "id" : "obj-86", + "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 690.0, 27.0, 137.0, 23.0 ], - "text" : "Create your presets" + "patching_rect" : [ 545.0, 33.5, 137.0, 35.0 ], + "text" : "Create presets by clicking on numbers" } } @@ -2890,7 +1885,7 @@ "numinlets" : 1, "numoutlets" : 5, "outlettype" : [ "preset", "int", "preset", "int", "" ], - "patching_rect" : [ 549.0, 24.0, 126.0, 28.0 ], + "patching_rect" : [ 751.5, 224.0, 126.0, 28.0 ], "pattrstorage" : "DJster", "presentation" : 1, "presentation_rect" : [ 129.0, 14.5, 125.0, 28.0 ] @@ -2914,7 +1909,7 @@ } , "classnamespace" : "box", - "rect" : [ 241.0, 162.0, 403.0, 673.0 ], + "rect" : [ 283.0, 57.0, 403.0, 673.0 ], "bglocked" : 0, "openinpresentation" : 1, "default_fontsize" : 12.0, @@ -3123,7 +2118,7 @@ } , "classnamespace" : "box", - "rect" : [ 507.0, 207.0, 876.0, 682.0 ], + "rect" : [ 507.0, 109.0, 876.0, 682.0 ], "bglocked" : 0, "openinpresentation" : 0, "default_fontsize" : 12.0, @@ -3431,9 +2426,9 @@ "outlettype" : [ "", "", "", "" ], "patching_rect" : [ 12.0, 260.0, 56.0, 22.0 ], "restore" : { - "instrument-1" : [ "Bell-1.instr" ], - "instrument-2" : [ "Bell-1.instr" ], - "instrument-3" : [ "Bell-1.instr" ], + "instrument-1" : [ "Bell-2.instr" ], + "instrument-2" : [ "Bell-2.instr" ], + "instrument-3" : [ "Bell-2.instr" ], "instrument-4" : [ "Bell-1.instr" ] } , @@ -4155,7 +3150,7 @@ "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 51.0, 29.0, 50.0, 35.0 ], - "text" : "tempo 52" + "text" : "amount 1.1" } } @@ -4215,7 +3210,7 @@ "numoutlets" : 3, "outlettype" : [ "", "", "" ], "patching_rect" : [ 578.714285714285779, 182.0, 137.0, 22.0 ], - "restore" : [ 25 ], + "restore" : [ 0 ], "saved_object_attributes" : { "parameter_enable" : 0, "parameter_mappable" : 0 @@ -4246,7 +3241,7 @@ "numoutlets" : 3, "outlettype" : [ "", "", "" ], "patching_rect" : [ 531.571428571428555, 124.0, 148.0, 22.0 ], - "restore" : [ 25 ], + "restore" : [ 0 ], "saved_object_attributes" : { "parameter_enable" : 0, "parameter_mappable" : 0 @@ -4277,7 +3272,7 @@ "numoutlets" : 3, "outlettype" : [ "", "", "" ], "patching_rect" : [ 484.428571428571502, 93.0, 139.0, 22.0 ], - "restore" : [ 100 ], + "restore" : [ 0 ], "saved_object_attributes" : { "parameter_enable" : 0, "parameter_mappable" : 0 @@ -4308,7 +3303,7 @@ "numoutlets" : 3, "outlettype" : [ "", "", "" ], "patching_rect" : [ 437.0, 412.0, 168.0, 22.0 ], - "restore" : [ 70 ], + "restore" : [ 0 ], "saved_object_attributes" : { "parameter_enable" : 0, "parameter_mappable" : 0 @@ -4339,7 +3334,7 @@ "numoutlets" : 3, "outlettype" : [ "", "", "" ], "patching_rect" : [ 390.142857142857167, 323.0, 177.0, 22.0 ], - "restore" : [ 50 ], + "restore" : [ 0 ], "saved_object_attributes" : { "parameter_enable" : 0, "parameter_mappable" : 0 @@ -4370,7 +3365,7 @@ "numoutlets" : 3, "outlettype" : [ "", "", "" ], "patching_rect" : [ 343.0, 265.0, 171.0, 22.0 ], - "restore" : [ 21 ], + "restore" : [ 17 ], "saved_object_attributes" : { "parameter_enable" : 0, "parameter_mappable" : 0 @@ -4389,7 +3384,7 @@ "numoutlets" : 3, "outlettype" : [ "", "", "" ], "patching_rect" : [ 295.75, 209.0, 162.0, 22.0 ], - "restore" : [ 3 ], + "restore" : [ 1.1 ], "saved_object_attributes" : { "parameter_enable" : 0, "parameter_mappable" : 0 @@ -4427,7 +3422,7 @@ "numoutlets" : 3, "outlettype" : [ "", "", "" ], "patching_rect" : [ 201.5, 93.0, 159.0, 22.0 ], - "restore" : [ 23 ], + "restore" : [ 0 ], "saved_object_attributes" : { "parameter_enable" : 0, "parameter_mappable" : 0 @@ -5153,7 +4148,7 @@ } , "classnamespace" : "box", - "rect" : [ 817.0, 100.0, 734.0, 848.0 ], + "rect" : [ 134.0, 100.0, 734.0, 848.0 ], "bglocked" : 0, "openinpresentation" : 0, "default_fontsize" : 12.0, @@ -5301,7 +4296,7 @@ "numoutlets" : 3, "outlettype" : [ "", "", "" ], "patching_rect" : [ 517.899999999999977, 790.0, 145.0, 22.0 ], - "restore" : [ 21, 63 ], + "restore" : [ 8, 64 ], "saved_object_attributes" : { "parameter_enable" : 0, "parameter_mappable" : 0 @@ -5320,7 +4315,7 @@ "numoutlets" : 3, "outlettype" : [ "", "", "" ], "patching_rect" : [ 460.899999999999977, 903.0, 145.0, 22.0 ], - "restore" : [ 63, 21 ], + "restore" : [ 67, 11 ], "saved_object_attributes" : { "parameter_enable" : 0, "parameter_mappable" : 0 @@ -5339,7 +4334,7 @@ "numoutlets" : 3, "outlettype" : [ "", "", "" ], "patching_rect" : [ 403.899999999999977, 847.0, 145.0, 22.0 ], - "restore" : [ 108, 63 ], + "restore" : [ 125, 58 ], "saved_object_attributes" : { "parameter_enable" : 0, "parameter_mappable" : 0 @@ -5358,7 +4353,7 @@ "numoutlets" : 3, "outlettype" : [ "", "", "" ], "patching_rect" : [ 346.899999999999977, 790.0, 145.0, 22.0 ], - "restore" : [ 66, 109 ], + "restore" : [ 64, 112 ], "saved_object_attributes" : { "parameter_enable" : 0, "parameter_mappable" : 0 @@ -6395,6 +5390,7 @@ , { "box" : { "id" : "obj-34", + "int" : 4, "maxclass" : "gswitch2", "numinlets" : 2, "numoutlets" : 5, @@ -6873,9 +5869,9 @@ "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 1112.0, 249.0, 265.0, 35.0 ], + "patching_rect" : [ 1117.333333333333258, 358.0, 265.0, 35.0 ], "saved_object_attributes" : { - "client_rect" : [ 1187, 252, 1796, 568 ], + "client_rect" : [ 1049, 490, 1658, 806 ], "parameter_enable" : 0, "parameter_mappable" : 0, "storage_rect" : [ 780, 524, 1380, 824 ] @@ -7053,7 +6049,7 @@ "outlettype" : [ "", "" ], "patching_rect" : [ 169.0, 116.0, 118.0, 22.0 ], "saved_object_attributes" : { - "filename" : "djster_webcontrol.js", + "filename" : "djster_webcontrol", "parameter_enable" : 0 } , @@ -7109,7 +6105,7 @@ "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 1169.0, 202.0, 177.0, 22.0 ], + "patching_rect" : [ 1196.0, 308.0, 177.0, 22.0 ], "text" : "priority hub::instrument::bank -1" } @@ -7122,7 +6118,8 @@ "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 1240.0, 302.0, 134.0, 76.0 ], + "patching_rect" : [ 1151.0, 14.0, 135.0, 76.0 ], + "presentation_linecount" : 5, "text" : "\"Macintosh HD:/Users/Shared/Max 8/Library/healing-soundscapes/Presets/DefaultSetting.json\"" } @@ -7168,14 +6165,7 @@ } , { "patchline" : { - "destination" : [ "obj-55", 0 ], - "source" : [ "obj-110", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-115", 0 ], + "destination" : [ "obj-20", 0 ], "source" : [ "obj-117", 0 ] } @@ -7196,22 +6186,15 @@ } , { "patchline" : { - "destination" : [ "obj-115", 0 ], - "source" : [ "obj-120", 0 ] + "destination" : [ "obj-165", 1 ], + "source" : [ "obj-132", 0 ] } } , { "patchline" : { - "destination" : [ "obj-59", 0 ], - "source" : [ "obj-125", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-24", 0 ], - "source" : [ "obj-126", 1 ] + "destination" : [ "obj-181", 1 ], + "source" : [ "obj-132", 2 ] } } @@ -7221,6 +6204,27 @@ "source" : [ "obj-15", 0 ] } + } +, { + "patchline" : { + "destination" : [ "obj-79", 0 ], + "source" : [ "obj-160", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-79", 0 ], + "source" : [ "obj-164", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-160", 0 ], + "source" : [ "obj-165", 0 ] + } + } , { "patchline" : { @@ -7260,6 +6264,52 @@ "source" : [ "obj-18", 0 ] } + } +, { + "patchline" : { + "destination" : [ "obj-48", 0 ], + "midpoints" : [ 888.0, 217.5, 888.0, 217.5 ], + "source" : [ "obj-180", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-180", 0 ], + "source" : [ "obj-181", 1 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-165", 0 ], + "order" : 1, + "source" : [ "obj-182", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-181", 0 ], + "order" : 0, + "source" : [ "obj-182", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-185", 0 ], + "order" : 2, + "source" : [ "obj-182", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-132", 0 ], + "source" : [ "obj-185", 0 ] + } + } , { "patchline" : { @@ -7267,6 +6317,13 @@ "source" : [ "obj-19", 0 ] } + } +, { + "patchline" : { + "destination" : [ "obj-23", 0 ], + "source" : [ "obj-200", 1 ] + } + } , { "patchline" : { @@ -7277,15 +6334,8 @@ } , { "patchline" : { - "destination" : [ "obj-55", 0 ], - "source" : [ "obj-22", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-20", 0 ], - "source" : [ "obj-24", 0 ] + "destination" : [ "obj-29", 0 ], + "source" : [ "obj-23", 0 ] } } @@ -7312,22 +6362,38 @@ } , { "patchline" : { - "destination" : [ "obj-20", 0 ], - "midpoints" : [ 1226.5, 483.0, 1401.5, 483.0, 1401.5, 241.0, 1121.5, 241.0 ], - "source" : [ "obj-29", 2 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-27", 0 ], + "destination" : [ "obj-132", 0 ], "source" : [ "obj-29", 0 ] } } , { "patchline" : { - "destination" : [ "obj-48", 0 ], + "destination" : [ "obj-20", 0 ], + "order" : 0, + "source" : [ "obj-29", 2 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-200", 0 ], + "source" : [ "obj-29", 3 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-47", 0 ], + "order" : 1, + "source" : [ "obj-29", 2 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-48", 1 ], + "midpoints" : [ 1082.166666666666742, 205.5, 984.0, 205.5 ], "source" : [ "obj-29", 1 ] } @@ -7335,14 +6401,14 @@ , { "patchline" : { "destination" : [ "obj-29", 0 ], - "source" : [ "obj-30", 0 ] + "source" : [ "obj-3", 0 ] } } , { "patchline" : { - "destination" : [ "obj-27", 0 ], - "source" : [ "obj-31", 0 ] + "destination" : [ "obj-29", 0 ], + "source" : [ "obj-30", 0 ] } } @@ -7365,7 +6431,7 @@ , { "patchline" : { "destination" : [ "obj-29", 1 ], - "midpoints" : [ 1176.5, 535.0, 1296.5, 535.0, 1296.5, 425.0, 1226.5, 425.0 ], + "midpoints" : [ 888.0, 259.0, 1307.5, 259.0, 1307.5, 151.0, 1171.5, 151.0 ], "source" : [ "obj-48", 0 ] } @@ -7383,44 +6449,6 @@ "source" : [ "obj-52", 0 ] } - } -, { - "patchline" : { - "destination" : [ "obj-125", 0 ], - "source" : [ "obj-55", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-55", 0 ], - "source" : [ "obj-57", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-126", 0 ], - "order" : 0, - "source" : [ "obj-59", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-34", 0 ], - "order" : 1, - "source" : [ "obj-59", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-48", 1 ], - "midpoints" : [ 950.5, 294.0, 1272.5, 294.0 ], - "source" : [ "obj-59", 0 ] - } - } , { "patchline" : { @@ -7435,13 +6463,6 @@ "source" : [ "obj-7", 0 ] } - } -, { - "patchline" : { - "destination" : [ "obj-84", 1 ], - "source" : [ "obj-76", 0 ] - } - } , { "patchline" : { @@ -7450,20 +6471,6 @@ "source" : [ "obj-8", 0 ] } - } -, { - "patchline" : { - "destination" : [ "obj-77", 0 ], - "source" : [ "obj-80", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-80", 0 ], - "source" : [ "obj-82", 0 ] - } - } , { "patchline" : { @@ -7690,7 +6697,7 @@ "parameter_overrides" : { "obj-15::obj-1" : { "parameter_longname" : "Outset Pulses[3]", - "parameter_range" : [ 1, 24 ] + "parameter_range" : [ 1, 32 ] } , "obj-15::obj-104" : { @@ -7818,7 +6825,7 @@ , "obj-26::obj-1" : { "parameter_longname" : "Outset Pulses", - "parameter_range" : [ 1, 24 ] + "parameter_range" : [ 1, 32 ] } , "obj-26::obj-104" : { @@ -7952,7 +6959,7 @@ , "obj-5::obj-1" : { "parameter_longname" : "Outset Pulses[1]", - "parameter_range" : [ 1, 24 ] + "parameter_range" : [ 1, 32 ] } , "obj-5::obj-104" : { @@ -8082,7 +7089,7 @@ , "obj-8::obj-1" : { "parameter_longname" : "Outset Pulses[2]", - "parameter_range" : [ 1, 24 ] + "parameter_range" : [ 1, 32 ] } , "obj-8::obj-104" : { @@ -8399,13 +7406,6 @@ "name" : "mxj.mxo", "type" : "iLaX" } -, { - "name" : "my-LtoColl.maxpat", - "bootpath" : "/Users/Shared/Max 8/Packages/MaxScore/patchers/extensions", - "patcherrelativepath" : "../../Packages/MaxScore/patchers/extensions", - "type" : "JSON", - "implicit" : 1 - } , { "name" : "o.atomize.mxo", "type" : "iLaX" @@ -8519,6 +7519,13 @@ "type" : "TEXT", "implicit" : 1 } +, { + "name" : "tf.js", + "bootpath" : "/Users/Shared/Max 8/Library/tensorflow-max-mlp", + "patcherrelativepath" : "../tensorflow-max-mlp", + "type" : "TEXT", + "implicit" : 1 + } ], "autosave" : 0, "styles" : [ { diff --git a/hss-distributed-server.maxpatHSSPiece.json b/hss-distributed-server.maxpatHSSPiece.json new file mode 100644 index 0000000..0db3279 --- /dev/null +++ b/hss-distributed-server.maxpatHSSPiece.json @@ -0,0 +1,3 @@ +{ + +} diff --git a/hss.piecemaker.js b/hss.piecemaker.js index 22aff56..f033c6a 100644 --- a/hss.piecemaker.js +++ b/hss.piecemaker.js @@ -1,10 +1,10 @@ inlets = 2 -outlets = 3; - +outlets = 4; +var jpieces = {}; var presets = []; var hsspiece = {}; -var outdict = new Dict; +var outdict = new Dict("HSSPieces");; var points = [[0.5, 0.5], [1., 0.], [1., 1.], [0., 1.], [0., 0.]]; var net = new Dict; var title; @@ -29,21 +29,39 @@ var DJsterParams = { "tempo" : [20, 200, "log"],// "timesig_denominator" : [1, 5, "enum"],// "timesig_numerator" : [1, 12, "linear"],// - "tonic_pitch" : [12, 108, "linear"],// + "tonic_pitch" : [12, 108, "enum"],// }; +// function dictionary(d) { net.name = d; hsspiece[title]["networkData"] = JSON.parse(net.stringify()); outdict.parse(JSON.stringify(hsspiece)); - outlet(0, "dictionary", outdict.name); + //outlet(0, "dictionary", outdict.name); +} + +function readPiece(path) +{ + outdict.import_json(path); + jpieces = JSON.parse(outdict.stringify()); + var keys = outdict.getkeys(); + for (var i = 0; i < keys.length; i++) outlet(3, keys[i]); + outlet(1, outdict.get("DefaultSetting::1::networkData"); + outlet(1, predict(0.5, 0.5); + outlet(0, 0.5, 0.5; +} + +function getSection(section) +{ + outlet(1, outdict.get(section + "::1::networkData"); + outlet(1, predict(0.5, 0.5); + outlet(0, 0.5, 0.5; } function writePiece() { - var path = this.patcher.getnamed("machineLearning").subpatcher().getnamed("path").getvalueof(); - net.export_json(path + "HSSPiece.json"); + outdict.export_json(this.patcher.filepath + "HSSPiece.json"); } function anything() @@ -57,7 +75,7 @@ function anything() hsspiece[title] = {}; var slots = presets[i].get("pattrstorage::slots").getkeys();//number of slots here post("slots", slots, "\n"); - outlet(1, "clear"); + outlet(1, "clear_data"); for (var j = 0; j < slots.length; j++){ hsspiece[title][j + 1] = {}; var trainingData = []; @@ -67,7 +85,6 @@ function anything() delete data["Djster.µbus[" + p + "]::meters"]; for (var param in DJsterParams) { var val = data["Djster.µbus[" + p + "]::" + param]; - //post("params", hsspiece[title][j + 1]["Djster.µbus[" + p + "]::" + param], "\n"); switch (DJsterParams[param][2]) { case "linear" : trainingData.push(scale(val, DJsterParams[param][0], DJsterParams[param][1], 0., 1.)); @@ -76,17 +93,19 @@ function anything() trainingData.push(scale(val, DJsterParams[param][0], DJsterParams[param][1], 0., 1.)); break; case "enum" : - trainingData.push(0); + trainingData.push(j/5); break; } } - var val = data["hub::instrument::instrument-" + (p + 1)]; - trainingData.push(0); - } + //var val = data["hub::instrument::instrument-" + (p + 1)]; + trainingData.push(j/5); + var val = data["hub::src::src" + (p + 1)]; + trainingData.push(scale(val[0], 0, 127, 0., 1.)); + trainingData.push(scale(val[1], 0, 127, 0., 1.)); + } //post("data", JSON.stringify(data), "\n"); hsspiece[title][j + 1] = data; - outlet(1, points[j].concat(trainingData)); - outlet(1, "addPat"); + outlet(1, "data_point", points[j].concat(trainingData)); } outlet(1, "train", 10000); } @@ -95,10 +114,13 @@ function anything() function list() { var vector = arrayfromargs(arguments); + var src = []; + var currentPiece = this.patcher.getnamed("currentPiece").getvalueof(); var keys = Object.keys(DJsterParams); for (var i = 0; i < 4; i++) { for (var j = 0; j < vector.length/4; j++) { var k = j + i * vector.length/4; + //post("vector", j, "\n"); switch (j) { case 3 : //log case 17 : @@ -106,20 +128,32 @@ function list() outlet(2, "Djster.µbus[" + i + "]::" + keys[j], val); break; case 13 : //enum - val = "Major"; - outlet(2, "Djster.µbus[" + i + "]::" + keys[j], val); + //val = "Major"; + post(vector[k], Math.floor(vector[k]/0.2 + 1), "\n"); + outlet(2, "Djster.µbus[" + i + "]::" + keys[j], jpieces[currentPiece][parseInt(vector[k]/0.2 + 1)]["Djster.µbus[" + i + "]::scale"]); break; case 16 : - val = "2 2 2"; - outlet(2, "Djster.µbus[" + i + "]::" + keys[j], val); + //val = "2 2 2"; + outlet(2, "Djster.µbus[" + i + "]::" + keys[j], jpieces[currentPiece][parseInt(vector[k]/0.2 + 1)]["Djster.µbus[" + i + "]::meter"]); break; case 18 : - val = "4" - outlet(2, "Djster.µbus[" + i + "]::" + keys[j], val); + //val = "4" + outlet(2, "Djster.µbus[" + i + "]::" + keys[j], jpieces[currentPiece][parseInt(vector[k]/0.2 + 1)]["Djster.µbus[" + i + "]::timesig_denominator"]); break; case 21 : val = "4" - outlet(2, "hub::instrument::instrument-" + (i + 1), val); + outlet(2, "hub::instrument::instrument-" + (i + 1), jpieces[currentPiece][parseInt(vector[k]/0.2 + 1)]["hub::instrument::instrument-" + (i + 1)]); + break; + case 22 : + src[0] = scale(vector[k], 0, 1, 0, 127); + break; + case 23 : + src[1] = scale(vector[k], 0, 1, 0, 127); + outlet(2, "hub::src::src" + (i + 1), src); + break; + case 1 : case 9 : case 10 : case 14 : case 15 : case 19 : case 20 : + var val = Math.round(scale(vector[k], 0, 1, DJsterParams[keys[j]][0], DJsterParams[keys[j]][1])); + outlet(2, "Djster.µbus[" + i + "]::" + keys[j], val); break; default : //linear var val = scale(vector[k], 0, 1, DJsterParams[keys[j]][0], DJsterParams[keys[j]][1]);