Show bank:voice number for voices

e.g. 005:012
Closes #832
pull/840/head
probonopd 2 months ago committed by GitHub
parent 2e7ce26669
commit 969d0f1a52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 29
      src/uimenu.cpp

@ -702,15 +702,24 @@ void CUIMenu::EditProgramNumber (CUIMenu *pUIMenu, TMenuEvent Event)
CUIMenu::EditProgramNumber (pUIMenu, MenuEventStepDown); CUIMenu::EditProgramNumber (pUIMenu, MenuEventStepDown);
} }
} else { } else {
string TG ("TG"); // Show bank:voice number on the top line, e.g. 005:012
TG += to_string (nTG+1); int nBank = pUIMenu->m_pMiniDexed->GetTGParameter(CMiniDexed::TGParameterVoiceBank, nTG);
std::string topLine = "000";
string Value = to_string (nValue+1) + "=" + pUIMenu->m_pMiniDexed->GetVoiceName (nTG); topLine += std::to_string(nBank+1);
topLine = topLine.substr(topLine.length()-3,3);
pUIMenu->m_pUI->DisplayWrite (TG.c_str (), topLine += ":";
pUIMenu->m_pParentMenu[pUIMenu->m_nCurrentMenuItem].Name, std::string voiceNum = "000";
Value.c_str (), voiceNum += std::to_string(nValue+1);
nValue > 0, nValue < (int) CSysExFileLoader::VoicesPerBank-1); voiceNum = voiceNum.substr(voiceNum.length()-3,3);
topLine += voiceNum;
// Only show the voice name on the bottom line
std::string Value = pUIMenu->m_pMiniDexed->GetVoiceName (nTG);
pUIMenu->m_pUI->DisplayWrite (topLine.c_str(),
pUIMenu->m_pParentMenu[pUIMenu->m_nCurrentMenuItem].Name,
Value.c_str(),
nValue > 0, nValue < (int) CSysExFileLoader::VoicesPerBank-1);
} }
} }
@ -1996,5 +2005,3 @@ void CUIMenu::EditTGParameterModulation (CUIMenu *pUIMenu, TMenuEvent Event)
nValue > rParam.Minimum, nValue < rParam.Maximum); nValue > rParam.Minimum, nValue < rParam.Maximum);
} }

Loading…
Cancel
Save