nn-communication #7
180
example.maxpat
180
example.maxpat
@ -4,13 +4,13 @@
|
|||||||
"appversion" : {
|
"appversion" : {
|
||||||
"major" : 8,
|
"major" : 8,
|
||||||
"minor" : 6,
|
"minor" : 6,
|
||||||
"revision" : 2,
|
"revision" : 4,
|
||||||
"architecture" : "x64",
|
"architecture" : "x64",
|
||||||
"modernui" : 1
|
"modernui" : 1
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
"classnamespace" : "box",
|
"classnamespace" : "box",
|
||||||
"rect" : [ 34.0, 76.0, 1155.0, 763.0 ],
|
"rect" : [ -1639.0, 273.0, 1357.0, 740.0 ],
|
||||||
"bglocked" : 0,
|
"bglocked" : 0,
|
||||||
"openinpresentation" : 0,
|
"openinpresentation" : 0,
|
||||||
"default_fontsize" : 12.0,
|
"default_fontsize" : 12.0,
|
||||||
@ -39,6 +39,77 @@
|
|||||||
"subpatcher_template" : "",
|
"subpatcher_template" : "",
|
||||||
"assistshowspatchername" : 0,
|
"assistshowspatchername" : 0,
|
||||||
"boxes" : [ {
|
"boxes" : [ {
|
||||||
|
"box" : {
|
||||||
|
"id" : "obj-42",
|
||||||
|
"maxclass" : "newobj",
|
||||||
|
"numinlets" : 1,
|
||||||
|
"numoutlets" : 1,
|
||||||
|
"outlettype" : [ "" ],
|
||||||
|
"patching_rect" : [ 529.0, 843.0, 99.0, 22.0 ],
|
||||||
|
"saved_object_attributes" : {
|
||||||
|
"client_rect" : [ 100, 100, 500, 600 ],
|
||||||
|
"parameter_enable" : 0,
|
||||||
|
"parameter_mappable" : 0,
|
||||||
|
"storage_rect" : [ 200, 200, 800, 500 ]
|
||||||
|
}
|
||||||
|
,
|
||||||
|
"text" : "pattrstorage asdf",
|
||||||
|
"varname" : "asdf"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
, {
|
||||||
|
"box" : {
|
||||||
|
"id" : "obj-26",
|
||||||
|
"maxclass" : "newobj",
|
||||||
|
"numinlets" : 1,
|
||||||
|
"numoutlets" : 3,
|
||||||
|
"outlettype" : [ "", "", "" ],
|
||||||
|
"patching_rect" : [ 659.0, 856.0, 40.0, 22.0 ],
|
||||||
|
"restore" : [ {
|
||||||
|
"data" : {
|
||||||
|
"enumArrays" : [ [ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1" ], [ "2", "2", "2", "2", "2", "2", "2", "2", "2", "2" ], [ "attenuation", "attenuation", "attenuation", "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 ] ], [ [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "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, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO" ], [ "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1" ], [ "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine" ], [ "Sine Int.", "Sine Int.", "Rand", "Rand", "Rand", "Sine Int.", "Sine Int.", "Sine Int.", "Sine Int.", "Sine Int.", "Sine Int.", "Sine Int.", "Sine Int.", "Sine Int.", "Sine Int.", "Sine Int.", "Sine Int.", "Sine Int.", "Sine Int.", "Sine Int." ], [ "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE" ], [ "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz" ], [ "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0" ], [ "1", "1", "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" ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] ]
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"saved_object_attributes" : {
|
||||||
|
"parameter_enable" : 0,
|
||||||
|
"parameter_mappable" : 0
|
||||||
|
}
|
||||||
|
,
|
||||||
|
"text" : "pattr",
|
||||||
|
"varname" : "u671001838"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
, {
|
||||||
|
"box" : {
|
||||||
|
"id" : "obj-31",
|
||||||
|
"maxclass" : "newobj",
|
||||||
|
"numinlets" : 2,
|
||||||
|
"numoutlets" : 2,
|
||||||
|
"outlettype" : [ "", "" ],
|
||||||
|
"patching_rect" : [ 423.5, 622.0, 80.0, 22.0 ],
|
||||||
|
"text" : "route NNdata"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
, {
|
||||||
|
"box" : {
|
||||||
|
"id" : "obj-13",
|
||||||
|
"maxclass" : "message",
|
||||||
|
"numinlets" : 2,
|
||||||
|
"numoutlets" : 1,
|
||||||
|
"outlettype" : [ "" ],
|
||||||
|
"patching_rect" : [ 402.0, 112.0, 56.0, 22.0 ],
|
||||||
|
"text" : "dumpNN"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
, {
|
||||||
"box" : {
|
"box" : {
|
||||||
"fontname" : "Arial",
|
"fontname" : "Arial",
|
||||||
"fontsize" : 13.0,
|
"fontsize" : 13.0,
|
||||||
@ -167,7 +238,7 @@
|
|||||||
"numinlets" : 2,
|
"numinlets" : 2,
|
||||||
"numoutlets" : 1,
|
"numoutlets" : 1,
|
||||||
"outlettype" : [ "" ],
|
"outlettype" : [ "" ],
|
||||||
"patching_rect" : [ 586.0, 713.0, 89.0, 36.0 ],
|
"patching_rect" : [ 546.0, 735.0, 89.0, 35.0 ],
|
||||||
"text" : "harmoniclarity 14.213599"
|
"text" : "harmoniclarity 14.213599"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,21 +251,20 @@
|
|||||||
"numinlets" : 2,
|
"numinlets" : 2,
|
||||||
"numoutlets" : 1,
|
"numoutlets" : 1,
|
||||||
"outlettype" : [ "" ],
|
"outlettype" : [ "" ],
|
||||||
"patching_rect" : [ 491.0, 713.0, 85.0, 36.0 ],
|
"patching_rect" : [ 451.0, 735.0, 85.0, 35.0 ],
|
||||||
"text" : "event_length 55.786401"
|
"text" : "event_length 0.518845"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
, {
|
, {
|
||||||
"box" : {
|
"box" : {
|
||||||
"id" : "obj-78",
|
"id" : "obj-78",
|
||||||
"linecount" : 2,
|
|
||||||
"maxclass" : "message",
|
"maxclass" : "message",
|
||||||
"numinlets" : 2,
|
"numinlets" : 2,
|
||||||
"numoutlets" : 1,
|
"numoutlets" : 1,
|
||||||
"outlettype" : [ "" ],
|
"outlettype" : [ "" ],
|
||||||
"patching_rect" : [ 385.0, 715.0, 84.0, 36.0 ],
|
"patching_rect" : [ 345.0, 737.0, 84.0, 22.0 ],
|
||||||
"text" : "metriclarity 79.192955"
|
"text" : "metriclarity 20"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -205,7 +275,7 @@
|
|||||||
"numinlets" : 4,
|
"numinlets" : 4,
|
||||||
"numoutlets" : 4,
|
"numoutlets" : 4,
|
||||||
"outlettype" : [ "", "", "", "" ],
|
"outlettype" : [ "", "", "", "" ],
|
||||||
"patching_rect" : [ 410.0, 671.0, 273.0, 22.0 ],
|
"patching_rect" : [ 370.0, 693.0, 273.0, 22.0 ],
|
||||||
"text" : "routepass metriclarity event_length harmoniclarity"
|
"text" : "routepass metriclarity event_length harmoniclarity"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -217,7 +287,7 @@
|
|||||||
"maxclass" : "comment",
|
"maxclass" : "comment",
|
||||||
"numinlets" : 1,
|
"numinlets" : 1,
|
||||||
"numoutlets" : 0,
|
"numoutlets" : 0,
|
||||||
"patching_rect" : [ 1066.052632331848145, 53.0, 99.894735336303711, 89.0 ],
|
"patching_rect" : [ 1066.052632331848145, 53.0, 99.894735336303711, 87.0 ],
|
||||||
"text" : "You can use Hz, seconds, ms, hh:mm:ss, or bars.beats.ticks for the period/frequency"
|
"text" : "You can use Hz, seconds, ms, hh:mm:ss, or bars.beats.ticks for the period/frequency"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,7 +299,7 @@
|
|||||||
"maxclass" : "comment",
|
"maxclass" : "comment",
|
||||||
"numinlets" : 1,
|
"numinlets" : 1,
|
||||||
"numoutlets" : 0,
|
"numoutlets" : 0,
|
||||||
"patching_rect" : [ 1181.315790414810181, 40.0, 81.0, 117.0 ],
|
"patching_rect" : [ 1181.315790414810181, 40.0, 81.0, 114.0 ],
|
||||||
"text" : "Min and max must be ADDED to the center value to determine the true bounds. "
|
"text" : "Min and max must be ADDED to the center value to determine the true bounds. "
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -241,7 +311,7 @@
|
|||||||
"maxclass" : "comment",
|
"maxclass" : "comment",
|
||||||
"numinlets" : 1,
|
"numinlets" : 1,
|
||||||
"numoutlets" : 0,
|
"numoutlets" : 0,
|
||||||
"patching_rect" : [ 913.0, 107.0, 150.0, 62.0 ],
|
"patching_rect" : [ 913.0, 107.0, 150.0, 60.0 ],
|
||||||
"text" : "center values are read only, they must be configured by an upstream value"
|
"text" : "center values are read only, they must be configured by an upstream value"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -252,7 +322,7 @@
|
|||||||
"maxclass" : "newobj",
|
"maxclass" : "newobj",
|
||||||
"numinlets" : 1,
|
"numinlets" : 1,
|
||||||
"numoutlets" : 0,
|
"numoutlets" : 0,
|
||||||
"patching_rect" : [ 480.5, 613.0, 32.0, 22.0 ],
|
"patching_rect" : [ 537.0, 622.0, 32.0, 22.0 ],
|
||||||
"text" : "print"
|
"text" : "print"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -266,7 +336,7 @@
|
|||||||
"numinlets" : 5,
|
"numinlets" : 5,
|
||||||
"numoutlets" : 5,
|
"numoutlets" : 5,
|
||||||
"outlettype" : [ "", "", "", "", "" ],
|
"outlettype" : [ "", "", "", "", "" ],
|
||||||
"patching_rect" : [ 626.0, 613.0, 81.0, 23.0 ],
|
"patching_rect" : [ 558.0, 661.0, 81.0, 23.0 ],
|
||||||
"text" : "route 1 2 3 4"
|
"text" : "route 1 2 3 4"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -325,7 +395,8 @@
|
|||||||
"numinlets" : 1,
|
"numinlets" : 1,
|
||||||
"numoutlets" : 5,
|
"numoutlets" : 5,
|
||||||
"outlettype" : [ "preset", "int", "preset", "int", "" ],
|
"outlettype" : [ "preset", "int", "preset", "int", "" ],
|
||||||
"patching_rect" : [ 934.0, 27.0, 100.0, 40.0 ]
|
"patching_rect" : [ 934.0, 27.0, 100.0, 40.0 ],
|
||||||
|
"pattrstorage" : "asdf"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -333,9 +404,9 @@
|
|||||||
"box" : {
|
"box" : {
|
||||||
"data" : {
|
"data" : {
|
||||||
"data" : {
|
"data" : {
|
||||||
"enumArrays" : [ [ 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ "2", "4", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1" ], [ "2", "4", 2, "2", "2", "2", "2", "2", "2", "2" ], [ "scale", "meter", "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 ], [ "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1" ], [ "2", "2", "2", "2", "2", "2", "2", "2", "2", "2" ], [ "attenuation", "attenuation", "attenuation", "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 ] ], [ [ "major", "minor", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "4 4", "3 4", "7 8", "2 4", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ] ] ],
|
"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" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "param", "param", "param", "param" ], [ "param", "param", "param", "param", "param", "param", "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 ], [ "1", "4", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1" ], [ "Sine", "Tri", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine" ], [ "metriclarity", "meter", "event_length", "harmoniclarity", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE" ], [ "1hz", "0.4.0", "3s", "00:00:03", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz" ], [ "20", "0", "20", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0" ], [ "80", "2", "70", "50", "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" ] ]
|
"modArrays" : [ [ 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO", "LFO" ], [ "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1" ], [ "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine" ], [ "Sine Int.", "Sine Int.", "Rand", "Rand", "Rand", "Sine Int.", "Sine Int.", "Sine Int.", "Sine Int.", "Sine Int.", "Sine Int.", "Sine Int.", "Sine Int.", "Sine Int.", "Sine Int.", "Sine Int.", "Sine Int.", "Sine Int.", "Sine Int.", "Sine Int." ], [ "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE" ], [ "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz" ], [ "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0" ], [ "1", "1", "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" ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] ]
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -345,7 +416,7 @@
|
|||||||
"numinlets" : 2,
|
"numinlets" : 2,
|
||||||
"numoutlets" : 5,
|
"numoutlets" : 5,
|
||||||
"outlettype" : [ "dictionary", "", "", "", "" ],
|
"outlettype" : [ "dictionary", "", "", "", "" ],
|
||||||
"patching_rect" : [ 773.0, 808.0, 166.0, 22.0 ],
|
"patching_rect" : [ 786.0, 894.0, 166.0, 22.0 ],
|
||||||
"saved_object_attributes" : {
|
"saved_object_attributes" : {
|
||||||
"embed" : 1,
|
"embed" : 1,
|
||||||
"legacy" : 1,
|
"legacy" : 1,
|
||||||
@ -377,7 +448,7 @@
|
|||||||
"numinlets" : 1,
|
"numinlets" : 1,
|
||||||
"numoutlets" : 1,
|
"numoutlets" : 1,
|
||||||
"outlettype" : [ "bang" ],
|
"outlettype" : [ "bang" ],
|
||||||
"patching_rect" : [ 980.368419170379639, 702.0, 22.0, 22.0 ],
|
"patching_rect" : [ 989.0, 831.0, 22.0, 22.0 ],
|
||||||
"text" : "t b"
|
"text" : "t b"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -400,7 +471,7 @@
|
|||||||
"maxclass" : "comment",
|
"maxclass" : "comment",
|
||||||
"numinlets" : 1,
|
"numinlets" : 1,
|
||||||
"numoutlets" : 0,
|
"numoutlets" : 0,
|
||||||
"patching_rect" : [ 137.5, 440.0, 246.0, 66.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"
|
"text" : "this param is sent in its already enumerated form, so it will first be turned into a number halfway between the enumeration boundaries"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -424,8 +495,8 @@
|
|||||||
"numinlets" : 2,
|
"numinlets" : 2,
|
||||||
"numoutlets" : 1,
|
"numoutlets" : 1,
|
||||||
"outlettype" : [ "" ],
|
"outlettype" : [ "" ],
|
||||||
"patching_rect" : [ 949.0, 647.0, 156.0, 22.0 ],
|
"patching_rect" : [ 924.0, 748.0, 156.0, 22.0 ],
|
||||||
"text" : "meter 3 4"
|
"text" : "meter 4 4"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -436,7 +507,7 @@
|
|||||||
"numinlets" : 2,
|
"numinlets" : 2,
|
||||||
"numoutlets" : 1,
|
"numoutlets" : 1,
|
||||||
"outlettype" : [ "" ],
|
"outlettype" : [ "" ],
|
||||||
"patching_rect" : [ 824.0, 647.0, 101.0, 22.0 ],
|
"patching_rect" : [ 799.0, 748.0, 101.0, 22.0 ],
|
||||||
"text" : "attenuation 200"
|
"text" : "attenuation 200"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -448,8 +519,8 @@
|
|||||||
"numinlets" : 2,
|
"numinlets" : 2,
|
||||||
"numoutlets" : 1,
|
"numoutlets" : 1,
|
||||||
"outlettype" : [ "" ],
|
"outlettype" : [ "" ],
|
||||||
"patching_rect" : [ 662.0, 647.0, 157.0, 22.0 ],
|
"patching_rect" : [ 637.0, 748.0, 157.0, 22.0 ],
|
||||||
"text" : "scale minor"
|
"text" : "scale 1.6"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -457,11 +528,11 @@
|
|||||||
"box" : {
|
"box" : {
|
||||||
"id" : "obj-27",
|
"id" : "obj-27",
|
||||||
"maxclass" : "newobj",
|
"maxclass" : "newobj",
|
||||||
"numinlets" : 3,
|
"numinlets" : 4,
|
||||||
"numoutlets" : 3,
|
"numoutlets" : 4,
|
||||||
"outlettype" : [ "", "", "" ],
|
"outlettype" : [ "", "", "", "" ],
|
||||||
"patching_rect" : [ 423.5, 588.0, 133.0, 22.0 ],
|
"patching_rect" : [ 423.5, 588.0, 177.0, 22.0 ],
|
||||||
"text" : "routepass saved debug"
|
"text" : "routepass saved NNdata debug"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -472,7 +543,7 @@
|
|||||||
"maxclass" : "comment",
|
"maxclass" : "comment",
|
||||||
"numinlets" : 1,
|
"numinlets" : 1,
|
||||||
"numoutlets" : 0,
|
"numoutlets" : 0,
|
||||||
"patching_rect" : [ 504.0, 546.5, 268.0, 34.0 ],
|
"patching_rect" : [ 504.0, 546.5, 268.0, 33.0 ],
|
||||||
"text" : "we can only output symbols from jweb, so this turns them into lists"
|
"text" : "we can only output symbols from jweb, so this turns them into lists"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -496,7 +567,7 @@
|
|||||||
"maxclass" : "comment",
|
"maxclass" : "comment",
|
||||||
"numinlets" : 1,
|
"numinlets" : 1,
|
||||||
"numoutlets" : 0,
|
"numoutlets" : 0,
|
||||||
"patching_rect" : [ 548.52631402015686, 80.0, 150.0, 34.0 ],
|
"patching_rect" : [ 548.52631402015686, 80.0, 150.0, 33.0 ],
|
||||||
"text" : "see below for why we use separate names..."
|
"text" : "see below for why we use separate names..."
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -508,7 +579,7 @@
|
|||||||
"maxclass" : "comment",
|
"maxclass" : "comment",
|
||||||
"numinlets" : 1,
|
"numinlets" : 1,
|
||||||
"numoutlets" : 0,
|
"numoutlets" : 0,
|
||||||
"patching_rect" : [ 781.0, 17.0, 150.0, 48.0 ],
|
"patching_rect" : [ 781.0, 17.0, 150.0, 47.0 ],
|
||||||
"text" : "self explanatory. Warning-will overwrite whatever is saved."
|
"text" : "self explanatory. Warning-will overwrite whatever is saved."
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -520,7 +591,7 @@
|
|||||||
"maxclass" : "comment",
|
"maxclass" : "comment",
|
||||||
"numinlets" : 1,
|
"numinlets" : 1,
|
||||||
"numoutlets" : 0,
|
"numoutlets" : 0,
|
||||||
"patching_rect" : [ 1261.315790414810181, 47.0, 78.0, 103.0 ],
|
"patching_rect" : [ 1261.315790414810181, 47.0, 78.0, 100.0 ],
|
||||||
"text" : "You can use the `phase` control to phase offset two LFOs of the same frequency"
|
"text" : "You can use the `phase` control to phase offset two LFOs of the same frequency"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -533,7 +604,7 @@
|
|||||||
"maxclass" : "comment",
|
"maxclass" : "comment",
|
||||||
"numinlets" : 1,
|
"numinlets" : 1,
|
||||||
"numoutlets" : 0,
|
"numoutlets" : 0,
|
||||||
"patching_rect" : [ 161.5, 261.0, 197.0, 79.0 ],
|
"patching_rect" : [ 161.5, 261.0, 197.0, 78.0 ],
|
||||||
"text" : "This parameter is defined in the enumerators but not the modulators. It will be enumerated and immediately output"
|
"text" : "This parameter is defined in the enumerators but not the modulators. It will be enumerated and immediately output"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -558,7 +629,7 @@
|
|||||||
"maxclass" : "comment",
|
"maxclass" : "comment",
|
||||||
"numinlets" : 1,
|
"numinlets" : 1,
|
||||||
"numoutlets" : 0,
|
"numoutlets" : 0,
|
||||||
"patching_rect" : [ 159.0, 347.0, 254.0, 52.0 ],
|
"patching_rect" : [ 159.0, 347.0, 254.0, 51.0 ],
|
||||||
"text" : "This parameter is not defined by either the Modulators or Enumerators, so it will be passed directly to the output"
|
"text" : "This parameter is not defined by either the Modulators or Enumerators, so it will be passed directly to the output"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -571,7 +642,7 @@
|
|||||||
"maxclass" : "comment",
|
"maxclass" : "comment",
|
||||||
"numinlets" : 1,
|
"numinlets" : 1,
|
||||||
"numoutlets" : 0,
|
"numoutlets" : 0,
|
||||||
"patching_rect" : [ 159.0, 190.0, 197.0, 66.0 ],
|
"patching_rect" : [ 159.0, 190.0, 197.0, 64.0 ],
|
||||||
"text" : "This parameter is defined in the modulators, and when sent will act as the center value for that LFO"
|
"text" : "This parameter is defined in the modulators, and when sent will act as the center value for that LFO"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -583,7 +654,7 @@
|
|||||||
"maxclass" : "comment",
|
"maxclass" : "comment",
|
||||||
"numinlets" : 1,
|
"numinlets" : 1,
|
||||||
"numoutlets" : 0,
|
"numoutlets" : 0,
|
||||||
"patching_rect" : [ 59.0, 634.0, 254.0, 158.0 ],
|
"patching_rect" : [ 59.0, 634.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"
|
"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"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -631,7 +702,7 @@
|
|||||||
"numinlets" : 2,
|
"numinlets" : 2,
|
||||||
"numoutlets" : 5,
|
"numoutlets" : 5,
|
||||||
"outlettype" : [ "dictionary", "", "", "", "" ],
|
"outlettype" : [ "dictionary", "", "", "", "" ],
|
||||||
"patching_rect" : [ 980.368419170379639, 726.0, 97.0, 22.0 ],
|
"patching_rect" : [ 989.0, 855.0, 97.0, 22.0 ],
|
||||||
"saved_object_attributes" : {
|
"saved_object_attributes" : {
|
||||||
"embed" : 0,
|
"embed" : 0,
|
||||||
"legacy" : 1,
|
"legacy" : 1,
|
||||||
@ -650,7 +721,7 @@
|
|||||||
"maxclass" : "comment",
|
"maxclass" : "comment",
|
||||||
"numinlets" : 1,
|
"numinlets" : 1,
|
||||||
"numoutlets" : 0,
|
"numoutlets" : 0,
|
||||||
"patching_rect" : [ 504.0, 6.0, 150.0, 34.0 ],
|
"patching_rect" : [ 504.0, 6.0, 150.0, 33.0 ],
|
||||||
"text" : "required due to the asynchronous operation"
|
"text" : "required due to the asynchronous operation"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -662,7 +733,7 @@
|
|||||||
"maxclass" : "comment",
|
"maxclass" : "comment",
|
||||||
"numinlets" : 1,
|
"numinlets" : 1,
|
||||||
"numoutlets" : 0,
|
"numoutlets" : 0,
|
||||||
"patching_rect" : [ 773.0, 692.0, 150.0, 117.0 ],
|
"patching_rect" : [ 786.0, 778.0, 150.0, 114.0 ],
|
||||||
"text" : "Storage for the matrix. Unfortunately, jsweb dictionary handling isn't great, so we can't use it like a native dict object and need to do this wild hack for usage with pattrstorage"
|
"text" : "Storage for the matrix. Unfortunately, jsweb dictionary handling isn't great, so we can't use it like a native dict object and need to do this wild hack for usage with pattrstorage"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -737,6 +808,13 @@
|
|||||||
"source" : [ "obj-12", 0 ]
|
"source" : [ "obj-12", 0 ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
, {
|
||||||
|
"patchline" : {
|
||||||
|
"destination" : [ "obj-2", 0 ],
|
||||||
|
"source" : [ "obj-13", 0 ]
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
, {
|
, {
|
||||||
"patchline" : {
|
"patchline" : {
|
||||||
@ -788,6 +866,20 @@
|
|||||||
"source" : [ "obj-22", 0 ]
|
"source" : [ "obj-22", 0 ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
, {
|
||||||
|
"patchline" : {
|
||||||
|
"destination" : [ "obj-25", 0 ],
|
||||||
|
"source" : [ "obj-26", 1 ]
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
, {
|
||||||
|
"patchline" : {
|
||||||
|
"destination" : [ "obj-31", 0 ],
|
||||||
|
"source" : [ "obj-27", 1 ]
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
, {
|
, {
|
||||||
"patchline" : {
|
"patchline" : {
|
||||||
@ -799,14 +891,14 @@
|
|||||||
, {
|
, {
|
||||||
"patchline" : {
|
"patchline" : {
|
||||||
"destination" : [ "obj-63", 0 ],
|
"destination" : [ "obj-63", 0 ],
|
||||||
"source" : [ "obj-27", 2 ]
|
"source" : [ "obj-27", 3 ]
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
, {
|
, {
|
||||||
"patchline" : {
|
"patchline" : {
|
||||||
"destination" : [ "obj-66", 0 ],
|
"destination" : [ "obj-66", 0 ],
|
||||||
"source" : [ "obj-27", 1 ]
|
"source" : [ "obj-27", 2 ]
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
53
lfogui.js
53
lfogui.js
@ -105,13 +105,14 @@ function MasterLfoHandler(){
|
|||||||
|
|
||||||
const [initPhaseArr, setInitPhaseArr] = React.useState(Array(MAXLFOS).fill('0'));
|
const [initPhaseArr, setInitPhaseArr] = React.useState(Array(MAXLFOS).fill('0'));
|
||||||
const [lastPhaseArr, setLastPhaseArr] = React.useState(Array(MAXLFOS).fill(0));
|
const [lastPhaseArr, setLastPhaseArr] = React.useState(Array(MAXLFOS).fill(0));
|
||||||
const [cachedNoiseValueArr, setCachedNoiseValueArr] = React.useState(Array(MAXLFOS).fill([0, 0]));
|
const [cachedNoiseValueArr1, setCachedNoiseValueArr1] = React.useState(Array(MAXLFOS).fill(0));
|
||||||
|
const [cachedNoiseValueArr2, setCachedNoiseValueArr2] = React.useState(Array(MAXLFOS).fill(0));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const allModArrays = [modVisibleArr, modTypeArr, modInstanceNumArr, shapeArr, noiseTypeArr, djParamArr, freqArr, minArr, maxArr, initPhaseArr, lastPhaseArr, cachedNoiseValueArr];
|
const allModArrays = [modVisibleArr, modTypeArr, modInstanceNumArr, shapeArr, noiseTypeArr, djParamArr, freqArr, minArr, maxArr, initPhaseArr, lastPhaseArr, cachedNoiseValueArr1, cachedNoiseValueArr2];
|
||||||
const allModSetters = [setModVisibleArr, setModTypeArr, setModInstanceNumArr, setShapeArr, setNoiseTypeArr, setDjParamArr, setFreqArr, setMinArr, setMaxArr, setInitPhaseArr, lastPhaseArr, cachedNoiseValueArr];
|
const allModSetters = [setModVisibleArr, setModTypeArr, setModInstanceNumArr, setShapeArr, setNoiseTypeArr, setDjParamArr, setFreqArr, setMinArr, setMaxArr, setInitPhaseArr, setLastPhaseArr, setCachedNoiseValueArr1, setCachedNoiseValueArr2];
|
||||||
const modBlankVals = [true, 'LFO', '1', SHAPETYPES[0], MODPARAMOPTIONS[0], "Sine Int.", '1hz', '0', '1', '0', 0, [0, 0]];
|
const modBlankVals = [true, 'LFO', '1', SHAPETYPES[0], NOISETYPES[0], MODPARAMOPTIONS[0], '1hz', '0', '1', '0', 0, 0, 0];
|
||||||
|
|
||||||
|
|
||||||
/// ENUMERATOR ARRAYS
|
/// ENUMERATOR ARRAYS
|
||||||
@ -157,14 +158,12 @@ function MasterLfoHandler(){
|
|||||||
function handleLoad(event) {
|
function handleLoad(event) {
|
||||||
window.max.getDict(event.detail, (dict) => {
|
window.max.getDict(event.detail, (dict) => {
|
||||||
|
|
||||||
for (let i = 0; i<allModArrays.length; i++) {
|
for (let i = 0; i<dict.data.modArrays.length; i++) {
|
||||||
allModSetters[i](dict.data.modArrays[i]);
|
allModSetters[i](dict.data.modArrays[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 0; i<allEnumArrays.length; i++) {
|
for (let i = 0; i<allEnumArrays.length; i++) {
|
||||||
allEnumArrSetters[i](dict.data.enumArrays[i]);
|
allEnumArrSetters[i](dict.data.enumArrays[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 0; i<allEnumMats.length; i++) {
|
for (let i = 0; i<allEnumMats.length; i++) {
|
||||||
allEnumMatSetters[i](dict.data.enumMats[i]);
|
allEnumMatSetters[i](dict.data.enumMats[i]);
|
||||||
}
|
}
|
||||||
@ -242,7 +241,7 @@ function MasterLfoHandler(){
|
|||||||
|
|
||||||
function handleTick(event) {
|
function handleTick(event) {
|
||||||
let time = (Date.now() - firstUpdateTime) / 1000;
|
let time = (Date.now() - firstUpdateTime) / 1000;
|
||||||
let noiseData = {lastPhaseArr, setLastPhaseArr, cachedNoiseValueArr, setCachedNoiseValueArr, noiseTypeArr};
|
let noiseData = {lastPhaseArr, setLastPhaseArr, cachedNoiseValueArr1, setCachedNoiseValueArr1, cachedNoiseValueArr2, setCachedNoiseValueArr2, noiseTypeArr};
|
||||||
operateModulators(modVisibleArr, modTypeArr, modInstanceNumArr, djParamArr, modCenterVals, freqArr, minArr, maxArr, shapeArr, initPhaseArr, noiseData, userDefinedWave, time, beatsInMeasure, ticks);
|
operateModulators(modVisibleArr, modTypeArr, modInstanceNumArr, djParamArr, modCenterVals, freqArr, minArr, maxArr, shapeArr, initPhaseArr, noiseData, userDefinedWave, time, beatsInMeasure, ticks);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -260,6 +259,28 @@ function MasterLfoHandler(){
|
|||||||
|
|
||||||
function setNN(event){
|
function setNN(event){
|
||||||
|
|
||||||
|
for (let i=0; i<MAXLFOS; i++){
|
||||||
|
freqArr[i] = nnFreqToHzString(event.detail[i]);
|
||||||
|
}
|
||||||
|
setFreqArr(freqArr)
|
||||||
|
|
||||||
|
for (let i=MAXLFOS; i<MAXLFOS * 2; i++){
|
||||||
|
minArr[i - MAXLFOS] = event.detail[i];
|
||||||
|
}
|
||||||
|
setMinArr(minArr);
|
||||||
|
|
||||||
|
for (let i=MAXLFOS*2; i<MAXLFOS * 3; i++){
|
||||||
|
maxArr[i - MAXLFOS*2] = event.detail[i];
|
||||||
|
}
|
||||||
|
setMaxArr(maxArr);
|
||||||
|
|
||||||
|
for (let i=MAXLFOS*3; i<MAXLFOS * 4; i++){
|
||||||
|
initPhaseArr[i - MAXLFOS*3] = parseFloat(event.detail[i]);
|
||||||
|
|
||||||
|
}
|
||||||
|
setInitPhaseArr(initPhaseArr);
|
||||||
|
|
||||||
|
rerender(!render); // BAD! SHOULD NOT BE DOING THIS!
|
||||||
}
|
}
|
||||||
|
|
||||||
function dumpNN(event){
|
function dumpNN(event){
|
||||||
@ -269,7 +290,8 @@ function MasterLfoHandler(){
|
|||||||
});
|
});
|
||||||
allNNData = allNNData.concat(minArr);
|
allNNData = allNNData.concat(minArr);
|
||||||
allNNData = allNNData.concat(maxArr);
|
allNNData = allNNData.concat(maxArr);
|
||||||
log(allNNData);
|
allNNData = allNNData.concat(initPhaseArr);
|
||||||
|
window.max.outlet("NNdata " + allNNData.join(" "));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -367,7 +389,7 @@ function MasterLfoHandler(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
log("adding lfo");
|
|
||||||
for (var j = 0; j < allModArrays.length; j++){ // no space below, easy.
|
for (var j = 0; j < allModArrays.length; j++){ // no space below, easy.
|
||||||
let array = allModArrays[j];
|
let array = allModArrays[j];
|
||||||
array[id + 1] = modBlankVals[j];
|
array[id + 1] = modBlankVals[j];
|
||||||
@ -375,6 +397,7 @@ function MasterLfoHandler(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
rerender(!render);
|
rerender(!render);
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
removeLfo: () => {
|
removeLfo: () => {
|
||||||
@ -513,8 +536,8 @@ if (!DEBUG){
|
|||||||
window.dispatchEvent(new CustomEvent('dumpNN'));
|
window.dispatchEvent(new CustomEvent('dumpNN'));
|
||||||
});
|
});
|
||||||
|
|
||||||
window.max.bindInlet("setNN", () => {
|
window.max.bindInlet("setNN", (...data) => {
|
||||||
window.dispatchEvent(new CustomEvent('setNN'));
|
window.dispatchEvent(new CustomEvent('setNN', {'detail' : data}));
|
||||||
});
|
});
|
||||||
|
|
||||||
window.max.bindInlet("param", (inst, paramName, val) => {
|
window.max.bindInlet("param", (inst, paramName, val) => {
|
||||||
@ -534,12 +557,6 @@ if (!DEBUG){
|
|||||||
window.dispatchEvent(new CustomEvent('userWave', {'detail' : points}));
|
window.dispatchEvent(new CustomEvent('userWave', {'detail' : points}));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
/* window.max.binInlet("userWave", (...points) => {
|
|
||||||
window.dispatchEvent(new CustomEvent('userWave', {'detail' : [points]}));
|
|
||||||
log("received user points");
|
|
||||||
}); */
|
|
||||||
|
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
window.dispatchEvent(new CustomEvent('tick'));
|
window.dispatchEvent(new CustomEvent('tick'));
|
||||||
}, 200);
|
}, 200);
|
||||||
|
@ -143,14 +143,15 @@ function operateNoise(center, inst, timeBaseStr, min, max, waveType, phaseArr, i
|
|||||||
phase = (maxTicks % timeBase) / timeBase;
|
phase = (maxTicks % timeBase) / timeBase;
|
||||||
|
|
||||||
|
|
||||||
if (noiseData.cachedNoiseValueArr[index][0] == 0 || noiseData.lastPhaseArr[index] > phase){ // occurs if the phase reset to 0 or at the very start
|
if (noiseData.cachedNoiseValueArr1[index] == 0 || noiseData.lastPhaseArr[index] > phase){ // occurs if the phase reset to 0 or at the very start
|
||||||
|
|
||||||
noiseData.cachedNoiseValueArr[index][0] = noiseData.cachedNoiseValueArr[index][1];
|
noiseData.cachedNoiseValueArr1[index] = noiseData.cachedNoiseValueArr2[index];
|
||||||
if (noiseData.cachedNoiseValueArr[index][0] == 0)
|
if (noiseData.cachedNoiseValueArr1[index] == 0)
|
||||||
noiseData.cachedNoiseValueArr[index][0] = center;
|
noiseData.cachedNoiseValueArr2[index] = center;
|
||||||
|
|
||||||
noiseData.cachedNoiseValueArr[index][1] = Math.random();
|
noiseData.cachedNoiseValueArr1[index] = Math.random();
|
||||||
noiseData.setCachedNoiseValueArr(noiseData.cachedNoiseValueArr);
|
noiseData.setCachedNoiseValueArr1(noiseData.cachedNoiseValueArr1);
|
||||||
|
noiseData.setCachedNoiseValueArr2(noiseData.cachedNoiseValueArr2);
|
||||||
}
|
}
|
||||||
noiseData.lastPhaseArr[index] = phase;
|
noiseData.lastPhaseArr[index] = phase;
|
||||||
noiseData.setLastPhaseArr(noiseData.lastPhaseArr);
|
noiseData.setLastPhaseArr(noiseData.lastPhaseArr);
|
||||||
@ -158,7 +159,7 @@ function operateNoise(center, inst, timeBaseStr, min, max, waveType, phaseArr, i
|
|||||||
let sinePhase = (Math.sin(Math.PI + Math.PI * phase) + 1) / 2
|
let sinePhase = (Math.sin(Math.PI + Math.PI * phase) + 1) / 2
|
||||||
|
|
||||||
//let unscaled = (noiseData.cachedNoiseValueArr[index][1] - noiseData.cachedNoiseValueArr[index][0]) * sinePhase + noiseData.cachedNoiseValueArr[index][0];
|
//let unscaled = (noiseData.cachedNoiseValueArr[index][1] - noiseData.cachedNoiseValueArr[index][0]) * sinePhase + noiseData.cachedNoiseValueArr[index][0];
|
||||||
let unscaled = interpolateNoise(noiseData.noiseTypeArr[index], noiseData.cachedNoiseValueArr[index][0], noiseData.cachedNoiseValueArr[index][1], phase);
|
let unscaled = interpolateNoise(noiseType, noiseData.cachedNoiseValueArr1[index], noiseData.cachedNoiseValueArr2[index], phase);
|
||||||
syncDisplay(inst, name, unscaled);
|
syncDisplay(inst, name, unscaled);
|
||||||
|
|
||||||
return unscaled * amp + center + parseFloat(min);
|
return unscaled * amp + center + parseFloat(min);
|
||||||
|
Loading…
Reference in New Issue
Block a user