user defined wavetable and global transport phase alignment

This commit is contained in:
trian-gles 2024-09-03 12:28:30 +02:00
parent 7d984fdfa2
commit c531597a8a
5 changed files with 403 additions and 243 deletions

View File

@ -4,7 +4,5 @@ PLEASE DON'T USE THE PRESET OBJECT TO SAVE PRESETS! CLICK ON THE CIRCLES NUMBERE
YOU THEN CAN USE THE PRESET OBJECT TO LOAD PRESETS
Things not yet implemented:
- Phase syncing with the global transport for metrical LFO periods. If you ask for a 4 bar period LFO with a phase of 0, this will phase sync according to the instantiation of the \[jweb\] object, and NOT the start of a 4/4 bar
- User defined wavetable. I actually have this working already in a different repo but I don't want to merge it quite yet
- Noise functions. I'm thinking of having random values, linear interpolated random values, sine interpolated random values, and perlin noise. I'm not going to start working on this until earliest October
- The necessary interfacing allowing for training and control by the MLP. Similarly, this should wait until October or later.

View File

@ -10,7 +10,7 @@
}
,
"classnamespace" : "box",
"rect" : [ 34.0, 76.0, 981.0, 763.0 ],
"rect" : [ 34.0, 82.0, 1155.0, 750.0 ],
"bglocked" : 1,
"openinpresentation" : 1,
"default_fontsize" : 12.0,
@ -39,6 +39,86 @@
"subpatcher_template" : "",
"assistshowspatchername" : 0,
"boxes" : [ {
"box" : {
"fontface" : 1,
"id" : "obj-68",
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 230.0, 735.0, 159.0, 20.0 ],
"presentation" : 1,
"presentation_rect" : [ 9.0, 820.0, 159.0, 20.0 ],
"text" : "Custom LFO table"
}
}
, {
"box" : {
"color" : [ 1.0, 0.0, 0.0, 1.0 ],
"id" : "obj-64",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "bang" ],
"patching_rect" : [ 255.0, 304.0, 22.0, 22.0 ],
"text" : "t b"
}
}
, {
"box" : {
"color" : [ 1.0, 0.0, 0.0, 1.0 ],
"id" : "obj-60",
"maxclass" : "newobj",
"numinlets" : 0,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 290.0, 295.0, 39.0, 22.0 ],
"text" : "r load"
}
}
, {
"box" : {
"color" : [ 1.0, 0.0, 0.0, 1.0 ],
"id" : "obj-33",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 198.5, 382.0, 109.0, 22.0 ],
"text" : "prepend userWave"
}
}
, {
"box" : {
"candicane2" : [ 0.145098, 0.203922, 0.356863, 1.0 ],
"candicane3" : [ 0.290196, 0.411765, 0.713726, 1.0 ],
"candicane4" : [ 0.439216, 0.619608, 0.070588, 1.0 ],
"candicane5" : [ 0.584314, 0.827451, 0.431373, 1.0 ],
"candicane6" : [ 0.733333, 0.035294, 0.788235, 1.0 ],
"candicane7" : [ 0.878431, 0.243137, 0.145098, 1.0 ],
"candicane8" : [ 0.027451, 0.447059, 0.501961, 1.0 ],
"contdata" : 1,
"id" : "obj-55",
"maxclass" : "multislider",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "", "" ],
"parameter_enable" : 0,
"patching_rect" : [ 238.0, 328.0, 162.0, 52.0 ],
"peakcolor" : [ 0.498039, 0.498039, 0.498039, 1.0 ],
"presentation" : 1,
"presentation_rect" : [ 9.0, 843.5, 337.0, 91.0 ],
"setminmax" : [ 0.0, 127.0 ],
"settype" : 0,
"size" : 50,
"varname" : "customWavetable"
}
}
, {
"box" : {
"color" : [ 1.0, 0.0, 0.0, 1.0 ],
"id" : "obj-84",
@ -606,6 +686,20 @@
"subpatcher_template" : "",
"assistshowspatchername" : 0,
"boxes" : [ {
"box" : {
"fontname" : "Arial",
"fontsize" : 13.0,
"id" : "obj-29",
"maxclass" : "newobj",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "bang" ],
"patching_rect" : [ 56.0, 47.0, 210.0, 23.0 ],
"text" : "metro @interval 20 ticks @active 1"
}
}
, {
"box" : {
"id" : "obj-23",
"maxclass" : "newobj",
@ -684,8 +778,8 @@
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 50.0, 184.0, 89.0, 22.0 ],
"text" : "prepend tempo"
"patching_rect" : [ 50.0, 184.0, 80.0, 22.0 ],
"text" : "prepend ticks"
}
}
@ -872,6 +966,13 @@
"source" : [ "obj-23", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-37", 0 ],
"source" : [ "obj-29", 0 ]
}
}
, {
"patchline" : {
@ -904,7 +1005,7 @@
, {
"patchline" : {
"destination" : [ "obj-36", 0 ],
"source" : [ "obj-37", 4 ]
"source" : [ "obj-37", 7 ]
}
}
@ -1559,8 +1660,8 @@
"key" : "svg",
"val" : {
"id" : "src4",
"cx" : 153,
"cy" : 70
"cx" : 139,
"cy" : 69
}
}
@ -4752,30 +4853,12 @@
"patching_rect" : [ 225.0, 65.0, 56.0, 22.0 ],
"restore" : {
"currentPiece" : [ "DefaultSetting" ],
"customWavetable" : [ 12, 110, 103, 101, 94, 91, 83, 80, 76, 70, 61, 60, 59, 52, 51, 44, 45, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 41, 38, 38, 37, 34, 34, 33, 32, 31, 30, 30, 29, 27, 27, 26, 24, 23, 23, 22, 19, 15, 9, 0 ],
"modstorage-2" : [ {
"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" : [ [ 0, 0, 1, 1, 1, 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" ], [ "Sine", "Sine", "SawUp", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine" ], [ "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" ] ],
"modCenters" : {
"1" : {
}
,
"2" : {
}
,
"3" : {
}
,
"4" : {
}
}
"modArrays" : [ [ 0, 1, 1, 1, 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" ], [ "Sine", "SawUp", "Custom", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine" ], [ "NONE", "NONE", "harmoniclarity", "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" ] ]
}
}
@ -5331,7 +5414,7 @@
"numoutlets" : 3,
"outlettype" : [ "", "", "" ],
"patching_rect" : [ 383.5, 132.0, 148.0, 22.0 ],
"restore" : [ "Tutorial.bank.json" ],
"restore" : [ "HSS_Samples_25.7.24.json" ],
"saved_object_attributes" : {
"parameter_enable" : 0,
"parameter_mappable" : 0
@ -5414,7 +5497,7 @@
"instrument-1" : [ "X_Darkswarm.instr.json" ],
"instrument-2" : [ "X_Darkswarm.instr.json" ],
"instrument-3" : [ "X_BasicBells.instr.json" ],
"instrument-4" : [ "X_Grain.instr.json" ]
"instrument-4" : [ "X_Windwhistle.instr.json" ]
}
,
"text" : "autopattr",
@ -6218,7 +6301,7 @@
"numoutlets" : 3,
"outlettype" : [ "", "", "" ],
"patching_rect" : [ 578.714285714285779, 182.0, 137.0, 22.0 ],
"restore" : [ 0 ],
"restore" : [ 53 ],
"saved_object_attributes" : {
"parameter_enable" : 0,
"parameter_mappable" : 0
@ -6249,7 +6332,7 @@
"numoutlets" : 3,
"outlettype" : [ "", "", "" ],
"patching_rect" : [ 531.571428571428555, 124.0, 148.0, 22.0 ],
"restore" : [ 0 ],
"restore" : [ 53 ],
"saved_object_attributes" : {
"parameter_enable" : 0,
"parameter_mappable" : 0
@ -6280,7 +6363,7 @@
"numoutlets" : 3,
"outlettype" : [ "", "", "" ],
"patching_rect" : [ 484.428571428571502, 93.0, 139.0, 22.0 ],
"restore" : [ 0 ],
"restore" : [ 53 ],
"saved_object_attributes" : {
"parameter_enable" : 0,
"parameter_mappable" : 0
@ -6311,7 +6394,7 @@
"numoutlets" : 3,
"outlettype" : [ "", "", "" ],
"patching_rect" : [ 437.0, 412.0, 168.0, 22.0 ],
"restore" : [ 0 ],
"restore" : [ 68 ],
"saved_object_attributes" : {
"parameter_enable" : 0,
"parameter_mappable" : 0
@ -6342,7 +6425,7 @@
"numoutlets" : 3,
"outlettype" : [ "", "", "" ],
"patching_rect" : [ 390.142857142857167, 323.0, 177.0, 22.0 ],
"restore" : [ 0 ],
"restore" : [ 51 ],
"saved_object_attributes" : {
"parameter_enable" : 0,
"parameter_mappable" : 0
@ -6373,7 +6456,7 @@
"numoutlets" : 3,
"outlettype" : [ "", "", "" ],
"patching_rect" : [ 343.0, 265.0, 171.0, 22.0 ],
"restore" : [ 0 ],
"restore" : [ 37 ],
"saved_object_attributes" : {
"parameter_enable" : 0,
"parameter_mappable" : 0
@ -6392,7 +6475,7 @@
"numoutlets" : 3,
"outlettype" : [ "", "", "" ],
"patching_rect" : [ 295.75, 209.0, 162.0, 22.0 ],
"restore" : [ 0 ],
"restore" : [ 5.2 ],
"saved_object_attributes" : {
"parameter_enable" : 0,
"parameter_mappable" : 0
@ -6411,7 +6494,7 @@
"numoutlets" : 3,
"outlettype" : [ "", "", "" ],
"patching_rect" : [ 248.625, 154.0, 145.0, 22.0 ],
"restore" : [ 0 ],
"restore" : [ -9 ],
"saved_object_attributes" : {
"parameter_enable" : 0,
"parameter_mappable" : 0
@ -6430,7 +6513,7 @@
"numoutlets" : 3,
"outlettype" : [ "", "", "" ],
"patching_rect" : [ 201.5, 93.0, 159.0, 22.0 ],
"restore" : [ 0 ],
"restore" : [ 29 ],
"saved_object_attributes" : {
"parameter_enable" : 0,
"parameter_mappable" : 0
@ -7302,7 +7385,7 @@
"numoutlets" : 3,
"outlettype" : [ "", "", "" ],
"patching_rect" : [ 517.899999999999977, 790.0, 145.0, 22.0 ],
"restore" : [ 21, 63 ],
"restore" : [ 5, 64 ],
"saved_object_attributes" : {
"parameter_enable" : 0,
"parameter_mappable" : 0
@ -7321,7 +7404,7 @@
"numoutlets" : 3,
"outlettype" : [ "", "", "" ],
"patching_rect" : [ 460.899999999999977, 903.0, 145.0, 22.0 ],
"restore" : [ 63, 21 ],
"restore" : [ 62, 6 ],
"saved_object_attributes" : {
"parameter_enable" : 0,
"parameter_mappable" : 0
@ -7340,7 +7423,7 @@
"numoutlets" : 3,
"outlettype" : [ "", "", "" ],
"patching_rect" : [ 403.899999999999977, 847.0, 145.0, 22.0 ],
"restore" : [ 109, 63 ],
"restore" : [ 131, 62 ],
"saved_object_attributes" : {
"parameter_enable" : 0,
"parameter_mappable" : 0
@ -7359,7 +7442,7 @@
"numoutlets" : 3,
"outlettype" : [ "", "", "" ],
"patching_rect" : [ 346.899999999999977, 790.0, 145.0, 22.0 ],
"restore" : [ 66, 109 ],
"restore" : [ 61, 111 ],
"saved_object_attributes" : {
"parameter_enable" : 0,
"parameter_mappable" : 0
@ -8892,7 +8975,7 @@
}
,
"saved_object_attributes" : {
"client_rect" : [ 1057, 45, 1440, 407 ],
"client_rect" : [ 126, 184, 480, 312 ],
"parameter_enable" : 0,
"parameter_mappable" : 0,
"storage_rect" : [ 583, 69, 1034, 197 ]
@ -9506,6 +9589,13 @@
"source" : [ "obj-32", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-74", 0 ],
"source" : [ "obj-33", 0 ]
}
}
, {
"patchline" : {
@ -9577,6 +9667,13 @@
"source" : [ "obj-52", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-33", 0 ],
"source" : [ "obj-55", 0 ]
}
}
, {
"patchline" : {
@ -9598,6 +9695,13 @@
"source" : [ "obj-58", 4 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-64", 0 ],
"source" : [ "obj-60", 0 ]
}
}
, {
"patchline" : {
@ -9628,6 +9732,13 @@
"source" : [ "obj-63", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-55", 0 ],
"source" : [ "obj-64", 0 ]
}
}
, {
"patchline" : {
@ -9949,7 +10060,7 @@
"parameter_overrides" : {
"obj-15::obj-1" : {
"parameter_longname" : "Outset Pulses[3]",
"parameter_range" : [ 1, 28 ]
"parameter_range" : [ 1, 8 ]
}
,
"obj-15::obj-104" : {
@ -10077,7 +10188,7 @@
,
"obj-26::obj-1" : {
"parameter_longname" : "Outset Pulses",
"parameter_range" : [ 1, 28 ]
"parameter_range" : [ 1, 8 ]
}
,
"obj-26::obj-104" : {
@ -10211,7 +10322,7 @@
,
"obj-5::obj-1" : {
"parameter_longname" : "Outset Pulses[1]",
"parameter_range" : [ 1, 28 ]
"parameter_range" : [ 1, 8 ]
}
,
"obj-5::obj-104" : {
@ -10341,7 +10452,7 @@
,
"obj-8::obj-1" : {
"parameter_longname" : "Outset Pulses[2]",
"parameter_range" : [ 1, 28 ]
"parameter_range" : [ 1, 4 ]
}
,
"obj-8::obj-104" : {

View File

@ -3,14 +3,14 @@
"fileversion" : 1,
"appversion" : {
"major" : 8,
"minor" : 5,
"revision" : 6,
"minor" : 6,
"revision" : 2,
"architecture" : "x64",
"modernui" : 1
}
,
"classnamespace" : "box",
"rect" : [ 112.0, 87.0, 1344.0, 869.0 ],
"rect" : [ 34.0, 76.0, 1155.0, 763.0 ],
"bglocked" : 0,
"openinpresentation" : 0,
"default_fontsize" : 12.0,
@ -40,25 +40,98 @@
"assistshowspatchername" : 0,
"boxes" : [ {
"box" : {
"id" : "obj-31",
"maxclass" : "message",
"fontname" : "Arial",
"fontsize" : 13.0,
"id" : "obj-29",
"maxclass" : "newobj",
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 45.0, 289.0, 104.0, 22.0 ],
"text" : "param 2 scale 0.5"
"outlettype" : [ "bang" ],
"patching_rect" : [ 465.0, 141.0, 210.0, 23.0 ],
"text" : "metro @interval 40 ticks @active 1"
}
}
, {
"box" : {
"id" : "obj-28",
"maxclass" : "button",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "bang" ],
"parameter_enable" : 0,
"patching_rect" : [ 826.0, 79.0, 24.0, 24.0 ]
}
}
, {
"box" : {
"id" : "obj-3",
"maxclass" : "message",
"numinlets" : 2,
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 45.0, 154.0, 131.0, 22.0 ],
"text" : "param 1 metriclarity 40"
"patching_rect" : [ 817.0, 147.0, 80.0, 22.0 ],
"text" : "prepend ticks"
}
}
, {
"box" : {
"id" : "obj-54",
"maxclass" : "newobj",
"numinlets" : 0,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 44.0, 528.5, 49.0, 22.0 ],
"text" : "r reload"
}
}
, {
"box" : {
"id" : "obj-50",
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 233.5, 589.0, 150.0, 20.0 ],
"text" : "user definted LFO shape"
}
}
, {
"box" : {
"id" : "obj-48",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 118.0, 606.5, 109.0, 22.0 ],
"text" : "prepend userWave"
}
}
, {
"box" : {
"candicane2" : [ 0.145098, 0.203922, 0.356863, 1.0 ],
"candicane3" : [ 0.290196, 0.411765, 0.713726, 1.0 ],
"candicane4" : [ 0.439216, 0.619608, 0.070588, 1.0 ],
"candicane5" : [ 0.584314, 0.827451, 0.431373, 1.0 ],
"candicane6" : [ 0.733333, 0.035294, 0.788235, 1.0 ],
"candicane7" : [ 0.878431, 0.243137, 0.145098, 1.0 ],
"candicane8" : [ 0.027451, 0.447059, 0.501961, 1.0 ],
"contdata" : 1,
"id" : "obj-33",
"maxclass" : "multislider",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "", "" ],
"parameter_enable" : 0,
"patching_rect" : [ 118.0, 528.5, 162.0, 52.0 ],
"peakcolor" : [ 0.498039, 0.498039, 0.498039, 1.0 ],
"setminmax" : [ 0.0, 127.0 ],
"settype" : 0,
"size" : 50
}
}
@ -94,8 +167,8 @@
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 586.0, 713.0, 89.0, 35.0 ],
"text" : "harmoniclarity 20.2"
"patching_rect" : [ 586.0, 713.0, 89.0, 36.0 ],
"text" : "harmoniclarity 40.156651"
}
}
@ -107,8 +180,8 @@
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 491.0, 713.0, 85.0, 35.0 ],
"text" : "event_length 70.2"
"patching_rect" : [ 491.0, 713.0, 85.0, 36.0 ],
"text" : "event_length 29.843349"
}
}
@ -120,8 +193,8 @@
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 385.0, 715.0, 84.0, 35.0 ],
"text" : "metriclarity 69.626659"
"patching_rect" : [ 385.0, 715.0, 84.0, 36.0 ],
"text" : "metriclarity 0.5"
}
}
@ -144,7 +217,7 @@
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 1066.052632331848145, 53.0, 99.894735336303711, 87.0 ],
"patching_rect" : [ 1066.052632331848145, 53.0, 99.894735336303711, 89.0 ],
"text" : "You can use Hz, seconds, ms, hh:mm:ss, or bars.beats.ticks for the period/frequency"
}
@ -156,7 +229,7 @@
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 1181.315790414810181, 40.0, 81.0, 114.0 ],
"patching_rect" : [ 1181.315790414810181, 40.0, 81.0, 117.0 ],
"text" : "Min and max must be ADDED to the center value to determine the true bounds. "
}
@ -168,7 +241,7 @@
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 913.0, 107.0, 150.0, 60.0 ],
"patching_rect" : [ 913.0, 107.0, 150.0, 62.0 ],
"text" : "center values are read only, they must be configured by an upstream value"
}
@ -209,18 +282,6 @@
"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" : {
@ -252,7 +313,7 @@
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 200.0, 807.0, 51.0, 22.0 ],
"patching_rect" : [ 939.0, 69.0, 51.0, 22.0 ],
"text" : "s reload"
}
@ -264,74 +325,7 @@
"numinlets" : 1,
"numoutlets" : 5,
"outlettype" : [ "preset", "int", "preset", "int", "" ],
"patching_rect" : [ 190.0, 752.0, 100.0, 40.0 ],
"pattrstorage" : "storage"
}
}
, {
"box" : {
"id" : "obj-28",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 460.0, 789.0, 116.0, 22.0 ],
"saved_object_attributes" : {
"client_rect" : [ 903, 252, 1512, 568 ],
"parameter_enable" : 0,
"parameter_mappable" : 0,
"storage_rect" : [ 780, 524, 1380, 824 ]
}
,
"text" : "pattrstorage storage",
"varname" : "storage"
}
}
, {
"box" : {
"id" : "obj-26",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 3,
"outlettype" : [ "", "", "" ],
"patching_rect" : [ 643.0, 770.0, 40.0, 22.0 ],
"restore" : [ {
"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", "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" ] ] ],
"modArrays" : [ [ 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ "1", "1", "1", "4", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1" ], [ "Sine", "SawUp", "SawUp", "Tri", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine" ], [ "metriclarity", "event_length", "harmoniclarity", "meter", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE" ], [ "0.2hz", "2s", "0:0:02", "0.5.0", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz" ], [ "-10", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0" ], [ "30", "100", "100", "2", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1" ], [ "0", "0", "0.5", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0" ] ],
"modCenters" : {
"1" : {
"metriclarity" : 40
}
,
"2" : {
"scale" : 1.6
}
,
"3" : {
"attenuation" : 100
}
,
"4" : {
"meter" : 0.5
}
}
}
}
],
"saved_object_attributes" : {
"parameter_enable" : 0,
"parameter_mappable" : 0
}
,
"text" : "pattr",
"varname" : "u560003760"
"patching_rect" : [ 934.0, 27.0, 100.0, 40.0 ]
}
}
@ -339,28 +333,9 @@
"box" : {
"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", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation", "attenuation" ] ],
"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" ] ],
"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" ] ] ],
"modArrays" : [ [ 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ "1", "1", "1", "4", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1" ], [ "Sine", "SawUp", "SawUp", "Tri", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine", "Sine" ], [ "metriclarity", "event_length", "harmoniclarity", "meter", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE", "NONE" ], [ "0.2hz", "2s", "0:0:02", "0.5.0", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz", "1hz" ], [ "-10", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0" ], [ "30", "100", "100", "2", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1" ], [ "0", "0", "0.5", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0" ] ],
"modCenters" : {
"1" : {
"metriclarity" : 40
}
,
"2" : {
"scale" : 1.6
}
,
"3" : {
"attenuation" : 100
}
,
"4" : {
"meter" : 0.5
}
}
"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" ] ]
}
}
@ -368,11 +343,12 @@
"id" : "obj-25",
"maxclass" : "newobj",
"numinlets" : 2,
"numoutlets" : 4,
"outlettype" : [ "dictionary", "", "", "" ],
"numoutlets" : 5,
"outlettype" : [ "dictionary", "", "", "", "" ],
"patching_rect" : [ 773.0, 808.0, 166.0, 22.0 ],
"saved_object_attributes" : {
"embed" : 1,
"legacy" : 1,
"parameter_enable" : 0,
"parameter_mappable" : 0
}
@ -424,7 +400,7 @@
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 137.5, 440.0, 246.0, 64.0 ],
"patching_rect" : [ 137.5, 440.0, 246.0, 66.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"
}
@ -461,7 +437,7 @@
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 824.0, 647.0, 101.0, 22.0 ],
"text" : "attenuation 100"
"text" : "attenuation 200"
}
}
@ -496,7 +472,7 @@
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 504.0, 546.5, 268.0, 33.0 ],
"patching_rect" : [ 504.0, 546.5, 268.0, 34.0 ],
"text" : "we can only output symbols from jweb, so this turns them into lists"
}
@ -520,7 +496,7 @@
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 548.52631402015686, 80.0, 150.0, 33.0 ],
"patching_rect" : [ 548.52631402015686, 80.0, 150.0, 34.0 ],
"text" : "see below for why we use separate names..."
}
@ -532,7 +508,7 @@
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 781.0, 17.0, 150.0, 47.0 ],
"patching_rect" : [ 781.0, 17.0, 150.0, 48.0 ],
"text" : "self explanatory. Warning-will overwrite whatever is saved."
}
@ -544,7 +520,7 @@
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 1261.315790414810181, 47.0, 78.0, 100.0 ],
"patching_rect" : [ 1261.315790414810181, 47.0, 78.0, 103.0 ],
"text" : "You can use the `phase` control to phase offset two LFOs of the same frequency"
}
@ -557,7 +533,7 @@
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 169.0, 246.0, 197.0, 78.0 ],
"patching_rect" : [ 161.5, 261.0, 197.0, 79.0 ],
"text" : "This parameter is defined in the enumerators but not the modulators. It will be enumerated and immediately output"
}
@ -569,7 +545,7 @@
"numinlets" : 2,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 45.0, 256.0, 104.0, 22.0 ],
"patching_rect" : [ 59.0, 256.0, 104.0, 22.0 ],
"text" : "param 2 scale 1.6"
}
@ -578,11 +554,11 @@
"box" : {
"bubble" : 1,
"id" : "obj-24",
"linecount" : 4,
"linecount" : 3,
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 169.0, 332.5, 226.0, 64.0 ],
"patching_rect" : [ 159.0, 347.0, 254.0, 52.0 ],
"text" : "This parameter is not defined by either the Modulators or Enumerators, so it will be passed directly to the output"
}
@ -595,7 +571,7 @@
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 183.0, 154.0, 197.0, 64.0 ],
"patching_rect" : [ 159.0, 190.0, 197.0, 66.0 ],
"text" : "This parameter is defined in the modulators, and when sent will act as the center value for that LFO"
}
@ -607,7 +583,7 @@
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 45.0, 564.0, 254.0, 154.0 ],
"patching_rect" : [ 59.0, 634.0, 254.0, 158.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"
}
@ -653,11 +629,12 @@
"id" : "obj-4",
"maxclass" : "newobj",
"numinlets" : 2,
"numoutlets" : 4,
"outlettype" : [ "dictionary", "", "", "" ],
"numoutlets" : 5,
"outlettype" : [ "dictionary", "", "", "", "" ],
"patching_rect" : [ 980.368419170379639, 726.0, 97.0, 22.0 ],
"saved_object_attributes" : {
"embed" : 0,
"legacy" : 1,
"parameter_enable" : 0,
"parameter_mappable" : 0
}
@ -673,7 +650,7 @@
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 504.0, 6.0, 150.0, 33.0 ],
"patching_rect" : [ 504.0, 6.0, 150.0, 34.0 ],
"text" : "required due to the asynchronous operation"
}
@ -685,7 +662,7 @@
"maxclass" : "comment",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 773.0, 692.0, 150.0, 114.0 ],
"patching_rect" : [ 773.0, 692.0, 150.0, 117.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"
}
@ -811,13 +788,6 @@
"source" : [ "obj-22", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-25", 0 ],
"source" : [ "obj-26", 1 ]
}
}
, {
"patchline" : {
@ -842,15 +812,22 @@
}
, {
"patchline" : {
"destination" : [ "obj-2", 0 ],
"source" : [ "obj-3", 0 ]
"destination" : [ "obj-47", 0 ],
"source" : [ "obj-28", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-47", 0 ],
"source" : [ "obj-29", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-2", 0 ],
"source" : [ "obj-31", 0 ]
"source" : [ "obj-3", 0 ]
}
}
@ -860,6 +837,13 @@
"source" : [ "obj-32", 1 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-48", 0 ],
"source" : [ "obj-33", 0 ]
}
}
, {
"patchline" : {
@ -867,6 +851,14 @@
"source" : [ "obj-36", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-15", 0 ],
"order" : 3,
"source" : [ "obj-37", 0 ]
}
}
, {
"patchline" : {
@ -875,6 +867,14 @@
"source" : [ "obj-37", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-22", 0 ],
"order" : 5,
"source" : [ "obj-37", 0 ]
}
}
, {
"patchline" : {
@ -883,6 +883,22 @@
"source" : [ "obj-37", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-5", 0 ],
"order" : 2,
"source" : [ "obj-37", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-8", 0 ],
"order" : 4,
"source" : [ "obj-37", 0 ]
}
}
, {
"patchline" : {
@ -916,8 +932,15 @@
}
, {
"patchline" : {
"destination" : [ "obj-52", 0 ],
"source" : [ "obj-47", 4 ]
"destination" : [ "obj-3", 0 ],
"source" : [ "obj-47", 7 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-2", 0 ],
"source" : [ "obj-48", 0 ]
}
}
@ -930,8 +953,8 @@
}
, {
"patchline" : {
"destination" : [ "obj-2", 0 ],
"source" : [ "obj-52", 0 ]
"destination" : [ "obj-33", 0 ],
"source" : [ "obj-54", 0 ]
}
}

View File

@ -45,12 +45,14 @@ function MasterLfoHandler(){
/// MODULATOR ARRAYS
const [userDefinedWave, setUserDefinedWave] = React.useState(Array(50).fill(0));
const [modVisibleArr, setModVisibleArr] = React.useState(initVisArr);
const [modInstanceNumArr, setModInstanceNumArr] = React.useState(Array(MAXLFOS).fill('1'));
const [modCenterVals, setModCenterVals] = React.useState({'1':{}, '2':{}, '3':{}, '4':{}});
const [bpm, setBpm] = React.useState(100);
const [ticks, setTicks] = React.useState(0);
const [beatsInMeasure, setBeatsInMeasure] = React.useState(4);
const [shapeArr, setShapeArr] = React.useState(Array(MAXLFOS).fill('Sine'));
@ -124,8 +126,6 @@ function MasterLfoHandler(){
for (let i = 0; i<allEnumMats.length; i++) {
allEnumMatSetters[i](dict.data.enumMats[i]);
}
setModCenterVals(dict.data.modCenters);
})
}
@ -133,8 +133,7 @@ function MasterLfoHandler(){
let data = {
'modArrays' : allModArrays,
'enumArrays' : allEnumArrays,
'enumMats' : allEnumMats,
'modCenters': modCenterVals
'enumMats' : allEnumMats
}
window.max.setDict(event.detail, {"data" : data});
window.max.outlet("saved");
@ -201,25 +200,31 @@ function MasterLfoHandler(){
function handleTick(event) {
let time = (Date.now() - firstUpdateTime) / 1000;
operateModulators(modVisibleArr, modInstanceNumArr, djParamArr, modCenterVals, freqArr, minArr, maxArr, shapeArr, phaseArr, time, bpm, beatsInMeasure);
}
function handleBpm(event) {
setBpm(event.detail);
operateModulators(modVisibleArr, modInstanceNumArr, djParamArr, modCenterVals, freqArr, minArr, maxArr, shapeArr, phaseArr, userDefinedWave, time, beatsInMeasure, ticks);
}
function handleTimeSig(event) {
setBeatsInMeasure(parseFloat(event.detail[0]) * parseFloat(event.detail[1])/ 4);
}
function handleChangeUserWave(event){
setUserDefinedWave(event.detail);
}
function handleMaxTicks(event){
setTicks(event.detail);
}
window.addEventListener('loadDict', handleLoad);
window.addEventListener('saveDict', handleSave);
window.addEventListener('tick', handleTick);
window.addEventListener('param', handleParam);
window.addEventListener('enum', handleEnum);
window.addEventListener('tempo', handleBpm);
window.addEventListener('timesig', handleTimeSig);
window.addEventListener('userWave', handleChangeUserWave);
window.addEventListener('maxTicks', handleMaxTicks);
return () => {
window.removeEventListener('loadDict', handleLoad);
@ -227,10 +232,11 @@ function MasterLfoHandler(){
window.removeEventListener('tick', handleTick);
window.removeEventListener('param', handleParam);
window.removeEventListener('enum', handleEnum);
window.removeEventListener('tempo', handleBpm);
window.removeEventListener('timesig', handleTimeSig);
window.removeEventListener('userWave', handleChangeUserWave);
window.removeEventListener('maxTicks', handleMaxTicks);
};
}, [...allModArrays, ...allEnumArrays, ...allEnumMats, modCenterVals, render, bpm, beatsInMeasure]);
}, [...allModArrays, ...allEnumArrays, ...allEnumMats, modCenterVals, render, beatsInMeasure, ticks]);
function CheckLinked(inst, param, checkInstArr, checkParamArr){
@ -427,14 +433,24 @@ if (!DEBUG){
window.dispatchEvent(new CustomEvent('param', {'detail' : [inst, 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]}));
});
window.max.bindInlet("ticks", (val) => {
window.dispatchEvent(new CustomEvent('maxTicks', {'detail' : val}));
});
window.max.bindInlet("userWave", (...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(() => {
window.dispatchEvent(new CustomEvent('tick'));
}, 200);

View File

@ -2,7 +2,7 @@
// MODULATORS
/////////////////////////
var SHAPETYPES = ["Sine", "SawUp", "SawDown", "Tri", "Square"];
var SHAPETYPES = ["Sine", "SawUp", "SawDown", "Tri", "Square", "Custom"];
var INSTANCEOPTIONS = ["1", "2", "3", "4"];
@ -10,6 +10,11 @@ const MODPARAMOPTIONS = ["NONE", "stream", "pulse_length", "eventfulness", "even
"harmoniclarity", "melodic_cohesion", "melody_scope", "tonic_pitch", "pitch_center", "pitch_range", "dynamics",
"attenuation", "chordal_weight", "tonality-profile", "ostinato-buffer", "ostinato", "meter", "scale"];
const PhaseTypes = Object.freeze({
MUSICAL: Symbol("musical"),
TIME: Symbol("time")
});
function ControlType(){
return e('select', {className: 'control-type'}, Option("LFO"));
}
@ -44,7 +49,7 @@ function LfoRow(props){
};
}
function indexWave(type, phase){
function indexWave(type, phase, userDefinedWave){
switch (type){
case "Sine":
return (Math.sin(phase * Math.PI * 2) / 2) + 0.5;
@ -56,10 +61,12 @@ function indexWave(type, phase){
return phase > 0.5? (1-phase) * 2 : phase * 2;
case "Square":
return +(phase > 0.5);
case "Custom":
return parseFloat(userDefinedWave[Math.floor(phase * 50)]) / 127
}
}
function operateModulators(visibleArr, instanceNumArr, paramNames, centers, freqs, mins, maxs, waveTypes, phaseArr, currTime, bpm, beatsInMeasure){
function operateModulators(visibleArr, instanceNumArr, paramNames, centers, freqs, mins, maxs, waveTypes, phaseArr, userDefinedWave, currTime, beatsInMeasure, ticks){
for (let i=0; i<paramNames.length; i++){
if (visibleArr[i]){
@ -69,19 +76,27 @@ function operateModulators(visibleArr, instanceNumArr, paramNames, centers, freq
if (centers[inst].hasOwnProperty(name)){
center = centers[inst][name];
}
let output = operateModulator(center, inst, freqs[i], mins[i], maxs[i], waveTypes[i], phaseArr, i, name, currTime, bpm, beatsInMeasure);
let output = operateModulator(center, inst, freqs[i], mins[i], maxs[i], waveTypes[i], phaseArr, i, userDefinedWave, name, currTime, beatsInMeasure, ticks);
if (name !== "NONE")
window.dispatchEvent(new CustomEvent('enum', {'detail' : [inst, name, output]}));
}
}
}
function operateModulator(center, inst, freq, min, max, waveType, phaseArr, phaseI, name, currTime, bpm, beatsInMeasure){
let amp = parseFloat(max) - parseFloat(min);
function operateModulator(center, inst, timeBaseStr, min, max, waveType, phaseArr, phaseI, userDefinedWave, name, currTime, beatsInMeasure, maxTicks){
freq = parseLfoTime(freq, bpm, beatsInMeasure);
let phase = (currTime * freq + parseFloat(phaseArr[phaseI])) % 1.00;
let unscaled = indexWave(waveType, phase);
let amp = parseFloat(max) - parseFloat(min);
let phaseType;
let timeBase;
[timeBase, phaseType] = parseLfoTime(timeBaseStr, beatsInMeasure);
let phase;
if (phaseType === PhaseTypes.TIME)
phase = (currTime * timeBase + parseFloat(phaseArr[phaseI])) % 1.00;
else if (phaseType === PhaseTypes.MUSICAL)
phase = (maxTicks % timeBase) / timeBase;
let unscaled = indexWave(waveType, phase, userDefinedWave);
let el = document.getElementById(`slider-${inst}-${name}`);
if (el)
@ -90,33 +105,30 @@ function operateModulator(center, inst, freq, min, max, waveType, phaseArr, phas
return unscaled * amp + center + parseFloat(min);
}
function parseLfoTime(lfoTime, bpm, beatsInMeasure){
// actual returns the period for musical timing, to avoid floating point errors
function parseLfoTime(lfoTime, beatsInMeasure){
if (lfoTime.slice(-2) == "hz"){
return parseFloat(lfoTime.slice(0, -2));
return [parseFloat(lfoTime.slice(0, -2)), PhaseTypes.TIME];
}
else if (lfoTime.slice(-2) == "ms"){
return 1000 / parseFloat(lfoTime.slice(0, -2));
return [1000 / parseFloat(lfoTime.slice(0, -2)), PhaseTypes.TIME];
}
else if (lfoTime.slice(-1) == "s"){
return 1 / parseFloat(lfoTime.slice(0, -1));
return [1 / parseFloat(lfoTime.slice(0, -1)), PhaseTypes.TIME];
}
else if ((lfoTime.match(/:/g) || []).length == 2){
return 1 / moment.duration(lfoTime).asSeconds();
return [1 / moment.duration(lfoTime).asSeconds(), PhaseTypes.TIME];
}
else if ((lfoTime.match(/\./g) || []).length == 2){
return musicalTimingToFreq(...lfoTime.split('.'), bpm, beatsInMeasure)
return [musicalTimingToFreq(...lfoTime.split('.'), beatsInMeasure), PhaseTypes.MUSICAL];
}
else {
return 0;
return [0, PhaseTypes.TIME];
}
}
function musicalTimingToFreq(bars, beats, ticks, bpm, beatsInMeasure){
let totalTicks = (parseFloat(bars) * parseFloat(beatsInMeasure) + beats) * 480 + parseFloat(ticks);
let tpm = bpm * 480;
let cyclesPerMinute = tpm / totalTicks;
let hz = cyclesPerMinute / 60;
return hz;
function musicalTimingToFreq(bars, beats, ticks, beatsInMeasure){
let totalTicks = (parseFloat(bars) * parseFloat(beatsInMeasure) + parseFloat(beats)) * 480 + parseFloat(ticks);
return totalTicks;
}