Modifications
This commit is contained in:
parent
1372117f88
commit
712a7234a2
415
HSSParameterIndexer.maxpat
Normal file
415
HSSParameterIndexer.maxpat
Normal file
@ -0,0 +1,415 @@
|
||||
{
|
||||
"patcher" : {
|
||||
"fileversion" : 1,
|
||||
"appversion" : {
|
||||
"major" : 8,
|
||||
"minor" : 6,
|
||||
"revision" : 4,
|
||||
"architecture" : "x64",
|
||||
"modernui" : 1
|
||||
}
|
||||
,
|
||||
"classnamespace" : "box",
|
||||
"rect" : [ 423.0, 658.0, 836.0, 345.0 ],
|
||||
"bglocked" : 0,
|
||||
"openinpresentation" : 0,
|
||||
"default_fontsize" : 12.0,
|
||||
"default_fontface" : 0,
|
||||
"default_fontname" : "Arial",
|
||||
"gridonopen" : 1,
|
||||
"gridsize" : [ 15.0, 15.0 ],
|
||||
"gridsnaponopen" : 1,
|
||||
"objectsnaponopen" : 1,
|
||||
"statusbarvisible" : 2,
|
||||
"toolbarvisible" : 1,
|
||||
"lefttoolbarpinned" : 0,
|
||||
"toptoolbarpinned" : 0,
|
||||
"righttoolbarpinned" : 0,
|
||||
"bottomtoolbarpinned" : 0,
|
||||
"toolbars_unpinned_last_save" : 0,
|
||||
"tallnewobj" : 0,
|
||||
"boxanimatetime" : 200,
|
||||
"enablehscroll" : 1,
|
||||
"enablevscroll" : 1,
|
||||
"devicewidth" : 0.0,
|
||||
"description" : "",
|
||||
"digest" : "",
|
||||
"tags" : "",
|
||||
"style" : "",
|
||||
"subpatcher_template" : "",
|
||||
"assistshowspatchername" : 0,
|
||||
"boxes" : [ {
|
||||
"box" : {
|
||||
"id" : "obj-10",
|
||||
"maxclass" : "message",
|
||||
"numinlets" : 2,
|
||||
"numoutlets" : 1,
|
||||
"outlettype" : [ "" ],
|
||||
"patching_rect" : [ 334.0, 251.0, 135.0, 22.0 ],
|
||||
"text" : "print: data_point 0.5 0.5"
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"box" : {
|
||||
"id" : "obj-7",
|
||||
"maxclass" : "button",
|
||||
"numinlets" : 1,
|
||||
"numoutlets" : 1,
|
||||
"outlettype" : [ "bang" ],
|
||||
"parameter_enable" : 0,
|
||||
"patching_rect" : [ 63.0, 15.0, 24.0, 24.0 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"box" : {
|
||||
"id" : "obj-8",
|
||||
"maxclass" : "newobj",
|
||||
"numinlets" : 2,
|
||||
"numoutlets" : 1,
|
||||
"outlettype" : [ "int" ],
|
||||
"patching_rect" : [ 595.0, 70.0, 29.5, 22.0 ],
|
||||
"text" : "+ 1"
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"box" : {
|
||||
"id" : "obj-3",
|
||||
"items" : [ "attenuation", ",", "chordal_weight", ",", "dynamics", ",", "event_length_display_style", ",", "event_length", ",", "eventfulness", ",", "harmoniclarity", ",", "melodic_cohesion", ",", "melody_scope", ",", "metriclarity", ",", "outset_pulses", ",", "overlap", ",", "pitch_center", ",", "pitch_range", ",", "scale", ",", "sorted", ",", "stream", ",", "subdivision", ",", "tempo", ",", "timesig_denominator", ",", "timesig_numerator", ",", "tonic_pitch", ",", "instrument", ",", "src_x", ",", "src_y" ],
|
||||
"maxclass" : "umenu",
|
||||
"numinlets" : 1,
|
||||
"numoutlets" : 3,
|
||||
"outlettype" : [ "int", "", "" ],
|
||||
"parameter_enable" : 0,
|
||||
"patching_rect" : [ 595.0, 41.0, 100.0, 22.0 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"box" : {
|
||||
"id" : "obj-46",
|
||||
"maxclass" : "newobj",
|
||||
"numinlets" : 2,
|
||||
"numoutlets" : 1,
|
||||
"outlettype" : [ "int" ],
|
||||
"patching_rect" : [ 677.0, 191.0, 32.0, 22.0 ],
|
||||
"text" : "+ 75"
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"box" : {
|
||||
"id" : "obj-45",
|
||||
"maxclass" : "newobj",
|
||||
"numinlets" : 2,
|
||||
"numoutlets" : 1,
|
||||
"outlettype" : [ "int" ],
|
||||
"patching_rect" : [ 634.0, 191.0, 32.0, 22.0 ],
|
||||
"text" : "+ 50"
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"box" : {
|
||||
"id" : "obj-42",
|
||||
"maxclass" : "newobj",
|
||||
"numinlets" : 2,
|
||||
"numoutlets" : 1,
|
||||
"outlettype" : [ "int" ],
|
||||
"patching_rect" : [ 595.0, 191.0, 32.0, 22.0 ],
|
||||
"text" : "+ 25"
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"box" : {
|
||||
"id" : "obj-41",
|
||||
"maxclass" : "number",
|
||||
"numinlets" : 1,
|
||||
"numoutlets" : 2,
|
||||
"outlettype" : [ "", "bang" ],
|
||||
"parameter_enable" : 0,
|
||||
"patching_rect" : [ 595.0, 129.0, 50.0, 22.0 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"box" : {
|
||||
"id" : "obj-5",
|
||||
"maxclass" : "newobj",
|
||||
"numinlets" : 1,
|
||||
"numoutlets" : 4,
|
||||
"outlettype" : [ "", "", "", "" ],
|
||||
"patching_rect" : [ 63.0, 166.0, 50.5, 22.0 ],
|
||||
"text" : "t l l l l"
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"box" : {
|
||||
"id" : "obj-39",
|
||||
"linecount" : 2,
|
||||
"maxclass" : "message",
|
||||
"numinlets" : 2,
|
||||
"numoutlets" : 1,
|
||||
"outlettype" : [ "" ],
|
||||
"patching_rect" : [ 206.0, 251.0, 50.0, 35.0 ],
|
||||
"text" : "0.565412"
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"box" : {
|
||||
"id" : "obj-37",
|
||||
"maxclass" : "newobj",
|
||||
"numinlets" : 2,
|
||||
"numoutlets" : 2,
|
||||
"outlettype" : [ "", "" ],
|
||||
"patching_rect" : [ 237.0, 215.0, 54.0, 22.0 ],
|
||||
"text" : "zl.nth 76"
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"box" : {
|
||||
"id" : "obj-36",
|
||||
"linecount" : 2,
|
||||
"maxclass" : "message",
|
||||
"numinlets" : 2,
|
||||
"numoutlets" : 1,
|
||||
"outlettype" : [ "" ],
|
||||
"patching_rect" : [ 144.0, 251.0, 50.0, 35.0 ],
|
||||
"text" : "0.565412"
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"box" : {
|
||||
"id" : "obj-34",
|
||||
"maxclass" : "newobj",
|
||||
"numinlets" : 2,
|
||||
"numoutlets" : 2,
|
||||
"outlettype" : [ "", "" ],
|
||||
"patching_rect" : [ 175.0, 215.0, 54.0, 22.0 ],
|
||||
"text" : "zl.nth 51"
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"box" : {
|
||||
"id" : "obj-33",
|
||||
"linecount" : 2,
|
||||
"maxclass" : "message",
|
||||
"numinlets" : 2,
|
||||
"numoutlets" : 1,
|
||||
"outlettype" : [ "" ],
|
||||
"patching_rect" : [ 83.0, 251.0, 50.0, 35.0 ],
|
||||
"text" : "0.565412"
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"box" : {
|
||||
"id" : "obj-32",
|
||||
"maxclass" : "newobj",
|
||||
"numinlets" : 2,
|
||||
"numoutlets" : 2,
|
||||
"outlettype" : [ "", "" ],
|
||||
"patching_rect" : [ 114.0, 215.0, 54.0, 22.0 ],
|
||||
"text" : "zl.nth 26"
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"box" : {
|
||||
"id" : "obj-26",
|
||||
"linecount" : 2,
|
||||
"maxclass" : "message",
|
||||
"numinlets" : 2,
|
||||
"numoutlets" : 1,
|
||||
"outlettype" : [ "" ],
|
||||
"patching_rect" : [ 32.0, 251.0, 50.0, 35.0 ],
|
||||
"text" : "0.565412"
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"box" : {
|
||||
"id" : "obj-22",
|
||||
"maxclass" : "newobj",
|
||||
"numinlets" : 2,
|
||||
"numoutlets" : 2,
|
||||
"outlettype" : [ "", "" ],
|
||||
"patching_rect" : [ 63.0, 215.0, 47.0, 22.0 ],
|
||||
"text" : "zl.nth 1"
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"box" : {
|
||||
"id" : "obj-4",
|
||||
"linecount" : 7,
|
||||
"maxclass" : "message",
|
||||
"numinlets" : 2,
|
||||
"numoutlets" : 1,
|
||||
"outlettype" : [ "" ],
|
||||
"patching_rect" : [ 63.0, 55.0, 496.0, 102.0 ],
|
||||
"text" : "0.15 0 0.503937 0 1.333333 0 0.807087 0.751969 0.145833 0.799213 0 1 0.375 0.145833 0.001 1 1 0.001 0.565412 0.001 0.001 0.001 0 0.519685 0.858268 0.2 0 0.472441 0 1.333333 0.1 0.5 0.75 0.145833 0.75 0 1 0.5 0.145833 0.001 1 1 0.001 0.565412 0.001 0.001 0.001 0 0.858268 0.496063 0.751181 0 0.472441 0 1.333333 0.05 0.4 0.183071 0.145833 0.6 0 1 0.5 0.145833 0.001 1 1 0.001 0.565412 0.001 0.001 0.001 0 0.496063 0.165354 0.2 0 0.393701 0 1.333333 0.2 0.8 0.75 0.145833 0.75 0 1 0.375 0.145833 0.001 1 1 0.001 0.565412 0.001 0.001 0.001 0 0.165354 0.496063"
|
||||
}
|
||||
|
||||
}
|
||||
],
|
||||
"lines" : [ {
|
||||
"patchline" : {
|
||||
"destination" : [ "obj-26", 1 ],
|
||||
"source" : [ "obj-22", 0 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"patchline" : {
|
||||
"destination" : [ "obj-8", 0 ],
|
||||
"source" : [ "obj-3", 0 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"patchline" : {
|
||||
"destination" : [ "obj-33", 1 ],
|
||||
"source" : [ "obj-32", 0 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"patchline" : {
|
||||
"destination" : [ "obj-36", 1 ],
|
||||
"source" : [ "obj-34", 0 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"patchline" : {
|
||||
"destination" : [ "obj-39", 1 ],
|
||||
"source" : [ "obj-37", 0 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"patchline" : {
|
||||
"destination" : [ "obj-5", 0 ],
|
||||
"source" : [ "obj-4", 0 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"patchline" : {
|
||||
"destination" : [ "obj-22", 1 ],
|
||||
"order" : 3,
|
||||
"source" : [ "obj-41", 0 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"patchline" : {
|
||||
"destination" : [ "obj-42", 0 ],
|
||||
"order" : 2,
|
||||
"source" : [ "obj-41", 0 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"patchline" : {
|
||||
"destination" : [ "obj-45", 0 ],
|
||||
"order" : 1,
|
||||
"source" : [ "obj-41", 0 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"patchline" : {
|
||||
"destination" : [ "obj-46", 0 ],
|
||||
"order" : 0,
|
||||
"source" : [ "obj-41", 0 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"patchline" : {
|
||||
"destination" : [ "obj-32", 1 ],
|
||||
"source" : [ "obj-42", 0 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"patchline" : {
|
||||
"destination" : [ "obj-34", 1 ],
|
||||
"source" : [ "obj-45", 0 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"patchline" : {
|
||||
"destination" : [ "obj-37", 1 ],
|
||||
"source" : [ "obj-46", 0 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"patchline" : {
|
||||
"destination" : [ "obj-22", 0 ],
|
||||
"source" : [ "obj-5", 0 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"patchline" : {
|
||||
"destination" : [ "obj-32", 0 ],
|
||||
"source" : [ "obj-5", 1 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"patchline" : {
|
||||
"destination" : [ "obj-34", 0 ],
|
||||
"source" : [ "obj-5", 2 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"patchline" : {
|
||||
"destination" : [ "obj-37", 0 ],
|
||||
"source" : [ "obj-5", 3 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"patchline" : {
|
||||
"destination" : [ "obj-4", 0 ],
|
||||
"source" : [ "obj-7", 0 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"patchline" : {
|
||||
"destination" : [ "obj-41", 0 ],
|
||||
"order" : 0,
|
||||
"source" : [ "obj-8", 0 ]
|
||||
}
|
||||
|
||||
}
|
||||
, {
|
||||
"patchline" : {
|
||||
"destination" : [ "obj-7", 0 ],
|
||||
"order" : 1,
|
||||
"source" : [ "obj-8", 0 ]
|
||||
}
|
||||
|
||||
}
|
||||
],
|
||||
"dependency_cache" : [ ],
|
||||
"autosave" : 0
|
||||
}
|
||||
|
||||
}
|
96285
HSS_NOT.json
96285
HSS_NOT.json
File diff suppressed because it is too large
Load Diff
@ -1,48 +0,0 @@
|
||||
00:00, 0.515873 0.477551;
|
||||
00:30, 0.420635 0.281633;
|
||||
01:00, 0.325397 0.142857;
|
||||
01:30, 0.18254 0.208163;
|
||||
02:00, 0.150794 0.330612;
|
||||
02:30, 0.206349 0.346939;
|
||||
03:00, 0.380952 0.436735;
|
||||
03:30, 0.5 0.502041;
|
||||
04:00, 0.301587 0.420408;
|
||||
04:30, 0.253968 0.232653;
|
||||
05:00, 0.380952 0.281633;
|
||||
05:30, 0.404762 0.330612;
|
||||
06:00, 0.507937 0.485714;
|
||||
06:30, 0.571429 0.591837;
|
||||
07:00, 0.611111 0.714286;
|
||||
07:30, 0.65873 0.779592;
|
||||
08:00, 0.777778 0.763265;
|
||||
08:30, 0.833333 0.640816;
|
||||
09:00, 0.507937 0.502041;
|
||||
09:30, 0.555556 0.583673;
|
||||
10:00, 0.587302 0.673469;
|
||||
10:30, 0.650794 0.738776;
|
||||
11:00, 0.714286 0.673469;
|
||||
11:30, 0.5 0.493878;
|
||||
12:00, 0.603175 0.461224;
|
||||
12:30, 0.714286 0.420408;
|
||||
13:00, 0.706349 0.297959;
|
||||
13:30, 0.595238 0.314286;
|
||||
14:00, 0.539683 0.395918;
|
||||
14:30, 0.507937 0.493878;
|
||||
15:00, 0.444444 0.657143;
|
||||
15:30, 0.373016 0.820408;
|
||||
16:00, 0.238095 0.657143;
|
||||
16:30, 0.285714 0.616327;
|
||||
17:00, 0.349206 0.559184;
|
||||
17:30, 0.492063 0.485714;
|
||||
18:00, 0.404762 0.469388;
|
||||
18:30, 0.277778 0.404082;
|
||||
19:00, 0.238095 0.297959;
|
||||
19:30, 0.349206 0.257143;
|
||||
20:00, 0.436508 0.297959;
|
||||
20:30, 0.52381 0.469388;
|
||||
21:00, 0.603175 0.412245;
|
||||
21:30, 0.714286 0.404082;
|
||||
22:00, 0.825397 0.363265;
|
||||
22:30, 0.857143 0.257143;
|
||||
23:00, 0.730159 0.24898;
|
||||
23:30, 0.603175 0.338776;
|
File diff suppressed because it is too large
Load Diff
@ -14,7 +14,7 @@ var DJsterParams = {
|
||||
"chordal_weight" : [1, 5, "linear"],//
|
||||
"dynamics" : [0, 127, "linear"],//
|
||||
"event_length_display_style" : [0, 1, "linear"],//
|
||||
"event_length" : [60, 1000, "log"],//
|
||||
"event_length" : [60, 10000, "log"],//
|
||||
"eventfulness" : [0, 100, "linear"],//
|
||||
"harmoniclarity" : [0, 100, "linear"],//
|
||||
"melodic_cohesion" : [-100, 100, "linear"],//
|
||||
@ -28,7 +28,7 @@ var DJsterParams = {
|
||||
"sorted" : [0, 1, "linear"],//
|
||||
"stream" : [0, 1, "linear"],//
|
||||
"subdivision" : [1, 5, "enum"],//
|
||||
"tempo" : [1, 200, "log"],//
|
||||
"tempo" : [5, 200, "log"],//
|
||||
"timesig_denominator" : [1, 5, "enum"],//
|
||||
"timesig_numerator" : [1, 12, "enum"],//
|
||||
"tonic_pitch" : [12, 108, "enum"],//
|
||||
@ -69,6 +69,15 @@ function readPiece(path)
|
||||
setMenu();
|
||||
}
|
||||
|
||||
function setPresetFile(f)
|
||||
{
|
||||
filename = f;
|
||||
currentPiece = filename.slice(filename.lastIndexOf("/") + 1, filename.lastIndexOf("."));
|
||||
hsspiece[currentPiece] = {};
|
||||
outdict.parse(JSON.stringify(hsspiece));
|
||||
setMenu();
|
||||
}
|
||||
|
||||
function setMenu()
|
||||
{
|
||||
var pieces = ["setPiece"];
|
||||
@ -77,12 +86,13 @@ function setMenu()
|
||||
this.patcher.getnamed("currentPiece").message("append", Object.keys(hsspiece)[i]);
|
||||
pieces.push(Object.keys(hsspiece)[i]);
|
||||
}
|
||||
this.patcher.getnamed("currentPiece").message("set", Object.keys(hsspiece).length - 1);
|
||||
var item = Object.keys(hsspiece).indexOf(currentPiece);
|
||||
this.patcher.getnamed("currentPiece").message("set", item);
|
||||
this.patcher.getnamed("currentPiece").message("clearchecks");
|
||||
this.patcher.getnamed("currentPiece").message("checkitem", Object.keys(hsspiece).length - 1, 1);
|
||||
this.patcher.getnamed("currentPiece").message("checkitem", item, 1);
|
||||
this.patcher.getnamed("webcontrol").message(pieces);
|
||||
var piece = new Dict();
|
||||
piece.parse(JSON.stringify({ "player" : 0, "piece" : Object.keys(hsspiece).length - 1 }));
|
||||
piece.parse(JSON.stringify({ "player" : 0, "piece" : item }));
|
||||
this.patcher.getnamed("webcontrol").message("param", "dictionary", piece.name);
|
||||
//outlet(3, pieces);
|
||||
}
|
||||
@ -165,14 +175,6 @@ function anything()
|
||||
}
|
||||
*/
|
||||
|
||||
function setPresetFile(f)
|
||||
{
|
||||
filename = f;
|
||||
currentPiece = filename.slice(filename.lastIndexOf("/") + 1, filename.lastIndexOf("."));
|
||||
hsspiece[currentPiece] = {};
|
||||
outdict.parse(JSON.stringify(hsspiece));
|
||||
setMenu();
|
||||
}
|
||||
|
||||
function train()
|
||||
{
|
||||
@ -192,13 +194,16 @@ function train()
|
||||
var val = data["Djster.µbus[" + p + "]::" + param];
|
||||
switch (DJsterParams[param][2]) {
|
||||
case "linear" :
|
||||
trainingData.push(scale(val, DJsterParams[param][0], DJsterParams[param][1], 0., 1.));
|
||||
var value = scale(val, DJsterParams[param][0], DJsterParams[param][1], 0., 1.);
|
||||
if (value == 0) value += 0.001;
|
||||
else if (value == 1) value -= 0.001;
|
||||
trainingData.push(value);
|
||||
break;
|
||||
case "log" :
|
||||
trainingData.push(Math.log(val) / Math.log(DJsterParams[param][1]));// Math.log(f)/Math.log(base)
|
||||
break;
|
||||
case "enum" :
|
||||
trainingData.push(j/5);
|
||||
trainingData.push(j/5 + 0.001);//make sure it's a float
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user