Apply soyersoyer@882d6c0

882d6c0bcd
update-Synth_Dexed-1
probonopd 2 weeks ago
parent d610110004
commit f3c7584b80
  1. 5
      src/mididevice.cpp
  2. 9
      src/minidexed.cpp
  3. 1
      src/minidexed.h

@ -44,6 +44,7 @@ LOGMODULE ("mididevice");
#define MIDI_CC_PAN_POSITION 10 #define MIDI_CC_PAN_POSITION 10
#define MIDI_CC_BANK_SELECT_LSB 32 #define MIDI_CC_BANK_SELECT_LSB 32
#define MIDI_CC_BANK_SUSTAIN 64 #define MIDI_CC_BANK_SUSTAIN 64
#define MIDI_CC_BANK_SOSTENUTO 66
#define MIDI_CC_RESONANCE 71 #define MIDI_CC_RESONANCE 71
#define MIDI_CC_FREQUENCY_CUTOFF 74 #define MIDI_CC_FREQUENCY_CUTOFF 74
#define MIDI_CC_REVERB_LEVEL 91 #define MIDI_CC_REVERB_LEVEL 91
@ -380,6 +381,10 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign
case MIDI_CC_BANK_SUSTAIN: case MIDI_CC_BANK_SUSTAIN:
m_pSynthesizer->setSustain (pMessage[2] >= 64, nTG); m_pSynthesizer->setSustain (pMessage[2] >= 64, nTG);
break; break;
case MIDI_CC_BANK_SOSTENUTO:
m_pSynthesizer->setSostenuto (pMessage[2] >= 64, nTG);
break;
case MIDI_CC_RESONANCE: case MIDI_CC_RESONANCE:
m_pSynthesizer->SetResonance (maplong (pMessage[2], 0, 127, 0, 99), nTG); m_pSynthesizer->SetResonance (maplong (pMessage[2], 0, 127, 0, 99), nTG);

@ -830,6 +830,15 @@ void CMiniDexed::setSustain(bool sustain, unsigned nTG)
m_pTG[nTG]->setSustain (sustain); m_pTG[nTG]->setSustain (sustain);
} }
void CMiniDexed::setSostenuto(bool sostenuto, unsigned nTG)
{
assert (nTG < CConfig::AllToneGenerators);
if (nTG >= m_nToneGenerators) return; // Not an active TG
assert (m_pTG[nTG]);
m_pTG[nTG]->setSostenuto (sostenuto);
}
void CMiniDexed::panic(uint8_t value, unsigned nTG) void CMiniDexed::panic(uint8_t value, unsigned nTG)
{ {
assert (nTG < CConfig::AllToneGenerators); assert (nTG < CConfig::AllToneGenerators);

@ -84,6 +84,7 @@ public:
void keydown (int16_t pitch, uint8_t velocity, unsigned nTG); void keydown (int16_t pitch, uint8_t velocity, unsigned nTG);
void setSustain (bool sustain, unsigned nTG); void setSustain (bool sustain, unsigned nTG);
void setSostenuto (bool sostenuto, unsigned nTG);
void panic (uint8_t value, unsigned nTG); void panic (uint8_t value, unsigned nTG);
void notesOff (uint8_t value, unsigned nTG); void notesOff (uint8_t value, unsigned nTG);
void setModWheel (uint8_t value, unsigned nTG); void setModWheel (uint8_t value, unsigned nTG);

Loading…
Cancel
Save