setOperatorMute

more-midi-functions
probonopd 3 days ago committed by GitHub
parent 10d278848f
commit d49875c642
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 17
      src/minidexed.cpp

@ -2,7 +2,7 @@
// minidexed.cpp
//
// MiniDexed - Dexed FM synthesizer for bare metal Raspberry Pi
// Copyright (C) 2022 The MiniDexed Team
// Copyright (C) 2022-25 The MiniDexed Team
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@ -2184,3 +2184,18 @@ unsigned CMiniDexed::getModController (unsigned controller, unsigned parameter,
}
}
void CMiniDexed::setOperatorMute(uint8_t operatorIndex, unsigned nTG) {
if (nTG >= CConfig::AllToneGenerators || operatorIndex >= 6) {
LOGERR("Invalid tone generator or operator index: TG=%u, Operator=%u", nTG, operatorIndex);
return;
}
// Toggle the operator mask for the specified operator
m_uchOPMask[nTG] ^= (1 << operatorIndex);
LOGDBG("Operator %u mute toggled for TG %u. New mask: 0x%02X", operatorIndex, nTG, m_uchOPMask[nTG]);
// Apply the updated operator mask to the tone generator
m_pTG[nTG]->SetOperatorMask(m_uchOPMask[nTG]);
}

Loading…
Cancel
Save