Merge branch 'main' of ssh://213.61.58.36:2222/kieran-mcauliffe/healing-soundscapes
This commit is contained in:
commit
77eae76815
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Auto detect text files and perform LF normalization
|
||||||
|
* text=auto
|
8260
HSSPieces.json
8260
HSSPieces.json
File diff suppressed because it is too large
Load Diff
7182
HSSPiecesNN.json
7182
HSSPiecesNN.json
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
18421
HSS_NOT.json
Normal file
18421
HSS_NOT.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -28,7 +28,7 @@
|
|||||||
"Djster.µbus[0]::attenuation" : [ 15.0 ],
|
"Djster.µbus[0]::attenuation" : [ 15.0 ],
|
||||||
"Djster.µbus[0]::chordal_weight" : [ 1.0 ],
|
"Djster.µbus[0]::chordal_weight" : [ 1.0 ],
|
||||||
"Djster.µbus[0]::dynamics" : [ 64.0 ],
|
"Djster.µbus[0]::dynamics" : [ 64.0 ],
|
||||||
"Djster.µbus[0]::event_length" : [ 3749.999999999995907 ],
|
"Djster.µbus[0]::event_length" : [ 10000.0 ],
|
||||||
"Djster.µbus[0]::event_length_display_style" : [ 0.0 ],
|
"Djster.µbus[0]::event_length_display_style" : [ 0.0 ],
|
||||||
"Djster.µbus[0]::eventfulness" : [ 0.0 ],
|
"Djster.µbus[0]::eventfulness" : [ 0.0 ],
|
||||||
"Djster.µbus[0]::global_transport_active" : [ 1.0 ],
|
"Djster.µbus[0]::global_transport_active" : [ 1.0 ],
|
||||||
@ -4190,7 +4190,7 @@
|
|||||||
"Djster.µbus[1]::attenuation" : [ 20.0 ],
|
"Djster.µbus[1]::attenuation" : [ 20.0 ],
|
||||||
"Djster.µbus[1]::chordal_weight" : [ 1.0 ],
|
"Djster.µbus[1]::chordal_weight" : [ 1.0 ],
|
||||||
"Djster.µbus[1]::dynamics" : [ 60.0 ],
|
"Djster.µbus[1]::dynamics" : [ 60.0 ],
|
||||||
"Djster.µbus[1]::event_length" : [ 3749.999999999995907 ],
|
"Djster.µbus[1]::event_length" : [ 10000.0 ],
|
||||||
"Djster.µbus[1]::event_length_display_style" : [ 0.0 ],
|
"Djster.µbus[1]::event_length_display_style" : [ 0.0 ],
|
||||||
"Djster.µbus[1]::eventfulness" : [ 0.0 ],
|
"Djster.µbus[1]::eventfulness" : [ 0.0 ],
|
||||||
"Djster.µbus[1]::global_transport_active" : [ 1.0 ],
|
"Djster.µbus[1]::global_transport_active" : [ 1.0 ],
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1
Trajectories/HSS_Greg_Compositions.V3.traj
Normal file
1
Trajectories/HSS_Greg_Compositions.V3.traj
Normal file
@ -0,0 +1 @@
|
|||||||
|
00:00, 0.111111 0.093878;
00:30, 0.111111 0.093878;
01:00, 0.111111 0.093878;
01:30, 0.111111 0.093878;
02:00, 0.111111 0.093878;
02:30, 0.333333 0.102041;
03:00, 0.333333 0.102041;
03:30, 0.333333 0.102041;
04:00, 0.333333 0.102041;
04:30, 0.492063 0.093878;
05:00, 0.492063 0.093878;
05:30, 0.492063 0.093878;
06:00, 0.674603 0.102041;
06:30, 0.849206 0.477551;
07:00, 0.888889 0.877551;
07:30, 0.888889 0.877551;
08:00, 0.888889 0.877551;
08:30, 0.888889 0.877551;
09:00, 0.714286 0.746939;
09:30, 0.714286 0.746939;
10:00, 0.714286 0.746939;
10:30, 0.515873 0.502041;
11:00, 0.515873 0.502041;
11:30, 0.515873 0.502041;
12:00, 0.507937 0.502041;
12:30, 0.507937 0.502041;
13:00, 0.507937 0.502041;
13:30, 0.507937 0.502041;
14:00, 0.730159 0.355102;
14:30, 0.730159 0.355102;
15:00, 0.896825 0.110204;
15:30, 0.896825 0.110204;
16:00, 0.896825 0.110204;
16:30, 0.904762 0.477551;
17:00, 0.904762 0.477551;
17:30, 0.84127 0.665306;
18:00, 0.84127 0.665306;
18:30, 0.888889 0.877551;
19:00, 0.888889 0.877551;
19:30, 0.507937 0.534694;
20:00, 0.507937 0.534694;
20:30, 0.507937 0.534694;
21:00, 0.507937 0.534694;
21:30, 0.277778 0.738776;
22:00, 0.277778 0.738776;
22:30, 0.071429 0.559184;
23:00, 0.087302 0.134694;
23:30, 0.087302 0.134694;
|
1
Trajectories/Hss-chen-Composition2024-1.traj
Normal file
1
Trajectories/Hss-chen-Composition2024-1.traj
Normal file
@ -0,0 +1 @@
|
|||||||
|
00:00, 0.277778 0.232653;
00:30, 0 0;
01:00, 0.47619 0.061224;
01:30, 0 0;
02:00, 0 0;
02:30, 0 0;
03:00, 0.706349 0.257143;
03:30, 0 0;
04:00, 0.793651 0.510204;
04:30, 0 0;
05:00, 0 0;
05:30, 0 0;
06:00, 0.928571 0.363265;
06:30, 0 0;
07:00, 0.714286 0.493878;
07:30, 0 0;
08:00, 0.5 0.779592;
08:30, 0 0;
09:00, 0.349206 0.657143;
09:30, 0 0;
10:00, 0.230159 0.755102;
10:30, 0 0;
11:00, 0.619048 0.771429;
11:30, 0 0;
12:00, 0.833333 0.510204;
12:30, 0 0;
13:00, 0.746032 0.314286;
13:30, 0 0;
14:00, 0.634921 0.142857;
14:30, 0 0;
15:00, 0.507937 0.502041;
15:30, 0 0;
16:00, 0.119048 0.893878;
16:30, 0 0;
17:00, 0.539683 0.893878;
17:30, 0 0;
18:00, 0.904762 0.885714;
18:30, 0 0;
19:00, 0.904762 0.665306;
19:30, 0 0;
20:00, 0.912698 0.502041;
20:30, 0 0;
21:00, 0.912698 0.314286;
21:30, 0 0;
22:00, 0.912698 0.102041;
22:30, 0 0;
23:00, 0.666667 0.110204;
23:30, 0 0;
|
1
Trajectories/Hss-chen-Composition2024-2.traj
Normal file
1
Trajectories/Hss-chen-Composition2024-2.traj
Normal file
@ -0,0 +1 @@
|
|||||||
|
00:00, 0.730159 0.265306;
00:30, 0 0;
01:00, 0 0;
01:30, 0 0;
02:00, 0.5 0.167347;
02:30, 0 0;
03:00, 0 0;
03:30, 0 0;
04:00, 0.706349 0.314286;
04:30, 0 0;
05:00, 0 0;
05:30, 0 0;
06:00, 0.833333 0.493878;
06:30, 0 0;
07:00, 0 0;
07:30, 0 0;
08:00, 0.5 0.779592;
08:30, 0 0;
09:00, 0.5 0.493878;
09:30, 0 0;
10:00, 0 0;
10:30, 0.253968 0.763265;
11:00, 0 0;
11:30, 0 0;
12:00, 0.801587 0.722449;
12:30, 0 0;
13:00, 0.777778 0.240816;
13:30, 0 0;
14:00, 0.507937 0.363265;
14:30, 0 0;
15:00, 0 0;
15:30, 0.230159 0.257143;
16:00, 0 0;
16:30, 0.206349 0.510204;
17:00, 0 0;
17:30, 0 0;
18:00, 0.730159 0.706122;
18:30, 0 0;
19:00, 0 0;
19:30, 0 0;
20:00, 0.5 0.502041;
20:30, 0 0;
21:00, 0 0;
21:30, 0 0;
22:00, 0.904762 0.085714;
22:30, 0 0;
23:00, 0 0;
23:30, 0 0;
|
1
Trajectories/Loria_HSS_Trajectory.traj
Normal file
1
Trajectories/Loria_HSS_Trajectory.traj
Normal file
@ -0,0 +1 @@
|
|||||||
|
00:00, 0.318122 0.065112;
00:30, 0.261432 0.060253;
01:00, 0.190571 0.065112;
01:30, 0.117347 0.057823;
02:00, 0.047619 0.044898;
02:30, 0.089002 0.079689;
03:00, 0.133881 0.133139;
03:30, 0.188209 0.18173;
04:00, 0.242536 0.23518;
04:30, 0.285053 0.283771;
05:00, 0.33938 0.344509;
05:30, 0.405518 0.407677;
06:00, 0.507937 0.493878;
06:30, 0.405518 0.6069;
07:00, 0.353552 0.65792;
07:30, 0.296863 0.701652;
08:00, 0.24726 0.752673;
08:30, 0.195295 0.803693;
09:00, 0.152778 0.847425;
09:30, 0.114985 0.891156;
10:00, 0.071429 0.95102;
10:30, 0.126795 0.954325;
11:00, 0.240174 0.944606;
11:30, 0.355915 0.942177;
12:00, 0.507937 0.934694;
12:30, 0.639361 0.944606;
13:00, 0.736206 0.951895;
13:30, 0.85667 0.947036;
14:00, 0.928571 0.942857;
14:30, 0.939342 0.886297;
15:00, 0.934618 0.815841;
15:30, 0.929894 0.752673;
16:00, 0.934618 0.614189;
16:30, 0.941704 0.570457;
17:00, 0.920635 0.510204;
17:30, 0.934618 0.390671;
18:00, 0.932256 0.291059;
18:30, 0.934618 0.244898;
19:00, 0.939342 0.189018;
19:30, 0.934618 0.12828;
20:00, 0.944444 0.053061;
20:30, 0.889739 0.060253;
21:00, 0.82124 0.060253;
21:30, 0.748016 0.062682;
22:00, 0.698413 0.065112;
22:30, 0.627551 0.060253;
23:00, 0.5 0.069388;
23:30, 0.386621 0.062682;
|
1
Trajectories/Loria_HSS_Trajectory.traj.txt
Normal file
1
Trajectories/Loria_HSS_Trajectory.traj.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
00:00, 0.318122 0.065112;
00:30, 0.261432 0.060253;
01:00, 0.190571 0.065112;
01:30, 0.117347 0.057823;
02:00, 0.047619 0.044898;
02:30, 0.089002 0.079689;
03:00, 0.133881 0.133139;
03:30, 0.188209 0.18173;
04:00, 0.242536 0.23518;
04:30, 0.285053 0.283771;
05:00, 0.33938 0.344509;
05:30, 0.405518 0.407677;
06:00, 0.507937 0.493878;
06:30, 0.405518 0.6069;
07:00, 0.353552 0.65792;
07:30, 0.296863 0.701652;
08:00, 0.24726 0.752673;
08:30, 0.195295 0.803693;
09:00, 0.152778 0.847425;
09:30, 0.114985 0.891156;
10:00, 0.071429 0.95102;
10:30, 0.126795 0.954325;
11:00, 0.240174 0.944606;
11:30, 0.355915 0.942177;
12:00, 0.507937 0.934694;
12:30, 0.639361 0.944606;
13:00, 0.736206 0.951895;
13:30, 0.85667 0.947036;
14:00, 0.928571 0.942857;
14:30, 0.939342 0.886297;
15:00, 0.934618 0.815841;
15:30, 0.929894 0.752673;
16:00, 0.934618 0.614189;
16:30, 0.941704 0.570457;
17:00, 0.920635 0.510204;
17:30, 0.934618 0.390671;
18:00, 0.932256 0.291059;
18:30, 0.934618 0.244898;
19:00, 0.939342 0.189018;
19:30, 0.934618 0.12828;
20:00, 0.944444 0.053061;
20:30, 0.889739 0.060253;
21:00, 0.82124 0.060253;
21:30, 0.748016 0.062682;
22:00, 0.698413 0.065112;
22:30, 0.627551 0.060253;
23:00, 0.5 0.069388;
23:30, 0.386621 0.062682;
|
1
Trajectories/MyOwnTrajectory.txt
Normal file
1
Trajectories/MyOwnTrajectory.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
00:00, 0.5 0.502041;
00:30, 0.539683 0.591837;
01:00, 0 0;
01:30, 0 0;
02:00, 0 0;
02:30, 0 0;
03:00, 0 0;
03:30, 0 0;
04:00, 0 0;
04:30, 0 0;
05:00, 0 0;
05:30, 0 0;
06:00, 0 0;
06:30, 0 0;
07:00, 0 0;
07:30, 0 0;
08:00, 0 0;
08:30, 0 0;
09:00, 0 0;
09:30, 0 0;
10:00, 0 0;
10:30, 0 0;
11:00, 0 0;
11:30, 0 0;
12:00, 0 0;
12:30, 0 0;
13:00, 0 0;
13:30, 0 0;
14:00, 0 0;
14:30, 0 0;
15:00, 0 0;
15:30, 0 0;
16:00, 0 0;
16:30, 0 0;
17:00, 0 0;
17:30, 0 0;
18:00, 0 0;
18:30, 0 0;
19:00, 0 0;
19:30, 0 0;
20:00, 0 0;
20:30, 0 0;
21:00, 0 0;
21:30, 0 0;
22:00, 0 0;
22:30, 0 0;
23:00, 0 0;
23:30, 0 0;
|
@ -226,15 +226,19 @@ svg.push({
|
|||||||
addSlider(i, "player" + i, "Attenuation", "attenuation", j++, [0, 100], 1, 15, "this.value", "this.value");
|
addSlider(i, "player" + i, "Attenuation", "attenuation", j++, [0, 100], 1, 15, "this.value", "this.value");
|
||||||
}
|
}
|
||||||
createSpatBox();
|
createSpatBox();
|
||||||
addSlider(-1, "roomDIV", "Gain (dB)", "gain", 2, [-70, 6], 1, -10, "this.value", "this.value");
|
addSlider(-1, "roomDIV", "Level 1 (dB)", "level_1", 2, [-70, 6], 1, -10, "this.value", "this.value");
|
||||||
addSlider(-1, "roomDIV", "Room Size", "roomsize", 3, [1, 300], 1, 75, "this.value", "this.value");//
|
addSlider(-1, "roomDIV", "Level 2 (dB)", "level_2", 3, [-70, 6], 1, -10, "this.value", "this.value");
|
||||||
addSlider(-1, "roomDIV", "Rev. Time (ms)", "amount", 4, [0.5, 15], 0.1, 11, "this.value", "this.value");//
|
addSlider(-1, "roomDIV", "Level 3 (dB)", "level_3", 4, [-70, 6], 1, -10, "this.value", "this.value");
|
||||||
addSlider(-1, "roomDIV", "Spread", "spread", 5, [0, 100], 1, 23, "this.value", "this.value");//
|
addSlider(-1, "roomDIV", "Level 4 (dB)", "level_4", 5, [-70, 6], 1, -10, "this.value", "this.value");
|
||||||
addSlider(-1, "roomDIV", "Bandwidth", "bandwidth", 6, [0, 100], 1, 50, "this.value", "this.value"); //50
|
addSlider(-1, "roomDIV", "Gain (dB)", "gain", 6, [-70, 6], 1, -10, "this.value", "this.value");
|
||||||
addSlider(-1, "roomDIV", "Damping", "damping", 7, [0, 100], 1, 70, "this.value", "this.value");//
|
addSlider(-1, "roomDIV", "Room Size", "roomsize", 7, [1, 300], 1, 75, "this.value", "this.value");//
|
||||||
addSlider(-1, "roomDIV", "Early", "early", 8, [0, 100], 1, 25, "this.value", "this.value");//
|
addSlider(-1, "roomDIV", "Rev. Time (ms)", "amount", 8, [0.5, 15], 0.1, 11, "this.value", "this.value");//
|
||||||
addSlider(-1, "roomDIV", "Tail", "tail", 9, [0, 100], 1, 25, "this.value", "this.value");//
|
addSlider(-1, "roomDIV", "Spread", "spread", 9, [0, 100], 1, 23, "this.value", "this.value");//
|
||||||
addSlider(-1, "roomDIV", "Dry", "dry", 10, [0, 100], 1, 100, "this.value", "this.value");//
|
addSlider(-1, "roomDIV", "Bandwidth", "bandwidth", 10, [0, 100], 1, 50, "this.value", "this.value"); //50
|
||||||
|
addSlider(-1, "roomDIV", "Damping", "damping", 11, [0, 100], 1, 70, "this.value", "this.value");//
|
||||||
|
addSlider(-1, "roomDIV", "Early", "early", 12, [0, 100], 1, 25, "this.value", "this.value");//
|
||||||
|
addSlider(-1, "roomDIV", "Tail", "tail", 13, [0, 100], 1, 25, "this.value", "this.value");//
|
||||||
|
addSlider(-1, "roomDIV", "Dry", "dry", 14, [0, 100], 1, 100, "this.value", "this.value");//
|
||||||
|
|
||||||
|
|
||||||
elements.push(
|
elements.push(
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
|
|
||||||
}
|
|
@ -1,19 +1,19 @@
|
|||||||
inlets = 2
|
inlets = 2
|
||||||
outlets = 4;
|
outlets = 4;
|
||||||
|
|
||||||
var jpieces = {};
|
|
||||||
var presets = [];
|
var presets = [];
|
||||||
var filename = "";
|
var filename = "";
|
||||||
var currentPiece = "";
|
var currentPiece = "";
|
||||||
var hsspiece = {};
|
var hsspiece = {};
|
||||||
|
var metaComposition = "";
|
||||||
var outdict = new Dict("HSSPieces");;
|
var outdict = new Dict("HSSPieces");;
|
||||||
var points = [[0.5, 0.5], [0., 1.], [1., 1.], [1., 0.], [0., 0.]];
|
var points = [[0.5, 0.5], [0., 1.], [1., 1.], [1., 0.], [0., 0.]];
|
||||||
var net = new Dict;
|
var net = new Dict;
|
||||||
var title;
|
|
||||||
var DJsterParams = {
|
var DJsterParams = {
|
||||||
"attenuation" : [0, 100, "linear"], //
|
"attenuation" : [0, 100, "linear"], //
|
||||||
"chordal_weight" : [1, 5, "linear"],//
|
"chordal_weight" : [1, 5, "linear"],//
|
||||||
"dynamics" : [0, 127, "linear"],//
|
"dynamics" : [0, 127, "linear"],//
|
||||||
|
"event_length_display_style" : [0, 1, "linear"],//
|
||||||
"event_length" : [60, 600, "log"],//
|
"event_length" : [60, 600, "log"],//
|
||||||
"eventfulness" : [0, 100, "linear"],//
|
"eventfulness" : [0, 100, "linear"],//
|
||||||
"harmoniclarity" : [0, 100, "linear"],//
|
"harmoniclarity" : [0, 100, "linear"],//
|
||||||
@ -34,35 +34,58 @@ var DJsterParams = {
|
|||||||
"tonic_pitch" : [12, 108, "enum"],//
|
"tonic_pitch" : [12, 108, "enum"],//
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if(jsarguments.length>1) // argument 0 is the name of the js file
|
||||||
|
{
|
||||||
|
metaComposition = jsarguments[1];
|
||||||
|
}
|
||||||
|
var path = this.patcher.filepath.slice(0, this.patcher.filepath.lastIndexOf("/") + 1);
|
||||||
|
|
||||||
|
function loadbang()
|
||||||
|
{
|
||||||
|
bang();
|
||||||
|
post("currentPiece", path, "\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
function bang()
|
||||||
|
{
|
||||||
|
if (metaComposition != "") readPiece(path + metaComposition);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
function dictionary(d)
|
function dictionary(d)
|
||||||
{
|
{
|
||||||
net.name = d;
|
net.name = d;
|
||||||
hsspiece[title]["networkData"] = JSON.parse(net.stringify());
|
hsspiece[currentPiece]["networkData"] = JSON.parse(net.stringify());
|
||||||
outdict.parse(JSON.stringify(hsspiece));
|
outdict.parse(JSON.stringify(hsspiece));
|
||||||
jpieces = JSON.parse(outdict.stringify());
|
//jpieces = JSON.parse(outdict.stringify());
|
||||||
this.patcher.getnamed("currentPiece").message("clear");
|
setMenu();
|
||||||
for (var i = 0; i < Object.keys(jpieces).length; i++) this.patcher.getnamed("currentPiece").message("append", Object.keys(jpieces)[i]);
|
|
||||||
this.patcher.getnamed("currentPiece").message("set", Object.keys(jpieces).length - 1);
|
|
||||||
this.patcher.getnamed("currentPiece").message("clearchecks");
|
|
||||||
this.patcher.getnamed("currentPiece").message("checkitem", Object.keys(jpieces).length - 1, 1);
|
|
||||||
//outlet(0, "dictionary", outdict.name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function readPiece(path)
|
function readPiece(path)
|
||||||
{
|
{
|
||||||
outdict.import_json(path);
|
outdict.import_json(path);
|
||||||
jpieces = JSON.parse(outdict.stringify());
|
hsspiece = JSON.parse(outdict.stringify());
|
||||||
var keys = outdict.getkeys();
|
setMenu();
|
||||||
for (var i = 0; i < keys.length; i++) outlet(3, keys[i]);
|
}
|
||||||
outlet(1, outdict.get("DefaultSetting::1::networkData"));
|
|
||||||
outlet(1, "predict", 0.5, 0.5);
|
function setMenu()
|
||||||
outlet(0, 0.5, 0.5);
|
{
|
||||||
|
this.patcher.getnamed("currentPiece").message("clear");
|
||||||
|
for (var i = 0; i < Object.keys(hsspiece).length; i++) this.patcher.getnamed("currentPiece").message("append", Object.keys(hsspiece)[i]);
|
||||||
|
this.patcher.getnamed("currentPiece").message("set", Object.keys(hsspiece).length - 1);
|
||||||
|
this.patcher.getnamed("currentPiece").message("clearchecks");
|
||||||
|
this.patcher.getnamed("currentPiece").message("checkitem", Object.keys(hsspiece).length - 1, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
function writePiece()
|
||||||
|
{
|
||||||
|
if (metaComposition != "") outdict.export_json(path + metaComposition);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setDict()
|
function setDict()
|
||||||
{
|
{
|
||||||
jpieces = JSON.parse(outdict.stringify());
|
hsspiece = JSON.parse(outdict.stringify());
|
||||||
}
|
}
|
||||||
|
|
||||||
function setSection(section)
|
function setSection(section)
|
||||||
@ -72,14 +95,13 @@ function setSection(section)
|
|||||||
outlet(1, "set_weights", "dictionary", networkData.name);
|
outlet(1, "set_weights", "dictionary", networkData.name);
|
||||||
outlet(1, "predict", 0.5, 0.5);
|
outlet(1, "predict", 0.5, 0.5);
|
||||||
outlet(0, 0.5, 0.5);
|
outlet(0, 0.5, 0.5);
|
||||||
|
if (outdict.contains(section + "::breakpoints")) this.patcher.getnamed("mc.function").setvalueof(outdict.get(section + "::breakpoints"));
|
||||||
|
post("data", outdict.get(section + "::audiolevels"), "\n");
|
||||||
|
if (outdict.contains(section + "::audiolevels")) for (var i = 0; i < 4; i++) outlet(2, "hub::global::level_" + (i + 1), outdict.get(section + "::audiolevels")[i]);
|
||||||
}
|
}
|
||||||
currentPiece = section;
|
currentPiece = section;
|
||||||
}
|
}
|
||||||
|
|
||||||
function writePiece()
|
|
||||||
{
|
|
||||||
outdict.export_json(this.patcher.filepath + "HSSPiece.json");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
function anything()
|
function anything()
|
||||||
@ -134,18 +156,20 @@ function setPresetFile(f)
|
|||||||
{
|
{
|
||||||
filename = f;
|
filename = f;
|
||||||
currentPiece = filename.slice(filename.lastIndexOf("/") + 1, filename.lastIndexOf("."));
|
currentPiece = filename.slice(filename.lastIndexOf("/") + 1, filename.lastIndexOf("."));
|
||||||
|
hsspiece[currentPiece] = {};
|
||||||
|
outdict.parse(JSON.stringify(hsspiece));
|
||||||
|
setMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
function train()
|
function train()
|
||||||
{
|
{
|
||||||
presets = new Dict;
|
presets = new Dict;
|
||||||
presets.import_json(filename);
|
presets.import_json(filename);
|
||||||
title = currentPiece;
|
if (!hsspiece.hasOwnProperty(currentPiece)) hsspiece[currentPiece] = {};
|
||||||
hsspiece[title] = {};
|
|
||||||
var slots = presets.get("pattrstorage::slots").getkeys();//number of slots here
|
var slots = presets.get("pattrstorage::slots").getkeys();//number of slots here
|
||||||
outlet(1, "clear_data");
|
outlet(1, "clear_data");
|
||||||
for (var j = 0; j < slots.length; j++){
|
for (var j = 0; j < slots.length; j++){
|
||||||
hsspiece[title][j + 1] = {};
|
hsspiece[currentPiece][j + 1] = {};
|
||||||
var trainingData = [];
|
var trainingData = [];
|
||||||
var data = JSON.parse(presets.get("pattrstorage::slots::" + (j + 1) + "::data").stringify());
|
var data = JSON.parse(presets.get("pattrstorage::slots::" + (j + 1) + "::data").stringify());
|
||||||
for (var p = 0; p < 4; p++) {
|
for (var p = 0; p < 4; p++) {
|
||||||
@ -164,16 +188,13 @@ function train()
|
|||||||
trainingData.push(j/5);
|
trainingData.push(j/5);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
post("param", param, trainingData, "\n");
|
|
||||||
}
|
}
|
||||||
//var val = data["hub::instrument::instrument-" + (p + 1)];
|
|
||||||
trainingData.push(j/5);
|
trainingData.push(j/5);
|
||||||
var val = data["hub::src::src" + (p + 1)];
|
var val = data["hub::src::src" + (p + 1)];
|
||||||
trainingData.push(scale(val[0], 0, 127, 0., 1.));
|
trainingData.push(scale(val[0], 0, 127, 0., 1.));
|
||||||
trainingData.push(scale(val[1], 0, 127, 0., 1.));
|
trainingData.push(scale(val[1], 0, 127, 0., 1.));
|
||||||
}
|
}
|
||||||
//post("data", JSON.stringify(data), "\n");
|
hsspiece[currentPiece][j + 1] = data;
|
||||||
hsspiece[title][j + 1] = data;
|
|
||||||
outlet(1, "data_point", points[j].concat(trainingData));
|
outlet(1, "data_point", points[j].concat(trainingData));
|
||||||
}
|
}
|
||||||
outlet(1, "train", 10000);
|
outlet(1, "train", 10000);
|
||||||
@ -182,7 +203,6 @@ function train()
|
|||||||
|
|
||||||
function list()
|
function list()
|
||||||
{
|
{
|
||||||
//post("jpieces", Object.keys(jpieces), "\n");
|
|
||||||
var vector = arrayfromargs(arguments);
|
var vector = arrayfromargs(arguments);
|
||||||
var src = [];
|
var src = [];
|
||||||
//currentPiece = this.patcher.getnamed("currentPiece").getvalueof();
|
//currentPiece = this.patcher.getnamed("currentPiece").getvalueof();
|
||||||
@ -191,43 +211,43 @@ function list()
|
|||||||
for (var j = 0; j < vector.length/4; j++) {
|
for (var j = 0; j < vector.length/4; j++) {
|
||||||
var k = j + i * vector.length/4;
|
var k = j + i * vector.length/4;
|
||||||
switch (j) {
|
switch (j) {
|
||||||
case 3 : //log
|
case 1 : case 3 : case 10 : case 11 : case 15 : case 16 : case 20 : case 21 :
|
||||||
case 17 :
|
var val = Math.round(scale(vector[k], 0, 1, DJsterParams[keys[j]][0], DJsterParams[keys[j]][1]));
|
||||||
|
outlet(2, "Djster.µbus[" + i + "]::" + keys[j], val);
|
||||||
|
break;
|
||||||
|
case 4 : //log (not yet)
|
||||||
|
case 18 :
|
||||||
var val = scale(vector[k], 0, 1, DJsterParams[keys[j]][0], DJsterParams[keys[j]][1]);
|
var val = scale(vector[k], 0, 1, DJsterParams[keys[j]][0], DJsterParams[keys[j]][1]);
|
||||||
outlet(2, "Djster.µbus[" + i + "]::" + keys[j], val);
|
outlet(2, "Djster.µbus[" + i + "]::" + keys[j], val);
|
||||||
break;
|
break;
|
||||||
case 13 : //enum
|
case 14 : //enum
|
||||||
//val = "Major";
|
//val = "Major";
|
||||||
//post(vector[k], Math.floor(vector[k]/0.2 + 1), "\n");
|
//post(vector[k], Math.floor(vector[k]/0.2 + 1), "\n");
|
||||||
outlet(2, "Djster.µbus[" + i + "]::" + keys[j], jpieces[currentPiece][parseInt(vector[k]/0.2 + 1)]["Djster.µbus[" + i + "]::scale"]);
|
outlet(2, "Djster.µbus[" + i + "]::" + keys[j], hsspiece[currentPiece][parseInt(vector[k]/0.2 + 1)]["Djster.µbus[" + i + "]::scale"]);
|
||||||
break;
|
break;
|
||||||
case 16 :
|
case 17 :
|
||||||
//val = "2 2 2";
|
//val = "2 2 2";
|
||||||
outlet(2, "Djster.µbus[" + i + "]::" + keys[j], jpieces[currentPiece][parseInt(vector[k]/0.2 + 1)]["Djster.µbus[" + i + "]::meter"]);
|
outlet(2, "Djster.µbus[" + i + "]::" + keys[j], hsspiece[currentPiece][parseInt(vector[k]/0.2 + 1)]["Djster.µbus[" + i + "]::meter"]);
|
||||||
break;
|
break;
|
||||||
case 18 :
|
case 19 :
|
||||||
//val = "4"
|
//val = "4"
|
||||||
outlet(2, "Djster.µbus[" + i + "]::" + keys[j], jpieces[currentPiece][parseInt(vector[k]/0.2 + 1)]["Djster.µbus[" + i + "]::timesig_denominator"]);
|
outlet(2, "Djster.µbus[" + i + "]::" + keys[j], hsspiece[currentPiece][parseInt(vector[k]/0.2 + 1)]["Djster.µbus[" + i + "]::timesig_denominator"]);
|
||||||
break;
|
|
||||||
case 20 :
|
|
||||||
//tonic pitch
|
|
||||||
outlet(2, "Djster.µbus[" + i + "]::" + keys[j], jpieces[currentPiece][parseInt(vector[k]/0.2 + 1)]["Djster.µbus[" + i + "]::tonic_pitch"]);
|
|
||||||
break;
|
break;
|
||||||
case 21 :
|
case 21 :
|
||||||
val = "4"
|
//tonic pitch
|
||||||
outlet(2, "hub::instrument::instrument-" + (i + 1), jpieces[currentPiece][parseInt(vector[k]/0.2 + 1)]["hub::instrument::instrument-" + (i + 1)]);
|
outlet(2, "Djster.µbus[" + i + "]::" + keys[j], hsspiece[currentPiece][parseInt(vector[k]/0.2 + 1)]["Djster.µbus[" + i + "]::tonic_pitch"]);
|
||||||
break;
|
break;
|
||||||
case 22 :
|
case 22 :
|
||||||
|
val = "4"
|
||||||
|
outlet(2, "hub::instrument::instrument-" + (i + 1), hsspiece[currentPiece][parseInt(vector[k]/0.2 + 1)]["hub::instrument::instrument-" + (i + 1)]);
|
||||||
|
break;
|
||||||
|
case 23 :
|
||||||
src[0] = scale(vector[k], 0, 1, 0, 127);
|
src[0] = scale(vector[k], 0, 1, 0, 127);
|
||||||
break;
|
break;
|
||||||
case 23 :
|
case 24 :
|
||||||
src[1] = scale(vector[k], 0, 1, 0, 127);
|
src[1] = scale(vector[k], 0, 1, 0, 127);
|
||||||
outlet(2, "hub::src::src" + (i + 1), src);
|
outlet(2, "hub::src::src" + (i + 1), src);
|
||||||
break;
|
break;
|
||||||
case 1 : case 9 : case 10 : case 14 : case 15 : case 19 : case 20 :
|
|
||||||
var val = Math.round(scale(vector[k], 0, 1, DJsterParams[keys[j]][0], DJsterParams[keys[j]][1]));
|
|
||||||
outlet(2, "Djster.µbus[" + i + "]::" + keys[j], val);
|
|
||||||
break;
|
|
||||||
default : //linear
|
default : //linear
|
||||||
var val = scale(vector[k], 0, 1, DJsterParams[keys[j]][0], DJsterParams[keys[j]][1]);
|
var val = scale(vector[k], 0, 1, DJsterParams[keys[j]][0], DJsterParams[keys[j]][1]);
|
||||||
outlet(2, "Djster.µbus[" + i + "]::" + keys[j], val);
|
outlet(2, "Djster.µbus[" + i + "]::" + keys[j], val);
|
||||||
@ -236,6 +256,23 @@ function list()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setBreakPoints()
|
||||||
|
{
|
||||||
|
hsspiece[currentPiece]["breakpoints"] = this.patcher.getnamed("mc.function").getvalueof();
|
||||||
|
outdict.parse(JSON.stringify(hsspiece));
|
||||||
|
//jpieces = JSON.parse(outdict.stringify());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function setAudioLevels()
|
||||||
|
{
|
||||||
|
post("hsspiece", currentPiece, "\n");
|
||||||
|
hsspiece[currentPiece]["audiolevels"] = this.patcher.getnamed("hub").subpatcher().getnamed("global").subpatcher().getnamed("level_1").getvalueof().concat(this.patcher.getnamed("hub").subpatcher().getnamed("global").subpatcher().getnamed("level_2").getvalueof(), this.patcher.getnamed("hub").subpatcher().getnamed("global").subpatcher().getnamed("level_3").getvalueof(), this.patcher.getnamed("hub").subpatcher().getnamed("global").subpatcher().getnamed("level_4").getvalueof());
|
||||||
|
outdict.parse(JSON.stringify(hsspiece));
|
||||||
|
//jpieces = JSON.parse(outdict.stringify());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function scale(x, inputmin, inputmax, outputmin, outputmax)
|
function scale(x, inputmin, inputmax, outputmin, outputmax)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user