MiniDexed
MiniDexed copied to clipboard
MIDI CC 07 (Volume) on PCCH sets Master Volume
Closes #920
- When a MIDI CC 07 message is received on the PCCH (if enabled), it sets the global Master Volume (
setMasterVolume), allowing direct control from a MIDI keyboard slider. - When PCCH is off, normal per-TG volume operation is preserved.
- The change is implemented in mididevice.cpp and includes a log message for traceability.
Code excerpt:
else if (pMessage[1] == MIDI_CC_VOLUME) // CC 07 on PCCH: Master Volume
{
float fMasterVolume = (float)pMessage[2] / 127.0f;
m_pSynthesizer->setMasterVolume(fMasterVolume);
LOGNOTE("MIDI CC07 (Volume) on PCCH: Set Master Volume to %d (%.3f)", pMessage[2], fMasterVolume);
break; // Do not process further for TGs
}
Testing:
- Send MIDI CC 07 on the PCCH: Master Volume changes.
- Send MIDI CC 07 on other channels: Only TG volume changes.