Control Surface  1.1.0
MIDI Control Surface library for Arduino
Settings/Settings.hpp
Go to the documentation of this file.
1 #ifndef CS_SETTINGSWRAPPER_HPP
2 #error "Do not include this file directly, use the wrapper!"
3 #endif
4 
5 /**
6  * @file Settings.hpp
7  *
8  * @brief All user settings and debugging options can be changed here.
9  */
10 
11 #include "NamespaceSettings.hpp"
12 #include <stddef.h>
13 #include <stdint.h>
14 
16 
17 // ----------------------------- Debug Settings ----------------------------- //
18 // ========================================================================== //
19 
20 /// The debug output.
21 // #define DEBUG_OUT Serial
22 
23 // #define DEBUG_MIDI_PACKETS
24 
25 /// Exit when encountering an error, instead of trying to recover (recommended).
26 #define FATAL_ERRORS
27 
28 // ----------------------------- User Settings ------------------------------ //
29 // ========================================================================== //
30 
31 /// The time in milliseconds it takes for the VU meter display peak bar to drop
32 /// one unit (i.e. one twelfth of the complete scale).
33 constexpr unsigned long VU_PEAK_DECAY_TIME = 300; // milliseconds
34 
35 /// The time in milliseconds that a VU meter display peak bar stays at the peak
36 /// before decaying.
37 constexpr unsigned long VU_PEAK_HOLD_TIME = 400; // milliseconds
38 
39 /// If set to true, the VU meter display peak bars will decay smoothly (i.e. one
40 /// pixel at a time), if set to false, they will decay one unit at a time. */
41 constexpr bool VU_PEAK_SMOOTH_DECAY = true;
42 
43 /// Determines when a note input should be interpreted as 'on'.
44 constexpr uint8_t NOTE_VELOCITY_THRESHOLD = 1;
45 
46 /// Don't parse incoming System Exclusive messages.
47 #define IGNORE_SYSEX 0
48 
49 /** The length of the maximum System Exclusive message
50  * that can be received. The maximum length sent by
51  * the MCU protocol is 120 bytes.
52  */
53 constexpr size_t SYSEX_BUFFER_SIZE = 128;
54 
55 /// The baud rate to use for Hairless MIDI.
56 constexpr unsigned long HAIRLESS_BAUD = 115200;
57 
58 /// The maximum frame rate of the displays.
59 constexpr uint8_t MAX_FPS = 60;
60 
61 // ========================================================================== //
62 
HAIRLESS_BAUD
constexpr unsigned long HAIRLESS_BAUD
The baud rate to use for Hairless MIDI.
Definition: Settings/Settings.hpp:56
NamespaceSettings.hpp
BEGIN_CS_NAMESPACE
#define BEGIN_CS_NAMESPACE
Definition: Settings/NamespaceSettings.hpp:9
VU_PEAK_HOLD_TIME
constexpr unsigned long VU_PEAK_HOLD_TIME
The time in milliseconds that a VU meter display peak bar stays at the peak before decaying.
Definition: Settings/Settings.hpp:37
END_CS_NAMESPACE
#define END_CS_NAMESPACE
Definition: Settings/NamespaceSettings.hpp:10
MAX_FPS
constexpr uint8_t MAX_FPS
The maximum frame rate of the displays.
Definition: Settings/Settings.hpp:59
VU_PEAK_DECAY_TIME
constexpr unsigned long VU_PEAK_DECAY_TIME
The time in milliseconds it takes for the VU meter display peak bar to drop one unit (i....
Definition: Settings/Settings.hpp:33
NOTE_VELOCITY_THRESHOLD
constexpr uint8_t NOTE_VELOCITY_THRESHOLD
Determines when a note input should be interpreted as 'on'.
Definition: Settings/Settings.hpp:44
VU_PEAK_SMOOTH_DECAY
constexpr bool VU_PEAK_SMOOTH_DECAY
If set to true, the VU meter display peak bars will decay smoothly (i.e.
Definition: Settings/Settings.hpp:41
SYSEX_BUFFER_SIZE
constexpr size_t SYSEX_BUFFER_SIZE
The length of the maximum System Exclusive message that can be received.
Definition: Settings/Settings.hpp:53