Deluge Firmware 1.3.0
Build date: 2025.04.16
Loading...
Searching...
No Matches
column_control_state.h
1/*
2 * Copyright © 2016-2024 Synthstrom Audible Limited
3 *
4 * This file is part of The Synthstrom Audible Deluge Firmware.
5 *
6 * The Synthstrom Audible Deluge Firmware is free software: you can redistribute it and/or modify it under the
7 * terms of the GNU General Public License as published by the Free Software Foundation,
8 * either version 3 of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 * See the GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along with this program.
15 * If not, see <https://www.gnu.org/licenses/>.
16 */
17
18#pragma once
19
20#include "gui/ui/keyboard/column_controls/chord.h"
21#include "gui/ui/keyboard/column_controls/chord_mem.h"
22#include "gui/ui/keyboard/column_controls/dx.h"
23#include "gui/ui/keyboard/column_controls/mod.h"
24#include "gui/ui/keyboard/column_controls/scale_mode.h"
25#include "gui/ui/keyboard/column_controls/session.h"
26#include "gui/ui/keyboard/column_controls/song_chord_mem.h"
27#include "gui/ui/keyboard/column_controls/velocity.h"
28
29namespace deluge::gui::ui::keyboard::layout {
30
31enum ColumnControlFunction : int8_t {
32 VELOCITY = 0,
33 MOD,
34 CHORD,
35 SONG_CHORD_MEM,
36 CHORD_MEM,
37 SCALE_MODE,
38 DX,
39 SESSION,
40 // BEAT_REPEAT,
41 COL_CTRL_FUNC_MAX,
42};
43
44using namespace deluge::gui::ui::keyboard::controls;
45
47 VelocityColumn velocityColumn{64};
48
49 ModColumn modColumn{};
50 ChordColumn chordColumn{};
51 SongChordMemColumn songChordMemColumn{};
52 ChordMemColumn chordMemColumn{};
53 ScaleModeColumn scaleModeColumn{};
54 DXColumn dxColumn{};
55 SessionColumn sessionColumn{};
56
57 ColumnControlFunction leftColFunc = VELOCITY;
58 ColumnControlFunction lastLeftFunc = VELOCITY; // Used to restore the left column function after a temporary change
59 ColumnControlFunction rightColFunc = MOD;
60 bool rightColSetAtRuntime = false;
61 ControlColumn* leftCol = &velocityColumn;
62 ControlColumn* rightCol = &modColumn;
63
64 ControlColumn* getColumnForFunc(ColumnControlFunction func);
65
66 void writeToFile(Serializer& writer);
67 void readFromFile(Deserializer& reader);
68};
69
70} // namespace deluge::gui::ui::keyboard::layout
Definition storage_manager.h:185
Definition storage_manager.h:119
Definition column_control_state.h:46