diff --git a/src/minidexed.cpp b/src/minidexed.cpp index 72edb6f..80a436f 100644 --- a/src/minidexed.cpp +++ b/src/minidexed.cpp @@ -2184,29 +2184,3 @@ unsigned CMiniDexed::getModController (unsigned controller, unsigned parameter, } } - -void CMiniDexed::setOperatorMask(uint8_t operatorMask, unsigned nTG) { - if (nTG >= CConfig::AllToneGenerators) { - LOGERR("Invalid tone generator: TG=%u", nTG); - return; - } - - // According to Yamaha DX7/TX SysEx format: - // Bit 0 = OP6, Bit 1 = OP5, Bit 2 = OP4, Bit 3 = OP3, Bit 4 = OP2, Bit 5 = OP1 - // For MiniDexed: Bit 0 = OP1, Bit 1 = OP2, etc. - need to reverse the bit order to match - - uint8_t reversedMask = 0; - for (int i = 0; i < 6; i++) { - if (operatorMask & (1 << i)) { - reversedMask |= (1 << (5 - i)); - } - } - - m_uchOPMask[nTG] = reversedMask; - LOGDBG("Set operator mask for TG %u: Yamaha=0x%02X, Reversed=0x%02X", nTG, operatorMask, reversedMask); - - // Apply the updated operator mask to the tone generator - if (nTG < m_nToneGenerators) { - m_pTG[nTG]->setOPAll(m_uchOPMask[nTG]); - } -}