launchkey_sdk/launchkey/modes/pad_mode.rs
1use crate::bidirectional_enum_mappings;
2
3#[derive(Debug, Clone)]
4pub enum PadMode {
5 /// Used for controlling Digital Audio Workstations.
6 DAW,
7
8 /// Pads function as drum triggers in standalone (MIDI) mode.
9 Drum,
10
11 /// Activates a DAW-controlled drum mode,
12 /// allowing the DAW to manage pad colors and receive MIDI messages
13 /// through the DAW MIDI port. Selecting `Drum` will disable this mode
14 /// and return to standalone drum operation.
15 DrumDAW,
16
17 /// Pads trigger custom chord mappings.
18 UserChords,
19
20 /// Chord Map mode: Pads trigger predefined chord progressions.
21 ChordMap,
22
23 /// User-defined pad mapping (slot 1).
24 Custom1,
25
26 /// User-defined pad mapping (slot 2).
27 Custom2,
28
29 /// User-defined pad mapping (slot 3).
30 Custom3,
31
32 /// User-defined pad mapping (slot 4).
33 Custom4,
34
35 /// Pads trigger arpeggiator patterns.
36 ArpPattern,
37}
38
39bidirectional_enum_mappings!(PadMode, u8, {
40 DAW => 0x02,
41 Drum => 0x01,
42 DrumDAW => 0x0F,
43 UserChords => 0x04,
44 ChordMap => 0x0E,
45 Custom1 => 0x05,
46 Custom2 => 0x06,
47 Custom3 => 0x07,
48 Custom4 => 0x08,
49 ArpPattern => 0x0D,
50});