-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdebug.h
76 lines (67 loc) · 1.64 KB
/
debug.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
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
void debug_show_voices_table()
{
Serial.println("--VOICES-------");
for (int i = 0; i < 4; ++i)
{
Serial.print("Voice ");
Serial.print(i);
Serial.print(" :");
Serial.println(VOICES[i]);
}
Serial.println("---------");
}
void debug_show_buttons_table()
{
Serial.println("--BUTTONS-------");
for (int i = 0; i < NUM_BUTTONS; ++i)
{
Serial.print("Button ");
Serial.print(i);
Serial.print(" :");
Serial.println(BUTTON_CURRENT_STATES[i]);
}
Serial.println("---------");
}
void debug_show_pots_table()
{
Serial.println("--POTS----------");
Serial.print("MODULATION (");
Serial.print(POT_MODULATION);
Serial.print("): ");
Serial.println(INPUT_MODULATION);
Serial.print("PITCHBEND (");
Serial.print(POT_PITCHBEND);
Serial.print("): ");
Serial.println(INPUT_PITCHBEND);
Serial.print("WAVEFORM (");
Serial.print(POT_WAVEFORM);
Serial.print("): ");
Serial.println(INPUT_WAVEFORM);
Serial.print("OCTAVE (");
Serial.print(POT_OCTAVE);
Serial.print("): ");
Serial.println(INPUT_OCTAVE);
Serial.println("---------");
}
//void debug_pressed(int btn)
//{
// Serial.print("Button ");
// Serial.print(btn);
// Serial.print(" pressed! Playing [Octave: ");
// Serial.print(CURRENT_OCTAVE);
// Serial.print(", Button: ");
// Serial.print(btn);
// Serial.print(", Voice:");
// Serial.print(FREE_VOICE - 1);
// Serial.print("] = ");
// Serial.println(OCTAVE_TABLE[CURRENT_OCTAVE][btn]);
// print_voice_states();
//}
void debug_show_state()
{
Serial.println("==========");
debug_show_buttons_table();
debug_show_voices_table();
debug_show_pots_table();
Serial.println("==========\n");
}