summaryrefslogtreecommitdiff
path: root/lib/MIDI.ck
blob: be808db0953a42114a05b0dea0214b95c78b63ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;