@ -563,7 +563,6 @@ void CUIMenu::EditVoiceBankNumber (CUIMenu *pUIMenu, TMenuEvent Event)
void CUIMenu : : EditProgramNumber ( CUIMenu * pUIMenu , TMenuEvent Event )
{
unsigned nTG = pUIMenu - > m_nMenuStackParameter [ pUIMenu - > m_nCurrentMenuDepth - 1 ] ;
int nHighestBank = pUIMenu - > m_pMiniDexed - > GetSysExFileLoader ( ) - > GetNumHighestBank ( ) ;
int nValue = pUIMenu - > m_pMiniDexed - > GetTGParameter ( CMiniDexed : : TGParameterProgram , nTG ) ;
@ -578,11 +577,7 @@ void CUIMenu::EditProgramNumber (CUIMenu *pUIMenu, TMenuEvent Event)
// Switch down a voice bank and set to the last voice
nValue = CSysExFileLoader : : VoicesPerBank - 1 ;
int nVB = pUIMenu - > m_pMiniDexed - > GetTGParameter ( CMiniDexed : : TGParameterVoiceBank , nTG ) ;
if ( - - nVB < 0 )
{
// Wrap around to last loaded bank
nVB = nHighestBank ;
}
nVB = pUIMenu - > m_pMiniDexed - > GetSysExFileLoader ( ) - > GetNextBankDown ( nVB ) ;
pUIMenu - > m_pMiniDexed - > SetTGParameter ( CMiniDexed : : TGParameterVoiceBank , nVB , nTG ) ;
}
pUIMenu - > m_pMiniDexed - > SetTGParameter ( CMiniDexed : : TGParameterProgram , nValue , nTG ) ;
@ -594,11 +589,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 ) nHighestBank )
{
// Wrap around to first bank
nVB = 0 ;
}
nVB = pUIMenu - > m_pMiniDexed - > GetSysExFileLoader ( ) - > GetNextBankUp ( nVB ) ;
pUIMenu - > m_pMiniDexed - > SetTGParameter ( CMiniDexed : : TGParameterVoiceBank , nVB , nTG ) ;
}
pUIMenu - > m_pMiniDexed - > SetTGParameter ( CMiniDexed : : TGParameterProgram , nValue , nTG ) ;