From 46c4194525e967b90d214b42513a79bd48c8bd31 Mon Sep 17 00:00:00 2001 From: equilet <2237372+equilet@users.noreply.github.com> Date: Mon, 30 Jun 2025 23:56:37 -0700 Subject: [PATCH] analyzer test --- misc/analyzer_test.maxpat | 695 +++++++++++++++++++++++++++++++++----- 1 file changed, 603 insertions(+), 92 deletions(-) diff --git a/misc/analyzer_test.maxpat b/misc/analyzer_test.maxpat index 3b18401..9d2f417 100644 --- a/misc/analyzer_test.maxpat +++ b/misc/analyzer_test.maxpat @@ -10,9 +10,418 @@ } , "classnamespace" : "box", - "rect" : [ 709.0, 180.0, 1000.0, 780.0 ], + "rect" : [ 224.0, 153.0, 1288.0, 783.0 ], "gridsize" : [ 15.0, 15.0 ], "boxes" : [ { + "box" : { + "fontface" : 0, + "fontname" : "Arial", + "fontsize" : 12.0, + "id" : "obj-52", + "maxclass" : "number~", + "mode" : 2, + "numinlets" : 2, + "numoutlets" : 2, + "outlettype" : [ "signal", "float" ], + "patching_rect" : [ 1014.0, 309.0, 159.0, 22.0 ], + "sig" : 0.0 + } + + } +, { + "box" : { + "fontname" : "Arial", + "fontsize" : 12.0, + "id" : "obj-49", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "signal" ], + "patching_rect" : [ 1014.0, 248.0, 146.0, 22.0 ], + "text" : "zsa.easy_centroid~ 256 8" + } + + } +, { + "box" : { + "id" : "obj-48", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 856.0, 572.0, 74.0, 22.0 ] + } + + } +, { + "box" : { + "id" : "obj-47", + "maxclass" : "button", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 738.0, 664.0, 24.0, 24.0 ] + } + + } +, { + "box" : { + "id" : "obj-45", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 770.0, 665.0, 109.0, 22.0 ], + "presentation_linecount" : 2, + "text" : "-1.179325" + } + + } +, { + "box" : { + "id" : "obj-44", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 910.0, 665.0, 125.0, 22.0 ], + "text" : "19.37544" + } + + } +, { + "box" : { + "id" : "obj-42", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 3, + "outlettype" : [ "bang", "", "" ], + "patching_rect" : [ 766.0, 600.0, 40.0, 22.0 ], + "text" : "t b l l" + } + + } +, { + "box" : { + "id" : "obj-41", + "maxclass" : "newobj", + "numinlets" : 2, + "numoutlets" : 2, + "outlettype" : [ "float", "int" ], + "patching_rect" : [ 936.0, 638.0, 78.0, 22.0 ], + "text" : "maximum -1." + } + + } +, { + "box" : { + "id" : "obj-40", + "maxclass" : "newobj", + "numinlets" : 2, + "numoutlets" : 2, + "outlettype" : [ "float", "int" ], + "patching_rect" : [ 801.0, 638.0, 124.0, 22.0 ], + "text" : "minimum 100000000." + } + + } +, { + "box" : { + "id" : "obj-39", + "maxclass" : "newobj", + "numinlets" : 2, + "numoutlets" : 2, + "outlettype" : [ "", "" ], + "patching_rect" : [ 766.0, 572.0, 81.0, 22.0 ], + "text" : "zl.group 2048" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-38", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 591.0, 688.0, 116.0, 22.0 ] + } + + } +, { + "box" : { + "id" : "obj-36", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 643.0, 504.0, 52.0, 20.0 ], + "text" : "1-based" + } + + } +, { + "box" : { + "ghostbar" : 23, + "id" : "obj-31", + "maxclass" : "multislider", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "" ], + "parameter_enable" : 0, + "patching_rect" : [ 591.0, 579.0, 33.0, 92.0 ], + "setminmax" : [ -96.0, 30.0 ], + "spacing" : 2 + } + + } +, { + "box" : { + "id" : "obj-30", + "maxclass" : "number", + "maximum" : 25, + "minimum" : 1, + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 644.0, 471.0, 50.0, 22.0 ] + } + + } +, { + "box" : { + "id" : "obj-27", + "maxclass" : "newobj", + "numinlets" : 2, + "numoutlets" : 2, + "outlettype" : [ "", "" ], + "patching_rect" : [ 591.0, 504.0, 37.0, 22.0 ], + "text" : "zl.nth" + } + + } +, { + "box" : { + "attr" : "fftsize", + "id" : "obj-26", + "maxclass" : "attrui", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "" ], + "parameter_enable" : 0, + "patching_rect" : [ 457.0, 417.0, 169.0, 22.0 ] + } + + } +, { + "box" : { + "attr" : "hopsize", + "id" : "obj-25", + "maxclass" : "attrui", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "" ], + "parameter_enable" : 0, + "patching_rect" : [ 457.0, 386.0, 169.0, 22.0 ] + } + + } +, { + "box" : { + "id" : "obj-23", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patcher" : { + "fileversion" : 1, + "appversion" : { + "major" : 9, + "minor" : 0, + "revision" : 6, + "architecture" : "x64", + "modernui" : 1 + } +, + "classnamespace" : "box", + "rect" : [ 0.0, 0.0, 1000.0, 780.0 ], + "gridsize" : [ 15.0, 15.0 ], + "boxes" : [ { + "box" : { + "fontface" : 0, + "id" : "obj-27", + "linecount" : 4, + "maxclass" : "o.expr.codebox", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "FullPacket", "FullPacket" ], + "patching_rect" : [ 50.0, 100.0, 222.0, 70.0 ], + "text" : "if(/loudness > -15., \n /pitch/out = /pitch/raw/midi, \n /pitch/out = 0.\n)" + } + + } +, { + "box" : { + "format" : 6, + "id" : "obj-25", + "maxclass" : "flonum", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 143.0, 263.0, 149.0, 22.0 ] + } + + } +, { + "box" : { + "id" : "obj-18", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 50.0, 234.0, 32.0, 22.0 ], + "text" : "mtof" + } + + } +, { + "box" : { + "id" : "obj-15", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "FullPacket" ], + "patching_rect" : [ 50.0, 189.0, 98.0, 22.0 ], + "text" : "o.route /pitch/out" + } + + } +, { + "box" : { + "comment" : "", + "id" : "obj-20", + "index" : 1, + "maxclass" : "inlet", + "numinlets" : 0, + "numoutlets" : 1, + "outlettype" : [ "FullPacket" ], + "patching_rect" : [ 50.0, 40.0, 30.0, 30.0 ] + } + + } +, { + "box" : { + "comment" : "", + "id" : "obj-22", + "index" : 1, + "maxclass" : "outlet", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 50.0, 345.0, 30.0, 30.0 ] + } + + } + ], + "lines" : [ { + "patchline" : { + "destination" : [ "obj-18", 0 ], + "source" : [ "obj-15", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-22", 0 ], + "order" : 1, + "source" : [ "obj-18", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-25", 0 ], + "order" : 0, + "source" : [ "obj-18", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-27", 0 ], + "source" : [ "obj-20", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-15", 0 ], + "source" : [ "obj-27", 0 ] + } + + } + ] + } +, + "patching_rect" : [ 401.0, 452.0, 84.0, 22.0 ], + "text" : "p pitch_output" + } + + } +, { + "box" : { + "id" : "obj-17", + "linecount" : 8, + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 728.0, 400.0, 217.0, 116.0 ], + "text" : "5.029141 2.80911 2.451141 2.253799 6.025356 6.54813 -0.335481 -2.055422 4.666232 0.072036 0.848584 -2.570892 -5.908357 -11.58 -14.145124 -13.346862 -13.583971 -14.658138 -12.994757 -16.171775 -18.886846 -21.880275 -27.06217 -26.194589 -37.034173" + } + + } +, { + "box" : { + "id" : "obj-14", + "maxclass" : "number", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "bang" ], + "parameter_enable" : 0, + "patching_rect" : [ 793.0, 357.0, 50.0, 22.0 ] + } + + } +, { + "box" : { + "id" : "obj-5", + "maxclass" : "newobj", + "numinlets" : 2, + "numoutlets" : 2, + "outlettype" : [ "", "" ], + "patching_rect" : [ 793.0, 329.0, 37.0, 22.0 ], + "text" : "zl.len" + } + + } +, { + "box" : { + "hiderwff" : 1, + "id" : "obj-9", + "maxclass" : "playbar", + "numinlets" : 1, + "numoutlets" : 2, + "outlettype" : [ "", "int" ], + "patching_rect" : [ 263.0, 83.0, 597.0, 20.0 ] + } + + } +, { "box" : { "channels" : 1, "id" : "obj-28", @@ -22,7 +431,7 @@ "numoutlets" : 4, "outlettype" : [ "signal", "", "float", "list" ], "parameter_enable" : 1, - "patching_rect" : [ 40.0, 447.0, 48.0, 136.0 ], + "patching_rect" : [ 95.0, 511.0, 48.0, 136.0 ], "saved_attribute_attributes" : { "valueof" : { "parameter_longname" : "live.gain~[1]", @@ -39,33 +448,6 @@ "varname" : "live.gain~[1]" } - } -, { - "box" : { - "fontface" : 0, - "id" : "obj-27", - "linecount" : 4, - "maxclass" : "o.expr.codebox", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "FullPacket", "FullPacket" ], - "patching_rect" : [ 397.0, 427.0, 222.0, 70.0 ], - "text" : "if(/loudness > -15., \n /pitch/out = /pitch/raw/midi, \n /pitch/out = 0.\n)" - } - - } -, { - "box" : { - "format" : 6, - "id" : "obj-25", - "maxclass" : "flonum", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "", "bang" ], - "parameter_enable" : 0, - "patching_rect" : [ 490.0, 590.0, 149.0, 22.0 ] - } - } , { "box" : { @@ -77,7 +459,7 @@ "numoutlets" : 4, "outlettype" : [ "signal", "", "float", "list" ], "parameter_enable" : 1, - "patching_rect" : [ 102.0, 447.0, 48.0, 136.0 ], + "patching_rect" : [ 401.0, 511.0, 48.0, 136.0 ], "saved_attribute_attributes" : { "valueof" : { "parameter_longname" : "live.gain~", @@ -102,58 +484,24 @@ "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "signal" ], - "patching_rect" : [ 397.0, 601.0, 43.0, 22.0 ], + "patching_rect" : [ 401.0, 484.0, 43.0, 22.0 ], "text" : "cycle~" } } , { "box" : { - "id" : "obj-18", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 397.0, 561.0, 32.0, 22.0 ], - "text" : "mtof" - } - - } -, { - "box" : { - "id" : "obj-15", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "", "FullPacket" ], - "patching_rect" : [ 397.0, 516.0, 98.0, 22.0 ], - "text" : "o.route /pitch/out" - } - - } -, { - "box" : { + "ghostbar" : 23, "id" : "obj-10", "maxclass" : "multislider", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "" ], "parameter_enable" : 0, - "patching_rect" : [ 735.0, 441.0, 132.0, 104.0 ], + "patching_rect" : [ 263.0, 233.0, 597.0, 92.0 ], "setminmax" : [ -96.0, 30.0 ], - "size" : 25 - } - - } -, { - "box" : { - "id" : "obj-14", - "maxclass" : "multislider", - "numinlets" : 1, - "numoutlets" : 2, - "outlettype" : [ "", "" ], - "parameter_enable" : 0, - "patching_rect" : [ 574.0, 300.5, 369.0, 81.0 ] + "size" : 25, + "spacing" : 2 } } @@ -164,7 +512,7 @@ "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "FullPacket" ], - "patching_rect" : [ 340.0, 366.0, 76.0, 22.0 ], + "patching_rect" : [ 344.0, 425.0, 76.0, 22.0 ], "text" : "o.route /bark" } @@ -176,7 +524,7 @@ "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 371.0, 186.0, 300.0, 100.0 ] + "patching_rect" : [ 263.0, 110.0, 597.0, 117.0 ] } } @@ -186,7 +534,7 @@ "maxclass" : "ezdac~", "numinlets" : 2, "numoutlets" : 0, - "patching_rect" : [ 193.0, 538.0, 45.0, 45.0 ] + "patching_rect" : [ 451.0, 665.0, 45.0, 45.0 ] } } @@ -197,7 +545,7 @@ "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 143.0, 215.0, 49.0, 22.0 ], + "patching_rect" : [ 95.0, 87.0, 49.0, 22.0 ], "text" : "open, 1" } @@ -209,7 +557,7 @@ "numinlets" : 2, "numoutlets" : 2, "outlettype" : [ "signal", "bang" ], - "patching_rect" : [ 143.0, 251.0, 95.0, 22.0 ], + "patching_rect" : [ 95.0, 123.0, 95.0, 22.0 ], "text" : "sfplay~ @loop 1" } @@ -217,12 +565,26 @@ , { "box" : { "id" : "obj-1", + "linecount" : 5, "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 9, "outlettype" : [ "list", "float", "float", "float", "list", "bang", "list", "list", "FullPacket" ], - "patching_rect" : [ 143.0, 330.0, 216.0, 22.0 ], - "text" : "analyzer~ 2048 1024 blackman70 0 32" + "patching_rect" : [ 136.0, 345.0, 227.0, 76.0 ], + "text" : "analyzer~ @buffersize 2048 @hopsize 1024 @fftsize 4096 @windowtype blackman70 @initialdelay 0 @numpitches 1 @numpeakstofind 10 @numpeakstooutput 10 @barkformat list" + } + + } +, { + "box" : { + "attr" : "buffersize", + "id" : "obj-24", + "maxclass" : "attrui", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "" ], + "parameter_enable" : 0, + "patching_rect" : [ 457.0, 357.0, 169.0, 22.0 ] } } @@ -236,38 +598,40 @@ } , { "patchline" : { - "destination" : [ "obj-10", 0 ], - "source" : [ "obj-13", 0 ] + "destination" : [ "obj-27", 0 ], + "order" : 1, + "source" : [ "obj-10", 0 ] } } , { "patchline" : { - "destination" : [ "obj-27", 0 ], - "source" : [ "obj-13", 1 ] + "destination" : [ "obj-5", 0 ], + "order" : 0, + "source" : [ "obj-10", 0 ] } } , { "patchline" : { - "destination" : [ "obj-18", 0 ], - "source" : [ "obj-15", 0 ] + "destination" : [ "obj-10", 0 ], + "order" : 1, + "source" : [ "obj-13", 0 ] } } , { "patchline" : { - "destination" : [ "obj-19", 0 ], - "order" : 1, - "source" : [ "obj-18", 0 ] + "destination" : [ "obj-17", 1 ], + "order" : 0, + "source" : [ "obj-13", 0 ] } } , { "patchline" : { - "destination" : [ "obj-25", 0 ], - "order" : 0, - "source" : [ "obj-18", 0 ] + "destination" : [ "obj-23", 0 ], + "source" : [ "obj-13", 1 ] } } @@ -296,7 +660,35 @@ } , { "patchline" : { - "destination" : [ "obj-15", 0 ], + "destination" : [ "obj-19", 0 ], + "source" : [ "obj-23", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "source" : [ "obj-24", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "source" : [ "obj-25", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "source" : [ "obj-26", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-31", 0 ], "source" : [ "obj-27", 0 ] } @@ -319,8 +711,94 @@ } , { "patchline" : { - "destination" : [ "obj-1", 0 ], + "destination" : [ "obj-27", 1 ], + "source" : [ "obj-30", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-38", 0 ], "order" : 1, + "source" : [ "obj-31", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-39", 0 ], + "order" : 0, + "source" : [ "obj-31", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-42", 0 ], + "source" : [ "obj-39", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-45", 1 ], + "source" : [ "obj-40", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-44", 1 ], + "source" : [ "obj-41", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-40", 0 ], + "source" : [ "obj-42", 1 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-41", 0 ], + "source" : [ "obj-42", 2 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-47", 0 ], + "source" : [ "obj-42", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-39", 1 ], + "source" : [ "obj-48", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-52", 0 ], + "source" : [ "obj-49", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-14", 0 ], + "source" : [ "obj-5", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-1", 0 ], + "order" : 2, "source" : [ "obj-6", 0 ] } @@ -328,7 +806,7 @@ , { "patchline" : { "destination" : [ "obj-12", 0 ], - "order" : 0, + "order" : 1, "source" : [ "obj-6", 0 ] } @@ -336,7 +814,15 @@ , { "patchline" : { "destination" : [ "obj-28", 0 ], - "order" : 2, + "order" : 3, + "source" : [ "obj-6", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-49", 0 ], + "order" : 0, "source" : [ "obj-6", 0 ] } @@ -347,6 +833,13 @@ "source" : [ "obj-8", 0 ] } + } +, { + "patchline" : { + "destination" : [ "obj-6", 0 ], + "source" : [ "obj-9", 0 ] + } + } ], "parameters" : { @@ -376,6 +869,24 @@ "name" : "o.route.mxo", "type" : "iLaX" } +, { + "name" : "zsa.abs_centroid~.maxpat", + "bootpath" : "~/Documents/Max 9/Packages/zsa.descriptors/misc", + "patcherrelativepath" : "../../../../Max 9/Packages/zsa.descriptors/misc", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "zsa.centroid~.mxo", + "type" : "iLaX" + } +, { + "name" : "zsa.easy_centroid~.maxpat", + "bootpath" : "~/Documents/Max 9/Packages/zsa.descriptors/misc", + "patcherrelativepath" : "../../../../Max 9/Packages/zsa.descriptors/misc", + "type" : "JSON", + "implicit" : 1 + } ], "autosave" : 0 } -- 2.34.1