Deluge Firmware
1.3.0
Build date: 2026.11.28
Toggle main menu visibility
Loading...
Searching...
No Matches
velocity_fold.h
1
/*
2
* Copyright © 2026 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/views/automation/editor_layout/note/velocity_edit.h"
21
26
class
VelocityFold
:
public
AutomationEditorLayout {
27
public
:
28
bool
isFolded();
30
void
affectEntireChanged
();
31
32
void
render
(
InstrumentClip
* clip,
RGB
image[][kDisplayWidth + kSideBarWidth],
33
uint8_t occupancyMask[][kDisplayWidth + kSideBarWidth]);
34
void
padAction(
InstrumentClip
* clip, int32_t x, int32_t y, int32_t velocity);
35
36
bool
anyPadPresses()
const
{
return
numPadPresses > 0; }
38
void
adjustHeldVelocity
(
InstrumentClip
* clip, int32_t offset);
39
void
endPadPresses();
40
41
private
:
42
struct
PadPress
{
43
bool
isActive;
44
int32_t xDisplay;
45
int32_t yDisplay;
46
int32_t startPos;
47
int32_t endPos;
48
};
49
50
void
padRelease(int32_t x, int32_t y);
51
void
setStepVelocity
(
InstrumentClip
* clip,
Action
* action, int32_t x, int32_t targetVelocity);
52
53
bool
foldedNonKit{
false
};
54
PadPress
padPresses[kEditPadPressBufferSize]{};
55
int32_t numPadPresses{0};
56
velocity_edit::Ramp ramp;
57
};
Action
Definition
action.h:78
InstrumentClip
Definition
instrument_clip.h:52
RGB
This class represents the colour format most used by the Deluge globally.
Definition
rgb.h:14
VelocityFold
Definition
velocity_fold.h:26
VelocityFold::render
void render(InstrumentClip *clip, RGB image[][kDisplayWidth+kSideBarWidth], uint8_t occupancyMask[][kDisplayWidth+kSideBarWidth])
Definition
velocity_fold.cpp:99
VelocityFold::affectEntireChanged
void affectEntireChanged()
call after affect entire was pressed in the note editor (and the kit's affect entire toggled)
Definition
velocity_fold.cpp:83
VelocityFold::adjustHeldVelocity
void adjustHeldVelocity(InstrumentClip *clip, int32_t offset)
fine tune the velocity of every note on the held steps with the horizontal encoder
Definition
velocity_fold.cpp:261
VelocityFold::setStepVelocity
void setStepVelocity(InstrumentClip *clip, Action *action, int32_t x, int32_t targetVelocity)
scale every note starting on step x in every note row so the highest one becomes targetVelocity
Definition
velocity_fold.cpp:178
PadPress
Definition
performance_view.h:33
VelocityFold::PadPress
Definition
velocity_fold.h:42