soyer 20 hours ago committed by GitHub
commit 3b9cb202a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 25
      src/minidexed.cpp
  2. 1
      src/minidexed.h

@ -658,6 +658,7 @@ void CMiniDexed::ProgramChange (unsigned nProgram, unsigned nTG)
assert (m_pTG[nTG]);
m_pTG[nTG]->loadVoiceParameters (Buffer);
setOPMask(0b111111, nTG);
if (m_pConfig->GetMIDIAutoVoiceDumpOnPC())
{
@ -1178,23 +1179,22 @@ void CMiniDexed::SetVoiceParameter (uint8_t uchOffset, uint8_t uchValue, unsigne
if (nOP < 6)
{
nOP = 5 - nOP; // OPs are in reverse order
if (uchOffset == DEXED_OP_ENABLE)
{
if (uchValue)
{
m_uchOPMask[nTG] |= 1 << nOP;
setOPMask(m_uchOPMask[nTG] | 1 << nOP, nTG);
}
else
{
m_uchOPMask[nTG] &= ~(1 << nOP);
setOPMask(m_uchOPMask[nTG] & ~(1 << nOP), nTG);
}
m_pTG[nTG]->setOPAll (m_uchOPMask[nTG]);
return;
}
nOP = 5 - nOP; // OPs are in reverse order
}
}
uchOffset += nOP * 21;
@ -1213,12 +1213,12 @@ uint8_t CMiniDexed::GetVoiceParameter (uint8_t uchOffset, unsigned nOP, unsigned
if (nOP < 6)
{
nOP = 5 - nOP; // OPs are in reverse order
if (uchOffset == DEXED_OP_ENABLE)
{
return !!(m_uchOPMask[nTG] & (1 << nOP));
}
nOP = 5 - nOP; // OPs are in reverse order
}
uchOffset += nOP * 21;
@ -1792,6 +1792,8 @@ void CMiniDexed::loadVoiceParameters(const uint8_t* data, uint8_t nTG)
m_pTG[nTG]->loadVoiceParameters(&voice[6]);
m_pTG[nTG]->doRefreshVoice();
setOPMask(0b111111, nTG);
m_UI.ParameterChanged ();
}
@ -1848,6 +1850,12 @@ void CMiniDexed::getSysExVoiceDump(uint8_t* dest, uint8_t nTG)
dest[162] = 0xF7; // SysEx end
}
void CMiniDexed::setOPMask(uint8_t uchOPMask, uint8_t nTG)
{
m_uchOPMask[nTG] = uchOPMask;
m_pTG[nTG]->setOPAll (m_uchOPMask[nTG]);
}
void CMiniDexed::setMasterVolume(float32_t vol)
{
if (vol < 0.0)
@ -2022,6 +2030,7 @@ void CMiniDexed::LoadPerformanceParameters(void)
{
uint8_t* tVoiceData = m_PerformanceConfig.GetVoiceDataFromTxt(nTG);
m_pTG[nTG]->loadVoiceParameters(tVoiceData);
setOPMask(0b111111, nTG);
}
setMonoMode(m_PerformanceConfig.GetMonoMode(nTG) ? 1 : 0, nTG);
SetReverbSend (m_PerformanceConfig.GetReverbSend (nTG), nTG);

@ -122,6 +122,7 @@ public:
void loadVoiceParameters(const uint8_t* data, uint8_t nTG);
void setVoiceDataElement(uint8_t data, uint8_t number, uint8_t nTG);
void getSysExVoiceDump(uint8_t* dest, uint8_t nTG);
void setOPMask(uint8_t uchOPMask, uint8_t nTG);
void setModController (unsigned controller, unsigned parameter, uint8_t value, uint8_t nTG);
unsigned getModController (unsigned controller, unsigned parameter, uint8_t nTG);

Loading…
Cancel
Save