Deluge Firmware
1.3.0
Build date: 2026.08.29
Toggle main menu visibility
Loading...
Searching...
No Matches
instrument_clip_minder.h
1
/*
2
* Copyright © 2014-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 "hid/button.h"
22
#include "hid/display/oled_canvas/canvas.h"
23
#include "model/clip/clip_minder.h"
24
#include "model/scale/preset_scales.h"
25
26
#include <cstdint>
27
28
class
InstrumentClip
;
29
class
Output
;
30
class
ModelStack
;
31
32
// This class performs operations on an InstrumentClip that are common to both the InstrumentClipView,
33
// AutomationInstrumentClipView and KeyboardView.
34
35
class
InstrumentClipMinder :
public
ClipMinder
{
36
public
:
37
InstrumentClipMinder();
38
static
void
redrawNumericDisplay();
39
virtual
void
displayOrLanguageChanged();
40
bool
createNewInstrument(OutputType newOutputType,
bool
is_dx =
false
);
41
void
setLedStates();
42
virtual
void
focusRegained();
43
virtual
ActionResult buttonAction(deluge::hid::Button b,
bool
on,
bool
inCardRoutine);
44
void
calculateDefaultRootNote();
45
void
drawActualNoteCode(int16_t noteCode);
46
void
cycleThroughScales();
47
bool
setScale(Scale newScale);
48
void
displayScaleName(Scale scale);
49
void
displayCurrentScaleName();
50
void
selectEncoderAction(int32_t offset);
51
static
void
drawMIDIControlNumber(int32_t controlNumber,
bool
automationExists);
52
static
bool
makeCurrentClipActiveOnInstrumentIfPossible(
ModelStack
* modelStack);
53
bool
changeOutputType(OutputType newOutputType);
54
55
void
renderOLED(
deluge::hid::display::oled_canvas::Canvas
& canvas);
56
57
static
int16_t defaultRootNote;
// Stores the calculated "default" root note between the user pressing the
58
// scale-mode button and releasing it
59
static
bool
toggleScaleModeOnButtonRelease;
60
static
uint32_t scaleButtonPressTime;
61
static
bool
flashDefaultRootNoteOn;
62
63
static
uint8_t editingMIDICCForWhichModKnob;
64
};
ClipMinder
Definition
clip_minder.h:23
InstrumentClip
Definition
instrument_clip.h:48
ModelStack
Definition
model_stack.h:123
Output
Definition
output.h:81
deluge::hid::display::oled_canvas::Canvas
Definition
canvas.h:52