From d4d38842c7a4c0c89483c26101eceda36b8e2c8d Mon Sep 17 00:00:00 2001 From: computermusik Date: Wed, 28 Aug 2024 17:20:08 +0200 Subject: [PATCH] 6-channel playback implemented --- poly-vbap.maxpat | 206 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 157 insertions(+), 49 deletions(-) diff --git a/poly-vbap.maxpat b/poly-vbap.maxpat index 27f18cf..0f6afc8 100644 --- a/poly-vbap.maxpat +++ b/poly-vbap.maxpat @@ -4,13 +4,13 @@ "appversion" : { "major" : 8, "minor" : 6, - "revision" : 2, + "revision" : 4, "architecture" : "x64", "modernui" : 1 } , "classnamespace" : "box", - "rect" : [ 253.0, 100.0, 899.0, 742.0 ], + "rect" : [ 153.0, 100.0, 1052.0, 790.0 ], "bglocked" : 0, "openinpresentation" : 0, "default_fontsize" : 12.0, @@ -39,13 +39,85 @@ "subpatcher_template" : "", "assistshowspatchername" : 0, "boxes" : [ { + "box" : { + "id" : "obj-47", + "maxclass" : "newobj", + "numinlets" : 3, + "numoutlets" : 3, + "outlettype" : [ "bang", "bang", "" ], + "patching_rect" : [ 314.0, 46.0, 44.0, 22.0 ], + "text" : "sel 4 6" + } + + } +, { + "box" : { + "id" : "obj-46", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 314.0, 18.0, 28.0, 22.0 ], + "saved_object_attributes" : { + "attr_comment" : "" + } +, + "text" : "in 2" + } + + } +, { + "box" : { + "id" : "obj-44", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 808.0, 395.0, 150.0, 20.0 ] + } + + } +, { + "box" : { + "id" : "obj-41", + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 889.0, 331.0, 150.0, 20.0 ], + "text" : "120 60 0 -60 -120 -180 " + } + + } +, { + "box" : { + "id" : "obj-22", + "maxclass" : "panel", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 687.0, 58.0, 100.0, 200.0 ], + "rounded" : 0 + } + + } +, { + "box" : { + "id" : "obj-13", + "maxclass" : "message", + "numinlets" : 2, + "numoutlets" : 1, + "outlettype" : [ "" ], + "patching_rect" : [ 326.5, 89.0, 255.0, 22.0 ], + "text" : "define_loudspeakers 2 -30 30 90 150 -150 -90" + } + + } +, { "box" : { "id" : "obj-38", "maxclass" : "newobj", "numinlets" : 6, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 125.5, 342.0, 107.0, 22.0 ], + "patching_rect" : [ 126.0, 393.0, 107.0, 22.0 ], "text" : "scale 0.5 1. 100. 0" } @@ -57,7 +129,7 @@ "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "float", "float" ], - "patching_rect" : [ 83.5, 291.0, 61.0, 22.0 ], + "patching_rect" : [ 84.0, 342.0, 61.0, 22.0 ], "text" : "unpack f f" } @@ -69,7 +141,7 @@ "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 583.0, 132.0, 47.0, 22.0 ], + "patching_rect" : [ 583.0, 183.0, 47.0, 22.0 ], "text" : "pack f f" } @@ -83,7 +155,7 @@ "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, - "patching_rect" : [ 583.0, 101.0, 50.0, 22.0 ] + "patching_rect" : [ 583.0, 152.0, 50.0, 22.0 ] } } @@ -94,7 +166,7 @@ "numinlets" : 2, "numoutlets" : 2, "outlettype" : [ "bang", "" ], - "patching_rect" : [ 84.0, 211.0, 29.5, 22.0 ], + "patching_rect" : [ 84.0, 262.0, 29.5, 22.0 ], "text" : "sel" } @@ -106,7 +178,7 @@ "numinlets" : 2, "numoutlets" : 2, "outlettype" : [ "", "" ], - "patching_rect" : [ 84.0, 174.0, 47.0, 22.0 ], + "patching_rect" : [ 84.0, 225.0, 47.0, 22.0 ], "text" : "zl.nth 2" } @@ -118,7 +190,7 @@ "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 84.0, 144.0, 143.0, 22.0 ], + "patching_rect" : [ 84.0, 195.0, 143.0, 22.0 ], "text" : "fromsymbol @separator /" } @@ -130,7 +202,7 @@ "numinlets" : 2, "numoutlets" : 2, "outlettype" : [ "", "" ], - "patching_rect" : [ 83.5, 258.0, 76.5, 22.0 ], + "patching_rect" : [ 84.0, 309.0, 76.5, 22.0 ], "text" : "zl.reg" } @@ -142,7 +214,7 @@ "numinlets" : 2, "numoutlets" : 2, "outlettype" : [ "", "" ], - "patching_rect" : [ 84.0, 108.0, 76.0, 22.0 ], + "patching_rect" : [ 84.0, 159.0, 76.0, 22.0 ], "text" : "zl.slice 1" } @@ -154,7 +226,11 @@ "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 84.0, 43.0, 28.0, 22.0 ], + "patching_rect" : [ 84.0, 18.0, 28.0, 22.0 ], + "saved_object_attributes" : { + "attr_comment" : "" + } +, "text" : "in 1" } @@ -166,7 +242,7 @@ "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "int" ], - "patching_rect" : [ 230.0, 522.0, 29.5, 22.0 ], + "patching_rect" : [ 230.0, 573.0, 29.5, 22.0 ], "text" : "- 1" } @@ -178,7 +254,7 @@ "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "bang" ], - "patching_rect" : [ 230.0, 22.0, 58.0, 22.0 ], + "patching_rect" : [ 230.0, 64.0, 58.0, 22.0 ], "text" : "loadbang" } @@ -190,7 +266,7 @@ "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 230.0, 559.0, 103.0, 22.0 ], + "patching_rect" : [ 230.0, 610.0, 103.0, 22.0 ], "text" : "join @triggers 1" } @@ -202,7 +278,7 @@ "numinlets" : 1, "numoutlets" : 3, "outlettype" : [ "int", "int", "int" ], - "patching_rect" : [ 230.0, 144.0, 56.0, 22.0 ], + "patching_rect" : [ 230.0, 195.0, 56.0, 22.0 ], "text" : "thispoly~" } @@ -213,7 +289,11 @@ "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 230.0, 606.0, 35.0, 22.0 ], + "patching_rect" : [ 230.0, 657.0, 35.0, 22.0 ], + "saved_object_attributes" : { + "attr_comment" : "" + } +, "text" : "out 1" } @@ -229,7 +309,7 @@ "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 703.0, 586.5, 138.0, 49.0 ], + "patching_rect" : [ 703.0, 638.0, 138.0, 49.0 ], "text" : "Gains for speakers are visualized here.", "textcolor" : [ 0.3, 0.3, 0.3, 1.0 ] } @@ -241,7 +321,7 @@ "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 682.0, 385.0, 54.0, 20.0 ], + "patching_rect" : [ 682.0, 436.0, 54.0, 20.0 ], "text" : "Spread" } @@ -257,7 +337,7 @@ "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 563.0, 223.0, 278.0, 64.0 ], + "patching_rect" : [ 563.0, 274.0, 278.0, 64.0 ], "text" : "Move the yellow knob in this nodes object to change the perceived position of your sound source.", "textcolor" : [ 0.3, 0.3, 0.3, 1.0 ] } @@ -269,7 +349,7 @@ "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 523.0, 385.0, 54.0, 20.0 ], + "patching_rect" : [ 523.0, 436.0, 54.0, 20.0 ], "text" : "Azimuth" } @@ -283,7 +363,7 @@ "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, - "patching_rect" : [ 627.0, 385.0, 50.0, 22.0 ] + "patching_rect" : [ 627.0, 436.0, 50.0, 22.0 ] } } @@ -299,7 +379,7 @@ "appversion" : { "major" : 8, "minor" : 6, - "revision" : 2, + "revision" : 4, "architecture" : "x64", "modernui" : 1 } @@ -426,7 +506,7 @@ ] } , - "patching_rect" : [ 360.0, 385.0, 53.0, 22.0 ], + "patching_rect" : [ 360.0, 436.0, 53.0, 22.0 ], "saved_object_attributes" : { "description" : "", "digest" : "", @@ -445,7 +525,7 @@ "numinlets" : 1, "numoutlets" : 3, "outlettype" : [ "", "", "" ], - "patching_rect" : [ 314.0, 118.0, 111.0, 22.0 ], + "patching_rect" : [ 314.0, 169.0, 111.0, 22.0 ], "text" : "t l l l" } @@ -462,7 +542,7 @@ "appversion" : { "major" : 8, "minor" : 6, - "revision" : 2, + "revision" : 4, "architecture" : "x64", "modernui" : 1 } @@ -672,7 +752,7 @@ ] } , - "patching_rect" : [ 406.0, 150.0, 113.0, 22.0 ], + "patching_rect" : [ 406.0, 201.0, 113.0, 22.0 ], "saved_object_attributes" : { "description" : "", "digest" : "", @@ -696,7 +776,7 @@ "appversion" : { "major" : 8, "minor" : 6, - "revision" : 2, + "revision" : 4, "architecture" : "x64", "modernui" : 1 } @@ -861,7 +941,7 @@ ] } , - "patching_rect" : [ 471.0, 342.0, 175.0, 22.0 ], + "patching_rect" : [ 471.0, 393.0, 175.0, 22.0 ], "saved_object_attributes" : { "description" : "", "digest" : "", @@ -880,7 +960,7 @@ "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 406.0, 342.0, 47.0, 22.0 ], + "patching_rect" : [ 406.0, 393.0, 47.0, 22.0 ], "text" : "t getad" } @@ -902,7 +982,7 @@ "numoutlets" : 3, "outlettype" : [ "", "", "" ], "parameter_enable" : 0, - "patching_rect" : [ 406.0, 185.0, 149.0, 148.57908599999999 ], + "patching_rect" : [ 406.0, 236.0, 149.0, 148.57908599999999 ], "pointcolor" : [ 0.317647, 0.654902, 0.976471, 1.0 ], "xplace" : [ 0.146446609406726, 0.853553390593274, 0.853553390593274, 0.146446609406726 ], "yplace" : [ 0.146446609406726, 0.146446609406726, 0.853553390593274, 0.853553390593274 ] @@ -920,7 +1000,7 @@ "mode" : 0, "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 406.0, 185.0, 149.0, 148.57908599999999 ], + "patching_rect" : [ 406.0, 236.0, 149.0, 148.57908599999999 ], "proportion" : 0.39, "shape" : 1 } @@ -933,7 +1013,7 @@ "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 314.0, 78.0, 219.0, 22.0 ], + "patching_rect" : [ 314.0, 129.0, 219.0, 22.0 ], "text" : "define_loudspeakers 2 -45 45 135 -135" } @@ -950,7 +1030,7 @@ "appversion" : { "major" : 8, "minor" : 6, - "revision" : 2, + "revision" : 4, "architecture" : "x64", "modernui" : 1 } @@ -1103,7 +1183,7 @@ ] } , - "patching_rect" : [ 463.5, 554.0, 65.0, 22.0 ], + "patching_rect" : [ 464.0, 605.0, 65.0, 22.0 ], "saved_object_attributes" : { "description" : "", "digest" : "", @@ -1125,7 +1205,7 @@ "numoutlets" : 2, "outlettype" : [ "", "" ], "parameter_enable" : 0, - "patching_rect" : [ 463.5, 609.0, 231.0, 118.0 ], + "patching_rect" : [ 464.0, 660.0, 231.0, 118.0 ], "setminmax" : [ 0.0, 1.0 ], "size" : 4 } @@ -1138,7 +1218,7 @@ "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "bang", "float" ], - "patching_rect" : [ 471.0, 418.0, 37.0, 22.0 ], + "patching_rect" : [ 471.0, 469.0, 37.0, 22.0 ], "text" : "t b f" } @@ -1150,7 +1230,7 @@ "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "bang", "float" ], - "patching_rect" : [ 627.0, 418.0, 37.0, 22.0 ], + "patching_rect" : [ 627.0, 469.0, 37.0, 22.0 ], "text" : "t b f" } @@ -1164,7 +1244,7 @@ "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, - "patching_rect" : [ 471.0, 385.0, 50.0, 22.0 ], + "patching_rect" : [ 471.0, 436.0, 50.0, 22.0 ], "varname" : "gain[2]" } @@ -1177,7 +1257,7 @@ "numinlets" : 5, "numoutlets" : 5, "outlettype" : [ "list", "float", "float", "float", "float" ], - "patching_rect" : [ 314.0, 491.0, 61.0, 22.0 ], + "patching_rect" : [ 314.0, 542.0, 61.0, 22.0 ], "text" : "vbap 0 0" } @@ -1193,7 +1273,7 @@ "mode" : 0, "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 406.0, 185.0, 149.0, 148.57908599999999 ], + "patching_rect" : [ 406.0, 236.0, 149.0, 148.57908599999999 ], "proportion" : 0.39, "rounded" : 0 } @@ -1203,7 +1283,7 @@ "lines" : [ { "patchline" : { "destination" : [ "obj-33", 1 ], - "midpoints" : [ 498.5, 469.999938999999927, 334.0, 469.999938999999927 ], + "midpoints" : [ 498.5, 520.999938999999927, 334.0, 520.999938999999927 ], "source" : [ "obj-10", 1 ] } @@ -1211,7 +1291,7 @@ , { "patchline" : { "destination" : [ "obj-33", 0 ], - "midpoints" : [ 480.5, 457.999938999999927, 323.5, 457.999938999999927 ], + "midpoints" : [ 480.5, 508.999938999999927, 323.5, 508.999938999999927 ], "source" : [ "obj-10", 0 ] } @@ -1219,7 +1299,7 @@ , { "patchline" : { "destination" : [ "obj-33", 3 ], - "midpoints" : [ 654.5, 477.999938999999927, 355.0, 477.999938999999927 ], + "midpoints" : [ 654.5, 528.999938999999927, 355.0, 528.999938999999927 ], "source" : [ "obj-12", 1 ] } @@ -1227,10 +1307,17 @@ , { "patchline" : { "destination" : [ "obj-33", 0 ], - "midpoints" : [ 636.5, 457.999938999999927, 323.5, 457.999938999999927 ], + "midpoints" : [ 636.5, 508.999938999999927, 323.5, 508.999938999999927 ], "source" : [ "obj-12", 0 ] } + } +, { + "patchline" : { + "destination" : [ "obj-20", 0 ], + "source" : [ "obj-13", 0 ] + } + } , { "patchline" : { @@ -1347,7 +1434,7 @@ , { "patchline" : { "destination" : [ "obj-73", 0 ], - "midpoints" : [ 369.5, 584.5, 473.0, 584.5 ], + "midpoints" : [ 369.5, 635.5, 473.5, 635.5 ], "source" : [ "obj-32", 0 ] } @@ -1355,7 +1442,7 @@ , { "patchline" : { "destination" : [ "obj-3", 0 ], - "midpoints" : [ 323.5, 533.0, 473.0, 533.0 ], + "midpoints" : [ 323.5, 584.0, 473.5, 584.0 ], "order" : 0, "source" : [ "obj-33", 0 ] } @@ -1398,6 +1485,27 @@ "source" : [ "obj-4", 0 ] } + } +, { + "patchline" : { + "destination" : [ "obj-47", 0 ], + "source" : [ "obj-46", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-13", 0 ], + "source" : [ "obj-47", 1 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-8", 0 ], + "source" : [ "obj-47", 0 ] + } + } , { "patchline" : { @@ -1409,7 +1517,7 @@ , { "patchline" : { "destination" : [ "obj-64", 0 ], - "midpoints" : [ 415.5, 371.499938999999983, 389.5, 371.499938999999983, 389.5, 174.499999999999972, 415.5, 174.499999999999972 ], + "midpoints" : [ 415.5, 422.499938999999983, 389.5, 422.499938999999983, 389.5, 225.499999999999972, 415.5, 225.499999999999972 ], "source" : [ "obj-53", 0 ] } @@ -1468,7 +1576,7 @@ , { "patchline" : { "destination" : [ "obj-20", 0 ], - "midpoints" : [ 323.5, 110.333312999999976, 323.5, 110.333312999999976 ], + "midpoints" : [ 323.5, 161.333312999999976, 323.5, 161.333312999999976 ], "source" : [ "obj-8", 0 ] }