summaryrefslogtreecommitdiff
path: root/lib/Oscope.ck
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-04-28 22:21:17 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-04-28 22:21:17 +0200
commitf0a637fe7fce13ffe63b96bdfaf675636f71c3da (patch)
treecc4baa6b9a873a283bbbc203d267c78ea972e276 /lib/Oscope.ck
parentd572febd57e507b7d04dfa2111f048f11dfca4d1 (diff)
downloaddigitale-debutanten-f0a637fe7fce13ffe63b96bdfaf675636f71c3da.tar.gz
robust MIDI setup, configurable LFO oscillator waveform, multiple LFO shred support
Diffstat (limited to 'lib/Oscope.ck')
-rw-r--r--lib/Oscope.ck13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/Oscope.ck b/lib/Oscope.ck
index 5849b3f..b18a0b2 100644
--- a/lib/Oscope.ck
+++ b/lib/Oscope.ck
@@ -78,26 +78,25 @@ for (0 => int i; i < Bus.oscope.cap(); i++)
* jack.scope configuration via MIDI (Channel/Scene 1)
*/
/* FIXME: custom nanoKONTROL events */
-if (me.args() > 1)
+if (me.args() > 0)
me.exit();
-1 => int device;
-if (me.args() == 1)
- me.arg(0) => Std.atoi => device;
-
MidiIn min;
-if (!min.open(device))
+/* always open MIDI Through port, actual connection is done by Jack */
+if (!min.open(0))
me.exit();
<<< "MIDI device:", min.num(), " -> ", min.name() >>>;
+3 => int on_channel; /* scene 4 */
+
while (min => now) {
while (MidiMsg msg => min.recv) {
msg.data1 & 0x0F => int channel;
msg.data1 & 0xF0 => int cmd;
(msg.data3 $ float)/127 => float value;
- if (channel == 1 && cmd == 0xB0) {
+ if (channel == on_channel && cmd == 0xB0) {
<<< "Channel:", channel, "Command:", cmd, "Controller:", msg.data2, "Value:", value >>>;
if (msg.data2 == 67) {