aboutsummaryrefslogtreecommitdiff
path: root/src/adlmidi_midiplay.hpp
diff options
context:
space:
mode:
authorWohlstand <admin@wohlnet.ru>2020-09-03 00:46:53 +0300
committerWohlstand <admin@wohlnet.ru>2020-09-03 00:46:53 +0300
commitadd55f65c5727bfab338be16e6548f9af8756048 (patch)
tree3955e14974ffacab98a7939e1c23fb637c68fc30 /src/adlmidi_midiplay.hpp
parent9d34329f81f9d2588c27d828aaaf3a3d5f222da3 (diff)
downloadlibADLMIDI-add55f65c5727bfab338be16e6548f9af8756048.tar.gz
libADLMIDI-add55f65c5727bfab338be16e6548f9af8756048.tar.bz2
libADLMIDI-add55f65c5727bfab338be16e6548f9af8756048.zip
Fixed an incorrect logic of CC121
Issue #227
Diffstat (limited to 'src/adlmidi_midiplay.hpp')
-rw-r--r--src/adlmidi_midiplay.hpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/adlmidi_midiplay.hpp b/src/adlmidi_midiplay.hpp
index 93b36e9..7eaf51d 100644
--- a/src/adlmidi_midiplay.hpp
+++ b/src/adlmidi_midiplay.hpp
@@ -327,11 +327,21 @@ public:
*/
void resetAllControllers()
{
+ volume = def_volume;
+ brightness = 127;
+
+ resetAllControllers121();
+ }
+
+ /**
+ * @brief Reset all MIDI controllers into initial state (CC121)
+ */
+ void resetAllControllers121()
+ {
bend = 0;
bendsense_msb = def_bendsense_msb;
bendsense_lsb = def_bendsense_lsb;
updateBendSensitivity();
- volume = def_volume;
expression = 127;
sustain = false;
softPedal = false;
@@ -347,7 +357,6 @@ public:
portamentoEnable = false;
portamentoSource = -1;
portamentoRate = HUGE_VAL;
- brightness = 127;
}
/**