From 7f8536b4a6d7fd06b1cd4929f548d241183c09cd Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Mon, 16 Apr 2012 17:09:49 +0200 Subject: initial import of files relevant for noise project --- lib/MIDI.ck | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lib/MIDI.ck (limited to 'lib/MIDI.ck') diff --git a/lib/MIDI.ck b/lib/MIDI.ck new file mode 100644 index 0000000..be808db --- /dev/null +++ b/lib/MIDI.ck @@ -0,0 +1,18 @@ +/* + * Global MIDI tools + */ +public class MIDI { + static int channels; + + static int noteOff; + static int noteOn; + + fun static int + isCmd(int data, int cmd) + { + return data >= cmd && data < cmd + channels; + } +} +0x10 => MIDI.channels; +0x80 => MIDI.noteOff; +0x90 => MIDI.noteOn; -- cgit v1.2.3