diff --git a/common.js b/common.js
index 28c0e25..96cb58e 100644
--- a/common.js
+++ b/common.js
@@ -39,12 +39,12 @@ function Switch(props){
e('span', {className: 'slider round'}, null))
}
-function CreateParamChanger(arr, setArr, index, cb=() => {}){
+function CreateParamChanger(arr, setArr, index, postCB=() => {}, preCB=(val) => val){
return (event) => {
let newArr = arr.slice();
- newArr[index] = event.target.value;
+ newArr[index] = preCB(event.target.value);
setArr(newArr);
- cb();
+ postCB();
log(`${index} ${event.target.value}`);
}
}
diff --git a/example.maxpat b/example.maxpat
index 10eab41..c0df0ff 100644
--- a/example.maxpat
+++ b/example.maxpat
@@ -10,7 +10,7 @@
}
,
"classnamespace" : "box",
- "rect" : [ 533.0, 91.0, 930.0, 869.0 ],
+ "rect" : [ 533.0, 91.0, 1344.0, 869.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 12.0,
@@ -39,6 +39,54 @@
"subpatcher_template" : "",
"assistshowspatchername" : 0,
"boxes" : [ {
+ "box" : {
+ "id" : "obj-53",
+ "maxclass" : "button",
+ "numinlets" : 1,
+ "numoutlets" : 1,
+ "outlettype" : [ "bang" ],
+ "parameter_enable" : 0,
+ "patching_rect" : [ 737.0, 43.0, 24.0, 24.0 ]
+ }
+
+ }
+, {
+ "box" : {
+ "id" : "obj-1",
+ "maxclass" : "newobj",
+ "numinlets" : 1,
+ "numoutlets" : 1,
+ "outlettype" : [ "" ],
+ "patching_rect" : [ 684.0, 146.0, 94.0, 22.0 ],
+ "text" : "prepend timesig"
+ }
+
+ }
+, {
+ "box" : {
+ "id" : "obj-52",
+ "maxclass" : "newobj",
+ "numinlets" : 1,
+ "numoutlets" : 1,
+ "outlettype" : [ "" ],
+ "patching_rect" : [ 545.0, 135.0, 89.0, 22.0 ],
+ "text" : "prepend tempo"
+ }
+
+ }
+, {
+ "box" : {
+ "id" : "obj-49",
+ "linecount" : 2,
+ "maxclass" : "comment",
+ "numinlets" : 1,
+ "numoutlets" : 0,
+ "patching_rect" : [ 868.0, 96.0, 150.0, 33.0 ],
+ "text" : "ADD SUPPORT FOR MUSICAL TIMINGS"
+ }
+
+ }
+, {
"box" : {
"id" : "obj-37",
"maxclass" : "newobj",
@@ -115,9 +163,9 @@
"patching_rect" : [ 643.0, 770.0, 40.0, 22.0 ],
"restore" : [ {
"data" : {
- "enumArrays" : [ [ 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ "3", 2, 2, "2", "2", "2", "2", "2", "2", "2" ], [ "meter", "NONE", "NONE", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation" ] ],
+ "enumArrays" : [ [ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ "3", 2, 2, "2", "2", "2", "2", "2", "2", "2" ], [ "meter", "NONE", "NONE", "attenuation", "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 ] ], [ [ "3 4", "4 4", "7 8", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine" ], [ "meter", "eventfulness", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE" ], [ "0.1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1" ], [ "0.5", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0" ], [ "2.5", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1" ], [ "0", null, "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0" ] ]
+ "modArrays" : [ [ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine" ], [ "meter", "eventfulness", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE" ], [ "0.1hz", "1hz", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1" ], [ "0.5", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0" ], [ "2.5", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1" ], [ "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0" ] ]
}
}
@@ -136,9 +184,9 @@
"box" : {
"data" : {
"data" : {
- "enumArrays" : [ [ 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ "3", 2, 2, "2", "2", "2", "2", "2", "2", "2" ], [ "meter", "NONE", "NONE", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation" ] ],
+ "enumArrays" : [ [ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ "3", 2, 2, "2", "2", "2", "2", "2", "2", "2" ], [ "meter", "NONE", "NONE", "attenuation", "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 ] ], [ [ "3 4", "4 4", "7 8", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine" ], [ "meter", "eventfulness", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE" ], [ "0.1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1" ], [ "0.5", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0" ], [ "2.5", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1" ], [ "0", null, "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0" ] ]
+ "modArrays" : [ [ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine" ], [ "meter", "eventfulness", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE" ], [ "0.1hz", "1hz", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1" ], [ "0.5", "1", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0" ], [ "2.5", "0", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1" ], [ "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0" ] ]
}
}
@@ -170,31 +218,6 @@
"text" : "print"
}
- }
-, {
- "box" : {
- "id" : "obj-9",
- "linecount" : 2,
- "maxclass" : "comment",
- "numinlets" : 1,
- "numoutlets" : 0,
- "patching_rect" : [ 904.0, 80.0, 150.0, 33.0 ],
- "text" : "FINISH THE SAVING THING!!!"
- }
-
- }
-, {
- "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" : {
@@ -203,22 +226,10 @@
"numinlets" : 2,
"numoutlets" : 9,
"outlettype" : [ "int", "int", "float", "float", "float", "", "int", "float", "" ],
- "patching_rect" : [ 253.0, 520.0, 103.0, 22.0 ],
+ "patching_rect" : [ 744.815790414810181, 107.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" : {
@@ -323,19 +334,20 @@
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 569.0, 647.0, 87.0, 22.0 ],
- "text" : "meter 7 8"
+ "text" : "meter 4 4"
}
}
, {
"box" : {
"id" : "obj-31",
+ "linecount" : 2,
"maxclass" : "message",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
- "patching_rect" : [ 485.0, 647.0, 80.0, 22.0 ],
- "text" : "stream 0.364"
+ "patching_rect" : [ 485.0, 647.0, 80.0, 35.0 ],
+ "text" : "stream 0.207125"
}
}
@@ -347,7 +359,7 @@
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 347.0, 647.0, 133.0, 22.0 ],
- "text" : "metriclarity param2"
+ "text" : "metriclarity 20"
}
}
@@ -370,7 +382,7 @@
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
- "patching_rect" : [ 522.0, 528.0, 268.0, 33.0 ],
+ "patching_rect" : [ 518.0, 541.0, 268.0, 33.0 ],
"text" : "we can only output symbols from jweb, so this turns them into lists"
}
@@ -382,7 +394,7 @@
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
- "patching_rect" : [ 423.5, 539.0, 71.0, 22.0 ],
+ "patching_rect" : [ 423.5, 552.0, 71.0, 22.0 ],
"text" : "fromsymbol"
}
@@ -607,7 +619,7 @@
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
- "patching_rect" : [ 403.52631402015686, 149.0, 774.105266809463501, 365.0 ],
+ "patching_rect" : [ 402.0, 174.0, 788.631580829620361, 367.0 ],
"rendermode" : 0,
"url" : "file://lfogui.html"
}
@@ -615,6 +627,13 @@
}
],
"lines" : [ {
+ "patchline" : {
+ "destination" : [ "obj-2", 0 ],
+ "source" : [ "obj-1", 0 ]
+ }
+
+ }
+, {
"patchline" : {
"destination" : [ "obj-27", 0 ],
"source" : [ "obj-10", 0 ]
@@ -759,7 +778,7 @@
, {
"patchline" : {
"destination" : [ "obj-15", 0 ],
- "order" : 1,
+ "order" : 2,
"source" : [ "obj-37", 0 ]
}
@@ -767,6 +786,14 @@
, {
"patchline" : {
"destination" : [ "obj-16", 0 ],
+ "order" : 1,
+ "source" : [ "obj-37", 0 ]
+ }
+
+ }
+, {
+ "patchline" : {
+ "destination" : [ "obj-47", 0 ],
"order" : 0,
"source" : [ "obj-37", 0 ]
}
@@ -794,6 +821,20 @@
"source" : [ "obj-40", 0 ]
}
+ }
+, {
+ "patchline" : {
+ "destination" : [ "obj-1", 0 ],
+ "source" : [ "obj-47", 5 ]
+ }
+
+ }
+, {
+ "patchline" : {
+ "destination" : [ "obj-52", 0 ],
+ "source" : [ "obj-47", 4 ]
+ }
+
}
, {
"patchline" : {
@@ -801,6 +842,20 @@
"source" : [ "obj-5", 0 ]
}
+ }
+, {
+ "patchline" : {
+ "destination" : [ "obj-2", 0 ],
+ "source" : [ "obj-52", 0 ]
+ }
+
+ }
+, {
+ "patchline" : {
+ "destination" : [ "obj-47", 0 ],
+ "source" : [ "obj-53", 0 ]
+ }
+
}
, {
"patchline" : {
@@ -810,304 +865,7 @@
}
],
- "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
- }
- ],
+ "dependency_cache" : [ ],
"autosave" : 0
}
diff --git a/lfogui.html b/lfogui.html
index a94790e..e2bebd0 100644
--- a/lfogui.html
+++ b/lfogui.html
@@ -200,6 +200,7 @@
+
diff --git a/lfogui.js b/lfogui.js
index 20a92cd..1095aff 100644
--- a/lfogui.js
+++ b/lfogui.js
@@ -28,6 +28,8 @@ const MODULATORLABELS = ["-type-", "---shape---", "-------param-------", "--time
const ENUMERATORLABELS = ["---parameter---", "-# points-"];
+
+
function MasterLfoHandler(){
let initVisArr = Array(MAXLFOS).fill(false);
@@ -47,10 +49,13 @@ function MasterLfoHandler(){
const [modCenterVals, setModCenterVals] = React.useState({});
+ const [bpm, setBpm] = React.useState(100);
+ const [beatsInMeasure, setBeatsInMeasure] = React.useState(4);
+
const [shapeArr, setShapeArr] = React.useState(Array(MAXLFOS).fill('Sine'));
const [djParamArr, setDjParamArr] = React.useState(Array(MAXLFOS).fill('NONE'));
- const [timeArr, setTimeArr] = React.useState(Array(MAXLFOS).fill('1hz'));
+ const [freqArr, setFreqArr] = React.useState(Array(MAXLFOS).fill('1hz'));
// const [ampArr, setAmpArr] = React.useState(Array(MAXLFOS).fill('1'));
const [minArr, setMinArr] = React.useState(Array(MAXLFOS).fill('0'));
@@ -58,8 +63,8 @@ function MasterLfoHandler(){
const [phaseArr, setPhaseArr] = React.useState(Array(MAXLFOS).fill('0'));
- const allModArrays = [modVisibleArr, shapeArr, djParamArr, timeArr, minArr, maxArr, phaseArr];
- const allModSetters = [setModVisibleArr, setShapeArr, setDjParamArr, setTimeArr, setMinArr, setMaxArr, setPhaseArr];
+ const allModArrays = [modVisibleArr, shapeArr, djParamArr, freqArr, minArr, maxArr, phaseArr];
+ const allModSetters = [setModVisibleArr, setShapeArr, setDjParamArr, setFreqArr, setMinArr, setMaxArr, setPhaseArr];
const modBlankVals = [true, SHAPETYPES[0], MODPARAMOPTIONS[0], '1', '0', '1', '0'];
@@ -186,7 +191,15 @@ function MasterLfoHandler(){
function handleTick(event) {
let time = (Date.now() - firstUpdateTime) / 1000;
- operateModulators(modVisibleArr, djParamArr, modCenterVals, timeArr, minArr, maxArr, shapeArr, phaseArr, time);
+ operateModulators(modVisibleArr, djParamArr, modCenterVals, freqArr, minArr, maxArr, shapeArr, phaseArr, time, bpm, beatsInMeasure);
+ }
+
+ function handleBpm(event) {
+ setBpm(event.detail);
+ }
+
+ function handleTimeSig(event) {
+ setBeatsInMeasure(parseFloat(event.detail[0]) * parseFloat(event.detail[1])/ 4);
}
@@ -195,6 +208,8 @@ function MasterLfoHandler(){
window.addEventListener('tick', handleTick);
window.addEventListener('param', handleParam);
window.addEventListener('enum', handleEnum);
+ window.addEventListener('tempo', handleBpm);
+ window.addEventListener('timesig', handleTimeSig);
return () => {
window.removeEventListener('loadDict', handleLoad);
@@ -202,8 +217,10 @@ function MasterLfoHandler(){
window.removeEventListener('tick', handleTick);
window.removeEventListener('param', handleParam);
window.removeEventListener('enum', handleEnum);
+ window.removeEventListener('tempo', handleBpm);
+ window.removeEventListener('timesig', handleTimeSig);
};
- }, [...allModArrays, ...allEnumArrays, ...allEnumMats, modCenterVals, render]);
+ }, [...allModArrays, ...allEnumArrays, ...allEnumMats, modCenterVals, render, bpm, beatsInMeasure]);
@@ -224,8 +241,8 @@ function MasterLfoHandler(){
setDjParam: CreateParamChanger(djParamArr, setDjParamArr, i),
centerVals: modCenterVals,
- freq: timeArr[i],
- setFreq: CreateParamChanger(timeArr, setTimeArr, i),
+ freq: freqArr[i],
+ setFreq: CreateParamChanger(freqArr, setFreqArr, i),
//amp: ampArr[i],
//setAmp: CreateParamChanger(ampArr, setAmpArr, i),
@@ -388,6 +405,14 @@ if (!DEBUG){
window.dispatchEvent(new CustomEvent('param', {'detail' : [paramName, val]}));
});
+ window.max.bindInlet("tempo", (val) => {
+ window.dispatchEvent(new CustomEvent('tempo', {'detail' : val}));
+ });
+
+ window.max.bindInlet("timesig", (top, bottom) => {
+ window.dispatchEvent(new CustomEvent('timesig', {'detail' : [top, bottom]}));
+ });
+
setInterval(() => {
window.dispatchEvent(new CustomEvent('tick'));
}, 200);
diff --git a/modulators.js b/modulators.js
index 9c6f99b..3037999 100644
--- a/modulators.js
+++ b/modulators.js
@@ -56,7 +56,7 @@ function indexWave(type, phase){
}
}
-function operateModulators(visibleArr, paramNames, centers, lfoTimes, mins, maxs, waveTypes, phaseArr, currTime){
+function operateModulators(visibleArr, paramNames, centers, freqs, mins, maxs, waveTypes, phaseArr, currTime, bpm, beatsInMeasure){
for (let i=0; i>>0,s=0;sWe(e)?(r=e+1,t-We(e)):(r=e,t);return{year:r,dayOfYear:n}}function Be(e,t,n){var s,i,r=qe(e.year(),t,n),r=Math.floor((e.dayOfYear()-r-1)/7)+1;return r<1?s=r+N(i=e.year()-1,t,n):r>N(e.year(),t,n)?(s=r-N(e.year(),t,n),i=e.year()+1):(i=e.year(),s=r),{week:s,year:i}}function N(e,t,n){var s=qe(e,t,n),t=qe(e+1,t,n);return(We(e)-s+t)/7}s("w",["ww",2],"wo","week"),s("W",["WW",2],"Wo","isoWeek"),h("w",n,u),h("ww",n,t),h("W",n,u),h("WW",n,t),Oe(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=M(e)});function Je(e,t){return e.slice(t,7).concat(e.slice(0,t))}s("d",0,"do","day"),s("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),s("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),s("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),s("e",0,0,"weekday"),s("E",0,0,"isoWeekday"),h("d",n),h("e",n),h("E",n),h("dd",function(e,t){return t.weekdaysMinRegex(e)}),h("ddd",function(e,t){return t.weekdaysShortRegex(e)}),h("dddd",function(e,t){return t.weekdaysRegex(e)}),Oe(["dd","ddd","dddd"],function(e,t,n,s){s=n._locale.weekdaysParse(e,s,n._strict);null!=s?t.d=s:p(n).invalidWeekday=e}),Oe(["d","e","E"],function(e,t,n,s){t[s]=M(e)});var Qe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Xe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ke="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),et=i,tt=i,nt=i;function st(){function e(e,t){return t.length-e.length}for(var t,n,s,i=[],r=[],a=[],o=[],u=0;u<7;u++)s=l([2e3,1]).day(u),t=f(this.weekdaysMin(s,"")),n=f(this.weekdaysShort(s,"")),s=f(this.weekdays(s,"")),i.push(t),r.push(n),a.push(s),o.push(t),o.push(n),o.push(s);i.sort(e),r.sort(e),a.sort(e),o.sort(e),this._weekdaysRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function it(){return this.hours()%12||12}function rt(e,t){s(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function at(e,t){return t._meridiemParse}s("H",["HH",2],0,"hour"),s("h",["hh",2],0,it),s("k",["kk",2],0,function(){return this.hours()||24}),s("hmm",0,0,function(){return""+it.apply(this)+r(this.minutes(),2)}),s("hmmss",0,0,function(){return""+it.apply(this)+r(this.minutes(),2)+r(this.seconds(),2)}),s("Hmm",0,0,function(){return""+this.hours()+r(this.minutes(),2)}),s("Hmmss",0,0,function(){return""+this.hours()+r(this.minutes(),2)+r(this.seconds(),2)}),rt("a",!0),rt("A",!1),h("a",at),h("A",at),h("H",n,d),h("h",n,u),h("k",n,u),h("HH",n,t),h("hh",n,t),h("kk",n,t),h("hmm",me),h("hmmss",_e),h("Hmm",me),h("Hmmss",_e),v(["H","HH"],O),v(["k","kk"],function(e,t,n){e=M(e);t[O]=24===e?0:e}),v(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),v(["h","hh"],function(e,t,n){t[O]=M(e),p(n).bigHour=!0}),v("hmm",function(e,t,n){var s=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s)),p(n).bigHour=!0}),v("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s,2)),t[T]=M(e.substr(i)),p(n).bigHour=!0}),v("Hmm",function(e,t,n){var s=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s))}),v("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[O]=M(e.substr(0,s)),t[b]=M(e.substr(s,2)),t[T]=M(e.substr(i))});i=Re("Hours",!0);var ot,ut={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Fe,monthsShort:Le,week:{dow:0,doy:6},weekdays:Qe,weekdaysMin:Ke,weekdaysShort:Xe,meridiemParse:/[ap]\.?m?\.?/i},W={},lt={};function dt(e){return e&&e.toLowerCase().replace("_","-")}function ht(e){for(var t,n,s,i,r=0;r=t&&function(e,t){for(var n=Math.min(e.length,t.length),s=0;s=t-1)break;t--}r++}return ot}function ct(t){var e,n;if(void 0===W[t]&&"undefined"!=typeof module&&module&&module.exports&&(n=t)&&n.match("^[^/\\\\]*$"))try{e=ot._abbr,require("./locale/"+t),ft(e)}catch(e){W[t]=null}return W[t]}function ft(e,t){return e&&((t=g(t)?P(e):mt(e,t))?ot=t:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ot._abbr}function mt(e,t){if(null===t)return delete W[e],null;var n,s=ut;if(t.abbr=e,null!=W[e])Q("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=W[e]._config;else if(null!=t.parentLocale)if(null!=W[t.parentLocale])s=W[t.parentLocale]._config;else{if(null==(n=ct(t.parentLocale)))return lt[t.parentLocale]||(lt[t.parentLocale]=[]),lt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return W[e]=new K(X(s,t)),lt[e]&<[e].forEach(function(e){mt(e.name,e.config)}),ft(e),W[e]}function P(e){var t;if(!(e=e&&e._locale&&e._locale._abbr?e._locale._abbr:e))return ot;if(!y(e)){if(t=ct(e))return t;e=[e]}return ht(e)}function _t(e){var t=e._a;return t&&-2===p(e).overflow&&(t=t[Y]<0||11He(t[D],t[Y])?S:t[O]<0||24N(r,u,l)?p(s)._overflowWeeks=!0:null!=d?p(s)._overflowWeekday=!0:(h=$e(r,a,o,u,l),s._a[D]=h.year,s._dayOfYear=h.dayOfYear)),null!=e._dayOfYear&&(i=bt(e._a[D],n[D]),(e._dayOfYear>We(i)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),d=ze(i,0,e._dayOfYear),e._a[Y]=d.getUTCMonth(),e._a[S]=d.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=c[t]=n[t];for(;t<7;t++)e._a[t]=c[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[O]&&0===e._a[b]&&0===e._a[T]&&0===e._a[Te]&&(e._nextDay=!0,e._a[O]=0),e._d=(e._useUTC?ze:Ze).apply(null,c),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[O]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(p(e).weekdayMismatch=!0)}}function xt(e){if(e._f===_.ISO_8601)Yt(e);else if(e._f===_.RFC_2822)Ot(e);else{e._a=[],p(e).empty=!0;for(var t,n,s,i,r,a=""+e._i,o=a.length,u=0,l=ae(e._f,e._locale).match(te)||[],d=l.length,h=0;he.valueOf():e.valueOf()"}),u.toJSON=function(){return this.isValid()?this.toISOString():null},u.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},u.unix=function(){return Math.floor(this.valueOf()/1e3)},u.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},u.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},u.eraName=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},u.isLocal=function(){return!!this.isValid()&&!this._isUTC},u.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},u.isUtc=At,u.isUTC=At,u.zoneAbbr=function(){return this._isUTC?"UTC":""},u.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},u.dates=e("dates accessor is deprecated. Use date instead.",ge),u.months=e("months accessor is deprecated. Use month instead",Ie),u.years=e("years accessor is deprecated. Use year instead",Pe),u.zone=e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?(this.utcOffset(e="string"!=typeof e?-e:e,t),this):-this.utcOffset()}),u.isDSTShifted=e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){var e,t;return g(this._isDSTShifted)&&(q(e={},this),(e=Nt(e))._a?(t=(e._isUTC?l:R)(e._a),this._isDSTShifted=this.isValid()&&0