aboutsummaryrefslogtreecommitdiff
path: root/src/adlmidi_private.hpp
diff options
context:
space:
mode:
authorVitaly Novichkov <admin@wohlnet.ru>2018-06-23 06:40:27 +0300
committerVitaly Novichkov <admin@wohlnet.ru>2018-06-23 06:40:27 +0300
commitf6c6b70c488ba392236e1a4f5d2a32ceda00bf24 (patch)
tree8b5fc04dbb466a2635e422c894de7257b53dffbd /src/adlmidi_private.hpp
parentbe42c3c566c6f8b72f3ae9b526571a2c58326379 (diff)
downloadlibADLMIDI-f6c6b70c488ba392236e1a4f5d2a32ceda00bf24.tar.gz
libADLMIDI-f6c6b70c488ba392236e1a4f5d2a32ceda00bf24.tar.bz2
libADLMIDI-f6c6b70c488ba392236e1a4f5d2a32ceda00bf24.zip
Added CC66 Sostenuto support!
Sostenuto is the pedal hold that does hold of only currently playing notes and doesn't holds notes are will begin after turning of sostenuto on, unlike to the Pedal (CC64 Sustain) event.
Diffstat (limited to 'src/adlmidi_private.hpp')
-rw-r--r--src/adlmidi_private.hpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/adlmidi_private.hpp b/src/adlmidi_private.hpp
index ec194c6..1d68bae 100644
--- a/src/adlmidi_private.hpp
+++ b/src/adlmidi_private.hpp
@@ -349,8 +349,9 @@ public:
uint8_t bank_lsb, bank_msb;
uint8_t patch;
uint8_t volume, expression;
- uint8_t panning, vibrato, aftertouch, sustain;
+ uint8_t panning, vibrato, aftertouch;
uint16_t portamento;
+ bool sustain;
bool portamentoEnable;
int8_t portamentoSource; // note number or -1
double portamentoRate;
@@ -564,7 +565,7 @@ public:
updateBendSensitivity();
volume = 100;
expression = 127;
- sustain = 0;
+ sustain = false;
vibrato = 0;
aftertouch = 0;
std::memset(noteAftertouch, 0, 128);
@@ -612,8 +613,14 @@ public:
{
LocationData *prev, *next;
Location loc;
- bool sustained;
- char ____padding[7];
+ enum {
+ Sustain_None = 0x00,
+ Sustain_Pedal = 0x01,
+ Sustain_Sostenuto = 0x02,
+ Sustain_ANY = Sustain_Pedal | Sustain_Sostenuto,
+ };
+ uint8_t sustained;
+ char ____padding[6];
MIDIchannel::NoteInfo::Phys ins; // a copy of that in phys[]
//! Has fixed sustain, don't iterate "on" timeout
bool fixed_sustain;
@@ -1011,7 +1018,10 @@ private:
AdlChannel::LocationData *j,
MIDIchannel::activenoteiterator i);
void Panic();
- void KillSustainingNotes(int32_t MidCh = -1, int32_t this_adlchn = -1);
+ void KillSustainingNotes(int32_t MidCh = -1,
+ int32_t this_adlchn = -1,
+ uint8_t sustain_type = AdlChannel::LocationData::Sustain_ANY);
+ void MarkSostenutoNotes(int32_t MidCh = -1);
void SetRPN(unsigned MidCh, unsigned value, bool MSB);
void UpdatePortamento(unsigned MidCh);
void NoteUpdate_All(uint16_t MidCh, unsigned props_mask);