|
|
|
@ -486,7 +486,7 @@ void CUIMenu::EditGlobalParameter (CUIMenu *pUIMenu, TMenuEvent Event) |
|
|
|
|
void CUIMenu::EditVoiceBankNumber (CUIMenu *pUIMenu, TMenuEvent Event) |
|
|
|
|
{ |
|
|
|
|
unsigned nTG = pUIMenu->m_nMenuStackParameter[pUIMenu->m_nCurrentMenuDepth-1]; |
|
|
|
|
int nLoadedBanks = pUIMenu->m_pMiniDexed->GetSysExFileLoader ()->GetNumLoadedBanks(); |
|
|
|
|
int nHighestBank = pUIMenu->m_pMiniDexed->GetSysExFileLoader ()->GetNumHighestBank(); |
|
|
|
|
|
|
|
|
|
int nValue = pUIMenu->m_pMiniDexed->GetTGParameter (CMiniDexed::TGParameterVoiceBank, nTG); |
|
|
|
|
|
|
|
|
@ -505,9 +505,9 @@ void CUIMenu::EditVoiceBankNumber (CUIMenu *pUIMenu, TMenuEvent Event) |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
case MenuEventStepUp: |
|
|
|
|
if (++nValue > (int) nLoadedBanks-1) |
|
|
|
|
if (++nValue > (int) nHighestBank) |
|
|
|
|
{ |
|
|
|
|
nValue = nLoadedBanks-1; |
|
|
|
|
nValue = nHighestBank; |
|
|
|
|
} |
|
|
|
|
pUIMenu->m_pMiniDexed->SetTGParameter ( |
|
|
|
|
CMiniDexed::TGParameterVoiceBank, nValue, nTG); |
|
|
|
@ -537,7 +537,7 @@ void CUIMenu::EditVoiceBankNumber (CUIMenu *pUIMenu, TMenuEvent Event) |
|
|
|
|
void CUIMenu::EditProgramNumber (CUIMenu *pUIMenu, TMenuEvent Event) |
|
|
|
|
{ |
|
|
|
|
unsigned nTG = pUIMenu->m_nMenuStackParameter[pUIMenu->m_nCurrentMenuDepth-1]; |
|
|
|
|
int nLoadedBanks = pUIMenu->m_pMiniDexed->GetSysExFileLoader ()->GetNumLoadedBanks(); |
|
|
|
|
int nHighestBank = pUIMenu->m_pMiniDexed->GetSysExFileLoader ()->GetNumHighestBank(); |
|
|
|
|
|
|
|
|
|
int nValue = pUIMenu->m_pMiniDexed->GetTGParameter (CMiniDexed::TGParameterProgram, nTG); |
|
|
|
|
|
|
|
|
@ -555,7 +555,7 @@ void CUIMenu::EditProgramNumber (CUIMenu *pUIMenu, TMenuEvent Event) |
|
|
|
|
if (--nVB < 0) |
|
|
|
|
{ |
|
|
|
|
// Wrap around to last loaded bank
|
|
|
|
|
nVB = nLoadedBanks-1; |
|
|
|
|
nVB = nHighestBank; |
|
|
|
|
} |
|
|
|
|
pUIMenu->m_pMiniDexed->SetTGParameter (CMiniDexed::TGParameterVoiceBank, nVB, nTG); |
|
|
|
|
} |
|
|
|
@ -568,7 +568,7 @@ void CUIMenu::EditProgramNumber (CUIMenu *pUIMenu, TMenuEvent Event) |
|
|
|
|
// Switch up a voice bank and reset to voice 0
|
|
|
|
|
nValue = 0; |
|
|
|
|
int nVB = pUIMenu->m_pMiniDexed->GetTGParameter(CMiniDexed::TGParameterVoiceBank, nTG); |
|
|
|
|
if (++nVB > (int) nLoadedBanks-1) |
|
|
|
|
if (++nVB > (int) nHighestBank) |
|
|
|
|
{ |
|
|
|
|
// Wrap around to first bank
|
|
|
|
|
nVB = 0; |
|
|
|
|