From a69e97f61d1476f4bc8529bbcff51c09918dd0bf Mon Sep 17 00:00:00 2001 From: abscisys Date: Tue, 20 Dec 2022 00:44:28 +0100 Subject: [PATCH 1/6] Implementationg proposition for: - Unison mode #315 - Add a "All TG" menu #396 --- src/minidexed.cpp | 422 ++++++++++++++++++++++++++------------ src/minidexed.h | 11 +- src/performanceconfig.cpp | 41 ++++ src/performanceconfig.h | 13 ++ src/uimenu.cpp | 50 +++++ src/uimenu.h | 15 +- 6 files changed, 414 insertions(+), 138 deletions(-) diff --git a/src/minidexed.cpp b/src/minidexed.cpp index 0240ea5..830e63d 100644 --- a/src/minidexed.cpp +++ b/src/minidexed.cpp @@ -37,6 +37,9 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt, CMultiCoreSupport (CMemorySystem::Get ()), #endif m_pConfig (pConfig), + m_bSavePerformanceNewFile (false), + m_bSetNewPerformance (false), + m_bDeletePerformance (false), m_UI (this, pGPIOManager, pI2CMaster, pConfig), m_PerformanceConfig (pFileSystem), m_PCKeyboard (this, pConfig, &m_UI), @@ -51,10 +54,8 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt, 1000000U * pConfig->GetChunkSize ()/2 / pConfig->GetSampleRate ()), m_bProfileEnabled (m_pConfig->GetProfileEnabled ()), m_bSavePerformance (false), - m_bSavePerformanceNewFile (false), - m_bSetNewPerformance (false), - m_bDeletePerformance (false), - m_bLoadPerformanceBusy(false) + m_bLoadPerformanceBusy(false), + m_bSaveAsDefault(false) { assert (m_pConfig); @@ -157,6 +158,12 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt, // END setup reverb SetParameter (ParameterCompressorEnable, 1); + + // BEGIN Unison + SetParameter (ParameterUnisonEnable, 0); + SetParameter (ParameterUnisonPanSpread, 60); + SetParameter (ParameterUnisonDetuneSpread, 12); + // END Unison }; bool CMiniDexed::Initialize (void) @@ -412,8 +419,9 @@ void CMiniDexed::SetPan (unsigned nPan, unsigned nTG) assert (nTG < CConfig::ToneGenerators); m_nPan[nTG] = nPan; - tg_mixer->pan(nTG,mapfloat(nPan,0,127,0.0f,1.0f)); - reverb_send_mixer->pan(nTG,mapfloat(nPan,0,127,0.0f,1.0f)); + float normPan = mapfloat(nPan,0,127,0.0f,1.0f); + tg_mixer->pan(nTG,normPan); + reverb_send_mixer->pan(nTG,normPan); m_UI.ParameterChanged (); } @@ -686,6 +694,57 @@ void CMiniDexed::SetParameter (TParameter Parameter, int nValue) m_ReverbSpinLock.Release (); break; +#ifdef ARM_ALLOW_MULTI_CORE + /* Unison START */ + case ParameterUnisonEnable: + assert (CConfig::ToneGenerators > 1); + nValue=constrain((int)nValue,0,1); + if (!!nValue) { + for (unsigned nTG = 0; nTG < CConfig::ToneGenerators; nTG++) + { + SetTGParameter(TGParameterMIDIChannel, GetTGParameter(TGParameterMIDIChannel, 0), nTG); + SetTGParameter(TGParameterVoiceBank, GetTGParameter(TGParameterVoiceBank, 0), nTG); + SetTGParameter(TGParameterProgram, GetTGParameter(TGParameterProgram, 0), nTG); + SetTGParameter(TGParameterVolume, GetTGParameter(TGParameterVolume, 0), nTG); + } + // setting unison panning and detuning + SetParameter (ParameterUnisonPanSpread, m_nParameter[ParameterUnisonPanSpread]); + SetParameter (ParameterUnisonDetuneSpread, m_nParameter[ParameterUnisonDetuneSpread]); + } + break; + + case ParameterUnisonPanSpread: + assert (CConfig::ToneGenerators > 1); + nValue=constrain((int)nValue,0,63); + if (!!GetParameter(ParameterUnisonEnable)) + { + int step = 2 * nValue / (CConfig::ToneGenerators - 1); + int pan = 64 - nValue; + for (unsigned nTG = 0; nTG < CConfig::ToneGenerators; nTG++) + { + SetTGParameter(TGParameterPan, constrain((int)pan,0,127), nTG); + pan += step; + } + } + break; + + case ParameterUnisonDetuneSpread: + assert (CConfig::ToneGenerators > 1); + nValue=constrain((int)nValue,0,99); + if (!!GetParameter(ParameterUnisonEnable)) + { + int step = 2 * nValue / (CConfig::ToneGenerators - 1); + int detune = -nValue; + for (unsigned nTG = 0; nTG < CConfig::ToneGenerators; nTG++) + { + SetTGParameter(TGParameterMasterTune, constrain((int)detune,-99,99), nTG); + detune += step; + } + } + break; + /* Unison END */ +#endif + default: assert (0); break; @@ -700,173 +759,247 @@ int CMiniDexed::GetParameter (TParameter Parameter) void CMiniDexed::SetTGParameter (TTGParameter Parameter, int nValue, unsigned nTG) { - assert (nTG < CConfig::ToneGenerators); - - switch (Parameter) + if (nTG < CConfig::ToneGenerators) { - case TGParameterVoiceBank: BankSelectLSB (nValue, nTG); break; - case TGParameterProgram: ProgramChange (nValue, nTG); break; - case TGParameterVolume: SetVolume (nValue, nTG); break; - case TGParameterPan: SetPan (nValue, nTG); break; - case TGParameterMasterTune: SetMasterTune (nValue, nTG); break; - case TGParameterCutoff: SetCutoff (nValue, nTG); break; - case TGParameterResonance: SetResonance (nValue, nTG); break; - case TGParameterPitchBendRange: setPitchbendRange (nValue, nTG); break; - case TGParameterPitchBendStep: setPitchbendStep (nValue, nTG); break; - case TGParameterPortamentoMode: setPortamentoMode (nValue, nTG); break; - case TGParameterPortamentoGlissando: setPortamentoGlissando (nValue, nTG); break; - case TGParameterPortamentoTime: setPortamentoTime (nValue, nTG); break; - case TGParameterMonoMode: setMonoMode (nValue , nTG); break; - - case TGParameterMWRange: setModController(0, 0, nValue, nTG); break; - case TGParameterMWPitch: setModController(0, 1, nValue, nTG); break; - case TGParameterMWAmplitude: setModController(0, 2, nValue, nTG); break; - case TGParameterMWEGBias: setModController(0, 3, nValue, nTG); break; - - case TGParameterFCRange: setModController(1, 0, nValue, nTG); break; - case TGParameterFCPitch: setModController(1, 1, nValue, nTG); break; - case TGParameterFCAmplitude: setModController(1, 2, nValue, nTG); break; - case TGParameterFCEGBias: setModController(1, 3, nValue, nTG); break; - - case TGParameterBCRange: setModController(2, 0, nValue, nTG); break; - case TGParameterBCPitch: setModController(2, 1, nValue, nTG); break; - case TGParameterBCAmplitude: setModController(2, 2, nValue, nTG); break; - case TGParameterBCEGBias: setModController(2, 3, nValue, nTG); break; - - case TGParameterATRange: setModController(3, 0, nValue, nTG); break; - case TGParameterATPitch: setModController(3, 1, nValue, nTG); break; - case TGParameterATAmplitude: setModController(3, 2, nValue, nTG); break; - case TGParameterATEGBias: setModController(3, 3, nValue, nTG); break; - - case TGParameterMIDIChannel: - assert (0 <= nValue && nValue <= 255); - SetMIDIChannel ((uint8_t) nValue, nTG); - break; + assert (nTG < CConfig::ToneGenerators); + switch (Parameter) + { + case TGParameterVoiceBank: BankSelectLSB (nValue, nTG); break; + case TGParameterProgram: ProgramChange (nValue, nTG); break; + case TGParameterVolume: SetVolume (nValue, nTG); break; + case TGParameterPan: SetPan (nValue, nTG); break; + case TGParameterMasterTune: SetMasterTune (nValue, nTG); break; + case TGParameterCutoff: SetCutoff (nValue, nTG); break; + case TGParameterResonance: SetResonance (nValue, nTG); break; + case TGParameterPitchBendRange: setPitchbendRange (nValue, nTG); break; + case TGParameterPitchBendStep: setPitchbendStep (nValue, nTG); break; + case TGParameterPortamentoMode: setPortamentoMode (nValue, nTG); break; + case TGParameterPortamentoGlissando: setPortamentoGlissando (nValue, nTG); break; + case TGParameterPortamentoTime: setPortamentoTime (nValue, nTG); break; + case TGParameterMonoMode: setMonoMode (nValue , nTG); break; + + case TGParameterMWRange: setModController(0, 0, nValue, nTG); break; + case TGParameterMWPitch: setModController(0, 1, nValue, nTG); break; + case TGParameterMWAmplitude: setModController(0, 2, nValue, nTG); break; + case TGParameterMWEGBias: setModController(0, 3, nValue, nTG); break; + + case TGParameterFCRange: setModController(1, 0, nValue, nTG); break; + case TGParameterFCPitch: setModController(1, 1, nValue, nTG); break; + case TGParameterFCAmplitude: setModController(1, 2, nValue, nTG); break; + case TGParameterFCEGBias: setModController(1, 3, nValue, nTG); break; + + case TGParameterBCRange: setModController(2, 0, nValue, nTG); break; + case TGParameterBCPitch: setModController(2, 1, nValue, nTG); break; + case TGParameterBCAmplitude: setModController(2, 2, nValue, nTG); break; + case TGParameterBCEGBias: setModController(2, 3, nValue, nTG); break; + + case TGParameterATRange: setModController(3, 0, nValue, nTG); break; + case TGParameterATPitch: setModController(3, 1, nValue, nTG); break; + case TGParameterATAmplitude: setModController(3, 2, nValue, nTG); break; + case TGParameterATEGBias: setModController(3, 3, nValue, nTG); break; + + case TGParameterMIDIChannel: + assert (0 <= nValue && nValue <= 255); + SetMIDIChannel ((uint8_t) nValue, nTG); + break; - case TGParameterReverbSend: SetReverbSend (nValue, nTG); break; + case TGParameterReverbSend: SetReverbSend (nValue, nTG); break; + + default: + assert (0); + break; + } + +#ifdef ARM_ALLOW_MULTI_CORE + /* ALL TG START */ + + } else if (nTG == ALL_TG_ID) { + for (unsigned i = 0; i < CConfig::ToneGenerators; i++) + { + SetTGParameter(Parameter, nValue, i); + } + + /* ALL TG END */ +#endif - default: - assert (0); - break; } } int CMiniDexed::GetTGParameter (TTGParameter Parameter, unsigned nTG) { - assert (nTG < CConfig::ToneGenerators); - - switch (Parameter) + if (nTG < CConfig::ToneGenerators) { - case TGParameterVoiceBank: return m_nVoiceBankID[nTG]; - case TGParameterProgram: return m_nProgram[nTG]; - case TGParameterVolume: return m_nVolume[nTG]; - case TGParameterPan: return m_nPan[nTG]; - case TGParameterMasterTune: return m_nMasterTune[nTG]; - case TGParameterCutoff: return m_nCutoff[nTG]; - case TGParameterResonance: return m_nResonance[nTG]; - case TGParameterMIDIChannel: return m_nMIDIChannel[nTG]; - case TGParameterReverbSend: return m_nReverbSend[nTG]; - case TGParameterPitchBendRange: return m_nPitchBendRange[nTG]; - case TGParameterPitchBendStep: return m_nPitchBendStep[nTG]; - case TGParameterPortamentoMode: return m_nPortamentoMode[nTG]; - case TGParameterPortamentoGlissando: return m_nPortamentoGlissando[nTG]; - case TGParameterPortamentoTime: return m_nPortamentoTime[nTG]; - case TGParameterMonoMode: return m_bMonoMode[nTG] ? 1 : 0; - - case TGParameterMWRange: return getModController(0, 0, nTG); - case TGParameterMWPitch: return getModController(0, 1, nTG); - case TGParameterMWAmplitude: return getModController(0, 2, nTG); - case TGParameterMWEGBias: return getModController(0, 3, nTG); - - case TGParameterFCRange: return getModController(1, 0, nTG); - case TGParameterFCPitch: return getModController(1, 1, nTG); - case TGParameterFCAmplitude: return getModController(1, 2, nTG); - case TGParameterFCEGBias: return getModController(1, 3, nTG); - - case TGParameterBCRange: return getModController(2, 0, nTG); - case TGParameterBCPitch: return getModController(2, 1, nTG); - case TGParameterBCAmplitude: return getModController(2, 2, nTG); - case TGParameterBCEGBias: return getModController(2, 3, nTG); - - case TGParameterATRange: return getModController(3, 0, nTG); - case TGParameterATPitch: return getModController(3, 1, nTG); - case TGParameterATAmplitude: return getModController(3, 2, nTG); - case TGParameterATEGBias: return getModController(3, 3, nTG); - - - default: - assert (0); - return 0; + assert (nTG < CConfig::ToneGenerators); + + switch (Parameter) + { + case TGParameterVoiceBank: return m_nVoiceBankID[nTG]; + case TGParameterProgram: return m_nProgram[nTG]; + case TGParameterVolume: return m_nVolume[nTG]; + case TGParameterPan: return m_nPan[nTG]; + case TGParameterMasterTune: return m_nMasterTune[nTG]; + case TGParameterCutoff: return m_nCutoff[nTG]; + case TGParameterResonance: return m_nResonance[nTG]; + case TGParameterMIDIChannel: return m_nMIDIChannel[nTG]; + case TGParameterReverbSend: return m_nReverbSend[nTG]; + case TGParameterPitchBendRange: return m_nPitchBendRange[nTG]; + case TGParameterPitchBendStep: return m_nPitchBendStep[nTG]; + case TGParameterPortamentoMode: return m_nPortamentoMode[nTG]; + case TGParameterPortamentoGlissando: return m_nPortamentoGlissando[nTG]; + case TGParameterPortamentoTime: return m_nPortamentoTime[nTG]; + case TGParameterMonoMode: return m_bMonoMode[nTG] ? 1 : 0; + + case TGParameterMWRange: return getModController(0, 0, nTG); + case TGParameterMWPitch: return getModController(0, 1, nTG); + case TGParameterMWAmplitude: return getModController(0, 2, nTG); + case TGParameterMWEGBias: return getModController(0, 3, nTG); + + case TGParameterFCRange: return getModController(1, 0, nTG); + case TGParameterFCPitch: return getModController(1, 1, nTG); + case TGParameterFCAmplitude: return getModController(1, 2, nTG); + case TGParameterFCEGBias: return getModController(1, 3, nTG); + + case TGParameterBCRange: return getModController(2, 0, nTG); + case TGParameterBCPitch: return getModController(2, 1, nTG); + case TGParameterBCAmplitude: return getModController(2, 2, nTG); + case TGParameterBCEGBias: return getModController(2, 3, nTG); + + case TGParameterATRange: return getModController(3, 0, nTG); + case TGParameterATPitch: return getModController(3, 1, nTG); + case TGParameterATAmplitude: return getModController(3, 2, nTG); + case TGParameterATEGBias: return getModController(3, 3, nTG); + + + default: + assert (0); + return 0; + } + +#ifdef ARM_ALLOW_MULTI_CORE + /* ALL TG START */ + + } else if (nTG == ALL_TG_ID) { + return GetTGParameter(Parameter, 0); + + /* ALL TG END */ +#endif + } + + return 0; } void CMiniDexed::SetVoiceParameter (uint8_t uchOffset, uint8_t uchValue, unsigned nOP, unsigned nTG) { - assert (nTG < CConfig::ToneGenerators); - assert (m_pTG[nTG]); - assert (nOP <= 6); - - if (nOP < 6) + if (nTG < CConfig::ToneGenerators) { - if (uchOffset == DEXED_OP_ENABLE) + assert (nTG < CConfig::ToneGenerators); + assert (m_pTG[nTG]); + assert (nOP <= 6); + + if (nOP < 6) { - if (uchValue) + if (uchOffset == DEXED_OP_ENABLE) { - m_uchOPMask[nTG] |= 1 << nOP; - } - else - { - m_uchOPMask[nTG] &= ~(1 << nOP); - } + if (uchValue) + { + m_uchOPMask[nTG] |= 1 << nOP; + } + else + { + m_uchOPMask[nTG] &= ~(1 << nOP); + } - m_pTG[nTG]->setOPAll (m_uchOPMask[nTG]); + m_pTG[nTG]->setOPAll (m_uchOPMask[nTG]); - return; + return; + } + + nOP = 5 - nOP; // OPs are in reverse order } - nOP = 5 - nOP; // OPs are in reverse order - } + uchOffset += nOP * 21; + assert (uchOffset < 156); + + m_pTG[nTG]->setVoiceDataElement (uchOffset, uchValue); - uchOffset += nOP * 21; - assert (uchOffset < 156); +#ifdef ARM_ALLOW_MULTI_CORE + /* ALL TG START */ + + } else if (nTG == ALL_TG_ID) { + for (unsigned i = 0; i < CConfig::ToneGenerators; i++) + { + SetVoiceParameter(uchOffset, uchValue, nOP, i); + } - m_pTG[nTG]->setVoiceDataElement (uchOffset, uchValue); + /* ALL TG END */ +#endif + + } } uint8_t CMiniDexed::GetVoiceParameter (uint8_t uchOffset, unsigned nOP, unsigned nTG) { - assert (nTG < CConfig::ToneGenerators); - assert (m_pTG[nTG]); - assert (nOP <= 6); - - if (nOP < 6) + if (nTG < CConfig::ToneGenerators) { - if (uchOffset == DEXED_OP_ENABLE) + assert (nTG < CConfig::ToneGenerators); + assert (m_pTG[nTG]); + assert (nOP <= 6); + + if (nOP < 6) { - return !!(m_uchOPMask[nTG] & (1 << nOP)); + if (uchOffset == DEXED_OP_ENABLE) + { + return !!(m_uchOPMask[nTG] & (1 << nOP)); + } + + nOP = 5 - nOP; // OPs are in reverse order } - nOP = 5 - nOP; // OPs are in reverse order - } + uchOffset += nOP * 21; + assert (uchOffset < 156); + + return m_pTG[nTG]->getVoiceDataElement (uchOffset); + +#ifdef ARM_ALLOW_MULTI_CORE + /* ALL TG START */ + + } else if (nTG == ALL_TG_ID) { + return GetVoiceParameter (uchOffset, nOP, 0); - uchOffset += nOP * 21; - assert (uchOffset < 156); + /* ALL TG END */ +#endif + } - return m_pTG[nTG]->getVoiceDataElement (uchOffset); + return 0; } std::string CMiniDexed::GetVoiceName (unsigned nTG) { - char VoiceName[11]; - memset (VoiceName, 0, sizeof VoiceName); + if (nTG < CConfig::ToneGenerators) + { + char VoiceName[11]; + memset (VoiceName, 0, sizeof VoiceName); - assert (nTG < CConfig::ToneGenerators); - assert (m_pTG[nTG]); - m_pTG[nTG]->setName (VoiceName); + assert (nTG < CConfig::ToneGenerators); + assert (m_pTG[nTG]); + m_pTG[nTG]->setName (VoiceName); - std::string Result (VoiceName); + std::string Result (VoiceName); - return Result; + return Result; + +#ifdef ARM_ALLOW_MULTI_CORE + /* ALL TG START */ + + } else if (nTG == ALL_TG_ID) { + return GetVoiceName (0); + + /* ALL TG END */ +#endif + } + + return std::string("ERROR"); } #ifndef ARM_ALLOW_MULTI_CORE @@ -1036,10 +1169,10 @@ void CMiniDexed::ProcessSound (void) #endif -bool CMiniDexed::SavePerformance (bool bSaveAsDeault) +bool CMiniDexed::SavePerformance (bool bSaveAsDefault) { m_bSavePerformance = true; - m_bSaveAsDeault=bSaveAsDeault; + m_bSaveAsDefault=bSaveAsDefault; return true; } @@ -1090,7 +1223,15 @@ bool CMiniDexed::DoSavePerformance (void) m_PerformanceConfig.SetReverbDiffusion (m_nParameter[ParameterReverbDiffusion]); m_PerformanceConfig.SetReverbLevel (m_nParameter[ParameterReverbLevel]); - if(m_bSaveAsDeault) +#ifdef ARM_ALLOW_MULTI_CORE + /* UNISON START */ + m_PerformanceConfig.SetUnisonEnable (!!m_nParameter[ParameterUnisonEnable]); + m_PerformanceConfig.SetUnisonPanSpread (m_nParameter[ParameterUnisonPanSpread]); + m_PerformanceConfig.SetUnisonDetuneSpread (m_nParameter[ParameterUnisonDetuneSpread]); + /* UNISON END */ +#endif + + if(m_bSaveAsDefault) { m_PerformanceConfig.SetNewPerformance(0); @@ -1478,6 +1619,15 @@ void CMiniDexed::LoadPerformanceParameters(void) SetParameter (ParameterReverbLowPass, m_PerformanceConfig.GetReverbLowPass ()); SetParameter (ParameterReverbDiffusion, m_PerformanceConfig.GetReverbDiffusion ()); SetParameter (ParameterReverbLevel, m_PerformanceConfig.GetReverbLevel ()); + +#ifdef ARM_ALLOW_MULTI_CORE + /* UNISON START */ + SetParameter (ParameterUnisonPanSpread, m_PerformanceConfig.GetUnisonPanSpread ()); + SetParameter (ParameterUnisonDetuneSpread, m_PerformanceConfig.GetUnisonDetuneSpread ()); + SetParameter (ParameterUnisonEnable, m_PerformanceConfig.GetUnisonEnable () ? 1 : 0); + /* UNISON END */ +#endif + } std::string CMiniDexed::GetNewPerformanceDefaultName(void) diff --git a/src/minidexed.h b/src/minidexed.h index 3b7de4e..8efe5a1 100644 --- a/src/minidexed.h +++ b/src/minidexed.h @@ -134,6 +134,15 @@ public: ParameterReverbLowPass, ParameterReverbDiffusion, ParameterReverbLevel, + +#ifdef ARM_ALLOW_MULTI_CORE + /* UNISON START */ + ParameterUnisonEnable, + ParameterUnisonPanSpread, + ParameterUnisonDetuneSpread, + /* UNISON END */ +#endif + ParameterUnknown }; @@ -297,7 +306,7 @@ private: bool m_bDeletePerformance; unsigned m_nDeletePerformanceID; bool m_bLoadPerformanceBusy; - bool m_bSaveAsDeault; + bool m_bSaveAsDefault; }; #endif diff --git a/src/performanceconfig.cpp b/src/performanceconfig.cpp index 7249003..545a8eb 100644 --- a/src/performanceconfig.cpp +++ b/src/performanceconfig.cpp @@ -159,6 +159,11 @@ bool CPerformanceConfig::Load (void) m_nReverbDiffusion = m_Properties.GetNumber ("ReverbDiffusion", 65); m_nReverbLevel = m_Properties.GetNumber ("ReverbLevel", 99); + // Unison + m_bUnisonEnable = m_Properties.GetNumber("UnisonEnable", 0) != 0; + m_nUnisonPanSpread = m_Properties.GetNumber("UnisonPanSpread", 56); + m_nUnisonDetuneSpread = m_Properties.GetNumber("UnisonDetuneSpread", 21); + return bResult; } @@ -277,6 +282,10 @@ bool CPerformanceConfig::Save (void) m_Properties.SetNumber ("ReverbDiffusion", m_nReverbDiffusion); m_Properties.SetNumber ("ReverbLevel", m_nReverbLevel); + m_Properties.SetNumber ("UnisonEnable", m_bUnisonEnable ? 1 : 0); + m_Properties.SetNumber ("UnisonPanSpread", m_nUnisonPanSpread); + m_Properties.SetNumber ("UnisonDetuneSpread", m_nUnisonDetuneSpread); + return m_Properties.Save (); } @@ -503,6 +512,38 @@ void CPerformanceConfig::SetReverbLevel (unsigned nValue) { m_nReverbLevel = nValue; } + +// Unison +bool CPerformanceConfig::GetUnisonEnable (void) const +{ + return m_bUnisonEnable; +} + +unsigned CPerformanceConfig::GetUnisonPanSpread (void) const +{ + return m_nUnisonPanSpread; +} + +unsigned CPerformanceConfig::GetUnisonDetuneSpread (void) const +{ + return m_nUnisonDetuneSpread; +} + +void CPerformanceConfig::SetUnisonEnable (bool bValue) +{ + m_bUnisonEnable = bValue; +} + +void CPerformanceConfig::SetUnisonPanSpread (unsigned nValue) +{ + m_nUnisonPanSpread = nValue; +} + +void CPerformanceConfig::SetUnisonDetuneSpread (unsigned nValue) +{ + m_nUnisonDetuneSpread = nValue; +} + // Pitch bender and portamento: void CPerformanceConfig::SetPitchBendRange (unsigned nValue, unsigned nTG) { diff --git a/src/performanceconfig.h b/src/performanceconfig.h index ec32598..3b3838f 100644 --- a/src/performanceconfig.h +++ b/src/performanceconfig.h @@ -117,6 +117,14 @@ public: void SetReverbDiffusion (unsigned nValue); void SetReverbLevel (unsigned nValue); + // Unison + bool GetUnisonEnable (void) const; + unsigned GetUnisonPanSpread (void) const; + unsigned GetUnisonDetuneSpread (void) const; + void SetUnisonEnable (bool bValue); + void SetUnisonPanSpread (unsigned nValue); + void SetUnisonDetuneSpread (unsigned nValue); + bool VoiceDataFilled(unsigned nTG); bool ListPerformances(); //std::string m_DirName; @@ -183,6 +191,11 @@ private: unsigned m_nReverbLowPass; unsigned m_nReverbDiffusion; unsigned m_nReverbLevel; + + // Unison + bool m_bUnisonEnable; + unsigned m_nUnisonPanSpread; + unsigned m_nUnisonDetuneSpread; }; #endif diff --git a/src/uimenu.cpp b/src/uimenu.cpp index a1d44ce..7649e99 100644 --- a/src/uimenu.cpp +++ b/src/uimenu.cpp @@ -52,6 +52,11 @@ const CUIMenu::TMenuItem CUIMenu::s_MainMenu[] = {"TG8", MenuHandler, s_TGMenu, 7}, #endif {"Effects", MenuHandler, s_EffectsMenu}, +#ifdef ARM_ALLOW_MULTI_CORE + /* Unison START */ + {"Unison", MenuHandler, s_UnisonMenu}, + /* Unison END */ +#endif {"Performance", MenuHandler, s_PerformanceMenu}, {0} }; @@ -77,6 +82,29 @@ const CUIMenu::TMenuItem CUIMenu::s_TGMenu[] = {0} }; +#ifdef ARM_ALLOW_MULTI_CORE + /* ALL TG START */ +const CUIMenu::TMenuItem CUIMenu::s_AllTGMenu[] = +{ + {"Voice", EditProgramNumber}, + {"Bank", EditVoiceBankNumber}, + {"Volume", EditTGParameter, 0, CMiniDexed::TGParameterVolume}, + {"Pan Spread", EditGlobalParameter, 0, CMiniDexed::ParameterUnisonPanSpread}, + {"Reverb-Send", EditTGParameter, 0, CMiniDexed::TGParameterReverbSend}, + {"Detune", EditGlobalParameter, 0, CMiniDexed::ParameterUnisonDetuneSpread}, + {"Cutoff", EditTGParameter, 0, CMiniDexed::TGParameterCutoff}, + {"Resonance", EditTGParameter, 0, CMiniDexed::TGParameterResonance}, + {"Pitch Bend", MenuHandler, s_EditPitchBendMenu}, + {"Portamento", MenuHandler, s_EditPortamentoMenu}, + {"Poly/Mono", EditTGParameter, 0, CMiniDexed::TGParameterMonoMode}, + {"Modulation", MenuHandler, s_ModulationMenu}, + {"Channel", EditTGParameter, 0, CMiniDexed::TGParameterMIDIChannel}, + {"Edit Voice", MenuHandler, s_EditVoiceMenu}, + {0} +}; + /* ALL TG END */ +#endif + const CUIMenu::TMenuItem CUIMenu::s_EffectsMenu[] = { {"Compress", EditGlobalParameter, 0, CMiniDexed::ParameterCompressorEnable}, @@ -135,6 +163,19 @@ const CUIMenu::TMenuItem CUIMenu::s_ReverbMenu[] = #endif +#ifdef ARM_ALLOW_MULTI_CORE + /* Unison START */ +const CUIMenu::TMenuItem CUIMenu::s_UnisonMenu[] = +{ + {"Enable", EditGlobalParameter, 0, CMiniDexed::ParameterUnisonEnable}, + {"All TG", MenuHandler, s_AllTGMenu, ALL_TG_ID}, + // {"Max Pan", EditGlobalParameter, 0, CMiniDexed::ParameterUnisonPanSpread}, + // {"Max Detune", EditGlobalParameter, 0, CMiniDexed::ParameterUnisonDetuneSpread}, + {0} +}; + /* Unison END */ +#endif + // inserting menu items before "OP1" affect OPShortcutHandler() const CUIMenu::TMenuItem CUIMenu::s_EditVoiceMenu[] = { @@ -213,6 +254,15 @@ const CUIMenu::TParameter CUIMenu::s_GlobalParameter[CMiniDexed::ParameterUnknow {0, 99, 1}, // ParameterReverbLowPass {0, 99, 1}, // ParameterReverbDiffusion {0, 99, 1} // ParameterReverbLevel + +#ifdef ARM_ALLOW_MULTI_CORE + , + /* UNISON START */ + {0, 1, 1, ToOnOff}, // ParameterUnisonEnable + {0, 63, 1}, // ParameterUnisonPanSpread + {0, 99, 1} // ParameterUnisonDetuneSpread + /* UNISON END */ +#endif }; // must match CMiniDexed::TTGParameter diff --git a/src/uimenu.h b/src/uimenu.h index 78384be..f6bec8b 100644 --- a/src/uimenu.h +++ b/src/uimenu.h @@ -26,6 +26,8 @@ #include #include +#define ALL_TG_ID 100 + class CMiniDexed; class CUserInterface; @@ -137,6 +139,11 @@ private: static const TMenuItem s_MenuRoot[]; static const TMenuItem s_MainMenu[]; static const TMenuItem s_TGMenu[]; +#ifdef ARM_ALLOW_MULTI_CORE + /* ALL TG START */ + static const TMenuItem s_AllTGMenu[]; + /* ALL TG END */ +#endif static const TMenuItem s_EffectsMenu[]; static const TMenuItem s_ReverbMenu[]; static const TMenuItem s_EditVoiceMenu[]; @@ -145,7 +152,13 @@ private: static const TMenuItem s_EditPitchBendMenu[]; static const TMenuItem s_EditPortamentoMenu[]; static const TMenuItem s_PerformanceMenu[]; - + +#ifdef ARM_ALLOW_MULTI_CORE + /* Unison START */ + static const TMenuItem s_UnisonMenu[]; + /* Unison END */ +#endif + static const TMenuItem s_ModulationMenu[]; static const TMenuItem s_ModulationMenuParameters[]; From dabe431d53469d36172611375998c702f99967e6 Mon Sep 17 00:00:00 2001 From: abscisys Date: Tue, 20 Dec 2022 01:13:46 +0100 Subject: [PATCH 2/6] Fixing compiling errors on RPI1 --- src/minidexed.cpp | 12 +++++++----- src/performanceconfig.cpp | 9 ++++++++- src/performanceconfig.h | 5 ++++- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/minidexed.cpp b/src/minidexed.cpp index 830e63d..46d951e 100644 --- a/src/minidexed.cpp +++ b/src/minidexed.cpp @@ -37,9 +37,6 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt, CMultiCoreSupport (CMemorySystem::Get ()), #endif m_pConfig (pConfig), - m_bSavePerformanceNewFile (false), - m_bSetNewPerformance (false), - m_bDeletePerformance (false), m_UI (this, pGPIOManager, pI2CMaster, pConfig), m_PerformanceConfig (pFileSystem), m_PCKeyboard (this, pConfig, &m_UI), @@ -54,6 +51,9 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt, 1000000U * pConfig->GetChunkSize ()/2 / pConfig->GetSampleRate ()), m_bProfileEnabled (m_pConfig->GetProfileEnabled ()), m_bSavePerformance (false), + m_bSavePerformanceNewFile (false), + m_bSetNewPerformance (false), + m_bDeletePerformance (false), m_bLoadPerformanceBusy(false), m_bSaveAsDefault(false) { @@ -159,11 +159,13 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt, SetParameter (ParameterCompressorEnable, 1); - // BEGIN Unison + #ifdef ARM_ALLOW_MULTI_CORE + /* Unison START */ SetParameter (ParameterUnisonEnable, 0); SetParameter (ParameterUnisonPanSpread, 60); SetParameter (ParameterUnisonDetuneSpread, 12); - // END Unison + /* Unison END */ + #endif }; bool CMiniDexed::Initialize (void) diff --git a/src/performanceconfig.cpp b/src/performanceconfig.cpp index 545a8eb..af36e8a 100644 --- a/src/performanceconfig.cpp +++ b/src/performanceconfig.cpp @@ -159,10 +159,13 @@ bool CPerformanceConfig::Load (void) m_nReverbDiffusion = m_Properties.GetNumber ("ReverbDiffusion", 65); m_nReverbLevel = m_Properties.GetNumber ("ReverbLevel", 99); - // Unison + #ifdef ARM_ALLOW_MULTI_CORE + /* Unison START */ m_bUnisonEnable = m_Properties.GetNumber("UnisonEnable", 0) != 0; m_nUnisonPanSpread = m_Properties.GetNumber("UnisonPanSpread", 56); m_nUnisonDetuneSpread = m_Properties.GetNumber("UnisonDetuneSpread", 21); + /* Unison END */ + #endif return bResult; } @@ -282,9 +285,13 @@ bool CPerformanceConfig::Save (void) m_Properties.SetNumber ("ReverbDiffusion", m_nReverbDiffusion); m_Properties.SetNumber ("ReverbLevel", m_nReverbLevel); + #ifdef ARM_ALLOW_MULTI_CORE + /* Unison START */ m_Properties.SetNumber ("UnisonEnable", m_bUnisonEnable ? 1 : 0); m_Properties.SetNumber ("UnisonPanSpread", m_nUnisonPanSpread); m_Properties.SetNumber ("UnisonDetuneSpread", m_nUnisonDetuneSpread); + /* Unison END */ + #endif return m_Properties.Save (); } diff --git a/src/performanceconfig.h b/src/performanceconfig.h index 3b3838f..017c419 100644 --- a/src/performanceconfig.h +++ b/src/performanceconfig.h @@ -192,10 +192,13 @@ private: unsigned m_nReverbDiffusion; unsigned m_nReverbLevel; - // Unison + #ifdef ARM_ALLOW_MULTI_CORE + /* Unison START */ bool m_bUnisonEnable; unsigned m_nUnisonPanSpread; unsigned m_nUnisonDetuneSpread; + /* Unison END */ + #endif }; #endif From 03a07747f096643265dd724964518acc7f682de9 Mon Sep 17 00:00:00 2001 From: abscisys Date: Tue, 20 Dec 2022 01:38:24 +0100 Subject: [PATCH 3/6] Fixing compiling issue on RPI1 --- src/performanceconfig.cpp | 5 ++++- src/performanceconfig.h | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/performanceconfig.cpp b/src/performanceconfig.cpp index af36e8a..b7d967a 100644 --- a/src/performanceconfig.cpp +++ b/src/performanceconfig.cpp @@ -520,7 +520,8 @@ void CPerformanceConfig::SetReverbLevel (unsigned nValue) m_nReverbLevel = nValue; } -// Unison +#ifdef ARM_ALLOW_MULTI_CORE +/* Unison START */ bool CPerformanceConfig::GetUnisonEnable (void) const { return m_bUnisonEnable; @@ -550,6 +551,8 @@ void CPerformanceConfig::SetUnisonDetuneSpread (unsigned nValue) { m_nUnisonDetuneSpread = nValue; } +/* Unison END */ +#endif // Pitch bender and portamento: void CPerformanceConfig::SetPitchBendRange (unsigned nValue, unsigned nTG) diff --git a/src/performanceconfig.h b/src/performanceconfig.h index 017c419..76aa768 100644 --- a/src/performanceconfig.h +++ b/src/performanceconfig.h @@ -117,13 +117,16 @@ public: void SetReverbDiffusion (unsigned nValue); void SetReverbLevel (unsigned nValue); - // Unison + #ifdef ARM_ALLOW_MULTI_CORE + /* Unison START */ bool GetUnisonEnable (void) const; unsigned GetUnisonPanSpread (void) const; unsigned GetUnisonDetuneSpread (void) const; void SetUnisonEnable (bool bValue); void SetUnisonPanSpread (unsigned nValue); void SetUnisonDetuneSpread (unsigned nValue); + /* Unison END */ + #endif bool VoiceDataFilled(unsigned nTG); bool ListPerformances(); From aac83913329823203dbe58e2538433afe14b8809 Mon Sep 17 00:00:00 2001 From: abscisys Date: Tue, 20 Dec 2022 03:51:31 +0100 Subject: [PATCH 4/6] Revert "Fixing compiling issue on RPI1" This reverts commit 03a07747f096643265dd724964518acc7f682de9. --- src/performanceconfig.cpp | 5 +---- src/performanceconfig.h | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/performanceconfig.cpp b/src/performanceconfig.cpp index b7d967a..af36e8a 100644 --- a/src/performanceconfig.cpp +++ b/src/performanceconfig.cpp @@ -520,8 +520,7 @@ void CPerformanceConfig::SetReverbLevel (unsigned nValue) m_nReverbLevel = nValue; } -#ifdef ARM_ALLOW_MULTI_CORE -/* Unison START */ +// Unison bool CPerformanceConfig::GetUnisonEnable (void) const { return m_bUnisonEnable; @@ -551,8 +550,6 @@ void CPerformanceConfig::SetUnisonDetuneSpread (unsigned nValue) { m_nUnisonDetuneSpread = nValue; } -/* Unison END */ -#endif // Pitch bender and portamento: void CPerformanceConfig::SetPitchBendRange (unsigned nValue, unsigned nTG) diff --git a/src/performanceconfig.h b/src/performanceconfig.h index 76aa768..017c419 100644 --- a/src/performanceconfig.h +++ b/src/performanceconfig.h @@ -117,16 +117,13 @@ public: void SetReverbDiffusion (unsigned nValue); void SetReverbLevel (unsigned nValue); - #ifdef ARM_ALLOW_MULTI_CORE - /* Unison START */ + // Unison bool GetUnisonEnable (void) const; unsigned GetUnisonPanSpread (void) const; unsigned GetUnisonDetuneSpread (void) const; void SetUnisonEnable (bool bValue); void SetUnisonPanSpread (unsigned nValue); void SetUnisonDetuneSpread (unsigned nValue); - /* Unison END */ - #endif bool VoiceDataFilled(unsigned nTG); bool ListPerformances(); From 11b38851af8ce2ffa11a5c24e3ef25b48935951e Mon Sep 17 00:00:00 2001 From: abscisys Date: Tue, 20 Dec 2022 03:51:57 +0100 Subject: [PATCH 5/6] Revert "Fixing compiling errors on RPI1" This reverts commit dabe431d53469d36172611375998c702f99967e6. --- src/minidexed.cpp | 12 +++++------- src/performanceconfig.cpp | 9 +-------- src/performanceconfig.h | 5 +---- 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/src/minidexed.cpp b/src/minidexed.cpp index 46d951e..830e63d 100644 --- a/src/minidexed.cpp +++ b/src/minidexed.cpp @@ -37,6 +37,9 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt, CMultiCoreSupport (CMemorySystem::Get ()), #endif m_pConfig (pConfig), + m_bSavePerformanceNewFile (false), + m_bSetNewPerformance (false), + m_bDeletePerformance (false), m_UI (this, pGPIOManager, pI2CMaster, pConfig), m_PerformanceConfig (pFileSystem), m_PCKeyboard (this, pConfig, &m_UI), @@ -51,9 +54,6 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt, 1000000U * pConfig->GetChunkSize ()/2 / pConfig->GetSampleRate ()), m_bProfileEnabled (m_pConfig->GetProfileEnabled ()), m_bSavePerformance (false), - m_bSavePerformanceNewFile (false), - m_bSetNewPerformance (false), - m_bDeletePerformance (false), m_bLoadPerformanceBusy(false), m_bSaveAsDefault(false) { @@ -159,13 +159,11 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt, SetParameter (ParameterCompressorEnable, 1); - #ifdef ARM_ALLOW_MULTI_CORE - /* Unison START */ + // BEGIN Unison SetParameter (ParameterUnisonEnable, 0); SetParameter (ParameterUnisonPanSpread, 60); SetParameter (ParameterUnisonDetuneSpread, 12); - /* Unison END */ - #endif + // END Unison }; bool CMiniDexed::Initialize (void) diff --git a/src/performanceconfig.cpp b/src/performanceconfig.cpp index af36e8a..545a8eb 100644 --- a/src/performanceconfig.cpp +++ b/src/performanceconfig.cpp @@ -159,13 +159,10 @@ bool CPerformanceConfig::Load (void) m_nReverbDiffusion = m_Properties.GetNumber ("ReverbDiffusion", 65); m_nReverbLevel = m_Properties.GetNumber ("ReverbLevel", 99); - #ifdef ARM_ALLOW_MULTI_CORE - /* Unison START */ + // Unison m_bUnisonEnable = m_Properties.GetNumber("UnisonEnable", 0) != 0; m_nUnisonPanSpread = m_Properties.GetNumber("UnisonPanSpread", 56); m_nUnisonDetuneSpread = m_Properties.GetNumber("UnisonDetuneSpread", 21); - /* Unison END */ - #endif return bResult; } @@ -285,13 +282,9 @@ bool CPerformanceConfig::Save (void) m_Properties.SetNumber ("ReverbDiffusion", m_nReverbDiffusion); m_Properties.SetNumber ("ReverbLevel", m_nReverbLevel); - #ifdef ARM_ALLOW_MULTI_CORE - /* Unison START */ m_Properties.SetNumber ("UnisonEnable", m_bUnisonEnable ? 1 : 0); m_Properties.SetNumber ("UnisonPanSpread", m_nUnisonPanSpread); m_Properties.SetNumber ("UnisonDetuneSpread", m_nUnisonDetuneSpread); - /* Unison END */ - #endif return m_Properties.Save (); } diff --git a/src/performanceconfig.h b/src/performanceconfig.h index 017c419..3b3838f 100644 --- a/src/performanceconfig.h +++ b/src/performanceconfig.h @@ -192,13 +192,10 @@ private: unsigned m_nReverbDiffusion; unsigned m_nReverbLevel; - #ifdef ARM_ALLOW_MULTI_CORE - /* Unison START */ + // Unison bool m_bUnisonEnable; unsigned m_nUnisonPanSpread; unsigned m_nUnisonDetuneSpread; - /* Unison END */ - #endif }; #endif From 531726562461b96c245032e24106b29aacbaba9a Mon Sep 17 00:00:00 2001 From: abscisys Date: Tue, 20 Dec 2022 03:52:11 +0100 Subject: [PATCH 6/6] Revert "Implementationg proposition for:" This reverts commit a69e97f61d1476f4bc8529bbcff51c09918dd0bf. --- src/minidexed.cpp | 422 ++++++++++++-------------------------- src/minidexed.h | 11 +- src/performanceconfig.cpp | 41 ---- src/performanceconfig.h | 13 -- src/uimenu.cpp | 50 ----- src/uimenu.h | 15 +- 6 files changed, 138 insertions(+), 414 deletions(-) diff --git a/src/minidexed.cpp b/src/minidexed.cpp index 830e63d..0240ea5 100644 --- a/src/minidexed.cpp +++ b/src/minidexed.cpp @@ -37,9 +37,6 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt, CMultiCoreSupport (CMemorySystem::Get ()), #endif m_pConfig (pConfig), - m_bSavePerformanceNewFile (false), - m_bSetNewPerformance (false), - m_bDeletePerformance (false), m_UI (this, pGPIOManager, pI2CMaster, pConfig), m_PerformanceConfig (pFileSystem), m_PCKeyboard (this, pConfig, &m_UI), @@ -54,8 +51,10 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt, 1000000U * pConfig->GetChunkSize ()/2 / pConfig->GetSampleRate ()), m_bProfileEnabled (m_pConfig->GetProfileEnabled ()), m_bSavePerformance (false), - m_bLoadPerformanceBusy(false), - m_bSaveAsDefault(false) + m_bSavePerformanceNewFile (false), + m_bSetNewPerformance (false), + m_bDeletePerformance (false), + m_bLoadPerformanceBusy(false) { assert (m_pConfig); @@ -158,12 +157,6 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt, // END setup reverb SetParameter (ParameterCompressorEnable, 1); - - // BEGIN Unison - SetParameter (ParameterUnisonEnable, 0); - SetParameter (ParameterUnisonPanSpread, 60); - SetParameter (ParameterUnisonDetuneSpread, 12); - // END Unison }; bool CMiniDexed::Initialize (void) @@ -419,9 +412,8 @@ void CMiniDexed::SetPan (unsigned nPan, unsigned nTG) assert (nTG < CConfig::ToneGenerators); m_nPan[nTG] = nPan; - float normPan = mapfloat(nPan,0,127,0.0f,1.0f); - tg_mixer->pan(nTG,normPan); - reverb_send_mixer->pan(nTG,normPan); + tg_mixer->pan(nTG,mapfloat(nPan,0,127,0.0f,1.0f)); + reverb_send_mixer->pan(nTG,mapfloat(nPan,0,127,0.0f,1.0f)); m_UI.ParameterChanged (); } @@ -694,57 +686,6 @@ void CMiniDexed::SetParameter (TParameter Parameter, int nValue) m_ReverbSpinLock.Release (); break; -#ifdef ARM_ALLOW_MULTI_CORE - /* Unison START */ - case ParameterUnisonEnable: - assert (CConfig::ToneGenerators > 1); - nValue=constrain((int)nValue,0,1); - if (!!nValue) { - for (unsigned nTG = 0; nTG < CConfig::ToneGenerators; nTG++) - { - SetTGParameter(TGParameterMIDIChannel, GetTGParameter(TGParameterMIDIChannel, 0), nTG); - SetTGParameter(TGParameterVoiceBank, GetTGParameter(TGParameterVoiceBank, 0), nTG); - SetTGParameter(TGParameterProgram, GetTGParameter(TGParameterProgram, 0), nTG); - SetTGParameter(TGParameterVolume, GetTGParameter(TGParameterVolume, 0), nTG); - } - // setting unison panning and detuning - SetParameter (ParameterUnisonPanSpread, m_nParameter[ParameterUnisonPanSpread]); - SetParameter (ParameterUnisonDetuneSpread, m_nParameter[ParameterUnisonDetuneSpread]); - } - break; - - case ParameterUnisonPanSpread: - assert (CConfig::ToneGenerators > 1); - nValue=constrain((int)nValue,0,63); - if (!!GetParameter(ParameterUnisonEnable)) - { - int step = 2 * nValue / (CConfig::ToneGenerators - 1); - int pan = 64 - nValue; - for (unsigned nTG = 0; nTG < CConfig::ToneGenerators; nTG++) - { - SetTGParameter(TGParameterPan, constrain((int)pan,0,127), nTG); - pan += step; - } - } - break; - - case ParameterUnisonDetuneSpread: - assert (CConfig::ToneGenerators > 1); - nValue=constrain((int)nValue,0,99); - if (!!GetParameter(ParameterUnisonEnable)) - { - int step = 2 * nValue / (CConfig::ToneGenerators - 1); - int detune = -nValue; - for (unsigned nTG = 0; nTG < CConfig::ToneGenerators; nTG++) - { - SetTGParameter(TGParameterMasterTune, constrain((int)detune,-99,99), nTG); - detune += step; - } - } - break; - /* Unison END */ -#endif - default: assert (0); break; @@ -759,247 +700,173 @@ int CMiniDexed::GetParameter (TParameter Parameter) void CMiniDexed::SetTGParameter (TTGParameter Parameter, int nValue, unsigned nTG) { - if (nTG < CConfig::ToneGenerators) - { - assert (nTG < CConfig::ToneGenerators); - switch (Parameter) - { - case TGParameterVoiceBank: BankSelectLSB (nValue, nTG); break; - case TGParameterProgram: ProgramChange (nValue, nTG); break; - case TGParameterVolume: SetVolume (nValue, nTG); break; - case TGParameterPan: SetPan (nValue, nTG); break; - case TGParameterMasterTune: SetMasterTune (nValue, nTG); break; - case TGParameterCutoff: SetCutoff (nValue, nTG); break; - case TGParameterResonance: SetResonance (nValue, nTG); break; - case TGParameterPitchBendRange: setPitchbendRange (nValue, nTG); break; - case TGParameterPitchBendStep: setPitchbendStep (nValue, nTG); break; - case TGParameterPortamentoMode: setPortamentoMode (nValue, nTG); break; - case TGParameterPortamentoGlissando: setPortamentoGlissando (nValue, nTG); break; - case TGParameterPortamentoTime: setPortamentoTime (nValue, nTG); break; - case TGParameterMonoMode: setMonoMode (nValue , nTG); break; - - case TGParameterMWRange: setModController(0, 0, nValue, nTG); break; - case TGParameterMWPitch: setModController(0, 1, nValue, nTG); break; - case TGParameterMWAmplitude: setModController(0, 2, nValue, nTG); break; - case TGParameterMWEGBias: setModController(0, 3, nValue, nTG); break; - - case TGParameterFCRange: setModController(1, 0, nValue, nTG); break; - case TGParameterFCPitch: setModController(1, 1, nValue, nTG); break; - case TGParameterFCAmplitude: setModController(1, 2, nValue, nTG); break; - case TGParameterFCEGBias: setModController(1, 3, nValue, nTG); break; - - case TGParameterBCRange: setModController(2, 0, nValue, nTG); break; - case TGParameterBCPitch: setModController(2, 1, nValue, nTG); break; - case TGParameterBCAmplitude: setModController(2, 2, nValue, nTG); break; - case TGParameterBCEGBias: setModController(2, 3, nValue, nTG); break; - - case TGParameterATRange: setModController(3, 0, nValue, nTG); break; - case TGParameterATPitch: setModController(3, 1, nValue, nTG); break; - case TGParameterATAmplitude: setModController(3, 2, nValue, nTG); break; - case TGParameterATEGBias: setModController(3, 3, nValue, nTG); break; - - case TGParameterMIDIChannel: - assert (0 <= nValue && nValue <= 255); - SetMIDIChannel ((uint8_t) nValue, nTG); - break; - - case TGParameterReverbSend: SetReverbSend (nValue, nTG); break; - - default: - assert (0); - break; - } - -#ifdef ARM_ALLOW_MULTI_CORE - /* ALL TG START */ + assert (nTG < CConfig::ToneGenerators); - } else if (nTG == ALL_TG_ID) { - for (unsigned i = 0; i < CConfig::ToneGenerators; i++) - { - SetTGParameter(Parameter, nValue, i); - } + switch (Parameter) + { + case TGParameterVoiceBank: BankSelectLSB (nValue, nTG); break; + case TGParameterProgram: ProgramChange (nValue, nTG); break; + case TGParameterVolume: SetVolume (nValue, nTG); break; + case TGParameterPan: SetPan (nValue, nTG); break; + case TGParameterMasterTune: SetMasterTune (nValue, nTG); break; + case TGParameterCutoff: SetCutoff (nValue, nTG); break; + case TGParameterResonance: SetResonance (nValue, nTG); break; + case TGParameterPitchBendRange: setPitchbendRange (nValue, nTG); break; + case TGParameterPitchBendStep: setPitchbendStep (nValue, nTG); break; + case TGParameterPortamentoMode: setPortamentoMode (nValue, nTG); break; + case TGParameterPortamentoGlissando: setPortamentoGlissando (nValue, nTG); break; + case TGParameterPortamentoTime: setPortamentoTime (nValue, nTG); break; + case TGParameterMonoMode: setMonoMode (nValue , nTG); break; + + case TGParameterMWRange: setModController(0, 0, nValue, nTG); break; + case TGParameterMWPitch: setModController(0, 1, nValue, nTG); break; + case TGParameterMWAmplitude: setModController(0, 2, nValue, nTG); break; + case TGParameterMWEGBias: setModController(0, 3, nValue, nTG); break; + + case TGParameterFCRange: setModController(1, 0, nValue, nTG); break; + case TGParameterFCPitch: setModController(1, 1, nValue, nTG); break; + case TGParameterFCAmplitude: setModController(1, 2, nValue, nTG); break; + case TGParameterFCEGBias: setModController(1, 3, nValue, nTG); break; + + case TGParameterBCRange: setModController(2, 0, nValue, nTG); break; + case TGParameterBCPitch: setModController(2, 1, nValue, nTG); break; + case TGParameterBCAmplitude: setModController(2, 2, nValue, nTG); break; + case TGParameterBCEGBias: setModController(2, 3, nValue, nTG); break; + + case TGParameterATRange: setModController(3, 0, nValue, nTG); break; + case TGParameterATPitch: setModController(3, 1, nValue, nTG); break; + case TGParameterATAmplitude: setModController(3, 2, nValue, nTG); break; + case TGParameterATEGBias: setModController(3, 3, nValue, nTG); break; + + case TGParameterMIDIChannel: + assert (0 <= nValue && nValue <= 255); + SetMIDIChannel ((uint8_t) nValue, nTG); + break; - /* ALL TG END */ -#endif + case TGParameterReverbSend: SetReverbSend (nValue, nTG); break; + default: + assert (0); + break; } } int CMiniDexed::GetTGParameter (TTGParameter Parameter, unsigned nTG) { - if (nTG < CConfig::ToneGenerators) - { - assert (nTG < CConfig::ToneGenerators); - - switch (Parameter) - { - case TGParameterVoiceBank: return m_nVoiceBankID[nTG]; - case TGParameterProgram: return m_nProgram[nTG]; - case TGParameterVolume: return m_nVolume[nTG]; - case TGParameterPan: return m_nPan[nTG]; - case TGParameterMasterTune: return m_nMasterTune[nTG]; - case TGParameterCutoff: return m_nCutoff[nTG]; - case TGParameterResonance: return m_nResonance[nTG]; - case TGParameterMIDIChannel: return m_nMIDIChannel[nTG]; - case TGParameterReverbSend: return m_nReverbSend[nTG]; - case TGParameterPitchBendRange: return m_nPitchBendRange[nTG]; - case TGParameterPitchBendStep: return m_nPitchBendStep[nTG]; - case TGParameterPortamentoMode: return m_nPortamentoMode[nTG]; - case TGParameterPortamentoGlissando: return m_nPortamentoGlissando[nTG]; - case TGParameterPortamentoTime: return m_nPortamentoTime[nTG]; - case TGParameterMonoMode: return m_bMonoMode[nTG] ? 1 : 0; - - case TGParameterMWRange: return getModController(0, 0, nTG); - case TGParameterMWPitch: return getModController(0, 1, nTG); - case TGParameterMWAmplitude: return getModController(0, 2, nTG); - case TGParameterMWEGBias: return getModController(0, 3, nTG); - - case TGParameterFCRange: return getModController(1, 0, nTG); - case TGParameterFCPitch: return getModController(1, 1, nTG); - case TGParameterFCAmplitude: return getModController(1, 2, nTG); - case TGParameterFCEGBias: return getModController(1, 3, nTG); - - case TGParameterBCRange: return getModController(2, 0, nTG); - case TGParameterBCPitch: return getModController(2, 1, nTG); - case TGParameterBCAmplitude: return getModController(2, 2, nTG); - case TGParameterBCEGBias: return getModController(2, 3, nTG); - - case TGParameterATRange: return getModController(3, 0, nTG); - case TGParameterATPitch: return getModController(3, 1, nTG); - case TGParameterATAmplitude: return getModController(3, 2, nTG); - case TGParameterATEGBias: return getModController(3, 3, nTG); - - - default: - assert (0); - return 0; - } - -#ifdef ARM_ALLOW_MULTI_CORE - /* ALL TG START */ - - } else if (nTG == ALL_TG_ID) { - return GetTGParameter(Parameter, 0); - - /* ALL TG END */ -#endif + assert (nTG < CConfig::ToneGenerators); + switch (Parameter) + { + case TGParameterVoiceBank: return m_nVoiceBankID[nTG]; + case TGParameterProgram: return m_nProgram[nTG]; + case TGParameterVolume: return m_nVolume[nTG]; + case TGParameterPan: return m_nPan[nTG]; + case TGParameterMasterTune: return m_nMasterTune[nTG]; + case TGParameterCutoff: return m_nCutoff[nTG]; + case TGParameterResonance: return m_nResonance[nTG]; + case TGParameterMIDIChannel: return m_nMIDIChannel[nTG]; + case TGParameterReverbSend: return m_nReverbSend[nTG]; + case TGParameterPitchBendRange: return m_nPitchBendRange[nTG]; + case TGParameterPitchBendStep: return m_nPitchBendStep[nTG]; + case TGParameterPortamentoMode: return m_nPortamentoMode[nTG]; + case TGParameterPortamentoGlissando: return m_nPortamentoGlissando[nTG]; + case TGParameterPortamentoTime: return m_nPortamentoTime[nTG]; + case TGParameterMonoMode: return m_bMonoMode[nTG] ? 1 : 0; + + case TGParameterMWRange: return getModController(0, 0, nTG); + case TGParameterMWPitch: return getModController(0, 1, nTG); + case TGParameterMWAmplitude: return getModController(0, 2, nTG); + case TGParameterMWEGBias: return getModController(0, 3, nTG); + + case TGParameterFCRange: return getModController(1, 0, nTG); + case TGParameterFCPitch: return getModController(1, 1, nTG); + case TGParameterFCAmplitude: return getModController(1, 2, nTG); + case TGParameterFCEGBias: return getModController(1, 3, nTG); + + case TGParameterBCRange: return getModController(2, 0, nTG); + case TGParameterBCPitch: return getModController(2, 1, nTG); + case TGParameterBCAmplitude: return getModController(2, 2, nTG); + case TGParameterBCEGBias: return getModController(2, 3, nTG); + + case TGParameterATRange: return getModController(3, 0, nTG); + case TGParameterATPitch: return getModController(3, 1, nTG); + case TGParameterATAmplitude: return getModController(3, 2, nTG); + case TGParameterATEGBias: return getModController(3, 3, nTG); + + + default: + assert (0); + return 0; } - - return 0; } void CMiniDexed::SetVoiceParameter (uint8_t uchOffset, uint8_t uchValue, unsigned nOP, unsigned nTG) { - if (nTG < CConfig::ToneGenerators) - { - assert (nTG < CConfig::ToneGenerators); - assert (m_pTG[nTG]); - assert (nOP <= 6); + assert (nTG < CConfig::ToneGenerators); + assert (m_pTG[nTG]); + assert (nOP <= 6); - if (nOP < 6) + if (nOP < 6) + { + if (uchOffset == DEXED_OP_ENABLE) { - if (uchOffset == DEXED_OP_ENABLE) + if (uchValue) { - if (uchValue) - { - m_uchOPMask[nTG] |= 1 << nOP; - } - else - { - m_uchOPMask[nTG] &= ~(1 << nOP); - } - - m_pTG[nTG]->setOPAll (m_uchOPMask[nTG]); - - return; + m_uchOPMask[nTG] |= 1 << nOP; + } + else + { + m_uchOPMask[nTG] &= ~(1 << nOP); } - nOP = 5 - nOP; // OPs are in reverse order - } - - uchOffset += nOP * 21; - assert (uchOffset < 156); - - m_pTG[nTG]->setVoiceDataElement (uchOffset, uchValue); - -#ifdef ARM_ALLOW_MULTI_CORE - /* ALL TG START */ + m_pTG[nTG]->setOPAll (m_uchOPMask[nTG]); - } else if (nTG == ALL_TG_ID) { - for (unsigned i = 0; i < CConfig::ToneGenerators; i++) - { - SetVoiceParameter(uchOffset, uchValue, nOP, i); + return; } - /* ALL TG END */ -#endif - + nOP = 5 - nOP; // OPs are in reverse order } + + uchOffset += nOP * 21; + assert (uchOffset < 156); + + m_pTG[nTG]->setVoiceDataElement (uchOffset, uchValue); } uint8_t CMiniDexed::GetVoiceParameter (uint8_t uchOffset, unsigned nOP, unsigned nTG) { - if (nTG < CConfig::ToneGenerators) - { - assert (nTG < CConfig::ToneGenerators); - assert (m_pTG[nTG]); - assert (nOP <= 6); + assert (nTG < CConfig::ToneGenerators); + assert (m_pTG[nTG]); + assert (nOP <= 6); - if (nOP < 6) + if (nOP < 6) + { + if (uchOffset == DEXED_OP_ENABLE) { - if (uchOffset == DEXED_OP_ENABLE) - { - return !!(m_uchOPMask[nTG] & (1 << nOP)); - } - - nOP = 5 - nOP; // OPs are in reverse order + return !!(m_uchOPMask[nTG] & (1 << nOP)); } - uchOffset += nOP * 21; - assert (uchOffset < 156); - - return m_pTG[nTG]->getVoiceDataElement (uchOffset); - -#ifdef ARM_ALLOW_MULTI_CORE - /* ALL TG START */ - - } else if (nTG == ALL_TG_ID) { - return GetVoiceParameter (uchOffset, nOP, 0); - - /* ALL TG END */ -#endif + nOP = 5 - nOP; // OPs are in reverse order } - return 0; + uchOffset += nOP * 21; + assert (uchOffset < 156); + + return m_pTG[nTG]->getVoiceDataElement (uchOffset); } std::string CMiniDexed::GetVoiceName (unsigned nTG) { - if (nTG < CConfig::ToneGenerators) - { - char VoiceName[11]; - memset (VoiceName, 0, sizeof VoiceName); - - assert (nTG < CConfig::ToneGenerators); - assert (m_pTG[nTG]); - m_pTG[nTG]->setName (VoiceName); - - std::string Result (VoiceName); + char VoiceName[11]; + memset (VoiceName, 0, sizeof VoiceName); - return Result; - -#ifdef ARM_ALLOW_MULTI_CORE - /* ALL TG START */ + assert (nTG < CConfig::ToneGenerators); + assert (m_pTG[nTG]); + m_pTG[nTG]->setName (VoiceName); - } else if (nTG == ALL_TG_ID) { - return GetVoiceName (0); + std::string Result (VoiceName); - /* ALL TG END */ -#endif - } - - return std::string("ERROR"); + return Result; } #ifndef ARM_ALLOW_MULTI_CORE @@ -1169,10 +1036,10 @@ void CMiniDexed::ProcessSound (void) #endif -bool CMiniDexed::SavePerformance (bool bSaveAsDefault) +bool CMiniDexed::SavePerformance (bool bSaveAsDeault) { m_bSavePerformance = true; - m_bSaveAsDefault=bSaveAsDefault; + m_bSaveAsDeault=bSaveAsDeault; return true; } @@ -1223,15 +1090,7 @@ bool CMiniDexed::DoSavePerformance (void) m_PerformanceConfig.SetReverbDiffusion (m_nParameter[ParameterReverbDiffusion]); m_PerformanceConfig.SetReverbLevel (m_nParameter[ParameterReverbLevel]); -#ifdef ARM_ALLOW_MULTI_CORE - /* UNISON START */ - m_PerformanceConfig.SetUnisonEnable (!!m_nParameter[ParameterUnisonEnable]); - m_PerformanceConfig.SetUnisonPanSpread (m_nParameter[ParameterUnisonPanSpread]); - m_PerformanceConfig.SetUnisonDetuneSpread (m_nParameter[ParameterUnisonDetuneSpread]); - /* UNISON END */ -#endif - - if(m_bSaveAsDefault) + if(m_bSaveAsDeault) { m_PerformanceConfig.SetNewPerformance(0); @@ -1619,15 +1478,6 @@ void CMiniDexed::LoadPerformanceParameters(void) SetParameter (ParameterReverbLowPass, m_PerformanceConfig.GetReverbLowPass ()); SetParameter (ParameterReverbDiffusion, m_PerformanceConfig.GetReverbDiffusion ()); SetParameter (ParameterReverbLevel, m_PerformanceConfig.GetReverbLevel ()); - -#ifdef ARM_ALLOW_MULTI_CORE - /* UNISON START */ - SetParameter (ParameterUnisonPanSpread, m_PerformanceConfig.GetUnisonPanSpread ()); - SetParameter (ParameterUnisonDetuneSpread, m_PerformanceConfig.GetUnisonDetuneSpread ()); - SetParameter (ParameterUnisonEnable, m_PerformanceConfig.GetUnisonEnable () ? 1 : 0); - /* UNISON END */ -#endif - } std::string CMiniDexed::GetNewPerformanceDefaultName(void) diff --git a/src/minidexed.h b/src/minidexed.h index 8efe5a1..3b7de4e 100644 --- a/src/minidexed.h +++ b/src/minidexed.h @@ -134,15 +134,6 @@ public: ParameterReverbLowPass, ParameterReverbDiffusion, ParameterReverbLevel, - -#ifdef ARM_ALLOW_MULTI_CORE - /* UNISON START */ - ParameterUnisonEnable, - ParameterUnisonPanSpread, - ParameterUnisonDetuneSpread, - /* UNISON END */ -#endif - ParameterUnknown }; @@ -306,7 +297,7 @@ private: bool m_bDeletePerformance; unsigned m_nDeletePerformanceID; bool m_bLoadPerformanceBusy; - bool m_bSaveAsDefault; + bool m_bSaveAsDeault; }; #endif diff --git a/src/performanceconfig.cpp b/src/performanceconfig.cpp index 545a8eb..7249003 100644 --- a/src/performanceconfig.cpp +++ b/src/performanceconfig.cpp @@ -159,11 +159,6 @@ bool CPerformanceConfig::Load (void) m_nReverbDiffusion = m_Properties.GetNumber ("ReverbDiffusion", 65); m_nReverbLevel = m_Properties.GetNumber ("ReverbLevel", 99); - // Unison - m_bUnisonEnable = m_Properties.GetNumber("UnisonEnable", 0) != 0; - m_nUnisonPanSpread = m_Properties.GetNumber("UnisonPanSpread", 56); - m_nUnisonDetuneSpread = m_Properties.GetNumber("UnisonDetuneSpread", 21); - return bResult; } @@ -282,10 +277,6 @@ bool CPerformanceConfig::Save (void) m_Properties.SetNumber ("ReverbDiffusion", m_nReverbDiffusion); m_Properties.SetNumber ("ReverbLevel", m_nReverbLevel); - m_Properties.SetNumber ("UnisonEnable", m_bUnisonEnable ? 1 : 0); - m_Properties.SetNumber ("UnisonPanSpread", m_nUnisonPanSpread); - m_Properties.SetNumber ("UnisonDetuneSpread", m_nUnisonDetuneSpread); - return m_Properties.Save (); } @@ -512,38 +503,6 @@ void CPerformanceConfig::SetReverbLevel (unsigned nValue) { m_nReverbLevel = nValue; } - -// Unison -bool CPerformanceConfig::GetUnisonEnable (void) const -{ - return m_bUnisonEnable; -} - -unsigned CPerformanceConfig::GetUnisonPanSpread (void) const -{ - return m_nUnisonPanSpread; -} - -unsigned CPerformanceConfig::GetUnisonDetuneSpread (void) const -{ - return m_nUnisonDetuneSpread; -} - -void CPerformanceConfig::SetUnisonEnable (bool bValue) -{ - m_bUnisonEnable = bValue; -} - -void CPerformanceConfig::SetUnisonPanSpread (unsigned nValue) -{ - m_nUnisonPanSpread = nValue; -} - -void CPerformanceConfig::SetUnisonDetuneSpread (unsigned nValue) -{ - m_nUnisonDetuneSpread = nValue; -} - // Pitch bender and portamento: void CPerformanceConfig::SetPitchBendRange (unsigned nValue, unsigned nTG) { diff --git a/src/performanceconfig.h b/src/performanceconfig.h index 3b3838f..ec32598 100644 --- a/src/performanceconfig.h +++ b/src/performanceconfig.h @@ -117,14 +117,6 @@ public: void SetReverbDiffusion (unsigned nValue); void SetReverbLevel (unsigned nValue); - // Unison - bool GetUnisonEnable (void) const; - unsigned GetUnisonPanSpread (void) const; - unsigned GetUnisonDetuneSpread (void) const; - void SetUnisonEnable (bool bValue); - void SetUnisonPanSpread (unsigned nValue); - void SetUnisonDetuneSpread (unsigned nValue); - bool VoiceDataFilled(unsigned nTG); bool ListPerformances(); //std::string m_DirName; @@ -191,11 +183,6 @@ private: unsigned m_nReverbLowPass; unsigned m_nReverbDiffusion; unsigned m_nReverbLevel; - - // Unison - bool m_bUnisonEnable; - unsigned m_nUnisonPanSpread; - unsigned m_nUnisonDetuneSpread; }; #endif diff --git a/src/uimenu.cpp b/src/uimenu.cpp index 7649e99..a1d44ce 100644 --- a/src/uimenu.cpp +++ b/src/uimenu.cpp @@ -52,11 +52,6 @@ const CUIMenu::TMenuItem CUIMenu::s_MainMenu[] = {"TG8", MenuHandler, s_TGMenu, 7}, #endif {"Effects", MenuHandler, s_EffectsMenu}, -#ifdef ARM_ALLOW_MULTI_CORE - /* Unison START */ - {"Unison", MenuHandler, s_UnisonMenu}, - /* Unison END */ -#endif {"Performance", MenuHandler, s_PerformanceMenu}, {0} }; @@ -82,29 +77,6 @@ const CUIMenu::TMenuItem CUIMenu::s_TGMenu[] = {0} }; -#ifdef ARM_ALLOW_MULTI_CORE - /* ALL TG START */ -const CUIMenu::TMenuItem CUIMenu::s_AllTGMenu[] = -{ - {"Voice", EditProgramNumber}, - {"Bank", EditVoiceBankNumber}, - {"Volume", EditTGParameter, 0, CMiniDexed::TGParameterVolume}, - {"Pan Spread", EditGlobalParameter, 0, CMiniDexed::ParameterUnisonPanSpread}, - {"Reverb-Send", EditTGParameter, 0, CMiniDexed::TGParameterReverbSend}, - {"Detune", EditGlobalParameter, 0, CMiniDexed::ParameterUnisonDetuneSpread}, - {"Cutoff", EditTGParameter, 0, CMiniDexed::TGParameterCutoff}, - {"Resonance", EditTGParameter, 0, CMiniDexed::TGParameterResonance}, - {"Pitch Bend", MenuHandler, s_EditPitchBendMenu}, - {"Portamento", MenuHandler, s_EditPortamentoMenu}, - {"Poly/Mono", EditTGParameter, 0, CMiniDexed::TGParameterMonoMode}, - {"Modulation", MenuHandler, s_ModulationMenu}, - {"Channel", EditTGParameter, 0, CMiniDexed::TGParameterMIDIChannel}, - {"Edit Voice", MenuHandler, s_EditVoiceMenu}, - {0} -}; - /* ALL TG END */ -#endif - const CUIMenu::TMenuItem CUIMenu::s_EffectsMenu[] = { {"Compress", EditGlobalParameter, 0, CMiniDexed::ParameterCompressorEnable}, @@ -163,19 +135,6 @@ const CUIMenu::TMenuItem CUIMenu::s_ReverbMenu[] = #endif -#ifdef ARM_ALLOW_MULTI_CORE - /* Unison START */ -const CUIMenu::TMenuItem CUIMenu::s_UnisonMenu[] = -{ - {"Enable", EditGlobalParameter, 0, CMiniDexed::ParameterUnisonEnable}, - {"All TG", MenuHandler, s_AllTGMenu, ALL_TG_ID}, - // {"Max Pan", EditGlobalParameter, 0, CMiniDexed::ParameterUnisonPanSpread}, - // {"Max Detune", EditGlobalParameter, 0, CMiniDexed::ParameterUnisonDetuneSpread}, - {0} -}; - /* Unison END */ -#endif - // inserting menu items before "OP1" affect OPShortcutHandler() const CUIMenu::TMenuItem CUIMenu::s_EditVoiceMenu[] = { @@ -254,15 +213,6 @@ const CUIMenu::TParameter CUIMenu::s_GlobalParameter[CMiniDexed::ParameterUnknow {0, 99, 1}, // ParameterReverbLowPass {0, 99, 1}, // ParameterReverbDiffusion {0, 99, 1} // ParameterReverbLevel - -#ifdef ARM_ALLOW_MULTI_CORE - , - /* UNISON START */ - {0, 1, 1, ToOnOff}, // ParameterUnisonEnable - {0, 63, 1}, // ParameterUnisonPanSpread - {0, 99, 1} // ParameterUnisonDetuneSpread - /* UNISON END */ -#endif }; // must match CMiniDexed::TTGParameter diff --git a/src/uimenu.h b/src/uimenu.h index f6bec8b..78384be 100644 --- a/src/uimenu.h +++ b/src/uimenu.h @@ -26,8 +26,6 @@ #include #include -#define ALL_TG_ID 100 - class CMiniDexed; class CUserInterface; @@ -139,11 +137,6 @@ private: static const TMenuItem s_MenuRoot[]; static const TMenuItem s_MainMenu[]; static const TMenuItem s_TGMenu[]; -#ifdef ARM_ALLOW_MULTI_CORE - /* ALL TG START */ - static const TMenuItem s_AllTGMenu[]; - /* ALL TG END */ -#endif static const TMenuItem s_EffectsMenu[]; static const TMenuItem s_ReverbMenu[]; static const TMenuItem s_EditVoiceMenu[]; @@ -152,13 +145,7 @@ private: static const TMenuItem s_EditPitchBendMenu[]; static const TMenuItem s_EditPortamentoMenu[]; static const TMenuItem s_PerformanceMenu[]; - -#ifdef ARM_ALLOW_MULTI_CORE - /* Unison START */ - static const TMenuItem s_UnisonMenu[]; - /* Unison END */ -#endif - + static const TMenuItem s_ModulationMenu[]; static const TMenuItem s_ModulationMenuParameters[];