-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUI.h
36 lines (23 loc) · 856 Bytes
/
UI.h
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
#ifndef UI_INCLUDED
#define UI_INCLUDED
// config
#define BUTTON_PIN_1 A0
#define BUTTON_PIN_2 8
#define MODE_STANDBY 0
#define MODE_EUCLIDIAN 1
#define MODE_EUCLIDIAN_MUTATION 2
#define MODE_RANDOM 3
#define MODE_EXPERIMENTAL 4
#define NUM_DEMO_MODES 5
#define UI_BUTTON_PRESSED_INDICATOR_INTERVAL 500 // duration to show on the pixels that a button has been pressed
#define ACTION_NONE 0
#define ACTION_MODE_CHANGE 1
#define ACTION_RESET_EUCLIDIAN 2
#define CC_DEMO_MODE 19 // choose playback mode - 0=None, 1=Euclidian, 2=Euclidian with mutation, 3=Random triggers
short demo_mode = 0;
unsigned long button_pressed_at = 0;
int ui_last_action = ACTION_NONE;
void setup_buttons();
void update_buttons();
bool handle_ui_ccs(int channel, int number, int value);
#endif