-
Notifications
You must be signed in to change notification settings - Fork 0
/
launchpad_constants.js
86 lines (78 loc) · 1.46 KB
/
launchpad_constants.js
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
74
75
76
77
78
79
80
81
82
83
84
85
86
// CCs for the Top buttons
var TopButton =
{
CURSOR_UP:104,
CURSOR_DOWN:105,
CURSOR_LEFT:106,
CURSOR_RIGHT:107,
SESSION:108,
USER1:109,
USER2:110,
MIXER:111
};
// CCs for the Mixer Buttons
var MixerButton =
{
VOLUME:0,
PAN:1,
SEND_A:2,
SEND_B:3,
STOP:4,
TRK_ON:5,
SOLO:6,
ARM:7
};
// Called the scripts mainly within launchpad_grid
// It is used for the Bitwig logo and the VUmeter
function mixColour(red, green, blink)
{
return (blink ? 8 : 12) | red | (green * 16);
}
// Defines the values to be sent for the colours
var Colour = // Novation are from the UK
{
OFF:12,
RED_LOW:13,
RED_FULL:15,
AMBER_LOW:29,
AMBER_FULL:63,
YELLOW_FULL:62,
YELLOW_LOW: 0x2D,
ORANGE:39,
LIME:0x3D,
HEADER:mixColour(0,1,false),
GREEN_LOW:28,
GREEN_FULL:60,
RED_FLASHING:11,
AMBER_FLASHING:59,
YELLOW_FLASHING:58,
GREEN_FLASHING:56
};
// defines the LED locations with the pending and active LED arrays for the lights
// They are used in the format LED.SCENE
var LED =
{
GRID:0,
SCENE:64,
TOP:72,
CURSOR_UP:0,
CURSOR_DOWN:1,
CURSOR_LEFT:2,
CURSOR_RIGHT:3,
SESSION:4,
USER1:5,
USER2:6,
MIXER:7,
VOLUME:0,
PAN:1,
SEND_A:2,
SEND_B:3,
STOP:4,
TRK_ON:5,
SOLO:6,
ARM:7
};
// Number of tracks, sends and scenes, they are called from the Launchpad.control.js file only during the init() function
var NUM_TRACKS = 8;
var NUM_SENDS = 2;
var NUM_SCENES = 8;