Deluge Firmware 1.3.0
Build date: 2026.11.28
Loading...
Searching...
No Matches
flash_storage.h
1/*
2 * Copyright © 2015-2023 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 "definitions_cxx.hpp"
21#include "model/scale/preset_scales.h"
22#include <bitset>
23#include <cstdint>
24#include <span>
25
26#define PREVIEW_OFF 0
27#define PREVIEW_ONLY_WHILE_NOT_PLAYING 1
28#define PREVIEW_ON 2
29
30enum class Polarity : uint8_t;
31namespace deluge::usb_audio {
32enum class Mode : uint8_t;
33}
34namespace FlashStorage {
35
36extern uint8_t defaultScale;
37extern bool audioClipRecordMargins;
38extern KeyboardLayout keyboardLayout;
39extern uint8_t
40 recordQuantizeLevel; // Assumes insideWorldTickMagnitude==1, which is not default anymore, so adjust accordingly
41extern uint8_t sampleBrowserPreviewMode;
42extern uint8_t defaultVelocity;
43extern int8_t defaultMagnitude;
44extern bool settingsBeenRead;
45extern uint8_t defaultBendRange[2];
46
47extern SessionLayoutType defaultSessionLayout;
48extern KeyboardLayoutType defaultKeyboardLayout;
49
50extern bool keyboardFunctionsVelocityGlide;
51extern bool keyboardFunctionsModwheelGlide;
52
53extern FavouritesDefaultLayout defaultFavouritesLayout;
54
55extern bool gridEmptyPadsUnarm;
56extern bool gridEmptyPadsCreateRec;
57extern bool gridAllowGreenSelection;
58extern GridDefaultActiveMode defaultGridActiveMode;
59
60extern uint8_t defaultMetronomeVolume;
61
62extern bool automationInterpolate;
63extern bool automationClear;
64extern bool automationShift;
65extern bool automationNudgeNote;
66extern bool automationDisableAuditionPadShortcuts;
67
68extern StartupSongMode defaultStartupSongMode;
69extern uint8_t defaultPadBrightness;
70extern SampleRepeatMode defaultSliceMode;
71extern bool highCPUUsageIndicator;
72extern uint8_t defaultHoldTime;
73extern int32_t holdTime;
74
75extern uint8_t defaultSwingInterval;
76
77extern std::bitset<NUM_PRESET_SCALES> defaultDisabledPresetScales;
78
79extern bool accessibilityShortcuts;
80extern MenuHighlighting accessibilityMenuHighlighting;
81
82extern OutputType defaultNewClipType;
83extern bool defaultUseLastClipType;
85extern ScreensaverMode screensaverMode;
88extern uint8_t screensaverTimeoutMinutes;
89
90extern ThresholdRecordingMode defaultThresholdRecordingMode;
91
92extern Polarity defaultPatchCablePolarity;
93
96extern deluge::usb_audio::Mode usbAudioMode;
97
98void readSettings();
99void writeSettings();
100void resetSettings();
101void factoryReset(bool showPopup = true);
102void resetAutomationSettings();
103
107bool areLegacyMidiFollowSettingsPending();
108
110void clearLegacyMidiFollowSettingsPending();
111
112} // namespace FlashStorage