- moved app/ to main/ and app.js to main.js for disambiguation

- added osc sendings to sync targets (ie other instances of the app running on the network)
This commit is contained in:
jean-emmanuel 2015-09-08 18:58:37 +02:00 • committed by bordun
parent db8809719d
commit cd24f7290d
3 changed files with 13 additions and 7 deletions

View file

@ -1 +1 @@
require(__dirname+'/app/app.js')
require(__dirname+'/main/main.js')

View file

@ -3,8 +3,8 @@
"sessionPath": "/home/bordun/oscwork/oschtmlgui/sessions/",
"recentSessions": [
"/home/bordun/oscwork/oschtmlgui/sessions/demo.js",
"/home/bordun/oscwork/oschtmlgui/sessions/knob.js",
"/home/bordun/oscwork/oschtmlgui/sessions/demo-full.js",
"/home/bordun/oscwork/oschtmlgui/sessions/knob.js",
"/home/bordun/oscwork/oschtmlgui/sessions/xy.js",
"/home/bordun/oscwork/oschtmlgui/sessions/fadertest.js",
"/home/bordun/oscwork/oschtmlgui/sessions/monitorsjeannot.js",

View file

@ -1,7 +1,6 @@
/* TODO
- configuration panel
- defaultTarget
- syncTargets
*/
var app = require('app')
@ -183,15 +182,22 @@ ipc.on('ready',function(){
ipc.on('sendOsc', function (event,data) {
for (i in data.target.split(' ')) {
var targets = []
Array.prototype.push.apply(targets, data.target.split(' '));
Array.prototype.push.apply(targets, readConfig('syncTargets'));
for (i in targets) {
var host = targets[i].split(':')[0],
port = targets[i].split(':')[1];
var host = data.target.split(' ')[i].split(':')[0],
port = data.target.split(' ')[i].split(':')[1];
udpPort.send({
address: data.path,
args: data.args
}, host, port);
}
});