Deluge Firmware
1.3.0
Build date: 2026.08.16
Toggle main menu visibility
Loading...
Searching...
No Matches
mod_controllable.h
1
/*
2
* Copyright © 2016-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
#include "definitions_cxx.hpp"
20
#include "modulation/params/param.h"
21
22
class
ParamManagerForTimeline
;
23
class
ParamManagerForTimeline
;
24
class
InstrumentClip
;
25
class
Action
;
26
class
ParamManagerForTimeline
;
27
class
AutoParam
;
28
class
ParamCollection
;
29
class
Sound
;
30
class
TimelineCounter
;
31
class
ModelStackWithAutoParam
;
32
class
ModelStackWithThreeMainThings
;
33
class
MIDIKnob
;
34
class
ModelStackWithSoundFlags
;
35
40
class
ModControllable {
41
public
:
42
ModControllable() =
default
;
43
virtual
~ModControllable() =
default
;
44
virtual
bool
modEncoderButtonAction(uint8_t whichModEncoder,
bool
on,
ModelStackWithThreeMainThings
* modelStack) {
45
return
false
;
46
}
// Returns whether Instrument was changed
47
virtual
void
modButtonAction(uint8_t whichModButton,
bool
on,
ParamManagerForTimeline
* paramManager) {};
48
virtual
ModelStackWithAutoParam
*
49
getParamFromModEncoder(int32_t whichModEncoder,
ModelStackWithThreeMainThings
* modelStack,
50
bool
allowCreation =
true
);
// Check that autoParam isn't NULL, after calling this.
51
53
virtual
ModelStackWithAutoParam
*
getParamFromMIDIKnob
(
MIDIKnob
& knob,
ModelStackWithThreeMainThings
* modelStack);
54
55
virtual
uint8_t* getModKnobMode();
// Return NULL if different modes not supported
56
virtual
bool
isKit() {
return
false
; }
57
virtual
bool
isSong() {
return
false
; }
58
virtual
bool
isEditingComp() {
return
false
; }
59
virtual
bool
valueChangedEnoughToMatter(int32_t old_value, int32_t new_value,
deluge::modulation::params::Kind
kind,
60
uint32_t paramID) {
61
return
old_value != new_value;
62
}
63
virtual
int32_t getKnobPosForNonExistentParam(
64
int32_t whichModEncoder,
65
ModelStackWithAutoParam
* modelStack);
// modelStack->autoParam will be NULL in this rare case!!
66
virtual
ActionResult modEncoderActionForNonExistentParam(int32_t offset, int32_t whichModEncoder,
67
ModelStackWithAutoParam
* modelStack) {
68
return
ActionResult::NOT_DEALT_WITH;
69
}
70
virtual
bool
allowNoteTails(
ModelStackWithSoundFlags
* modelStack,
bool
disregardSampleLoop =
false
) {
return
true
; }
71
virtual
void
polyphonicExpressionEventOnChannelOrNote(int32_t newValue, int32_t expressionDimension,
72
int32_t channelOrNoteNumber,
73
MIDICharacteristic whichCharacteristic) {}
74
virtual
void
monophonicExpressionEvent(int32_t newValue, int32_t expressionDimension) {}
75
76
protected
:
81
deluge::modulation::params::Kind
unpatchedParamKind_
;
82
};
Action
Definition
action.h:79
AutoParam
Definition
auto_param.h:44
InstrumentClip
Definition
instrument_clip.h:48
MIDIKnob
Definition
knob.h:34
ModControllable::unpatchedParamKind_
deluge::modulation::params::Kind unpatchedParamKind_
Definition
mod_controllable.h:81
ModControllable::getParamFromMIDIKnob
virtual ModelStackWithAutoParam * getParamFromMIDIKnob(MIDIKnob &knob, ModelStackWithThreeMainThings *modelStack)
Check that autoParam isn't NULL, after calling this.
Definition
mod_controllable.cpp:40
ModelStackWithAutoParam
Definition
model_stack.h:269
ModelStackWithSoundFlags
Definition
model_stack.h:287
ModelStackWithThreeMainThings
Definition
model_stack.h:231
ParamCollection
Definition
param_collection.h:39
ParamManagerForTimeline
Definition
param_manager.h:174
Sound
Definition
sound.h:71
TimelineCounter
Definition
timeline_counter.h:28
deluge::modulation::params::Kind
Kind
Definition
param.h:42