Added PC option to Performance menu. Various bug fixes. Allow menu updating if on Performance/Load display. Swapped TG1 and TG3 in Performance 000008 so that TG1 is set to MIDI CH 1 in all Performances.

pull/500/head
diyelectromusic 2 years ago
parent a234380539
commit 8060ee381a
  1. 20
      performance/000008_AmpUpright.ini
  2. 12
      src/minidexed.cpp
  3. 3
      src/minidexed.h
  4. 52
      src/uimenu.cpp
  5. 1
      src/uimenu.h

@ -1,9 +1,9 @@
BankNumber1=2 BankNumber1=2
VoiceNumber1=6 VoiceNumber1=2
MIDIChannel1=0 MIDIChannel1=1
Volume1=47 Volume1=87
Pan1=0 Pan1=0
Detune1=0 Detune1=2
Cutoff1=99 Cutoff1=99
Resonance1=0 Resonance1=0
NoteLimitLow1=0 NoteLimitLow1=0
@ -15,7 +15,7 @@ PitchBendStep1=0
PortamentoMode1=0 PortamentoMode1=0
PortamentoGlissando1=0 PortamentoGlissando1=0
PortamentoTime1=0 PortamentoTime1=0
VoiceData1=5F 15 00 26 5C 3E 60 00 30 05 0A 03 00 04 00 01 55 00 01 00 07 4D 48 48 22 32 62 00 00 27 00 14 00 01 00 00 04 5F 01 02 00 0A 59 3C 17 23 63 5E 00 00 2E 03 02 03 03 03 00 01 5E 01 00 00 00 5F 1C 06 23 63 59 4B 00 05 00 63 00 01 02 00 06 4F 00 05 00 09 58 5C 47 3F 63 43 5B 5A 27 0C 14 03 00 02 00 01 5A 00 01 00 05 58 1C 1B 32 63 5A 00 00 11 63 05 03 00 02 00 03 63 00 01 00 07 00 00 00 00 32 32 32 32 0A 05 01 0E 05 00 00 00 00 01 18 41 31 31 50 6E 34 4D 46 78 64 74 VoiceData1=43 0B 0B 2A 63 58 00 00 02 00 4E 03 01 06 00 00 50 00 05 00 0E 45 0A 0D 2A 63 58 00 00 22 08 09 03 00 01 00 04 51 00 01 00 0B 4E 49 33 37 63 3A 00 00 33 0C 0B 03 03 01 00 02 5C 01 06 09 06 40 15 07 2C 63 4F 00 00 1E 00 00 00 00 07 00 03 63 00 01 00 08 42 0B 00 27 63 4F 00 00 20 00 09 00 00 03 00 01 4C 00 01 01 00 40 15 07 2C 63 4F 00 00 1E 00 00 00 00 07 00 02 63 00 01 00 03 63 63 63 63 32 32 32 32 08 07 01 23 00 00 00 01 00 02 18 50 69 61 6E 6F 42 6F 20 31 5C 55
MonoMode1=0 MonoMode1=0
ModulationWheelRange1=99 ModulationWheelRange1=99
ModulationWheelTarget1=1 ModulationWheelTarget1=1
@ -53,11 +53,11 @@ BreathControlTarget2=0
AftertouchRange2=99 AftertouchRange2=99
AftertouchTarget2=0 AftertouchTarget2=0
BankNumber3=2 BankNumber3=2
VoiceNumber3=2 VoiceNumber3=6
MIDIChannel3=1 MIDIChannel3=0
Volume3=87 Volume3=47
Pan3=0 Pan3=0
Detune3=2 Detune3=0
Cutoff3=99 Cutoff3=99
Resonance3=0 Resonance3=0
NoteLimitLow3=0 NoteLimitLow3=0
@ -69,7 +69,7 @@ PitchBendStep3=0
PortamentoMode3=0 PortamentoMode3=0
PortamentoGlissando3=0 PortamentoGlissando3=0
PortamentoTime3=0 PortamentoTime3=0
VoiceData3=43 0B 0B 2A 63 58 00 00 02 00 4E 03 01 06 00 00 50 00 05 00 0E 45 0A 0D 2A 63 58 00 00 22 08 09 03 00 01 00 04 51 00 01 00 0B 4E 49 33 37 63 3A 00 00 33 0C 0B 03 03 01 00 02 5C 01 06 09 06 40 15 07 2C 63 4F 00 00 1E 00 00 00 00 07 00 03 63 00 01 00 08 42 0B 00 27 63 4F 00 00 20 00 09 00 00 03 00 01 4C 00 01 01 00 40 15 07 2C 63 4F 00 00 1E 00 00 00 00 07 00 02 63 00 01 00 03 63 63 63 63 32 32 32 32 08 07 01 23 00 00 00 01 00 02 18 50 69 61 6E 6F 42 6F 20 31 5C 55 VoiceData3=5F 15 00 26 5C 3E 60 00 30 05 0A 03 00 04 00 01 55 00 01 00 07 4D 48 48 22 32 62 00 00 27 00 14 00 01 00 00 04 5F 01 02 00 0A 59 3C 17 23 63 5E 00 00 2E 03 02 03 03 03 00 01 5E 01 00 00 00 5F 1C 06 23 63 59 4B 00 05 00 63 00 01 02 00 06 4F 00 05 00 09 58 5C 47 3F 63 43 5B 5A 27 0C 14 03 00 02 00 01 5A 00 01 00 05 58 1C 1B 32 63 5A 00 00 11 63 05 03 00 02 00 03 63 00 01 00 07 00 00 00 00 32 32 32 32 0A 05 01 0E 05 00 00 00 00 01 18 41 31 31 50 6E 34 4D 46 78 64 74
MonoMode3=0 MonoMode3=0
ModulationWheelRange3=99 ModulationWheelRange3=99
ModulationWheelTarget3=1 ModulationWheelTarget3=1

