|
|
@ -65,7 +65,7 @@ const CUIMenu::TMenuItem CUIMenu::s_TGMenu[] = |
|
|
|
#ifdef ARM_ALLOW_MULTI_CORE |
|
|
|
#ifdef ARM_ALLOW_MULTI_CORE |
|
|
|
{"Pan", EditTGParameter, 0, CMiniDexed::TGParameterPan}, |
|
|
|
{"Pan", EditTGParameter, 0, CMiniDexed::TGParameterPan}, |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
{"Insert FX", MenuHandler, s_InsertFX}, |
|
|
|
{"Insert FX", MenuHandlerInsertFX}, |
|
|
|
{"Reverb-Send", EditTGParameter, 0, CMiniDexed::TGParameterReverbSend}, |
|
|
|
{"Reverb-Send", EditTGParameter, 0, CMiniDexed::TGParameterReverbSend}, |
|
|
|
{"Detune", EditTGParameter, 0, CMiniDexed::TGParameterMasterTune}, |
|
|
|
{"Detune", EditTGParameter, 0, CMiniDexed::TGParameterMasterTune}, |
|
|
|
{"Cutoff", EditTGParameter, 0, CMiniDexed::TGParameterCutoff}, |
|
|
|
{"Cutoff", EditTGParameter, 0, CMiniDexed::TGParameterCutoff}, |
|
|
@ -139,8 +139,8 @@ const CUIMenu::TMenuItem CUIMenu::s_ReverbMenu[] = |
|
|
|
|
|
|
|
|
|
|
|
const CUIMenu::TMenuItem CUIMenu::s_InsertFX[] = |
|
|
|
const CUIMenu::TMenuItem CUIMenu::s_InsertFX[] = |
|
|
|
{ |
|
|
|
{ |
|
|
|
{"Type", EditTGParameter2, 0, CMiniDexed::TGParameterInsertFXType}, |
|
|
|
{"Type:", EditTGParameter2, 0, CMiniDexed::TGParameterInsertFXType}, |
|
|
|
{"Edit", EditInsertFX}, |
|
|
|
{"Edit:", EditInsertFX}, |
|
|
|
{0} |
|
|
|
{0} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
@ -623,6 +623,93 @@ void CUIMenu::MenuHandler (CUIMenu *pUIMenu, TMenuEvent Event) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CUIMenu::MenuHandlerInsertFX (CUIMenu *pUIMenu, TMenuEvent Event) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// Setup menu when it's open
|
|
|
|
|
|
|
|
if (!pUIMenu->m_pCurrentMenu) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
pUIMenu->m_pCurrentMenu = s_InsertFX; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (Event) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
case MenuEventUpdate: |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case MenuEventSelect: // push menu
|
|
|
|
|
|
|
|
assert (pUIMenu->m_nCurrentMenuDepth < MaxMenuDepth); |
|
|
|
|
|
|
|
pUIMenu->m_MenuStackParent[pUIMenu->m_nCurrentMenuDepth] = pUIMenu->m_pParentMenu; |
|
|
|
|
|
|
|
pUIMenu->m_MenuStackMenu[pUIMenu->m_nCurrentMenuDepth] = pUIMenu->m_pCurrentMenu; |
|
|
|
|
|
|
|
pUIMenu->m_nMenuStackItem[pUIMenu->m_nCurrentMenuDepth] |
|
|
|
|
|
|
|
= pUIMenu->m_nCurrentMenuItem; |
|
|
|
|
|
|
|
pUIMenu->m_nMenuStackSelection[pUIMenu->m_nCurrentMenuDepth] |
|
|
|
|
|
|
|
= pUIMenu->m_nCurrentSelection; |
|
|
|
|
|
|
|
pUIMenu->m_nMenuStackParameter[pUIMenu->m_nCurrentMenuDepth] |
|
|
|
|
|
|
|
= pUIMenu->m_nCurrentParameter; |
|
|
|
|
|
|
|
pUIMenu->m_nCurrentMenuDepth++; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pUIMenu->m_pParentMenu = pUIMenu->m_pCurrentMenu; |
|
|
|
|
|
|
|
pUIMenu->m_nCurrentParameter = |
|
|
|
|
|
|
|
pUIMenu->m_pCurrentMenu[pUIMenu->m_nCurrentSelection].Parameter; |
|
|
|
|
|
|
|
pUIMenu->m_pCurrentMenu = |
|
|
|
|
|
|
|
pUIMenu->m_pCurrentMenu[pUIMenu->m_nCurrentSelection].MenuItem; |
|
|
|
|
|
|
|
pUIMenu->m_nCurrentMenuItem = pUIMenu->m_nCurrentSelection; |
|
|
|
|
|
|
|
pUIMenu->m_nCurrentSelection = 0; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case MenuEventStepDown: |
|
|
|
|
|
|
|
if (pUIMenu->m_nCurrentSelection > 0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
pUIMenu->m_nCurrentSelection--; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case MenuEventStepUp: |
|
|
|
|
|
|
|
++pUIMenu->m_nCurrentSelection; |
|
|
|
|
|
|
|
if (!pUIMenu->m_pCurrentMenu[pUIMenu->m_nCurrentSelection].Name) // more entries?
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
pUIMenu->m_nCurrentSelection--; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case MenuEventPressAndStepDown: |
|
|
|
|
|
|
|
case MenuEventPressAndStepUp: |
|
|
|
|
|
|
|
pUIMenu->TGShortcutHandler (Event); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (pUIMenu->m_pCurrentMenu) // if this is another menu?
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// Identify TG
|
|
|
|
|
|
|
|
unsigned nTG = pUIMenu->m_nMenuStackParameter[pUIMenu->m_nCurrentMenuDepth-1];
|
|
|
|
|
|
|
|
// Create TG label
|
|
|
|
|
|
|
|
string TG ("TG"); |
|
|
|
|
|
|
|
TG += to_string (nTG+1); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Get current FX type
|
|
|
|
|
|
|
|
int fxType = pUIMenu->m_pMiniDexed->GetTGParameter(CMiniDexed::TGParameterInsertFXType, nTG); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Create Paramter with type label
|
|
|
|
|
|
|
|
std::string value; |
|
|
|
|
|
|
|
value.append(pUIMenu->m_pCurrentMenu[pUIMenu->m_nCurrentSelection].Name); |
|
|
|
|
|
|
|
value.append(getFXTypeName(fxType)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pUIMenu->m_pUI->DisplayWrite ( |
|
|
|
|
|
|
|
TG.c_str (), |
|
|
|
|
|
|
|
pUIMenu->m_pParentMenu[pUIMenu->m_nCurrentMenuItem].Name, |
|
|
|
|
|
|
|
value.c_str(), |
|
|
|
|
|
|
|
pUIMenu->m_nCurrentSelection > 0, |
|
|
|
|
|
|
|
!!pUIMenu->m_pCurrentMenu[pUIMenu->m_nCurrentSelection+1].Name); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
pUIMenu->EventHandler (MenuEventUpdate); // no, update parameter display
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void CUIMenu::EditGlobalParameter (CUIMenu *pUIMenu, TMenuEvent Event) |
|
|
|
void CUIMenu::EditGlobalParameter (CUIMenu *pUIMenu, TMenuEvent Event) |
|
|
|
{ |
|
|
|
{ |
|
|
|
CMiniDexed::TParameter Param = (CMiniDexed::TParameter) pUIMenu->m_nCurrentParameter; |
|
|
|
CMiniDexed::TParameter Param = (CMiniDexed::TParameter) pUIMenu->m_nCurrentParameter; |
|
|
@ -966,9 +1053,15 @@ void CUIMenu::EditInsertFX (CUIMenu *pUIMenu, TMenuEvent Event) |
|
|
|
|
|
|
|
|
|
|
|
if (pUIMenu->m_pCurrentMenu) // if this is another menu?
|
|
|
|
if (pUIMenu->m_pCurrentMenu) // if this is another menu?
|
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
string TG ("TG"); |
|
|
|
|
|
|
|
TG += to_string (nTG+1); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Get current FX type
|
|
|
|
|
|
|
|
int fxType = pUIMenu->m_pMiniDexed->GetTGParameter(CMiniDexed::TGParameterInsertFXType, nTG); |
|
|
|
|
|
|
|
|
|
|
|
pUIMenu->m_pUI->DisplayWrite ( |
|
|
|
pUIMenu->m_pUI->DisplayWrite ( |
|
|
|
pUIMenu->m_pParentMenu[pUIMenu->m_nCurrentMenuItem].Name, |
|
|
|
TG.c_str (), |
|
|
|
"", |
|
|
|
getFXTypeName(fxType).c_str(), |
|
|
|
pUIMenu->m_pCurrentMenu[pUIMenu->m_nCurrentSelection].Name, |
|
|
|
pUIMenu->m_pCurrentMenu[pUIMenu->m_nCurrentSelection].Name, |
|
|
|
pUIMenu->m_nCurrentSelection > 0, |
|
|
|
pUIMenu->m_nCurrentSelection > 0, |
|
|
|
!!pUIMenu->m_pCurrentMenu[pUIMenu->m_nCurrentSelection+1].Name); |
|
|
|
!!pUIMenu->m_pCurrentMenu[pUIMenu->m_nCurrentSelection+1].Name); |
|
|
|