aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2015-11-30 09:37:00 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2015-11-30 09:37:00 +0100
commit802d5c348466c4da6f3cf593f59ad20be4a66e8d (patch)
tree4f913691c0225a1853d86bfa5b13f64be18b2903
parent6cf1034118be9c3fe2c6e1d0045c034a57f3c2b8 (diff)
downloadchimaera_sc-802d5c348466c4da6f3cf593f59ad20be4a66e8d.tar.xz
simplifications, part I.
-rwxr-xr-xignore/dummy_to_scsynth2F.sc6
-rw-r--r--ignore/instruments2F.sc38
-rw-r--r--ignore/instruments4F.sc4
-rwxr-xr-xignore/osc_to_scsynth2F.sc9
-rwxr-xr-xignore/scsynth_to_scsynth2F.sc24
-rwxr-xr-xignore/scsynth_to_scsynth4F.sc12
-rwxr-xr-xignore/tuio2_to_scsynth2F.sc6
-rwxr-xr-xignore/tuio2_to_scsynth4F.sc6
8 files changed, 43 insertions, 62 deletions
diff --git a/ignore/dummy_to_scsynth2F.sc b/ignore/dummy_to_scsynth2F.sc
index 5e0e8af..8dd913d 100755
--- a/ignore/dummy_to_scsynth2F.sc
+++ b/ignore/dummy_to_scsynth2F.sc
@@ -19,6 +19,8 @@
s.options.blockSize = 0x10;
s.options.memSize = 0x10000;
+s.options.numInputBusChannels = 8;
+s.options.numOutputBusChannels = 8;
s.latency = nil;
s.boot;
@@ -44,10 +46,10 @@ s.doWhenBooted({
chimconf.sendMsg("/sensors/number", {|msg|
var n = msg[0];
- chimout = ChimaeraOutSCSynth2F(s, n, [\base, \lead]);
+ chimout = ChimaeraOutSCSynth2F(s, n, [\synth_0, \synth_1]);
chimin = ChimaeraInDummy(s, chimconf, chimout);
Routine.run({
- "./instruments2F.sc".load.value(n, \base, \lead);
+ "./instruments2F.sc".load.value(n, [\synth_0, \synth_1]);
}, clock:AppClock);
});
})
diff --git a/ignore/instruments2F.sc b/ignore/instruments2F.sc
index 6c26fcc..aa192b9 100644
--- a/ignore/instruments2F.sc
+++ b/ignore/instruments2F.sc
@@ -15,20 +15,18 @@
* http://www.perlfoundation.org/artistic_license_2_0.
*/
-{|n, baseSym, leadSym|
- var baseInst, leadInst, loadInst, win, adrop, bdrop, path;
+{|n=160, symbols=nil|
+ var instruments, loadInst, win, drops, path;
/*
- * populate instrument name arrays
+ * populate instrument name array
*/
- baseInst = Array.new(64);
- leadInst = Array.new(64);
+ instruments = Array.new(64);
path = "./instruments/2F/";
p = PathName(path);
p.filesDo({|n|
var name = n.fileNameWithoutExtension;
- baseInst.add(name);
- leadInst.add(name);
+ instruments.add(name);
});
/*
@@ -38,20 +36,20 @@
(path++inst++".sc").load.value(group, n);
};
- loadInst.value(\base, baseInst[0]);
- loadInst.value(\lead, leadInst[0]);
+ if(symbols.isNil, {
+ symbols = [\synth_0, \synth_1, \synth_2, \synth_3, \synth_4, \synth_5, \synth_6, \synth_7];
+ });
- win = Window.new("2F Instruments ("++n++")", Rect(200,200,400,100)).front;
+ win = Window.new("2F Instruments ("++n++")", Rect(0, 0, 200, 20*symbols.size+20)).front;
- adrop = PopUpMenu(win, Rect(10,10,180,20));
- adrop.items = baseInst;
- adrop.action = {|menu|
- loadInst.value(baseSym, menu.item);
- };
+ symbols.do({|sym, i|
+ var drop = PopUpMenu(win, Rect(10, 20*i+10, 180, 20));
+ drop.items = instruments;
+ drop.action = {|menu|
+ loadInst.value(sym, menu.item);
+ };
+ drops.add(drop);
- bdrop = PopUpMenu(win, Rect(200,10,180,20));
- bdrop.items = leadInst;
- bdrop.action = {|menu|
- loadInst.value(leadSym, menu.item);
- };
+ loadInst.value(sym, instruments[0]);
+ });
}
diff --git a/ignore/instruments4F.sc b/ignore/instruments4F.sc
index ec5b6a2..0ec6907 100644
--- a/ignore/instruments4F.sc
+++ b/ignore/instruments4F.sc
@@ -36,13 +36,13 @@
(path++inst++".sc").load.value(group, n);
};
- loadInst.value(\base, baseInst[0]);
+ loadInst.value(\inst_0, baseInst[0]);
win = Window.new("4F Instruments", Rect(200,200,200,100)).front;
adrop = PopUpMenu(win, Rect(10,10,180,20));
adrop.items = baseInst;
adrop.action = {|menu|
- loadInst.value(\base, menu.item);
+ loadInst.value(\inst_0, menu.item);
};
}
diff --git a/ignore/osc_to_scsynth2F.sc b/ignore/osc_to_scsynth2F.sc
index 3f24dfb..108f036 100755
--- a/ignore/osc_to_scsynth2F.sc
+++ b/ignore/osc_to_scsynth2F.sc
@@ -19,6 +19,8 @@
s.options.blockSize = 0x10;
s.options.memSize = 0x10000;
+s.options.numInputBusChannels = 8;
+s.options.numOutputBusChannels = 8;
s.latency = nil;
s.boot;
@@ -28,9 +30,10 @@ s.doWhenBooted({
gidOffset = 100;
n = 160;
- s.sendMsg('/g_new', 0+gidOffset, \addToHead.asInt, 0);
- s.sendMsg('/g_new', 1+gidOffset, \addToHead.asInt, 0);
+ 0.to(7).do({|g|
+ s.sendMsg('/g_new', g+gidOffset, \addToHead.asInt, 0);
+ });
s.sync;
- "./instruments2F.sc".load.value(n, \base, \lead);
+ "./instruments2F.sc".load.value(n);
})
diff --git a/ignore/scsynth_to_scsynth2F.sc b/ignore/scsynth_to_scsynth2F.sc
index 19081c4..6b1390f 100755
--- a/ignore/scsynth_to_scsynth2F.sc
+++ b/ignore/scsynth_to_scsynth2F.sc
@@ -20,6 +20,8 @@
s.options.protocol = \tcp;
s.options.blockSize = 0x10;
s.options.memSize = 0x10000;
+s.options.numInputBusChannels = 8;
+s.options.numOutputBusChannels = 8;
s.latency = nil;
s.boot;
@@ -58,31 +60,11 @@ s.doWhenBooted({
chimconf.sendMsg("/engines/scsynth/enabled", true);
chimconf.sendMsg("/engines/scsynth/reset");
chimconf.sendMsg("/engines/scsynth/derivatives", true);
-
- chimconf.sendMsg("/engines/scsynth/attributes/0/name", \base);
- chimconf.sendMsg("/engines/scsynth/attributes/0/sid_offset", sidOffset);
- chimconf.sendMsg("/engines/scsynth/attributes/0/gid_offset", 0+gidOffset);
- chimconf.sendMsg("/engines/scsynth/attributes/0/out", 0);
- chimconf.sendMsg("/engines/scsynth/attributes/0/arg_offset", 0);
- chimconf.sendMsg("/engines/scsynth/attributes/0/allocate", true);
- chimconf.sendMsg("/engines/scsynth/attributes/0/gate", true);
- chimconf.sendMsg("/engines/scsynth/attributes/0/tail", \addToHead.asInt);
- chimconf.sendMsg("/engines/scsynth/attributes/0/group", false);
-
- chimconf.sendMsg("/engines/scsynth/attributes/1/name", \lead);
- chimconf.sendMsg("/engines/scsynth/attributes/1/sid_offset", sidOffset);
- chimconf.sendMsg("/engines/scsynth/attributes/1/gid_offset", 1+gidOffset);
- chimconf.sendMsg("/engines/scsynth/attributes/1/out", 1);
- chimconf.sendMsg("/engines/scsynth/attributes/1/arg_offset", 0);
- chimconf.sendMsg("/engines/scsynth/attributes/1/allocate", true);
- chimconf.sendMsg("/engines/scsynth/attributes/1/gate", true);
- chimconf.sendMsg("/engines/scsynth/attributes/1/tail", \addToHead.asInt);
- chimconf.sendMsg("/engines/scsynth/attributes/1/group", false);
chimconf.sendMsg("/sensors/number", {|msg|
var n=msg[0];
Routine.run({
- "./instruments2F.sc".load.value(n, \base, \lead);
+ "./instruments2F.sc".load.value(n, [\synth_0, \synth_1]);
}, clock:AppClock);
});
})
diff --git a/ignore/scsynth_to_scsynth4F.sc b/ignore/scsynth_to_scsynth4F.sc
index ae2e9e5..26b0b3e 100755
--- a/ignore/scsynth_to_scsynth4F.sc
+++ b/ignore/scsynth_to_scsynth4F.sc
@@ -20,6 +20,8 @@
s.options.protocol = \tcp;
s.options.blockSize = 0x10;
s.options.memSize = 0x10000;
+s.options.numInputBusChannels = 8;
+s.options.numOutputBusChannels = 8;
s.latency = nil;
s.boot;
@@ -59,24 +61,14 @@ s.doWhenBooted({
chimconf.sendMsg("/engines/scsynth/reset");
chimconf.sendMsg("/engines/scsynth/derivatives", true);
- chimconf.sendMsg("/engines/scsynth/attributes/0/name", \base);
- chimconf.sendMsg("/engines/scsynth/attributes/0/sid_offset", sidOffset);
chimconf.sendMsg("/engines/scsynth/attributes/0/gid_offset", grp);
chimconf.sendMsg("/engines/scsynth/attributes/0/out", 0);
- chimconf.sendMsg("/engines/scsynth/attributes/0/arg_offset", 0);
- chimconf.sendMsg("/engines/scsynth/attributes/0/allocate", true);
- chimconf.sendMsg("/engines/scsynth/attributes/0/gate", true);
- chimconf.sendMsg("/engines/scsynth/attributes/0/tail", \addToHead.asInt);
- chimconf.sendMsg("/engines/scsynth/attributes/0/group", false);
- chimconf.sendMsg("/engines/scsynth/attributes/1/name", \lead);
- chimconf.sendMsg("/engines/scsynth/attributes/1/sid_offset", sidOffset);
chimconf.sendMsg("/engines/scsynth/attributes/1/gid_offset", grp);
chimconf.sendMsg("/engines/scsynth/attributes/1/out", 0);
chimconf.sendMsg("/engines/scsynth/attributes/1/arg_offset", 5);
chimconf.sendMsg("/engines/scsynth/attributes/1/allocate", false);
chimconf.sendMsg("/engines/scsynth/attributes/1/gate", false);
- chimconf.sendMsg("/engines/scsynth/attributes/1/tail", \addToHead.asInt);
chimconf.sendMsg("/engines/scsynth/attributes/1/group", true);
chimconf.sendMsg("/sensors/number", {|msg|
diff --git a/ignore/tuio2_to_scsynth2F.sc b/ignore/tuio2_to_scsynth2F.sc
index 9fd89c0..5e456df 100755
--- a/ignore/tuio2_to_scsynth2F.sc
+++ b/ignore/tuio2_to_scsynth2F.sc
@@ -19,6 +19,8 @@
s.options.blockSize = 0x10;
s.options.memSize = 0x10000;
+s.options.numInputBusChannels = 8;
+s.options.numOutputBusChannels = 8;
s.latency = nil;
s.boot;
@@ -44,10 +46,10 @@ s.doWhenBooted({
chimconf.sendMsg("/sensors/number", {|msg|
var n = msg[0];
- chimout = ChimaeraOutSCSynth2F(s, n, [\base, \lead]);
+ chimout = ChimaeraOutSCSynth2F(s, n, [\synth_0, \synth_1]);
chimin = ChimaeraInTuio2(s, chimconf, chimout);
Routine.run({
- "./instruments2F.sc".load.value(n, \base, \lead);
+ "./instruments2F.sc".load.value(n, [\synth_0, \synth_1]);
}, clock:AppClock);
});
})
diff --git a/ignore/tuio2_to_scsynth4F.sc b/ignore/tuio2_to_scsynth4F.sc
index b186a64..317765b 100755
--- a/ignore/tuio2_to_scsynth4F.sc
+++ b/ignore/tuio2_to_scsynth4F.sc
@@ -19,6 +19,8 @@
s.options.blockSize = 0x10;
s.options.memSize = 0x10000;
+s.options.numInputBusChannels = 8;
+s.options.numOutputBusChannels = 8;
s.latency = nil;
s.boot;
@@ -44,10 +46,10 @@ s.doWhenBooted({
chimconf.sendMsg("/sensors/number", {|msg|
var n = msg[0];
- chimout = ChimaeraOutSCSynth4F(s, n, [\base, \lead]);
+ chimout = ChimaeraOutSCSynth4F(s, n, [\synth_0, \synth_1]);
chimin = ChimaeraInTuio2(s, chimconf, chimout);
Routine.run({
- "./instruments4F.sc".load.value(n, \base, \lead);
+ "./instruments4F.sc".load.value(n);
}, clock:AppClock);
});
})