aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2014-10-01 15:26:54 +0200
committerGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2014-10-01 15:26:54 +0200
commitc8c1c3379bb675059322482be723ecd7a01765e9 (patch)
treec82fab33d0005420c5774393d690033742502652
parent89e4797b5645fee34c9ef6cf20d5b84a30883f15 (diff)
downloadchimaera_sc-c8c1c3379bb675059322482be723ecd7a01765e9.zip
chimaera_sc-c8c1c3379bb675059322482be723ecd7a01765e9.tar.gz
chimaera_sc-c8c1c3379bb675059322482be723ecd7a01765e9.tar.bz2
chimaera_sc-c8c1c3379bb675059322482be723ecd7a01765e9.tar.xz
mfr14 snapshot
-rwxr-xr-xignore/dummy_to_scsynth2F.sc2
-rw-r--r--ignore/instruments2F.sc8
-rwxr-xr-xignore/mfr14.sc87
-rwxr-xr-xignore/osc_to_scsynth2F.sc7
-rwxr-xr-xignore/scsynth_to_scsynth2F.sc4
-rwxr-xr-xignore/tuio2_to_scsynth2F.sc2
6 files changed, 98 insertions, 12 deletions
diff --git a/ignore/dummy_to_scsynth2F.sc b/ignore/dummy_to_scsynth2F.sc
index 9dd20ff..c1586ca 100755
--- a/ignore/dummy_to_scsynth2F.sc
+++ b/ignore/dummy_to_scsynth2F.sc
@@ -57,6 +57,6 @@ s.doWhenBooted({
var n = msg[0];
chimout = ChimaeraOutSCSynth2F(s, n, [\base, \lead]);
chimin = ChimaeraInDummy(s, chimconf, rx, chimout);
- Routine.run({"./instruments2F.sc".load.value(n);}, clock:AppClock);
+ Routine.run({"./instruments2F.sc".load.value(n, \base, \lead);}, clock:AppClock);
});
})
diff --git a/ignore/instruments2F.sc b/ignore/instruments2F.sc
index 4d2dd2c..2188393 100644
--- a/ignore/instruments2F.sc
+++ b/ignore/instruments2F.sc
@@ -21,7 +21,7 @@
* distribution.
*/
-{|n|
+{|n, baseSym, leadSym|
var baseInst, leadInst, loadInst, win, adrop, bdrop, path;
/*
@@ -47,17 +47,17 @@
loadInst.value(\base, baseInst[0]);
loadInst.value(\lead, leadInst[0]);
- win = Window.new("2F Instruments", Rect(200,200,400,100)).front;
+ win = Window.new("2F Instruments ("++n++")", Rect(200,200,400,100)).front;
adrop = PopUpMenu(win, Rect(10,10,180,20));
adrop.items = baseInst;
adrop.action = {|menu|
- loadInst.value(\base, menu.item);
+ loadInst.value(baseSym, menu.item);
};
bdrop = PopUpMenu(win, Rect(200,10,180,20));
bdrop.items = leadInst;
bdrop.action = {|menu|
- loadInst.value(\lead, menu.item);
+ loadInst.value(leadSym, menu.item);
};
}
diff --git a/ignore/mfr14.sc b/ignore/mfr14.sc
new file mode 100755
index 0000000..60b0779
--- /dev/null
+++ b/ignore/mfr14.sc
@@ -0,0 +1,87 @@
+#!/usr/bin/env optsclang
+
+/*
+ * 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
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ * claim that you wrote the original software. If you use this software
+ * in a product, an acknowledgment in the product documentation would be
+ * appreciated but is not required.
+ *
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ * misrepresented as being the original software.
+ *
+ * 3. This notice may not be removed or altered from any source
+ * distribution.
+ */
+
+s.options.blockSize = 0x10;
+s.options.memSize = 0x10000;
+s.options.numInputBusChannels = 0;
+s.options.numOutputBusChannels = 10;
+s.latency = nil;
+s.boot;
+
+s.doWhenBooted({
+ var gidOffset, mix;
+
+ gidOffset = 100;
+
+ s.sendMsg('/g_new', 0+gidOffset, \addToHead.asInt, 0);
+ s.sendMsg('/g_new', 1+gidOffset, \addToHead.asInt, 0);
+ s.sendMsg('/g_new', 2+gidOffset, \addToHead.asInt, 0);
+ s.sendMsg('/g_new', 3+gidOffset, \addToHead.asInt, 0);
+ s.sendMsg('/g_new', 4+gidOffset, \addToHead.asInt, 0);
+ s.sendMsg('/g_new', 5+gidOffset, \addToHead.asInt, 0);
+ s.sendMsg('/g_new', 6+gidOffset, \addToHead.asInt, 0);
+ s.sendMsg('/g_new', 7+gidOffset, \addToHead.asInt, 0);
+
+ s.sendMsg('/g_new', 8+gidOffset, \addToHead.asInt, 0); // mix
+ s.sync;
+
+ SynthDef(\mixer, {|g0=0, g1=0, g2=0, g3=0, g4=0, g5=0, g6=0, g7=0|
+ var a0, a1, a2, a3, a4, a5, a6, a7;
+ var p0, p1, p2, p3, p4, p5, p6, p7;
+
+ // audio from SuperCollider
+ a0 = InFeedback.ar(2) * g0; // base1
+ a1 = InFeedback.ar(3) * g1; // lead1
+ a2 = InFeedback.ar(4) * g2; // base2
+ a3 = InFeedback.ar(5) * g3; // lead2
+ a4 = InFeedback.ar(6) * g4; // base3
+ a5 = InFeedback.ar(7) * g5; // lead3
+ a6 = InFeedback.ar(8) * g6; // base4
+ a7 = InFeedback.ar(9) * g7; // lead4
+
+ // mix four mono channels to stereo
+ p0 = Pan2.ar(a0, -1);
+ p1 = Pan2.ar(a1, 1);
+ p2 = Pan2.ar(a2, -1);
+ p3 = Pan2.ar(a3, 1);
+ p4 = Pan2.ar(a4, -1);
+ p5 = Pan2.ar(a5, 1);
+ p6 = Pan2.ar(a6, -1);
+ p7 = Pan2.ar(a7, 1);
+
+ OffsetOut.ar([0,1], Mix.ar([p0, p1, p2, p3, p4, p5, p6, p7]));
+ }).add;
+ s.sync;
+
+ mix = Synth(\mixer, target:8+gidOffset, addAction:\addToHead);
+ s.sync;
+
+ // /n_set iif 108 0 0.5
+
+ "./instruments2F.sc".load.value(96, \base1, \lead1); // mini
+ //"./instruments2F.sc".load.value(128, \base2, \lead2); // midi
+ "./instruments2F.sc".load.value(128, \base3, \lead3); // medi
+ "./instruments2F.sc".load.value(160, \base4, \lead4); // maxi
+})
diff --git a/ignore/osc_to_scsynth2F.sc b/ignore/osc_to_scsynth2F.sc
index 58207bc..7a55668 100755
--- a/ignore/osc_to_scsynth2F.sc
+++ b/ignore/osc_to_scsynth2F.sc
@@ -1,4 +1,4 @@
-#!/usr/bin/env sclang
+#!/usr/bin/env optsclang
/*
* Copyright (c) 2014 Hanspeter Portner (dev@open-music-kontrollers.ch)
@@ -29,14 +29,13 @@ s.latency = nil;
s.boot;
s.doWhenBooted({
- var hostname, tx, chimconf, rate, sidOffset, gidOffset;
+ var gidOffset;
gidOffset = 100;
- sidOffset = 200;
s.sendMsg('/g_new', 0+gidOffset, \addToHead.asInt, 0);
s.sendMsg('/g_new', 1+gidOffset, \addToHead.asInt, 0);
s.sync;
- "./instruments2F.sc".load.value(128);
+ "./instruments2F.sc".load.value(96, \base, \lead);
})
diff --git a/ignore/scsynth_to_scsynth2F.sc b/ignore/scsynth_to_scsynth2F.sc
index c407099..10bcdcc 100755
--- a/ignore/scsynth_to_scsynth2F.sc
+++ b/ignore/scsynth_to_scsynth2F.sc
@@ -51,7 +51,7 @@ s.doWhenBooted({
rate = 3000;
chimconf.sendMsg("/engines/enabled", false);
chimconf.sendMsg("/engines/reset");
- chimconf.sendMsg("/engines/offset", 0.002);
+ chimconf.sendMsg("/engines/offset", 0.0025);
chimconf.sendMsg("/engines/address", hostname++":"++s.addr.port, {
chimconf.sendMsg("/engines/server", false);
chimconf.sendMsg("/engines/mode", "osc.tcp");
@@ -74,7 +74,7 @@ s.doWhenBooted({
chimconf.sendMsg("/sensors/number", {|msg|
var n=msg[0];
Routine.run({
- "./instruments2F.sc".load.value(n);
+ "./instruments2F.sc".load.value(n, \base, \lead);
}, clock:AppClock);
});
})
diff --git a/ignore/tuio2_to_scsynth2F.sc b/ignore/tuio2_to_scsynth2F.sc
index c67cd95..0c65353 100755
--- a/ignore/tuio2_to_scsynth2F.sc
+++ b/ignore/tuio2_to_scsynth2F.sc
@@ -59,6 +59,6 @@ s.doWhenBooted({
var n = msg[0];
chimout = ChimaeraOutSCSynth2F(s, n, [\base, \lead]);
chimin = ChimaeraInTuio2(s, chimconf, rx, chimout);
- Routine.run({"./instruments2F.sc".load.value(n);}, clock:AppClock);
+ Routine.run({"./instruments2F.sc".load.value(n, \base, \lead);}, clock:AppClock);
});
})