From c4909e7024dd2a907b44bd14fac72f9238856160 Mon Sep 17 00:00:00 2001 From: equilet <2237372+equilet@users.noreply.github.com> Date: Sun, 1 Jun 2025 17:03:42 -0700 Subject: [PATCH] now operates on density as an int for poly~ voice count --- vt.density.maxpat | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/vt.density.maxpat b/vt.density.maxpat index 277f081..076d06f 100644 --- a/vt.density.maxpat +++ b/vt.density.maxpat @@ -10,9 +10,23 @@ } , "classnamespace" : "box", - "rect" : [ 787.0, 161.0, 918.0, 664.0 ], + "rect" : [ 488.0, 161.0, 918.0, 664.0 ], "gridsize" : [ 15.0, 15.0 ], "boxes" : [ { + "box" : { + "fontface" : 0, + "id" : "obj-9", + "linecount" : 7, + "maxclass" : "o.expr.codebox", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "FullPacket", "FullPacket" ], + "patching_rect" : [ 505.0, 219.0, 361.0, 108.0 ], + "text" : "/idx = aseq(0, int32(/density * (/num/voices - 1))), \nmap(\n lambda([i], \n assign(\"/voices/\" + i, /bndl)\n ), /idx + 1\n), \ndelete(/bndl, /idx, /density)" + } + + } +, { "box" : { "id" : "obj-6", "maxclass" : "newobj", @@ -97,7 +111,7 @@ "numoutlets" : 2, "outlettype" : [ "FullPacket", "FullPacket" ], "patching_rect" : [ 179.0, 355.0, 361.0, 108.0 ], - "text" : "/idx = aseq(0, int32(/density * (/num/voices - 1))), \nmap(\n lambda([i], \n assign(\"/voices/\" + i, /bndl)\n ), /idx + 1\n), \ndelete(/bndl, /idx, /density)" + "text" : "/idx = aseq(0, /density - 1), \nmap(\n lambda([i], \n assign(\"/voices/\" + i, /bndl)\n ), /idx + 1\n), \ndelete(/bndl, /idx, /density)" } } -- 2.34.1