-
Notifications
You must be signed in to change notification settings - Fork 0
/
Midi.txt
73 lines (61 loc) · 1.42 KB
/
Midi.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Accessing Raw Midi Data
// data[0] will be the status byte
// data[1] and data[2] will contain the parameter of the message (e.g. pitch and volume for noteOn noteOff)
// N.B. In some cases (noteOn, noteOff, controllerChange, etc) the first half of the status byte is the command and the second half if the channel
// In these cases (data[0] & 0xF0) gives you the command and (data[0] & 0x0F) gives you the channel
// Conversions for Midi Bytes
byte[] data = java MidiMessage.getMessage();
int byte0a = (int)(data[0] & 0xF0); //midi command
int byte0b = (int)(data[0] & 0x0F); //midi channel
int byte1 = data[1] & 0xFF; //param1 noteOn/off, CCNumber
int byte2 = data[2] & 0xFF; //param2 velocity , CCValue
APC40 live sysex handShake
1) live ->
message SysexMessage (id=1763)
data (id=1764)
[0] -16
[1] 126
[2] 0
[3] 6
[4] 1
[5] -9
length 6
[-16, 126, 0, 6, 1, -9]
2) apc ->
data (id=1771)
[0] -16
[1] 126
[2] 0
[3] 6
[4] 2
[5] 71
[6] 115
[7] 0
[8] 25
[9] 0
[10] 1
[11] 0
[12] 0
[13] 0
[14] 127
[15] 127
[16] 127
[17] 127
[18] 0
[19] 75
[20] 2
[21] 0
[22] 9
[23] 0
[24] 9
[25] 0
[26] 2
[27] 3
[28] 8
[29] 0
[30] 2
[31] 4
[32] 7
[33] 0
[34] -9
[-16, 126, 0, 6, 2, 71, 115, 0, 25, 0, 1, 0, 0, 0, 127, 127, 127, 127, 0, 75, 2, 0, 9, 0, 9, 0, 2, 3, 8, 0, 2, 4, 7, 0, -9]