From a37d2b5dd7c2079ba2b6d3769e5ad81ce86864c7 Mon Sep 17 00:00:00 2001 From: equilet <2237372+equilet@users.noreply.github.com> Date: Wed, 7 May 2025 02:14:49 -0700 Subject: [PATCH] moved logic for buffer choice into epistretch patcher. only loads files and outputs number and name --- polybuf_container~.maxpat | 534 +------------------------------------- 1 file changed, 5 insertions(+), 529 deletions(-) diff --git a/polybuf_container~.maxpat b/polybuf_container~.maxpat index b77f507..c9fc9b4 100644 --- a/polybuf_container~.maxpat +++ b/polybuf_container~.maxpat @@ -27,18 +27,6 @@ "text" : "prepend set file/folder:" } - } -, { - "box" : { - "id" : "obj-24", - "maxclass" : "number", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 486.0, 100.0, 50.0, 22.0 ] - } - } , { "box" : { @@ -203,7 +191,7 @@ "maxclass" : "inlet", "numinlets" : 0, "numoutlets" : 1, - "outlettype" : [ "" ], + "outlettype" : [ "int" ], "patching_rect" : [ 255.0, 67.0, 30.0, 30.0 ] } @@ -925,7 +913,7 @@ ] } , - "patching_rect" : [ 675.0, 296.0, 125.0, 22.0 ], + "patching_rect" : [ 662.0, 246.0, 125.0, 22.0 ], "text" : "p clear_routine_&_init" } @@ -966,482 +954,6 @@ "text" : "routepass bang FullPacket" } - } -, { - "box" : { - "id" : "obj-7", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "FullPacket" ], - "patching_rect" : [ 55.0, 559.0, 35.0, 22.0 ], - "text" : "o.var" - } - - } -, { - "box" : { - "id" : "obj-9", - "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, 769.0 ], - "gridsize" : [ 15.0, 15.0 ], - "subpatcher_template" : "Untitled5_template", - "boxes" : [ { - "box" : { - "id" : "obj-3", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 34.0, 135.0, 589.0, 22.0 ], - "text" : "t l l" - } - - } -, { - "box" : { - "id" : "obj-12", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "FullPacket", "FullPacket" ], - "patching_rect" : [ 34.0, 166.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" : [ 34.0, 93.0, 110.0, 31.0 ], - "text" : "/variety ??= 1." - } - - } -, { - "box" : { - "id" : "obj-9", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "FullPacket" ], - "patching_rect" : [ 34.0, 61.0, 132.0, 22.0 ], - "text" : "o.union" - } - - } -, { - "box" : { - "comment" : "", - "id" : "obj-6", - "index" : 2, - "maxclass" : "inlet", - "numinlets" : 0, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 147.0, 21.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" : [ 118.0, 502.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" : [ 118.0, 470.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" : [ 34.0, 21.0, 30.0, 30.0 ] - } - - } -, { - "box" : { - "comment" : "", - "id" : "obj-8", - "index" : 1, - "maxclass" : "outlet", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 118.0, 725.0, 30.0, 30.0 ] - } - - } -, { - "box" : { - "id" : "obj-2", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "float" ], - "patching_rect" : [ 34.0, 297.0, 39.0, 22.0 ], - "text" : "/ 999." - } - - } -, { - "box" : { - "id" : "obj-7", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 118.0, 365.0, 140.0, 22.0 ], - "text" : "gate 2" - } - - } -, { - "box" : { - "id" : "obj-11", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "FullPacket" ], - "patching_rect" : [ 239.0, 401.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" : [ 310.0, 203.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" : [ 34.0, 203.0, 103.0, 22.0 ], - "text" : "t b l 1" - } - - } -, { - "box" : { - "id" : "obj-14", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "FullPacket" ], - "patching_rect" : [ 118.0, 401.0, 95.0, 22.0 ], - "text" : "o.pack /rpercent" - } - - } -, { - "box" : { - "id" : "obj-25", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 373.0, 334.0, 41.0, 22.0 ], - "text" : "set $1" - } - - } -, { - "box" : { - "id" : "obj-16", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 4, - "outlettype" : [ "", "", "", "FullPacket" ], - "patching_rect" : [ 410.0, 296.0, 181.0, 22.0 ], - "text" : "o.route /numfiles /variety /choice" - } - - } -, { - "box" : { - "id" : "obj-43", - "maxclass" : "newobj", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 34.0, 259.0, 79.0, 22.0 ], - "text" : "random 1000" - } - - } -, { - "box" : { - "id" : "obj-18", - "maxclass" : "newobj", - "numinlets" : 3, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 356.0, 365.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-2", 0 ], - "source" : [ "obj-43", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-9", 0 ], - "source" : [ "obj-5", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-9", 1 ], - "source" : [ "obj-6", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-11", 0 ], - "source" : [ "obj-7", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-14", 0 ], - "source" : [ "obj-7", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-1", 0 ], - "source" : [ "obj-9", 0 ] - } - - } - ] - } -, - "patching_rect" : [ 646.0, 376.0, 85.0, 22.0 ], - "text" : "p o.randomize" - } - - } -, { - "box" : { - "id" : "obj-6", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "patching_rect" : [ 646.0, 412.0, 98.0, 22.0 ], - "text" : "t l l" - } - } , { "box" : { @@ -1716,7 +1228,7 @@ } , { "patchline" : { - "destination" : [ "obj-7", 0 ], + "destination" : [ "obj-47", 0 ], "source" : [ "obj-14", 0 ] } @@ -1758,7 +1270,7 @@ } , { "patchline" : { - "destination" : [ "obj-9", 0 ], + "destination" : [ "obj-1", 0 ], "source" : [ "obj-21", 0 ] } @@ -1769,13 +1281,6 @@ "source" : [ "obj-22", 0 ] } - } -, { - "patchline" : { - "destination" : [ "obj-38", 0 ], - "source" : [ "obj-24", 0 ] - } - } , { "patchline" : { @@ -1786,7 +1291,7 @@ } , { "patchline" : { - "destination" : [ "obj-24", 0 ], + "destination" : [ "obj-38", 0 ], "source" : [ "obj-29", 1 ] } @@ -1938,28 +1443,6 @@ "source" : [ "obj-5", 1 ] } - } -, { - "patchline" : { - "destination" : [ "obj-7", 0 ], - "source" : [ "obj-6", 0 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-9", 1 ], - "midpoints" : [ 734.5, 444.0, 781.46160888671875, 444.0, 781.46160888671875, 366.0, 721.5, 366.0 ], - "source" : [ "obj-6", 1 ] - } - - } -, { - "patchline" : { - "destination" : [ "obj-1", 0 ], - "source" : [ "obj-7", 0 ] - } - } , { "patchline" : { @@ -1995,13 +1478,6 @@ "source" : [ "obj-87", 0 ] } - } -, { - "patchline" : { - "destination" : [ "obj-6", 0 ], - "source" : [ "obj-9", 0 ] - } - } ], "dependency_cache" : [ { -- 2.34.1