Implement IgnoreAllNotesOff=1 (#366)

* GetIgnoreAllNotesOff

[ci skip]

* IgnoreAllNotesOff

[ci skip]

* IgnoreAllNotesOff

[ci skip]

* IgnoreAllNotesOff
pull/380/head^2
probonopd 2 years ago committed by GitHub
parent 3d93d815ec
commit 12f4ea7838
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/config.cpp
  2. 3
      src/config.h
  3. 5
      src/mididevice.cpp
  4. 1
      src/minidexed.ini

@ -69,7 +69,7 @@ void CConfig::Load (void)
}
m_bMIDIRXProgramChange = m_Properties.GetNumber ("MIDIRXProgramChange", 1) != 0;
m_bIgnoreAllNotesOff = m_Properties.GetNumber ("IgnoreAllNotesOff", 0) != 0;
m_bLCDEnabled = m_Properties.GetNumber ("LCDEnabled", 0) != 0;
m_nLCDPinEnable = m_Properties.GetNumber ("LCDPinEnable", 4);
@ -165,6 +165,11 @@ bool CConfig::GetMIDIRXProgramChange (void) const
return m_bMIDIRXProgramChange;
}
bool CConfig::GetIgnoreAllNotesOff (void) const
{
return m_bIgnoreAllNotesOff;
}
bool CConfig::GetLCDEnabled (void) const
{
return m_bLCDEnabled;

@ -75,7 +75,7 @@ public:
const char *GetMIDIThruIn (void) const; // "" if not specified
const char *GetMIDIThruOut (void) const; // "" if not specified
bool GetMIDIRXProgramChange (void) const; // true if not specified
bool GetIgnoreAllNotesOff (void) const;
// HD44780 LCD
// GPIO pin numbers are chip numbers, not header positions
@ -151,6 +151,7 @@ private:
std::string m_MIDIThruIn;
std::string m_MIDIThruOut;
bool m_bMIDIRXProgramChange;
bool m_bIgnoreAllNotesOff;
bool m_bLCDEnabled;
unsigned m_nLCDPinEnable;

@ -318,7 +318,10 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign
break;
case MIDI_CC_ALL_NOTES_OFF:
m_pSynthesizer->notesOff (pMessage[2], nTG);
if (!m_pConfig->GetIgnoreAllNotesOff ())
{
m_pSynthesizer->notesOff (pMessage[2], nTG);
}
break;
}
break;

@ -15,6 +15,7 @@ ChannelsSwapped=0
MIDIBaudRate=31250
#MIDIThru=umidi1,ttyS1
MIDIRXProgramChange=1
IgnoreAllNotesOff=0
# HD44780 LCD
LCDEnabled=1

Loading…
Cancel
Save