From 9f536a25c418e94a1827e1bf2e755172e16f6de5 Mon Sep 17 00:00:00 2001 From: equilet <2237372+equilet@users.noreply.github.com> Date: Fri, 27 Jun 2025 19:05:47 -0700 Subject: [PATCH] resets when /count/reset var is present --- vt.demosnd~.maxpat | 212 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 193 insertions(+), 19 deletions(-) diff --git a/vt.demosnd~.maxpat b/vt.demosnd~.maxpat index 07c899d..62181d7 100644 --- a/vt.demosnd~.maxpat +++ b/vt.demosnd~.maxpat @@ -10,17 +10,136 @@ } , "classnamespace" : "box", - "rect" : [ 109.0, 158.0, 452.0, 651.0 ], + "rect" : [ 320.0, 204.0, 536.0, 689.0 ], "gridsize" : [ 15.0, 15.0 ], "subpatcher_template" : "Untitled5_template", "boxes" : [ { + "box" : { + "id" : "obj-18", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "FullPacket" ], + "patcher" : { + "fileversion" : 1, + "appversion" : { + "major" : 9, + "minor" : 0, + "revision" : 6, + "architecture" : "x64", + "modernui" : 1 + } +, + "classnamespace" : "box", + "rect" : [ 59.0, 106.0, 252.0, 263.0 ], + "gridsize" : [ 15.0, 15.0 ], + "subpatcher_template" : "Untitled5_template", + "boxes" : [ { + "box" : { + "fontface" : 0, + "id" : "obj-15", + "linecount" : 2, + "maxclass" : "o.expr.codebox", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "FullPacket", "FullPacket" ], + "patching_rect" : [ 50.0, 100.0, 143.0, 44.0 ], + "text" : "/count = 1, \ndelete(/count/reset)" + } + + } +, { + "box" : { + "comment" : "", + "id" : "obj-16", + "index" : 1, + "maxclass" : "inlet", + "numinlets" : 0, + "numoutlets" : 1, + "outlettype" : [ "FullPacket" ], + "patching_rect" : [ 50.0, 40.0, 30.0, 30.0 ] + } + + } +, { + "box" : { + "comment" : "", + "id" : "obj-17", + "index" : 1, + "maxclass" : "outlet", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 50.0, 204.0, 30.0, 30.0 ] + } + + } + ], + "lines" : [ { + "patchline" : { + "destination" : [ "obj-17", 0 ], + "source" : [ "obj-15", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-15", 0 ], + "source" : [ "obj-16", 0 ] + } + + } + ] + } +, + "patching_rect" : [ 126.0, 139.0, 45.0, 22.0 ], + "text" : "p reset" + } + + } +, { + "box" : { + "id" : "obj-14", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "FullPacket", "FullPacket" ], + "patching_rect" : [ 126.0, 88.0, 129.0, 22.0 ], + "text" : "o.if exists(/count/reset)" + } + + } +, { + "box" : { + "id" : "obj-13", + "maxclass" : "newobj", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "FullPacket" ], + "patching_rect" : [ 236.0, 139.0, 48.0, 22.0 ], + "text" : "o.union" + } + + } +, { + "box" : { + "id" : "obj-11", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 3, + "outlettype" : [ "", "", "" ], + "patching_rect" : [ 126.0, 389.0, 130.0, 22.0 ], + "text" : "t l l l" + } + + } +, { "box" : { "id" : "obj-12", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 284.0, 447.0, 29.5, 22.0 ], + "patching_rect" : [ 459.0, 545.0, 29.5, 22.0 ], "text" : "0" } @@ -32,7 +151,7 @@ "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "int" ], - "patching_rect" : [ 50.0, 99.0, 271.0, 22.0 ], + "patching_rect" : [ 126.0, 58.0, 324.0, 22.0 ], "text" : "t l 1" } @@ -45,7 +164,7 @@ "maxclass" : "outlet", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 302.0, 536.0, 30.0, 30.0 ] + "patching_rect" : [ 431.0, 610.0, 30.0, 30.0 ] } } @@ -53,12 +172,13 @@ "box" : { "fontface" : 0, "id" : "obj-8", + "linecount" : 7, "maxclass" : "o.expr.codebox", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "FullPacket", "FullPacket" ], - "patching_rect" : [ 50.0, 140.0, 222.0, 31.0 ], - "text" : "/buffer/name = /pbname + \".\" + 1" + "patching_rect" : [ 126.0, 201.0, 269.0, 108.0 ], + "text" : "/count ??= 1,\n/buffer/name = /pbname + \".\" + /count, \n/sdelay = 0.,\nif(/count == /numfiles, \n /count = 1, \n /count++\n)" } } @@ -69,7 +189,7 @@ "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 111.5, 305.0, 72.0, 22.0 ], + "patching_rect" : [ 188.0, 468.0, 72.0, 22.0 ], "text" : "prepend set" } @@ -82,7 +202,7 @@ "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 236.0, 385.5, 113.0, 23.0 ], + "patching_rect" : [ 312.0, 545.0, 113.0, 23.0 ], "saved_bundle_data" : [ 35, 98, 117, 110, 100, 108, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 47, 115, 116, 111, 112, 0, 0, 0, 44, 115, 0, 0, 98, 97, 110, 103, 0, 0, 0, 0 ], "saved_bundle_length" : 40, "text" : "/stop : \"bang\"" @@ -97,7 +217,7 @@ "maxclass" : "outlet", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 236.0, 540.0, 30.0, 30.0 ] + "patching_rect" : [ 312.0, 610.0, 30.0, 30.0 ] } } @@ -108,7 +228,7 @@ "numinlets" : 2, "numoutlets" : 2, "outlettype" : [ "signal", "bang" ], - "patching_rect" : [ 50.0, 348.0, 205.0, 22.0 ], + "patching_rect" : [ 126.0, 504.0, 205.0, 22.0 ], "text" : "line~" } @@ -120,7 +240,7 @@ "numinlets" : 1, "numoutlets" : 3, "outlettype" : [ "", "", "FullPacket" ], - "patching_rect" : [ 50.0, 258.0, 142.0, 22.0 ], + "patching_rect" : [ 126.0, 440.0, 142.0, 22.0 ], "text" : "o.route /line /buffer/name" } @@ -132,7 +252,7 @@ "numinlets" : 1, "numoutlets" : 3, "outlettype" : [ "signal", "signal", "bang" ], - "patching_rect" : [ 50.0, 386.0, 115.0, 22.0 ], + "patching_rect" : [ 126.0, 545.0, 115.0, 22.0 ], "text" : "play~ buffet-demo 2" } @@ -145,7 +265,7 @@ "maxclass" : "outlet", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 99.0, 540.0, 30.0, 30.0 ] + "patching_rect" : [ 175.0, 610.0, 30.0, 30.0 ] } } @@ -353,7 +473,7 @@ ] } , - "patching_rect" : [ 50.0, 178.0, 92.0, 22.0 ], + "patching_rect" : [ 126.0, 326.0, 92.0, 22.0 ], "text" : "p o.getbufferlen" } @@ -366,7 +486,7 @@ "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "FullPacket", "FullPacket" ], - "patching_rect" : [ 50.0, 206.0, 282.0, 31.0 ], + "patching_rect" : [ 126.0, 351.0, 282.0, 31.0 ], "text" : "/line = [0., 0, /buffer/len, /buffer/len]" } @@ -380,7 +500,7 @@ "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 50.0, 40.0, 30.0, 30.0 ] + "patching_rect" : [ 126.0, 9.0, 30.0, 30.0 ] } } @@ -392,14 +512,14 @@ "maxclass" : "outlet", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 50.0, 540.0, 30.0, 30.0 ] + "patching_rect" : [ 126.0, 610.0, 30.0, 30.0 ] } } ], "lines" : [ { "patchline" : { - "destination" : [ "obj-8", 0 ], + "destination" : [ "obj-14", 0 ], "source" : [ "obj-10", 0 ] } @@ -410,6 +530,28 @@ "source" : [ "obj-10", 1 ] } + } +, { + "patchline" : { + "destination" : [ "obj-13", 1 ], + "midpoints" : [ 246.5, 419.0660400390625, 427.631683349609375, 419.0660400390625, 427.631683349609375, 133.32244873046875, 274.5, 133.32244873046875 ], + "source" : [ "obj-11", 2 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-3", 0 ], + "source" : [ "obj-11", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-5", 0 ], + "source" : [ "obj-11", 1 ] + } + } , { "patchline" : { @@ -417,6 +559,34 @@ "source" : [ "obj-12", 0 ] } + } +, { + "patchline" : { + "destination" : [ "obj-8", 0 ], + "source" : [ "obj-13", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-13", 0 ], + "source" : [ "obj-14", 1 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-18", 0 ], + "source" : [ "obj-14", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-8", 0 ], + "source" : [ "obj-18", 0 ] + } + } , { "patchline" : { @@ -478,7 +648,7 @@ } , { "patchline" : { - "destination" : [ "obj-3", 0 ], + "destination" : [ "obj-11", 0 ], "source" : [ "obj-62", 0 ] } @@ -520,6 +690,10 @@ "name" : "o.expr.codebox.mxo", "type" : "iLaX" } +, { + "name" : "o.if.mxo", + "type" : "iLaX" + } , { "name" : "o.pack.mxo", "type" : "iLaX" -- 2.34.1