@ -57,6 +57,8 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt,
m_bLoadPerformanceBusy(false) m_bLoadPerformanceBusy(false)
{ {
assert (m_pConfig); assert (m_pConfig);
m_bPerformanceProgramChange = m_pConfig->GetPerformanceProgramChange();
for (unsigned i = 0; i < CConfig::ToneGenerators; i++) for (unsigned i = 0; i < CConfig::ToneGenerators; i++)
{ {
@ -464,7 +466,7 @@ void CMiniDexed::ProgramChangePerformance (unsigned nProgram, unsigned nTG)
{ {
assert (m_pConfig); assert (m_pConfig);
if (m_pConfig-GetPerformanceProgramChange()) if (m_bPerformanceProgramChange)
{ {
// Program Change messages change Performances. // Program Change messages change Performances.
// //
@ -1468,8 +1470,12 @@ unsigned CMiniDexed::GetLastPerformance()
bool CMiniDexed::GetPerformanceProgramChange (void) bool CMiniDexed::GetPerformanceProgramChange (void)
{ {
assert (m_pConfig); return m_bPerformanceProgramChange;
return m_pConfig->GetPerformanceProgramChange(); }
void CMiniDexed::SetPerformanceProgramChange (bool bPerfPC)
{
m_bPerformanceProgramChange = bPerfPC;
} }
unsigned CMiniDexed::GetActualPerformanceID() unsigned CMiniDexed::GetActualPerformanceID()

@ -127,6 +127,7 @@ public:
bool GetPerformanceSelectToLoad(void); bool GetPerformanceSelectToLoad(void);
bool SavePerformance (bool bSaveAsDeault); bool SavePerformance (bool bSaveAsDeault);
bool GetPerformanceProgramChange (void); bool GetPerformanceProgramChange (void);
void SetPerformanceProgramChange (bool bPerfPC);
// Must match the order in CUIMenu::TParameter // Must match the order in CUIMenu::TParameter
enum TParameter enum TParameter
@ -139,6 +140,7 @@ public:
ParameterReverbLowPass, ParameterReverbLowPass,
ParameterReverbDiffusion, ParameterReverbDiffusion,
ParameterReverbLevel, ParameterReverbLevel,
ParameterPerformanceProgramChange,
ParameterUnknown ParameterUnknown
}; };
@ -307,6 +309,7 @@ private:
unsigned m_nDeletePerformanceID; unsigned m_nDeletePerformanceID;
bool m_bLoadPerformanceBusy; bool m_bLoadPerformanceBusy;
bool m_bSaveAsDeault; bool m_bSaveAsDeault;
bool m_bPerformanceProgramChange;
}; };
#endif #endif

@ -324,7 +324,8 @@ const CUIMenu::TMenuItem CUIMenu::s_PerformanceMenu[] =
{ {
{"Load", PerformanceMenu, 0, 0}, {"Load", PerformanceMenu, 0, 0},
{"Save", MenuHandler, s_SaveMenu}, {"Save", MenuHandler, s_SaveMenu},
{"Delete", PerformanceMenu, 0, 1}, {"Delete", PerformanceMenu, 0, 1},
{"Program Change", EditPerformanceProgramChange, 0, 0},
{0} {0}
}; };
@ -1208,21 +1209,23 @@ void CUIMenu::PgmUpDownHandler (TMenuEvent Event)
// Program Up/Down acts on performances // Program Up/Down acts on performances
unsigned nLastPerformance = m_pMiniDexed->GetLastPerformance(); unsigned nLastPerformance = m_pMiniDexed->GetLastPerformance();
unsigned nPerformance = m_pMiniDexed->GetActualPerformanceID(); unsigned nPerformance = m_pMiniDexed->GetActualPerformanceID();
LOGNOTE("Performance actual=%d, last=%d", nPerformance, nLastPerformance); //LOGNOTE("Performance actual=%d, last=%d", nPerformance, nLastPerformance);
if (Event == MenuEventPgmDown) if (Event == MenuEventPgmDown)
{ {
if (nPerformance > 0) if (nPerformance > 0)
{ {
m_pMiniDexed->SetNewPerformance(nPerformance-1); m_nSelectedPerformanceID = nPerformance-1;
LOGNOTE("Performance new=%d, last=%d", nPerformance-1, nLastPerformance); m_pMiniDexed->SetNewPerformance(m_nSelectedPerformanceID);
//LOGNOTE("Performance new=%d, last=%d", m_nSelectedPerformanceID, nLastPerformance);
} }
} }
else else
{ {
if (nPerformance < nLastPerformance-1) if (nPerformance < nLastPerformance-1)
{ {
m_pMiniDexed->SetNewPerformance(nPerformance+1); m_nSelectedPerformanceID = nPerformance+1;
LOGNOTE("Performance new=%d, last=%d", nPerformance+1, nLastPerformance); m_pMiniDexed->SetNewPerformance(m_nSelectedPerformanceID);
//LOGNOTE("Performance new=%d, last=%d", m_nSelectedPerformanceID, nLastPerformance);
} }
} }
} }
@ -1230,10 +1233,10 @@ void CUIMenu::PgmUpDownHandler (TMenuEvent Event)
{ {
// Program Up/Down acts on voices within a TG. // Program Up/Down acts on voices within a TG.
// If we're on anything apart from the root menu, // If we're not in the root menu, then see if we are already in a TG menu,
// then find the current TG number. Otherwise assume TG1 (nTG=0). // then find the current TG number. Otherwise assume TG1 (nTG=0).
unsigned nTG = 0; unsigned nTG = 0;
if (m_MenuStackMenu[0] == s_MainMenu) { if (m_MenuStackMenu[0] == s_MainMenu && (m_pCurrentMenu == s_TGMenu) || (m_MenuStackMenu[1] == s_TGMenu)) {
nTG = m_nMenuStackSelection[0]; nTG = m_nMenuStackSelection[0];
} }
assert (nTG < CConfig::ToneGenerators); assert (nTG < CConfig::ToneGenerators);
@ -1487,6 +1490,39 @@ void CUIMenu::PerformanceMenu (CUIMenu *pUIMenu, TMenuEvent Event)
} }
} }
void CUIMenu::EditPerformanceProgramChange (CUIMenu *pUIMenu, TMenuEvent Event)
{
bool bPerfPC = pUIMenu->m_pMiniDexed->GetPerformanceProgramChange();
switch (Event)
{
case MenuEventUpdate:
break;
case MenuEventStepDown:
case MenuEventStepUp:
bPerfPC = !bPerfPC;
pUIMenu->m_pMiniDexed->SetPerformanceProgramChange(bPerfPC);
break;
default:
return;
}
string PPC (" =");
string Value;
if (bPerfPC) {
Value = "Performance";
} else {
Value = "Voices";
}
pUIMenu->m_pUI->DisplayWrite (PPC.c_str (),
pUIMenu->m_pParentMenu[pUIMenu->m_nCurrentMenuItem].Name,
Value.c_str (),
true, true);
}
void CUIMenu::InputTxt (CUIMenu *pUIMenu, TMenuEvent Event) void CUIMenu::InputTxt (CUIMenu *pUIMenu, TMenuEvent Event)
{ {
unsigned nTG=0; unsigned nTG=0;

@ -91,6 +91,7 @@ private:
static void EditTGParameterModulation (CUIMenu *pUIMenu, TMenuEvent Event); static void EditTGParameterModulation (CUIMenu *pUIMenu, TMenuEvent Event);
static void PerformanceMenu (CUIMenu *pUIMenu, TMenuEvent Event); static void PerformanceMenu (CUIMenu *pUIMenu, TMenuEvent Event);
static void SavePerformanceNewFile (CUIMenu *pUIMenu, TMenuEvent Event); static void SavePerformanceNewFile (CUIMenu *pUIMenu, TMenuEvent Event);
static void EditPerformanceProgramChange (CUIMenu *pUIMenu, TMenuEvent Event);
static std::string GetGlobalValueString (unsigned nParameter, int nValue); static std::string GetGlobalValueString (unsigned nParameter, int nValue);
static std::string GetTGValueString (unsigned nTGParameter, int nValue); static std::string GetTGValueString (unsigned nTGParameter, int nValue);

Loading…
Cancel
Save