Deluge Firmware
1.3.0
Build date: 2026.08.29
Toggle main menu visibility
Loading...
Searching...
No Matches
isomorphic.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/layout/column_controls.h"
21
22
namespace
deluge::gui::ui::keyboard::layout {
23
24
class
KeyboardLayoutIsomorphic :
public
ColumnControlsKeyboard {
25
public
:
26
KeyboardLayoutIsomorphic() {}
27
~KeyboardLayoutIsomorphic()
override
{}
28
29
void
evaluatePads
(
PressedPad
presses[kMaxNumKeyboardPadPresses])
override
;
30
void
handleVerticalEncoder
(int32_t offset)
override
;
31
void
handleHorizontalEncoder
(int32_t offset,
bool
shiftEnabled,
PressedPad
presses[kMaxNumKeyboardPadPresses],
32
bool
encoderPressed =
false
)
override
;
33
void
precalculate
()
override
;
34
35
void
renderPads
(
RGB
image[][kDisplayWidth + kSideBarWidth])
override
;
36
37
l10n::String name()
override
{
return
l10n::String::STRING_FOR_KEYBOARD_LAYOUT_ISOMORPHIC; }
38
bool
supportsInstrument
()
override
{
return
true
; }
39
bool
supportsKit()
override
{
return
false
; }
40
41
private
:
42
void
offsetPads(int32_t offset,
bool
shiftEnabled);
43
inline
uint8_t noteFromCoords(int32_t x, int32_t y) {
44
return
getState().isomorphic.scrollOffset + x + y * getState().isomorphic.rowInterval;
45
}
46
47
RGB
noteColours[kDisplayHeight * kMaxIsomorphicRowInterval + kDisplayWidth];
48
};
49
50
};
// namespace deluge::gui::ui::keyboard::layout
RGB
This class represents the colour format most used by the Deluge globally.
Definition
rgb.h:14
deluge::gui::ui::keyboard::layout::KeyboardLayoutIsomorphic::precalculate
void precalculate() override
This function is called on visibility change and if colour offset changes.
Definition
isomorphic.cpp:90
deluge::gui::ui::keyboard::layout::KeyboardLayoutIsomorphic::handleHorizontalEncoder
void handleHorizontalEncoder(int32_t offset, bool shiftEnabled, PressedPad presses[kMaxNumKeyboardPadPresses], bool encoderPressed=false) override
Will be called with offset 0 to recalculate bounds on clip changes.
Definition
isomorphic.cpp:50
deluge::gui::ui::keyboard::layout::KeyboardLayoutIsomorphic::renderPads
void renderPads(RGB image[][kDisplayWidth+kSideBarWidth]) override
Handle output.
Definition
isomorphic.cpp:99
deluge::gui::ui::keyboard::layout::KeyboardLayoutIsomorphic::handleVerticalEncoder
void handleVerticalEncoder(int32_t offset) override
Shift state not supplied since that function is already taken.
Definition
isomorphic.cpp:43
deluge::gui::ui::keyboard::layout::KeyboardLayoutIsomorphic::supportsInstrument
bool supportsInstrument() override
This currently includes Synth, MIDI and CV.
Definition
isomorphic.h:38
deluge::gui::ui::keyboard::layout::KeyboardLayoutIsomorphic::evaluatePads
void evaluatePads(PressedPad presses[kMaxNumKeyboardPadPresses]) override
Handle input pad presses.
Definition
isomorphic.cpp:29
deluge::gui::ui::keyboard::PressedPad
Definition
notes_state.h:31