diff --git a/common.js b/common.js index c84a876..28c0e25 100644 --- a/common.js +++ b/common.js @@ -1,3 +1,9 @@ +function isNumeric(str) { + if (typeof str != "string") return false // we only process strings! + return !isNaN(str) && // use type coercion to parse the _entirety_ of the string (`parseFloat` alone does not do this)... + !isNaN(parseFloat(str)) // ...and ensure strings of whitespace fail + } + function DropDown(props) { return e('select', {type: "number", onChange: props.onChange, value: props.value}, ...props.options.map((item) => Option(item))); diff --git a/example-with-dj.maxpat b/example-with-dj.maxpat index 74fd16f..3e26901 100644 --- a/example-with-dj.maxpat +++ b/example-with-dj.maxpat @@ -10,7 +10,7 @@ } , "classnamespace" : "box", - "rect" : [ 116.0, 226.0, 1345.0, 588.0 ], + "rect" : [ 87.0, 170.0, 1345.0, 588.0 ], "bglocked" : 0, "openinpresentation" : 0, "default_fontsize" : 12.0, @@ -39,30 +39,6 @@ "subpatcher_template" : "", "assistshowspatchername" : 0, "boxes" : [ { - "box" : { - "id" : "obj-11", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 998.0, 270.0, 121.0, 22.0 ], - "text" : "Melodic Cohesion 30" - } - - } -, { - "box" : { - "id" : "obj-9", - "maxclass" : "message", - "numinlets" : 2, - "numoutlets" : 1, - "outlettype" : [ "" ], - "patching_rect" : [ 921.0, 221.0, 143.0, 22.0 ], - "text" : "harmoniclarity 90.727661" - } - - } -, { "box" : { "id" : "obj-8", "linecount" : 2, @@ -93,7 +69,7 @@ "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 1019.866710782051086, 165.542056441307068, 104.0, 22.0 ], + "patching_rect" : [ 999.866710782051086, 199.542056441307068, 104.0, 22.0 ], "text" : "save localStorage" } @@ -126,8 +102,8 @@ "box" : { "data" : { "data" : { - "enumArrays" : [ [ 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ "2", 2, 2, 2, "2", "2", "2", "2", "2", "2" ], [ "event_length", "meter", "stream", "scale", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation" ] ], - "enumMats" : [ [ [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ "0", "1", "2", 3, 4, 5, 6, 7, 8, 9, 10 ], [ "0", "1", "2", 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] ], [ [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "3 4", "7 8", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "0", "1", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "pentatonic", "major", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ] ] ], + "enumArrays" : [ [ 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 2, 2, 2, 2, 2, "2", "2", "2", "2", "2" ], [ "meter", "stream", "scale", "NONE", "NONE", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation" ] ], + "enumMats" : [ [ [ "0", "1", "2", 3, 4, 5, 6, 7, 8, 9, 10 ], [ "0", "1", "2", 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] ], [ [ "3 4", "7 8", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "0", "1", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "pentatonic", "major", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ] ] ], "modArrays" : [ [ 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ "Sine", "SawUp", "SawDown", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine" ], [ "metriclarity", "stream", "meter", "harmoniclarity", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation" ], [ "0.6", "0.3", "0.1", "0.6", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1" ], [ "30", "2", "2", "36", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1" ], [ "0", "0", "0", "0.5", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0" ] ] } @@ -2261,7 +2237,7 @@ ] } , - "patching_rect" : [ 68.8047869048537, 24.600006000000008, 465.200012000000015, 171.399993999999992 ], + "patching_rect" : [ 77.8047869048537, 25.600006000000008, 465.200012000000015, 171.399993999999992 ], "varname" : "Djster.µbus", "viewvisibility" : 1 } @@ -2393,7 +2369,7 @@ "parameter_overrides" : { "obj-1::obj-1" : { "parameter_longname" : "Outset Pulses[1]", - "parameter_range" : [ 1, 12 ] + "parameter_range" : [ 1, 56 ] } , "obj-1::obj-11" : { diff --git a/example.maxpat b/example.maxpat index 9c9e2d5..8581a7e 100644 --- a/example.maxpat +++ b/example.maxpat @@ -10,7 +10,7 @@ } , "classnamespace" : "box", - "rect" : [ 264.0, 92.0, 1260.0, 869.0 ], + "rect" : [ 354.0, 147.0, 1260.0, 869.0 ], "bglocked" : 0, "openinpresentation" : 0, "default_fontsize" : 12.0, @@ -39,6 +39,89 @@ "subpatcher_template" : "", "assistshowspatchername" : 0, "boxes" : [ { + "box" : { + "id" : "obj-9", + "linecount" : 4, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 904.0, 80.0, 150.0, 60.0 ], + "text" : "BROKEN - it tries to denumerate floating point values which should NOT happen" + } + + } +, { + "box" : { + "id" : "obj-48", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 4, + "outlettype" : [ "", "bang", "", "dictionary" ], + "patching_rect" : [ 129.0, 107.0, 50.5, 22.0 ], + "text" : "DJster", + "varname" : "DJster" + } + + } +, { + "box" : { + "id" : "obj-47", + "maxclass" : "newobj", + "numinlets" : 2, + "numoutlets" : 9, + "outlettype" : [ "int", "int", "float", "float", "float", "", "int", "float", "" ], + "patching_rect" : [ 253.0, 520.0, 103.0, 22.0 ], + "text" : "transport" + } + + } +, { + "box" : { + "id" : "obj-46", + "linecount" : 4, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 1045.5, 6.0, 153.0, 60.0 ], + "text" : "Should be an indicator for modulators if there is a corresponding enumerator and vice versa" + } + + } +, { + "box" : { + "id" : "obj-43", + "linecount" : 4, + "maxclass" : "comment", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 1045.5, 528.0, 150.0, 60.0 ], + "text" : "range should be user controllable - adds to user defined center point. Remove amp." + } + + } +, { + "box" : { + "id" : "obj-40", + "maxclass" : "newobj", + "numinlets" : 1, + "numoutlets" : 1, + "outlettype" : [ "bang" ], + "patching_rect" : [ 1041.0, 687.0, 22.0, 22.0 ], + "text" : "t b" + } + + } +, { + "box" : { + "id" : "obj-38", + "maxclass" : "dict.view", + "numinlets" : 1, + "numoutlets" : 0, + "patching_rect" : [ 1009.631580829620361, 742.0, 231.0, 134.0 ] + } + + } +, { "box" : { "bubble" : 1, "id" : "obj-30", @@ -46,21 +129,10 @@ "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 137.5, 440.0, 245.0, 64.0 ], + "patching_rect" : [ 137.5, 440.0, 246.0, 64.0 ], "text" : "this param is sent in its already enumerated form, so it will first be turned into a number halfway between the enumeration boundaries" } - } -, { - "box" : { - "id" : "obj-26", - "maxclass" : "newobj", - "numinlets" : 1, - "numoutlets" : 0, - "patching_rect" : [ 1019.0, 544.0, 32.0, 22.0 ], - "text" : "print" - } - } , { "box" : { @@ -81,7 +153,7 @@ "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 947.0, 595.0, 156.0, 22.0 ], + "patching_rect" : [ 949.0, 647.0, 156.0, 22.0 ], "text" : "attenuation 200" } @@ -93,8 +165,8 @@ "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 822.0, 595.0, 101.0, 22.0 ], - "text" : "scale major" + "patching_rect" : [ 824.0, 647.0, 101.0, 22.0 ], + "text" : "scale pentatonic" } } @@ -105,8 +177,8 @@ "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 660.0, 595.0, 157.0, 22.0 ], - "text" : "harmoniclarity 0.000872" + "patching_rect" : [ 662.0, 647.0, 157.0, 22.0 ], + "text" : "harmoniclarity 33.124751" } } @@ -117,7 +189,7 @@ "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 567.0, 595.0, 87.0, 22.0 ], + "patching_rect" : [ 569.0, 647.0, 87.0, 22.0 ], "text" : "meter 7 8" } @@ -129,8 +201,8 @@ "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 483.0, 595.0, 80.0, 22.0 ], - "text" : "stream 0" + "patching_rect" : [ 485.0, 647.0, 80.0, 22.0 ], + "text" : "stream 1" } } @@ -141,8 +213,8 @@ "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 345.0, 595.0, 133.0, 22.0 ], - "text" : "metriclarity 69.973845" + "patching_rect" : [ 347.0, 647.0, 133.0, 22.0 ], + "text" : "metriclarity 22.396041" } } @@ -150,11 +222,11 @@ "box" : { "id" : "obj-27", "maxclass" : "newobj", - "numinlets" : 7, - "numoutlets" : 7, - "outlettype" : [ "", "", "", "", "", "", "" ], - "patching_rect" : [ 421.5, 536.0, 369.0, 22.0 ], - "text" : "routepass metriclarity stream meter harmoniclarity scale attenuation" + "numinlets" : 8, + "numoutlets" : 8, + "outlettype" : [ "", "", "", "", "", "", "", "" ], + "patching_rect" : [ 423.5, 588.0, 404.0, 22.0 ], + "text" : "routepass metriclarity stream meter harmoniclarity scale attenuation saved" } } @@ -165,7 +237,7 @@ "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 497.0, 489.0, 268.0, 33.0 ], + "patching_rect" : [ 522.0, 528.0, 268.0, 33.0 ], "text" : "we can only output symbols from jweb, so this turns them into lists" } @@ -177,7 +249,7 @@ "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 421.52631402015686, 489.0, 71.0, 22.0 ], + "patching_rect" : [ 423.5, 539.0, 71.0, 22.0 ], "text" : "fromsymbol" } @@ -200,7 +272,7 @@ "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 817.0, 45.0, 150.0, 47.0 ], + "patching_rect" : [ 796.0, 27.5, 150.0, 47.0 ], "text" : "self explanatory. Warning-will overwrite whatever is saved." } @@ -212,7 +284,7 @@ "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 1039.0, 50.0, 152.0, 60.0 ], + "patching_rect" : [ 1045.5, 69.0, 152.0, 60.0 ], "text" : "You can use the `phase` control to phase offset two LFOs of the same frequency" } @@ -283,12 +355,12 @@ , { "box" : { "id" : "obj-21", - "linecount" : 10, + "linecount" : 11, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 45.0, 564.0, 254.0, 141.0 ], - "text" : "The operation runs\n\nInput > Modulators > Enumerators > Output\n\nA parameter from the input not established by a Modulator will be passed directly to the Enumerators\n\nLikewise, the Enumerators will pass not established parameters" + "patching_rect" : [ 45.0, 564.0, 254.0, 154.0 ], + "text" : "The operation runs\n\nInput > Denumeration > Modulators > Enumerators > Output\n\nA parameter from the input not established by a Modulator will be passed directly to the Enumerators\n\nLikewise, the Enumerators will pass not established parameters" } } @@ -300,7 +372,7 @@ "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 48.0, 181.0, 121.0, 22.0 ], - "text" : "param metriclarity 40" + "text" : "param metriclarity 20" } } @@ -332,9 +404,9 @@ "box" : { "data" : { "data" : { - "enumArrays" : [ [ 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ "2", 2, 2, 2, "2", "2", "2", "2", "2", "2" ], [ "event_length", "meter", "stream", "scale", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation" ] ], - "enumMats" : [ [ [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ "0", "1", "2", 3, 4, 5, 6, 7, 8, 9, 10 ], [ "0", "1", "2", 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] ], [ [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "3 4", "7 8", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "0", "1", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "pentatonic", "major", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ] ] ], - "modArrays" : [ [ 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ "Sine", "SawUp", "SawDown", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine" ], [ "metriclarity", "stream", "meter", "harmoniclarity", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation" ], [ "0.6", "0.3", "0.1", "0.6", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1" ], [ "30", "2", "2", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1" ], [ "0", "0", "0", "0.5", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0" ] ] + "enumArrays" : [ [ 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 2, 2, 2, 2, 2, "2", "2", "2", "2", "2" ], [ "meter", "stream", "scale", "NONE", "NONE", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation" ] ], + "enumMats" : [ [ [ "0", "1", "2", 3, 4, 5, 6, 7, 8, 9, 10 ], [ "0", "1", "2", 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] ], [ [ "3 4", "7 8", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "0", "1", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "pentatonic", "major", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ] ] ], + "modArrays" : [ [ 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ "Sine", "SawUp", "SawDown", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine" ], [ "metriclarity", "stream", "meter", "harmoniclarity", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation" ], [ "0.6", "0.3", "0.1", "0.6", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1" ], [ "30", "2", "2", "36", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1" ], [ "0", "0", "0", "0.5", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0" ] ] } } @@ -344,7 +416,7 @@ "numinlets" : 2, "numoutlets" : 4, "outlettype" : [ "dictionary", "", "", "" ], - "patching_rect" : [ 22.0, 102.0, 159.0, 22.0 ], + "patching_rect" : [ 1041.0, 711.0, 159.0, 22.0 ], "saved_object_attributes" : { "embed" : 1, "parameter_enable" : 0, @@ -386,7 +458,7 @@ "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, - "patching_rect" : [ 31.0, 18.0, 150.0, 74.0 ], + "patching_rect" : [ 857.631580829620361, 729.0, 150.0, 74.0 ], "text" : "Storage for the matrix. Unfortunately, jsweb dictionary handling isn't great, so we can't use it like a native dict object" } @@ -434,7 +506,7 @@ "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], - "patching_rect" : [ 421.52631402015686, 157.0, 728.105266809463501, 322.0 ], + "patching_rect" : [ 427.52631402015686, 123.0, 740.105266809463501, 392.0 ], "rendermode" : 0, "url" : "file://lfogui.html" } @@ -521,13 +593,6 @@ "source" : [ "obj-25", 0 ] } - } -, { - "patchline" : { - "destination" : [ "obj-26", 0 ], - "source" : [ "obj-27", 6 ] - } - } , { "patchline" : { @@ -563,6 +628,13 @@ "source" : [ "obj-27", 4 ] } + } +, { + "patchline" : { + "destination" : [ "obj-40", 0 ], + "source" : [ "obj-27", 6 ] + } + } , { "patchline" : { @@ -586,6 +658,20 @@ "source" : [ "obj-3", 0 ] } + } +, { + "patchline" : { + "destination" : [ "obj-38", 0 ], + "source" : [ "obj-4", 0 ] + } + + } +, { + "patchline" : { + "destination" : [ "obj-4", 0 ], + "source" : [ "obj-40", 0 ] + } + } , { "patchline" : { @@ -602,7 +688,304 @@ } ], - "dependency_cache" : [ ], + "parameters" : { + "obj-48::obj-1" : [ "Outset Pulses", "Outset Pulses", 0 ], + "obj-48::obj-104" : [ "Tonality Profile", "Tonality Profile", 0 ], + "obj-48::obj-109" : [ "Play", "Play", 0 ], + "obj-48::obj-11" : [ "Eventfulness", "Eventfulness", 0 ], + "obj-48::obj-110" : [ "Event Length", "Event Length", 0 ], + "obj-48::obj-122" : [ "Choice", "Choice", 0 ], + "obj-48::obj-128" : [ "Ostinato Buffer", "Ostinato Buffer", 0 ], + "obj-48::obj-13" : [ "Melody Scope", "Melody Scope", 0 ], + "obj-48::obj-136" : [ "Sorted", "Sorted", 0 ], + "obj-48::obj-155" : [ "Use Transport", "Use Transport", 0 ], + "obj-48::obj-158" : [ "Subdivision", "Subdivision", 0 ], + "obj-48::obj-16" : [ "Scale", "Scale", 0 ], + "obj-48::obj-187" : [ "meters", "meters", 0 ], + "obj-48::obj-188" : [ "Pitchsets", "Pitchsets", 0 ], + "obj-48::obj-206" : [ "Chordal Weight", "Chordal Weight", 0 ], + "obj-48::obj-217" : [ "Overlap", "Overlap", 0 ], + "obj-48::obj-22" : [ "Pulse Length", "Pulse Length", 0 ], + "obj-48::obj-24" : [ "Harmoniclarity", "Harmoniclarity", 0 ], + "obj-48::obj-25" : [ "Pitch Center", "Pitch Center", 0 ], + "obj-48::obj-26" : [ "Pitch Range", "Pitch Range", 0 ], + "obj-48::obj-27" : [ "Dynamics", "Dynamics", 0 ], + "obj-48::obj-28" : [ "Attenuation", "Attenuation", 0 ], + "obj-48::obj-29" : [ "Ostinato", "Ostinato", 0 ], + "obj-48::obj-32" : [ "live.text[1]", "Clear Scales", 0 ], + "obj-48::obj-47" : [ "Silent Downbeat", "Silent Downbeat", 0 ], + "obj-48::obj-49" : [ "Sync", "Sync", 0 ], + "obj-48::obj-5" : [ "Metriclarity", "Metriclarity", 0 ], + "obj-48::obj-52" : [ "Tonic Pitch", "Tonic Pitch", 0 ], + "obj-48::obj-53" : [ "Precision", "Precision", 0 ], + "obj-48::obj-56" : [ "Precision[1]", "Preset Tab", 0 ], + "obj-48::obj-77" : [ "Melodic Cohesion", "Melodic Cohesion", 0 ], + "obj-48::obj-87" : [ "Sync Type", "menu", 0 ], + "obj-48::obj-88" : [ "Scala Browser", "Scala Browser", 0 ], + "parameterbanks" : { + "0" : { + "index" : 0, + "name" : "", + "parameters" : [ "-", "-", "-", "-", "-", "-", "-", "-" ] + } + + } +, + "parameter_overrides" : { + "obj-48::obj-1" : { + "parameter_range" : [ 1, 8 ] + } +, + "obj-48::obj-13" : { + "parameter_unitstyle" : 7 + } +, + "obj-48::obj-25" : { + "parameter_unitstyle" : 8 + } +, + "obj-48::obj-26" : { + "parameter_unitstyle" : 7 + } +, + "obj-48::obj-52" : { + "parameter_unitstyle" : 8 + } + + } +, + "inherited_shortname" : 1 + } +, + "dependency_cache" : [ { + "name" : "AdditiveMeter2.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "Autobusk-µPlayer.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/core", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/core", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "DJster.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "Inner-Equation.5.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "Inside.3.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "Mod.2.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "Pof_(Qi)(i=0toz-r-1).2.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "Pof_(Qj)(j=1toz).2.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "Pof_(Qz+1-k)(k=0tor).2.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "Qz+1-k2.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "Qz-r2.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "TIE.7.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "Total-Internal-Equation.6.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "bytecount.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/core", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/core", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "composite-meters.txt", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "type" : "TEXT", + "implicit" : 1 + } +, { + "name" : "dispenser.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "djster.accum.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/core", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/core", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "dumper.2.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "harmonic-energy-profile.txt", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/Profiles", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/Profiles", + "type" : "TEXT", + "implicit" : 1 + } +, { + "name" : "harmonicity.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/Tonality", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/Tonality", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "indigestibility.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/Tonality", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/Tonality", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "meter-subpatch.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/core", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/core", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "mxj.mxo", + "type" : "iLaX" + } +, { + "name" : "outset.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/core", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/core", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "packback.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/abstractions", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/abstractions", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "platform.js", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/javascript", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/javascript", + "type" : "TEXT", + "implicit" : 1 + } +, { + "name" : "primefactors.txt", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/maps/microMaps", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/maps/microMaps", + "type" : "TEXT", + "implicit" : 1 + } +, { + "name" : "psi-functions.txt", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "type" : "TEXT", + "implicit" : 1 + } +, { + "name" : "reader.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "reader2.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/dispenser", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "scalaFileBase.js", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/javascript", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/javascript", + "type" : "TEXT", + "implicit" : 1 + } +, { + "name" : "scale-subpatch-exp.maxpat", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/patchers/DJster/core", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/patchers/DJster/core", + "type" : "JSON", + "implicit" : 1 + } +, { + "name" : "scriptingname.js", + "bootpath" : "~/Documents/Max 8/Packages/MaxScore/javascript", + "patcherrelativepath" : "../../Max 8/Packages/MaxScore/javascript", + "type" : "TEXT", + "implicit" : 1 + } + ], "autosave" : 0 } diff --git a/lfogui.js b/lfogui.js index bd68763..ea01a39 100644 --- a/lfogui.js +++ b/lfogui.js @@ -123,6 +123,7 @@ function MasterLfoHandler(){ 'enumMats' : allEnumMats } window.max.setDict(event.detail, {"data" : data}); + window.max.outlet("saved"); }