Skip to content

Commit

Permalink
add spectral synthesis option
Browse files Browse the repository at this point in the history
fix osc_relay
  • Loading branch information
grz0zrg committed Sep 8, 2017
1 parent dda0d04 commit b5ee536
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -157,7 +157,7 @@ Client :

Papers :
* [The Scientist and Engineer's Guide to Digital Signal Processing](http://www.dspguide.com)
* [Welsh's Synthesizer Cookbook](http://www.synthesizer-cookbook.com)
* [L'audionumérique 3°ed by Curtis Road](http://www.audionumerique.com/)
* [Fabrice Neyret Desmos page](http://www-evasion.imag.fr/Membres/Fabrice.Neyret/demos/DesmosGraph/indexImages.html)

Servers :
Expand Down
16 changes: 12 additions & 4 deletions client/dist/fs.js
Expand Up @@ -18238,7 +18238,7 @@ var _frame = function (raf_time) {

// and prev_data
for (i = 0; i < _output_channels; i += 1) {
buffer_osc.push(_prev_data[i]);
buffer_osc.push(new _synth_data_array(_prev_data[i]));
}

_oscNotifyFast(_OSC_FRAME_DATA, buffer_osc);
Expand Down Expand Up @@ -20696,6 +20696,7 @@ var _createFasSettingsContent = function () {
chn_synthesis_select,
granular_option,
additive_option,
spectral_option,
exp_option,
chn_genv_type_label,
chn_genv_type_select,
Expand All @@ -20721,9 +20722,11 @@ var _createFasSettingsContent = function () {
chn_synthesis_select = document.createElement("select");
granular_option = document.createElement("option");
additive_option = document.createElement("option");
spectral_option = document.createElement("option");
exp_option = document.createElement("option");
granular_option.innerHTML = "granular";
additive_option.innerHTML = "additive";
spectral_option.innerHTML = "spectral";
exp_option.innerHTML = "exp";

chn_genv_type_label = document.createElement("label");
Expand Down Expand Up @@ -20759,6 +20762,7 @@ var _createFasSettingsContent = function () {
chn_settings_div.innerHTML = "Chn " + (j + 1);

chn_synthesis_select.appendChild(additive_option);
chn_synthesis_select.appendChild(spectral_option);
chn_synthesis_select.appendChild(granular_option);
chn_synthesis_select.appendChild(exp_option);

Expand All @@ -20770,8 +20774,10 @@ var _createFasSettingsContent = function () {
if (chn_settings[0] === 0) {
additive_option.selected = true;
} else if (chn_settings[0] === 1) {
granular_option.selected = true;
spectral_option.selected = true;
} else if (chn_settings[0] === 2) {
granular_option.selected = true;
} else if (chn_settings[0] === 3) {
exp_option.selected = true;
}

Expand All @@ -20786,10 +20792,12 @@ var _createFasSettingsContent = function () {

if (this.value === "additive") {
value = 0;
} else if (this.value === "granular") {
} else if (this.value === "spectral") {
value = 1;
} else if (this.value === "exp") {
} else if (this.value === "granular") {
value = 2;
} else if (this.value === "exp") {
value = 3;
} else {
value = 0;
}
Expand Down
6 changes: 3 additions & 3 deletions client/dist/fs.min.js

Large diffs are not rendered by default.

14 changes: 11 additions & 3 deletions client/js/ui.js
Expand Up @@ -107,6 +107,7 @@ var _createFasSettingsContent = function () {
chn_synthesis_select,
granular_option,
additive_option,
spectral_option,
exp_option,
chn_genv_type_label,
chn_genv_type_select,
Expand All @@ -132,9 +133,11 @@ var _createFasSettingsContent = function () {
chn_synthesis_select = document.createElement("select");
granular_option = document.createElement("option");
additive_option = document.createElement("option");
spectral_option = document.createElement("option");
exp_option = document.createElement("option");
granular_option.innerHTML = "granular";
additive_option.innerHTML = "additive";
spectral_option.innerHTML = "spectral";
exp_option.innerHTML = "exp";

chn_genv_type_label = document.createElement("label");
Expand Down Expand Up @@ -170,6 +173,7 @@ var _createFasSettingsContent = function () {
chn_settings_div.innerHTML = "Chn " + (j + 1);

chn_synthesis_select.appendChild(additive_option);
chn_synthesis_select.appendChild(spectral_option);
chn_synthesis_select.appendChild(granular_option);
chn_synthesis_select.appendChild(exp_option);

Expand All @@ -181,8 +185,10 @@ var _createFasSettingsContent = function () {
if (chn_settings[0] === 0) {
additive_option.selected = true;
} else if (chn_settings[0] === 1) {
granular_option.selected = true;
spectral_option.selected = true;
} else if (chn_settings[0] === 2) {
granular_option.selected = true;
} else if (chn_settings[0] === 3) {
exp_option.selected = true;
}

Expand All @@ -197,10 +203,12 @@ var _createFasSettingsContent = function () {

if (this.value === "additive") {
value = 0;
} else if (this.value === "granular") {
} else if (this.value === "spectral") {
value = 1;
} else if (this.value === "exp") {
} else if (this.value === "granular") {
value = 2;
} else if (this.value === "exp") {
value = 3;
} else {
value = 0;
}
Expand Down
5 changes: 2 additions & 3 deletions osc_relay/osc_relay.js
Expand Up @@ -24,8 +24,6 @@ var udpPort = new osc.UDPPort({
metadata: true
});

udpPort.open();

function websocketConnect() {
wss = new WebSocket.Server({
server: server
Expand Down Expand Up @@ -63,7 +61,6 @@ udpPort.on("bundle", function (oscBundle, timeTag, info) {
});

udpPort.on("message", function (m) {
//console.log("message", m);
if (websocketPort) {
websocketPort.send(m);
}
Expand All @@ -72,3 +69,5 @@ udpPort.on("message", function (m) {
udpPort.on("error", function (e) {
console.log("UDP Error: ", e);
});

udpPort.open();

0 comments on commit b5ee536

Please sign in to comment.