aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2014-08-30 11:29:52 +0200
committerGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2014-08-30 11:29:52 +0200
commit77e0dcff846b5c51bf92acf0d73266df0cd38bf2 (patch)
treea4a755705ec926dad997e8976b5c93525b15e08d
parent983dc062a4f3a05d799fec7d9ac07e9423bc558a (diff)
downloadchimaera_sc-77e0dcff846b5c51bf92acf0d73266df0cd38bf2.zip
chimaera_sc-77e0dcff846b5c51bf92acf0d73266df0cd38bf2.tar.gz
chimaera_sc-77e0dcff846b5c51bf92acf0d73266df0cd38bf2.tar.bz2
chimaera_sc-77e0dcff846b5c51bf92acf0d73266df0cd38bf2.tar.xz
use tcp mode where appropriate
-rw-r--r--classes/ChimaeraCal.sc2
-rw-r--r--classes/ChimaeraConf.sc2
-rw-r--r--classes/ChimaeraDump.sc2
-rw-r--r--classes/ChimaeraGroup.sc2
-rw-r--r--classes/ChimaeraIn.sc2
-rw-r--r--classes/ChimaeraInDummy.sc41
-rw-r--r--classes/ChimaeraInTuio2.sc8
-rw-r--r--classes/ChimaeraMap.sc2
-rw-r--r--classes/ChimaeraOut.sc10
-rw-r--r--classes/ChimaeraOutMidi.sc29
-rw-r--r--classes/ChimaeraOutSCSynth2F.sc39
-rw-r--r--classes/ChimaeraOutSCSynth4F.sc39
-rwxr-xr-xignore/cal_gui.sc2
-rwxr-xr-xignore/custom.sc5
-rwxr-xr-xignore/custom_to_midi.sc14
-rwxr-xr-xignore/dummy_to_midi.sc3
-rwxr-xr-xignore/dummy_to_scsynth2F.sc2
-rwxr-xr-xignore/dump_gui.sc8
-rwxr-xr-xignore/group_gui.sc2
-rw-r--r--ignore/instruments2F.sc2
-rw-r--r--ignore/instruments4F.sc2
-rwxr-xr-xignore/introspect.sc2
-rwxr-xr-xignore/osc_to_scsynth2F.sc3
-rwxr-xr-xignore/oscmidi_to_midi.sc12
-rwxr-xr-xignore/scsynth_to_scsynth2F.sc16
-rwxr-xr-xignore/scsynth_to_scsynth4F.sc16
-rwxr-xr-xignore/tuio2_to_midi.sc8
-rwxr-xr-xignore/tuio2_to_scsynth2F.sc8
-rwxr-xr-xignore/tuio2_to_scsynth4F.sc8
29 files changed, 141 insertions, 150 deletions
diff --git a/classes/ChimaeraCal.sc b/classes/ChimaeraCal.sc
index e780b17..52ade9f 100644
--- a/classes/ChimaeraCal.sc
+++ b/classes/ChimaeraCal.sc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
diff --git a/classes/ChimaeraConf.sc b/classes/ChimaeraConf.sc
index 88679bb..134690f 100644
--- a/classes/ChimaeraConf.sc
+++ b/classes/ChimaeraConf.sc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
diff --git a/classes/ChimaeraDump.sc b/classes/ChimaeraDump.sc
index 3bd25c1..6229f75 100644
--- a/classes/ChimaeraDump.sc
+++ b/classes/ChimaeraDump.sc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
diff --git a/classes/ChimaeraGroup.sc b/classes/ChimaeraGroup.sc
index cd2e37c..26a0f16 100644
--- a/classes/ChimaeraGroup.sc
+++ b/classes/ChimaeraGroup.sc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
diff --git a/classes/ChimaeraIn.sc b/classes/ChimaeraIn.sc
index 7cf9d06..8b6ef52 100644
--- a/classes/ChimaeraIn.sc
+++ b/classes/ChimaeraIn.sc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
diff --git a/classes/ChimaeraInDummy.sc b/classes/ChimaeraInDummy.sc
index e17ce43..af597df 100644
--- a/classes/ChimaeraInDummy.sc
+++ b/classes/ChimaeraInDummy.sc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -22,56 +22,27 @@
*/
ChimaeraInDummy : ChimaeraIn {
- var on, off, set, idle, lastTime, ignore;
+ var on, off, set, idle, lastTime;
init {|s, conf, rx, iEngine|
engine = iEngine;
- lastTime = 0;
- ignore = false;
-
conf.sendMsg("/engines/dummy/enabled", true); // enable dummy output engine
on = OSCFunc({ |msg, time, addr, port|
- this.update(time);
- if(ignore.not) {
- engine.on(time, msg[1], msg[2], msg[3], msg[4], msg[5])
- };
+ engine.on(time, msg[1], msg[2], msg[3], msg[4], msg[5])
}, "/on", rx);
off = OSCFunc({ |msg, time, addr, port|
- this.update(time);
- if(ignore.not) {
- engine.off(time, msg[1], msg[2], msg[3])
- };
+ engine.off(time, msg[1], msg[2], msg[3])
}, "/off", rx);
set = OSCFunc({ |msg, time, addr, port|
- this.update(time);
- if(ignore.not) {
- engine.set(time, msg[1], msg[2], msg[3], msg[4], msg[5])
- };
+ engine.set(time, msg[1], msg[2], msg[3], msg[4], msg[5])
}, "/set", rx);
idle = OSCFunc({ |msg, time, addr, port|
- this.update(time);
- if(ignore.not) {
- engine.idle(time);
- };
+ engine.idle(time);
}, "/idle", rx);
}
-
- update {|time|
- if(time < lastTime) {
- "ignoring out-of-order event".postln;
- ignore = true;
- } { //time >= lastTime
- ignore = false;
- //if(time > lastTime) { FIXME
- engine.end(lastTime);
- engine.start(time);
- lastTime = time;
- //}
- };
- }
}
diff --git a/classes/ChimaeraInTuio2.sc b/classes/ChimaeraInTuio2.sc
index 6377f15..90ea793 100644
--- a/classes/ChimaeraInTuio2.sc
+++ b/classes/ChimaeraInTuio2.sc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -50,14 +50,12 @@ ChimaeraInTuio2 : ChimaeraIn {
ignore = false;
if(timestamp < lastTime) {
- ["message late", timestamp, lastTime].postln;
+ ("message late"+((timestamp-lastTime)*1000)+"ms").postln;
ignore = true;
};
lastFid = fid;
lastTime = timestamp;
-
- engine.start(time);
}, "/tuio2/frm", rx);
tok = OSCFunc({ |msg, time, addr, port|
@@ -105,8 +103,6 @@ ChimaeraInTuio2 : ChimaeraIn {
};
};
- engine.end(time);
-
blobsOld = msg;
};
}, "/tuio2/alv", rx);
diff --git a/classes/ChimaeraMap.sc b/classes/ChimaeraMap.sc
index 8141fdd..ed14010 100644
--- a/classes/ChimaeraMap.sc
+++ b/classes/ChimaeraMap.sc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
diff --git a/classes/ChimaeraOut.sc b/classes/ChimaeraOut.sc
index 66945a8..678e6e8 100644
--- a/classes/ChimaeraOut.sc
+++ b/classes/ChimaeraOut.sc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -34,14 +34,6 @@ ChimaeraOut {
"init".postln;
}
- start { |time|
- "start".postln;
- }
-
- end { |time|
- "end".postln;
- }
-
on { |time, sid, gid, pid, x, z|
"on".postln;
}
diff --git a/classes/ChimaeraOutMidi.sc b/classes/ChimaeraOutMidi.sc
index 12c0def..bd8f1b4 100644
--- a/classes/ChimaeraOutMidi.sc
+++ b/classes/ChimaeraOutMidi.sc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -39,19 +39,12 @@ ChimaeraOutMidi : ChimaeraOut {
lookup = Order.new; // lookup table of currently active keys
}
- start { |time|
- midio.latency = time - SystemClock.beats;
- if(midio.latency < 0) {
- ("message late"+(midio.latency*1000)+"ms").postln;
- };
- }
-
- end { |time|
- midio.latency = 0;
- }
-
on { |time, sid, gid, pid, x, z| // set callback function for blob on-events
var midikey, cc;
+
+ midio.latency = time - SystemClock.beats;
+ if(midio.latency < 0) { ("message late"+(midio.latency*1000)+"ms").postln; };
+
midikey = x*ran+bot;
lookup[sid] = midikey.round;
@@ -68,12 +61,19 @@ ChimaeraOutMidi : ChimaeraOut {
}
off { |time, sid, gid, pid| // set callback function for blob off-events
+ midio.latency = time - SystemClock.beats;
+ if(midio.latency < 0) { ("message late"+(midio.latency*1000)+"ms").postln; };
+
midio.noteOff(gid, lookup[sid], 0x00);
lookup[sid] = nil;
}
set { |time, sid, gid, pid, x, z| // set callback function for blob set-events
var midikey, cc;
+
+ midio.latency = time - SystemClock.beats;
+ if(midio.latency < 0) { ("message late"+(midio.latency*1000)+"ms").postln; };
+
midikey = x*ran+bot;
midio.bend(gid, midikey-lookup[sid]/ran*0x2000+0x1fff); // we're using a pitchbend span of ran*100 cents
@@ -88,8 +88,7 @@ ChimaeraOutMidi : ChimaeraOut {
}
idle { |time|
- //FIXME
- //midio.allNotesOff(baseID);
- //midio.allNotesOff(leadID);
+ midio.latency = time - SystemClock.beats;
+ if(midio.latency < 0) { ("message late"+(midio.latency*1000)+"ms").postln; };
}
}
diff --git a/classes/ChimaeraOutSCSynth2F.sc b/classes/ChimaeraOutSCSynth2F.sc
index a78c60a..b35c74c 100644
--- a/classes/ChimaeraOutSCSynth2F.sc
+++ b/classes/ChimaeraOutSCSynth2F.sc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -22,11 +22,10 @@
*/
ChimaeraOutSCSynth2F : ChimaeraOut {
- var bndl, sidOffset, gidOffset, instruments, s;
+ var sidOffset, gidOffset, instruments, s;
init {|iS, n, groups|
instruments = groups;
- bndl = List.new(32);
s = iS;
gidOffset = 100;
@@ -37,36 +36,34 @@ ChimaeraOutSCSynth2F : ChimaeraOut {
}
}
- start { |time|
- bndl.clear;
- }
-
- end { |time|
- var lag;
- lag = time - SystemClock.beats;
- if(lag < 0) {
- ("message late"+(lag*1000)+"ms").postln;
- };
- //s.listSendBundle(lag, bndl);
- s.listSendBundle(nil, bndl); //FIXME
- }
-
on { |time, sid, gid, pid, x, z| // set callback function for blob on-events
+ var lag = time - SystemClock.beats;
+ if(lag < 0) { ("message late"+(lag*1000)+"ms").postln; };
+
s.sendMsg('/s_new', instruments[gid], sid+sidOffset, \addToHead, gid+gidOffset, 'out', gid, 'gate', 0);
- bndl = bndl.add(['/n_set', sid+sidOffset, 0, x, 1, z, 2, pid, 'gate', 1]);
+ s.sendBundle(lag, ['/n_set', sid+sidOffset, 0, x, 1, z, 2, pid, 'gate', 1]);
}
off { |time, sid, gid, pid| // set callback function for blob off-events
- bndl = bndl.add(['/n_set', sid+sidOffset, 'gate', 0]);
+ var lag = time - SystemClock.beats;
+ if(lag < 0) { ("message late"+(lag*1000)+"ms").postln; };
+
+ s.sendBundle(lag, ['/n_set', sid+sidOffset, 'gate', 0]);
}
set { |time, sid, gid, pid, x, z| // set callback function for blob set-events
- bndl = bndl.add(['/n_set', sid+sidOffset, 0, x, 1, z, 2, pid]);
+ var lag = time - SystemClock.beats;
+ if(lag < 0) { ("message late"+(lag*1000)+"ms").postln; };
+
+ s.sendBundle(lag, ['/n_set', sid+sidOffset, 0, x, 1, z, 2, pid]);
}
idle { |time|
+ var lag = time - SystemClock.beats;
+ if(lag < 0) { ("message late"+(lag*1000)+"ms").postln; };
+
instruments do: {|v, gid|
- bndl = bndl.add(['/n_set', gid+gidOffset, 'gate', 0]);
+ s.sendBundle(lag, ['/n_set', gid+gidOffset, 'gate', 0]);
}
}
}
diff --git a/classes/ChimaeraOutSCSynth4F.sc b/classes/ChimaeraOutSCSynth4F.sc
index 9705d93..73c8bf7 100644
--- a/classes/ChimaeraOutSCSynth4F.sc
+++ b/classes/ChimaeraOutSCSynth4F.sc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -37,43 +37,42 @@ ChimaeraOutSCSynth4F : ChimaeraOut {
s.sendMsg('/g_new', grp, \addToHead.asInt, 0);
}
- start { |time|
- bndl.clear;
- }
-
- end { |time|
- var lag;
- lag = time - SystemClock.beats;
- if(lag < 0) {
- ("message late"+(lag*1000)+"ms").postln;
- };
- s.listSendBundle(lag, bndl);
- }
-
on { |time, sid, gid, pid, x, z| // set callback function for blob on-events
+ var lag = time - SystemClock.beats;
+ if(lag < 0) { ("message late"+(lag*1000)+"ms").postln; };
+
if(gid==0) {
s.sendMsg('/s_new', instruments[gid], sid+sidOffset, \addToHead, grp, 'out', gid, 'gate', 0);
- bndl = bndl.add(['/n_set', sid+sidOffset, 0, x, 1, z, 2, pid, 'gate', 1]);
+ s.sendBundle(lag, ['/n_set', sid+sidOffset, 0, x, 1, z, 2, pid, 'gate', 1]);
} {
- bndl = bndl.add(['/n_set', grp, 3, x, 4, z, 5, pid]);
+ s.sendBundle(lag, ['/n_set', grp, 3, x, 4, z, 5, pid]);
};
}
off { |time, sid, gid, pid| // set callback function for blob off-events
+ var lag = time - SystemClock.beats;
+ if(lag < 0) { ("message late"+(lag*1000)+"ms").postln; };
+
if(gid==0) {
- bndl = bndl.add(['/n_set', sid+sidOffset, 'gate', 0]);
+ s.sendBundle(lag, ['/n_set', sid+sidOffset, 'gate', 0]);
};
}
set { |time, sid, gid, pid, x, z| // set callback function for blob set-events
+ var lag = time - SystemClock.beats;
+ if(lag < 0) { ("message late"+(lag*1000)+"ms").postln; };
+
if(gid==0) {
- bndl = bndl.add(['/n_set', sid+sidOffset, 0, x, 1, z, 2, pid]);
+ s.sendBundle(lag, ['/n_set', sid+sidOffset, 0, x, 1, z, 2, pid]);
} {
- bndl = bndl.add(['/n_set', grp, 3, x, 4, z, 5, pid]);
+ s.sendBundle(lag, ['/n_set', grp, 3, x, 4, z, 5, pid]);
};
}
idle { |time|
- bndl = bndl.add(['/n_set', 0+gidOffset, 'gate', 0]);
+ var lag = time - SystemClock.beats;
+ if(lag < 0) { ("message late"+(lag*1000)+"ms").postln; };
+
+ s.sendBundle(lag, ['/n_set', 0+gidOffset, 'gate', 0]);
}
}
diff --git a/ignore/cal_gui.sc b/ignore/cal_gui.sc
index c340e0c..34bcd53 100755
--- a/ignore/cal_gui.sc
+++ b/ignore/cal_gui.sc
@@ -1,7 +1,7 @@
#!/usr/bin/env sclang
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
diff --git a/ignore/custom.sc b/ignore/custom.sc
index 26799ce..9d0b97c 100755
--- a/ignore/custom.sc
+++ b/ignore/custom.sc
@@ -1,7 +1,7 @@
#!/usr/bin/env sclang
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -28,10 +28,7 @@
hostname = "hostname".unixCmdGetStdOutLines[0]++".local";
- //thisProcess.openUDPPort(3333); // open port 3333 to listen for Tuio messages
thisProcess.openUDPPort(4444); // open port 4444 for listening to chimaera configuration replies
-
- //rx = NetAddr ("chimaera.local", 3333);
tx = NetAddr ("chimaera.local", 4444);
chimconf = ChimaeraConf(s, tx, tx);
diff --git a/ignore/custom_to_midi.sc b/ignore/custom_to_midi.sc
index 0f8fda6..fbadb5e 100755
--- a/ignore/custom_to_midi.sc
+++ b/ignore/custom_to_midi.sc
@@ -1,7 +1,7 @@
#!/usr/bin/env sclang
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -24,9 +24,7 @@
*/
{
- var hostname, rx, tx, rate, chimconf, chimin, chimout, midio, on , off, bend, control;
-
- hostname = "hostname".unixCmdGetStdOutLines[0]++".local";
+ var rx, tx, rate, chimconf, chimin, chimout, midio, on , off, bend, control;
thisProcess.openUDPPort(3333); // open port 3333 to listen for Tuio messages
thisProcess.openUDPPort(4444); // open port 4444 for listening to chimaera configuration replies
@@ -38,8 +36,12 @@
rate = 3000;
chimconf.sendMsg("/engines/reset");
- chimconf.sendMsg("/engines/address", hostname++":"++3333); // send output stream to port 3333
- chimconf.sendMsg("/engines/offset", 0.002);
+ chimconf.sendMsg("/engines/offset", 0.0025);
+
+ chimconf.sendMsg("/engines/enabled", false);
+ chimconf.sendMsg("/engines/server", true);
+ chimconf.sendMsg("/engines/mode", "osc.tcp");
+ chimconf.sendMsg("/engines/enabled", true, {|msg| rx.connect;}); // connect via TCP
chimconf.sendMsg("/engines/custom/reset");
chimconf.sendMsg("/engines/custom/append", "on", "/noteOn", "i($g) i(3 12* 0.5- $n 18% 6/- $n 6/+) i(0x7f)");
diff --git a/ignore/dummy_to_midi.sc b/ignore/dummy_to_midi.sc
index 42d8b49..e69e001 100755
--- a/ignore/dummy_to_midi.sc
+++ b/ignore/dummy_to_midi.sc
@@ -1,7 +1,7 @@
#!/usr/bin/env sclang
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -47,6 +47,7 @@
chimconf.sendMsg("/sensors/group/reset"); // reset groups
chimconf.sendMsg("/sensors/group/attributes/0", 0.0, 1.0, false, true, false); // add group
chimconf.sendMsg("/sensors/group/attributes/1", 0.0, 1.0, true, false, false); // add group
+
chimconf.sendMsg("/sensors/number", {|msg|
var n = msg[0];
chimout = ChimaeraOutMidi(s, n, [\base, \lead]);
diff --git a/ignore/dummy_to_scsynth2F.sc b/ignore/dummy_to_scsynth2F.sc
index cd4bbdd..9dd20ff 100755
--- a/ignore/dummy_to_scsynth2F.sc
+++ b/ignore/dummy_to_scsynth2F.sc
@@ -1,7 +1,7 @@
#!/usr/bin/env sclang
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
diff --git a/ignore/dump_gui.sc b/ignore/dump_gui.sc
index 655ad9c..cff1f50 100755
--- a/ignore/dump_gui.sc
+++ b/ignore/dump_gui.sc
@@ -1,7 +1,7 @@
#!/usr/bin/env sclang
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -38,8 +38,12 @@
rate = 2500;
chimconf.sendMsg("/engines/reset"); // reset all output engines
- chimconf.sendMsg("/engines/address", hostname++":"++3333); // send output stream to port 3333
chimconf.sendMsg("/engines/offset", 0.002);
+ chimconf.sendMsg("/engines/address", hostname++":"++3333, {
+ chimconf.sendMsg("/engines/server", false);
+ chimconf.sendMsg("/engines/mode", "osc.udp");
+ chimconf.sendMsg("/engines/enabled", true);
+ });
chimconf.sendMsg("/sensors/rate", rate);
diff --git a/ignore/group_gui.sc b/ignore/group_gui.sc
index 05eed46..c06df1a 100755
--- a/ignore/group_gui.sc
+++ b/ignore/group_gui.sc
@@ -1,7 +1,7 @@
#!/usr/bin/env sclang
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
diff --git a/ignore/instruments2F.sc b/ignore/instruments2F.sc
index 7267601..4d2dd2c 100644
--- a/ignore/instruments2F.sc
+++ b/ignore/instruments2F.sc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
diff --git a/ignore/instruments4F.sc b/ignore/instruments4F.sc
index 430b0eb..98bee60 100644
--- a/ignore/instruments4F.sc
+++ b/ignore/instruments4F.sc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
diff --git a/ignore/introspect.sc b/ignore/introspect.sc
index f20f258..1462c6d 100755
--- a/ignore/introspect.sc
+++ b/ignore/introspect.sc
@@ -1,7 +1,7 @@
#!/usr/bin/env sclang
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
diff --git a/ignore/osc_to_scsynth2F.sc b/ignore/osc_to_scsynth2F.sc
index 839bc8f..58207bc 100755
--- a/ignore/osc_to_scsynth2F.sc
+++ b/ignore/osc_to_scsynth2F.sc
@@ -1,7 +1,7 @@
#!/usr/bin/env sclang
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -23,7 +23,6 @@
* distribution.
*/
-//Server.supernova;
s.options.blockSize = 0x10;
s.options.memSize = 0x10000;
s.latency = nil;
diff --git a/ignore/oscmidi_to_midi.sc b/ignore/oscmidi_to_midi.sc
index 3c3ec6f..534bf91 100755
--- a/ignore/oscmidi_to_midi.sc
+++ b/ignore/oscmidi_to_midi.sc
@@ -1,7 +1,7 @@
#!/usr/bin/env sclang
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -24,9 +24,7 @@
*/
{
- var hostname, rx, tx, rate, chimconf, midio, func, effect;
-
- hostname = "hostname".unixCmdGetStdOutLines[0]++".local";
+ var rx, tx, rate, chimconf, midio, func, effect;
thisProcess.openUDPPort(3333); // open port 3333 to listen for Tuio messages
thisProcess.openUDPPort(4444); // open port 4444 for listening to chimaera configuration replies
@@ -38,8 +36,12 @@
rate = 3000;
chimconf.sendMsg("/engines/reset"); // reset all output engines
- chimconf.sendMsg("/engines/address", hostname++":"++3333); // send output stream to port 3333
chimconf.sendMsg("/engines/offset", 0.002);
+
+ chimconf.sendMsg("/engines/enabled", false);
+ chimconf.sendMsg("/engines/server", true);
+ chimconf.sendMsg("/engines/mode", "osc.tcp");
+ chimconf.sendMsg("/engines/enabled", true, {|msg| rx.connect;}); // connect via TCP
chimconf.sendMsg("/sensors/rate", rate);
chimconf.sendMsg("/sensors/group/reset"); // reset groups
diff --git a/ignore/scsynth_to_scsynth2F.sc b/ignore/scsynth_to_scsynth2F.sc
index c691552..c407099 100755
--- a/ignore/scsynth_to_scsynth2F.sc
+++ b/ignore/scsynth_to_scsynth2F.sc
@@ -1,7 +1,7 @@
#!/usr/bin/env sclang
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -23,12 +23,17 @@
* distribution.
*/
-//Server.supernova;
+s.options.protocol = \tcp;
s.options.blockSize = 0x10;
s.options.memSize = 0x10000;
s.latency = nil;
s.boot;
+Routine.run({
+ 2.wait;
+ s.addr.connect; // connect via TCP
+}, clock:AppClock);
+
s.doWhenBooted({
var hostname, tx, chimconf, rate, sidOffset, gidOffset;
@@ -44,9 +49,14 @@ s.doWhenBooted({
chimconf = ChimaeraConf(s, tx, tx);
rate = 3000;
+ chimconf.sendMsg("/engines/enabled", false);
chimconf.sendMsg("/engines/reset");
- chimconf.sendMsg("/engines/address", hostname++":"++s.addr.port); // send output stream to port 3333
chimconf.sendMsg("/engines/offset", 0.002);
+ chimconf.sendMsg("/engines/address", hostname++":"++s.addr.port, {
+ chimconf.sendMsg("/engines/server", false);
+ chimconf.sendMsg("/engines/mode", "osc.tcp");
+ chimconf.sendMsg("/engines/enabled", true);
+ });
chimconf.sendMsg("/sensors/rate", rate);
chimconf.sendMsg("/sensors/group/reset"); // reset groups
diff --git a/ignore/scsynth_to_scsynth4F.sc b/ignore/scsynth_to_scsynth4F.sc
index bf28d88..fcc02dc 100755
--- a/ignore/scsynth_to_scsynth4F.sc
+++ b/ignore/scsynth_to_scsynth4F.sc
@@ -1,7 +1,7 @@
#!/usr/bin/env sclang
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -23,12 +23,17 @@
* distribution.
*/
-//Server.supernova;
+s.options.protocol = \tcp;
s.options.blockSize = 0x10;
s.options.memSize = 0x10000;
s.latency = nil;
s.boot;
+Routine.run({
+ 2.wait;
+ s.addr.connect; // connect via TCP
+}, clock:AppClock);
+
s.doWhenBooted({
var hostname, tx, chimconf, rate, sidOffset, gidOffset, grp;
@@ -46,9 +51,14 @@ s.doWhenBooted({
chimconf = ChimaeraConf(s, tx, tx);
rate = 3000;
+ chimconf.sendMsg("/engines/enabled", false);
chimconf.sendMsg("/engines/reset");
- chimconf.sendMsg("/engines/address", hostname++":"++s.addr.port); // send output stream to port 3333
chimconf.sendMsg("/engines/offset", 0.002);
+ chimconf.sendMsg("/engines/address", hostname++":"++s.addr.port, {
+ chimconf.sendMsg("/engines/server", false);
+ chimconf.sendMsg("/engines/mode", "osc.tcp");
+ chimconf.sendMsg("/engines/enabled", true);
+ });
chimconf.sendMsg("/sensors/rate", rate);
chimconf.sendMsg("/sensors/group/reset"); // reset groups
diff --git a/ignore/tuio2_to_midi.sc b/ignore/tuio2_to_midi.sc
index 3527b83..47eb74e 100755
--- a/ignore/tuio2_to_midi.sc
+++ b/ignore/tuio2_to_midi.sc
@@ -1,7 +1,7 @@
#!/usr/bin/env sclang
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -38,8 +38,12 @@
rate = 3000;
chimconf.sendMsg("/engines/reset");
- chimconf.sendMsg("/engines/address", hostname++":"++3333); // send output stream to port 3333
chimconf.sendMsg("/engines/offset", 0.002);
+ chimconf.sendMsg("/engines/address", hostname++":"++3333, {
+ chimconf.sendMsg("/engines/server", false);
+ chimconf.sendMsg("/engines/mode", "osc.udp");
+ chimconf.sendMsg("/engines/enabled", true);
+ });
chimconf.sendMsg("/sensors/rate", rate);
chimconf.sendMsg("/sensors/group/reset"); // reset groups
diff --git a/ignore/tuio2_to_scsynth2F.sc b/ignore/tuio2_to_scsynth2F.sc
index a4709bd..c67cd95 100755
--- a/ignore/tuio2_to_scsynth2F.sc
+++ b/ignore/tuio2_to_scsynth2F.sc
@@ -1,7 +1,7 @@
#!/usr/bin/env sclang
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -43,8 +43,12 @@ s.doWhenBooted({
rate = 3000;
chimconf.sendMsg("/engines/reset");
- chimconf.sendMsg("/engines/address", hostname++":"++3333); // send output stream to port 3333
chimconf.sendMsg("/engines/offset", 0.002);
+ chimconf.sendMsg("/engines/address", hostname++":"++3333, {
+ chimconf.sendMsg("/engines/server", false);
+ chimconf.sendMsg("/engines/mode", "osc.udp");
+ chimconf.sendMsg("/engines/enabled", true);
+ });
chimconf.sendMsg("/sensors/rate", rate);
chimconf.sendMsg("/sensors/group/reset"); // reset groups
diff --git a/ignore/tuio2_to_scsynth4F.sc b/ignore/tuio2_to_scsynth4F.sc
index e26f4c2..038a563 100755
--- a/ignore/tuio2_to_scsynth4F.sc
+++ b/ignore/tuio2_to_scsynth4F.sc
@@ -1,7 +1,7 @@
#!/usr/bin/env sclang
/*
- * Copyright (c) 2013 Hanspeter Portner (dev@open-music-kontrollers.ch)
+ * Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
@@ -43,8 +43,12 @@ s.doWhenBooted({
rate = 3000;
chimconf.sendMsg("/engines/reset");
- chimconf.sendMsg("/engines/address", hostname++":"++3333); // send output stream to port 3333
chimconf.sendMsg("/engines/offset", 0.002);
+ chimconf.sendMsg("/engines/address", hostname++":"++3333, {
+ chimconf.sendMsg("/engines/server", false);
+ chimconf.sendMsg("/engines/mode", "osc.udp");
+ chimconf.sendMsg("/engines/enabled", true);
+ });
chimconf.sendMsg("/sensors/rate", rate);
chimconf.sendMsg("/sensors/group/reset"); // reset groups