From e4c45c2d182eeac9a3a683e7ba275c5ff539e4be Mon Sep 17 00:00:00 2001 From: equilet <2237372+equilet@users.noreply.github.com> Date: Wed, 14 May 2025 13:37:57 -0700 Subject: [PATCH] added vt.variety_handler --- engine_voice.episodes~.maxpat | 834 +++++----------------------------- 1 file changed, 119 insertions(+), 715 deletions(-) diff --git a/engine_voice.episodes~.maxpat b/engine_voice.episodes~.maxpat index 823aee1..db34c30 100644 --- a/engine_voice.episodes~.maxpat +++ b/engine_voice.episodes~.maxpat @@ -19,705 +19,124 @@ "subpatcher_template" : "Untitled5_template", "boxes" : [ { "box" : { - "id" : "obj-37", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 1043.0, 595.0, 81.0, 22.0 ], - "text" : "print setting..." - } - - } -, { - "box" : { - "id" : "obj-33", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 926.5, 455.0, 72.0, 22.0 ], - "text" : "prepend set" - } - - } -, { - "box" : { - "id" : "obj-27", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 903.0, 490.0, 72.0, 22.0 ], - "text" : "prepend set" - } - - } -, { - "box" : { - "fontsize" : 12.0, - "id" : "obj-26", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "", "", "FullPacket" ], - "patching_rect" : [ 903.0, 409.0, 66.0, 22.0 ], - "text" : "o.route /l /r" - } - - } -, { - "box" : { - "id" : "obj-22", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 945.0, 764.0, 64.0, 22.0 ], - "text" : "send~ ch2" - } - - } -, { - "box" : { - "id" : "obj-23", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 860.0, 764.0, 64.0, 22.0 ], - "text" : "send~ ch1" - } - - } -, { - "box" : { - "id" : "obj-4", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 570.0, 805.0, 42.0, 22.0 ], - "text" : "out~ 2" - } - - } -, { - "box" : { - "fontsize" : 12.0, - "id" : "obj-10", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "signal" ], - "patching_rect" : [ 509.0, 681.0, 50.0, 22.0 ], - "text" : "*~ 0." - } - - } -, { - "box" : { - "comment" : "", - "id" : "obj-16", - "index" : 0, - "maxclass" : "outlet", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 509.0, 800.0, 36.0, 36.0 ] - } - - } -, { - "box" : { - "id" : "obj-11", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 194.0, 179.0, 97.0, 22.0 ], - "text" : "t l l" - } - - } -, { - "box" : { - "id" : "obj-17", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patcher" : { - "fileversion" : 1, - "appversion" : { - "major" : 9, - "minor" : 0, - "revision" : 6, - "architecture" : "x64", - "modernui" : 1 - } -, - "classnamespace" : "box", - "rect" : [ 327.0, 270.0, 453.0, 410.0 ], - "gridsize" : [ 15.0, 15.0 ], - "subpatcher_template" : "Untitled5_template", - "boxes" : [ { - "box" : { - "id" : "obj-4", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "", "FullPacket" ], - "patching_rect" : [ 120.0, 230.0, 187.0, 22.0 ], - "text" : "o.gather /choice /numfiles /variety" - } - - } -, { - "box" : { - "comment" : "", - "id" : "obj-2", - "index" : 1, - "maxclass" : "outlet", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 41.0, 329.0, 30.0, 30.0 ] - } - - } -, { - "box" : { - "comment" : "", - "id" : "obj-1", - "index" : 1, - "maxclass" : "inlet", - "numinlets" : 0, - "numoutlets" : 1, - "outlettype" : [ "FullPacket" ], - "patching_rect" : [ 41.0, 35.0, 30.0, 30.0 ] - } - - } -, { - "box" : { - "id" : "obj-3", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "FullPacket" ], - "patcher" : { - "fileversion" : 1, - "appversion" : { - "major" : 9, - "minor" : 0, - "revision" : 6, - "architecture" : "x64", - "modernui" : 1 - } -, - "classnamespace" : "box", - "rect" : [ 34.0, 87.0, 670.0, 779.0 ], - "gridsize" : [ 15.0, 15.0 ], - "subpatcher_template" : "Untitled5_template", - "boxes" : [ { - "box" : { - "id" : "obj-4", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "FullPacket" ], - "patching_rect" : [ 31.0, 92.0, 35.0, 22.0 ], - "text" : "o.var" - } - - } -, { - "box" : { - "id" : "obj-3", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 31.0, 205.0, 589.0, 22.0 ], - "text" : "t l l" - } - - } -, { - "box" : { - "id" : "obj-12", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "FullPacket", "FullPacket" ], - "patching_rect" : [ 31.0, 236.0, 295.0, 22.0 ], - "text" : "o.if exists(/choice)" - } - - } -, { - "box" : { - "fontface" : 0, - "id" : "obj-1", - "maxclass" : "o.expr.codebox", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "FullPacket", "FullPacket" ], - "patching_rect" : [ 31.0, 163.0, 110.0, 31.0 ], - "text" : "/variety ??= 1." - } - - } -, { - "box" : { - "id" : "obj-9", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "FullPacket" ], - "patching_rect" : [ 31.0, 131.0, 132.0, 22.0 ], - "text" : "o.union" - } - - } -, { - "box" : { - "comment" : "", - "id" : "obj-6", - "index" : 2, - "maxclass" : "inlet", - "numinlets" : 0, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 144.0, 39.0, 30.0, 30.0 ] - } - - } -, { - "box" : { - "fontface" : 0, - "id" : "obj-28", - "linecount" : 14, - "maxclass" : "o.expr.codebox", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "FullPacket", "FullPacket" ], - "patching_rect" : [ 115.0, 572.0, 355.0, 198.0 ], - "text" : "/last ??= 0, \n/choice ??= 0,\n\nif(/numfiles == 1, \n /buffer/name = /pbname + \".\" + 1,\n if(/rpercent < /variety,\n progn(\n /buffer/name = /pbname + \".\" + (/choice + 1), \n /last = /choice\n ),\n /buffer/name = /pbname + \".\" + (/last + 1)\n )\n), \ndelete(/choice)" - } - - } -, { - "box" : { - "id" : "obj-10", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "FullPacket" ], - "patching_rect" : [ 115.0, 540.0, 505.0, 22.0 ], - "text" : "o.union" - } - - } -, { - "box" : { - "comment" : "", - "id" : "obj-5", - "index" : 1, - "maxclass" : "inlet", - "numinlets" : 0, - "numoutlets" : 1, - "outlettype" : [ "FullPacket" ], - "patching_rect" : [ 31.0, 41.0, 30.0, 30.0 ] - } - - } -, { - "box" : { - "comment" : "", - "id" : "obj-8", - "index" : 1, - "maxclass" : "outlet", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 115.0, 795.0, 30.0, 30.0 ] - } - - } -, { - "box" : { - "id" : "obj-2", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "float" ], - "patching_rect" : [ 31.0, 367.0, 39.0, 22.0 ], - "text" : "/ 999." - } - - } -, { - "box" : { - "id" : "obj-7", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 115.0, 435.0, 140.0, 22.0 ], - "text" : "gate 2" - } - - } -, { - "box" : { - "id" : "obj-11", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "FullPacket" ], - "patching_rect" : [ 236.0, 471.0, 136.0, 22.0 ], - "text" : "o.pack /rpercent /choice" - } - - } -, { - "box" : { - "id" : "obj-17", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 4, - "outlettype" : [ "bang", "bang", "", "int" ], - "patching_rect" : [ 307.0, 273.0, 50.5, 22.0 ], - "text" : "t b b l 2" - } - - } -, { - "box" : { - "id" : "obj-13", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 3, - "outlettype" : [ "bang", "", "int" ], - "patching_rect" : [ 31.0, 273.0, 103.0, 22.0 ], - "text" : "t b l 1" - } - - } -, { - "box" : { - "id" : "obj-14", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "FullPacket" ], - "patching_rect" : [ 115.0, 471.0, 95.0, 22.0 ], - "text" : "o.pack /rpercent" - } - - } -, { - "box" : { - "id" : "obj-25", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 370.0, 404.0, 41.0, 22.0 ], - "text" : "set $1" - } - - } -, { - "box" : { - "id" : "obj-16", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 4, - "outlettype" : [ "", "", "", "FullPacket" ], - "patching_rect" : [ 407.0, 366.0, 181.0, 22.0 ], - "text" : "o.route /numfiles /variety /choice" - } - - } -, { - "box" : { - "id" : "obj-43", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 31.0, 329.0, 79.0, 22.0 ], - "text" : "random 1000" - } - - } -, { - "box" : { - "id" : "obj-18", - "maxclass" : "newobj", - "numinlets" : 3, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 353.0, 435.0, 127.0, 22.0 ], - "text" : "drunk 100 3" - } - - } - ], - "lines" : [ { - "patchline" : { - "destination" : [ "obj-3", 0 ], - "source" : [ "obj-1", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-28", 0 ], - "source" : [ "obj-10", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-10", 0 ], - "source" : [ "obj-11", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-13", 0 ], - "source" : [ "obj-12", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-17", 0 ], - "source" : [ "obj-12", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-16", 0 ], - "source" : [ "obj-13", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-43", 0 ], - "source" : [ "obj-13", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-7", 0 ], - "source" : [ "obj-13", 2 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-10", 0 ], - "source" : [ "obj-14", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-18", 1 ], - "source" : [ "obj-16", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-25", 0 ], - "source" : [ "obj-16", 2 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-16", 0 ], - "source" : [ "obj-17", 2 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-18", 0 ], - "source" : [ "obj-17", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-43", 0 ], - "source" : [ "obj-17", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-7", 0 ], - "source" : [ "obj-17", 3 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-11", 1 ], - "source" : [ "obj-18", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-7", 1 ], - "source" : [ "obj-2", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-18", 0 ], - "source" : [ "obj-25", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-8", 0 ], - "source" : [ "obj-28", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-10", 1 ], - "source" : [ "obj-3", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-12", 0 ], - "source" : [ "obj-3", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-9", 0 ], - "source" : [ "obj-4", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-2", 0 ], - "source" : [ "obj-43", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-4", 0 ], - "source" : [ "obj-5", 0 ] - } + "id" : "obj-33", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 945.0, 702.0, 72.0, 22.0 ], + "text" : "prepend set" + } - } -, { - "patchline" : { - "destination" : [ "obj-9", 1 ], - "source" : [ "obj-6", 0 ] - } + } +, { + "box" : { + "id" : "obj-27", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 860.0, 702.0, 72.0, 22.0 ], + "text" : "prepend set" + } - } -, { - "patchline" : { - "destination" : [ "obj-11", 0 ], - "source" : [ "obj-7", 1 ] - } + } +, { + "box" : { + "fontsize" : 12.0, + "id" : "obj-26", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 3, + "outlettype" : [ "", "", "FullPacket" ], + "patching_rect" : [ 860.0, 662.0, 66.0, 22.0 ], + "text" : "o.route /l /r" + } - } -, { - "patchline" : { - "destination" : [ "obj-14", 0 ], - "source" : [ "obj-7", 0 ] - } + } +, { + "box" : { + "id" : "obj-22", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 945.0, 764.0, 64.0, 22.0 ], + "text" : "send~ ch2" + } - } -, { - "patchline" : { - "destination" : [ "obj-1", 0 ], - "source" : [ "obj-9", 0 ] - } + } +, { + "box" : { + "id" : "obj-23", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 860.0, 764.0, 64.0, 22.0 ], + "text" : "send~ ch1" + } - } - ] - } + } +, { + "box" : { + "id" : "obj-4", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 570.0, 805.0, 42.0, 22.0 ], + "saved_object_attributes" : { + "attr_comment" : "" + } , - "patching_rect" : [ 41.0, 110.0, 98.0, 22.0 ], - "text" : "p handle_variety" - } - - } -, { - "box" : { - "id" : "obj-16", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 41.0, 146.0, 98.0, 22.0 ], - "text" : "t l l" - } - - } - ], - "lines" : [ { - "patchline" : { - "destination" : [ "obj-3", 0 ], - "source" : [ "obj-1", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-2", 0 ], - "source" : [ "obj-16", 0 ] - } + "text" : "out~ 2" + } - } -, { - "patchline" : { - "destination" : [ "obj-4", 0 ], - "source" : [ "obj-16", 1 ] - } + } +, { + "box" : { + "fontsize" : 12.0, + "id" : "obj-10", + "maxclass" : "newobj", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "signal" ], + "patching_rect" : [ 509.0, 681.0, 50.0, 22.0 ], + "text" : "*~ 0." + } - } -, { - "patchline" : { - "destination" : [ "obj-16", 0 ], - "source" : [ "obj-3", 0 ] - } + } +, { + "box" : { + "comment" : "", + "id" : "obj-16", + "index" : 0, + "maxclass" : "outlet", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 509.0, 800.0, 36.0, 36.0 ] + } - } -, { - "patchline" : { - "destination" : [ "obj-3", 1 ], - "midpoints" : [ 129.5, 262.0, 324.373687744140625, 262.0, 324.373687744140625, 100.0, 129.5, 100.0 ], - "source" : [ "obj-4", 0 ] - } + } +, { + "box" : { + "id" : "obj-11", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "" ], + "patching_rect" : [ 194.0, 179.0, 97.0, 22.0 ], + "text" : "t l l" + } - } - ] - } -, - "patching_rect" : [ 367.0, 189.0, 89.0, 22.0 ], - "text" : "p initial_bundle" + } +, { + "box" : { + "id" : "obj-17", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 367.0, 189.0, 99.0, 22.0 ], + "text" : "vt.handle_variety" } } @@ -967,6 +386,10 @@ "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 1220.0, 798.0, 35.0, 22.0 ], + "saved_object_attributes" : { + "attr_comment" : "" + } +, "text" : "out 1" } @@ -1154,10 +577,6 @@ "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 395.0, 798.0, 52.0, 22.0 ], - "saved_object_attributes" : { - "attr_comment" : "" - } -, "text" : "out~ 1" } @@ -1170,10 +589,6 @@ "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 292.0, 50.0, 38.0, 22.0 ], - "saved_object_attributes" : { - "attr_comment" : "" - } -, "text" : "in 1" } @@ -2436,15 +1851,6 @@ , { "patchline" : { "destination" : [ "obj-23", 0 ], - "order" : 1, - "source" : [ "obj-27", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-37", 0 ], - "order" : 0, "source" : [ "obj-27", 0 ] } @@ -2504,15 +1910,6 @@ , { "patchline" : { "destination" : [ "obj-22", 0 ], - "order" : 1, - "source" : [ "obj-33", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-37", 0 ], - "order" : 0, "source" : [ "obj-33", 0 ] } @@ -2757,6 +2154,13 @@ "name" : "o.var.mxo", "type" : "iLaX" } +, { + "name" : "vt.handle_variety.maxpat", + "bootpath" : "~/Documents/programming/git_repositories/sonogarden_maxproj", + "patcherrelativepath" : ".", + "type" : "JSON", + "implicit" : 1 + } ], "autosave" : 0 } -- 2.34.1