fix op ordering

The ops are in reverse order in the OPMask as well
pull/870/head
Gergo Koteles 2 months ago
parent 9d8ed87aab
commit 0667f1b57a
  1. 8
      src/minidexed.cpp

@ -1177,6 +1177,8 @@ void CMiniDexed::SetVoiceParameter (uint8_t uchOffset, uint8_t uchValue, unsigne
if (nOP < 6) if (nOP < 6)
{ {
nOP = 5 - nOP; // OPs are in reverse order
if (uchOffset == DEXED_OP_ENABLE) if (uchOffset == DEXED_OP_ENABLE)
{ {
if (uchValue) if (uchValue)
@ -1192,8 +1194,6 @@ void CMiniDexed::SetVoiceParameter (uint8_t uchOffset, uint8_t uchValue, unsigne
return; return;
} }
nOP = 5 - nOP; // OPs are in reverse order
} }
uchOffset += nOP * 21; uchOffset += nOP * 21;
@ -1212,12 +1212,12 @@ uint8_t CMiniDexed::GetVoiceParameter (uint8_t uchOffset, unsigned nOP, unsigned
if (nOP < 6) if (nOP < 6)
{ {
nOP = 5 - nOP; // OPs are in reverse order
if (uchOffset == DEXED_OP_ENABLE) if (uchOffset == DEXED_OP_ENABLE)
{ {
return !!(m_uchOPMask[nTG] & (1 << nOP)); return !!(m_uchOPMask[nTG] & (1 << nOP));
} }
nOP = 5 - nOP; // OPs are in reverse order
} }
uchOffset += nOP * 21; uchOffset += nOP * 21;

Loading…
Cancel
Save