diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 7004625..abfe811 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -1,56 +1,27 @@ { "configurations": [ { - "name": "Win64", + "name": "Win32", "includePath": [ - "d:\\Documents\\dev\\OpenSource\\MiniDexed-fx2/CMSIS_5/CMSIS/Core/Include/", - "d:\\Documents\\dev\\OpenSource\\MiniDexed-fx2/CMSIS_5/CMSIS/DSP/Include/", - "d:\\Documents\\dev\\OpenSource\\MiniDexed-fx2/circle-stdlib/libs/circle/include", - "d:\\Documents\\dev\\OpenSource\\MiniDexed-fx2/circle-stdlib/libs/circle/addon" + "${workspaceFolder}/src/**", + "${workspaceFolder}/CMSIS_5/CMSIS/Core/Include/**", + "${workspaceFolder}/CMSIS_5/CMSIS/DSP/Include/**", + "${workspaceFolder}/circle-stdlib/include/**", + "${workspaceFolder}/circle-stdlib/libs/circle-newlib/include/**", + "${workspaceFolder}/circle-stdlib/libs/circle/include/**" ], "defines": [ - "ARM_ALLOW_MULTI_CORE", + "_DEBUG", + "UNICODE", + "_UNICODE", "RPI=4", - "RASPPI=4", - "DEBUG" + "ARM_ALLOW_MULTI_CORE" ], - "intelliSenseMode": "msvc-x64", + "windowsSdkVersion": "10.0.19041.0", "compilerPath": "cl.exe", "cStandard": "c17", "cppStandard": "c++20", - "configurationProvider": "ms-vscode.makefile-tools", - "rawCompilerPath": "cl.exe", - "mergeConfigurations": false, - "browse": { - "path": [ - "${workspaceFolder}/CMSIS_5/CMSIS/Core/Include/", - "${workspaceFolder}/CMSIS_5/CMSIS/DSP/Include/", - "${workspaceFolder}/circle-stdlib/libs/circle/include", - "${workspaceFolder}/circle-stdlib/libs/circle/addon", - "${workspaceFolder}/src", - "${workspaceFolder}" - ], - "limitSymbolsToIncludedHeaders": true - } - }, - { - "name": "Linux", - "includePath": [ - "${workspaceFolder}/CMSIS_5/CMSIS/Core/Include/", - "${workspaceFolder}/CMSIS_5/CMSIS/DSP/Include/", - "${workspaceFolder}/circle-stdlib/libs/circle/include", - "${workspaceFolder}/circle-stdlib/libs/circle/addon" - ], - "defines": [ - "ARM_ALLOW_MULTI_CORE", - "RPI=4", - "RASPPI=4", - "DEBUG" - ], - "intelliSenseMode": "windows-gcc-arm64", - "compilerPath": "/usr/bin/g++", - "cStandard": "c17", - "cppStandard": "c++20", + "intelliSenseMode": "windows-msvc-x64", "configurationProvider": "ms-vscode.makefile-tools" } ], diff --git a/.vscode/settings.json b/.vscode/settings.json index 794284c..67172f4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -76,7 +76,13 @@ "thread": "cpp", "cfenv": "cpp", "variant": "cpp", - "semaphore": "cpp" + "semaphore": "cpp", + "forward_list": "cpp", + "slist": "cpp", + "span": "cpp", + "regex": "cpp", + "valarray": "cpp", + "shared_mutex": "cpp" }, "C_Cpp.errorSquiggles": "disabled", "C_Cpp.intelliSenseEngine": "Tag Parser", diff --git a/circle-stdlib b/circle-stdlib index 61cf3a4..e318f89 160000 --- a/circle-stdlib +++ b/circle-stdlib @@ -1 +1 @@ -Subproject commit 61cf3a47bf93628039078b7c840e44432e52343e +Subproject commit e318f89932518e68b7e8fb4d55cdcd20d228f934 diff --git a/src/fx_components.cpp b/src/fx_components.cpp index 1de83b4..172c433 100644 --- a/src/fx_components.cpp +++ b/src/fx_components.cpp @@ -276,6 +276,9 @@ float32_t InterpolatedSineOscillator::Sin(float32_t phase) initialized = InterpolatedSineOscillator::ClassInitializer(); } + if(phase < 0.0f) while(phase < 0.0f) phase += Constants::M2PI; + else while(phase > Constants::M2PI) phase -= Constants::M2PI; + float32_t findex = phase / InterpolatedSineOscillator::DeltaTime; size_t index1 = static_cast(findex); @@ -288,6 +291,11 @@ float32_t InterpolatedSineOscillator::Sin(float32_t phase) return f1 + (f2 - f1) * r * InterpolatedSineOscillator::DeltaTime; } +float32_t InterpolatedSineOscillator::Cos(float32_t phase) +{ + return InterpolatedSineOscillator::Sin(Constants::MPI_2 - phase); +} + bool InterpolatedSineOscillator::ClassInitializer() { static bool initialized = false; diff --git a/src/fx_components.h b/src/fx_components.h index 3b699df..1d23e87 100644 --- a/src/fx_components.h +++ b/src/fx_components.h @@ -232,6 +232,7 @@ class InterpolatedSineOscillator : public FXBase public: static float32_t Sin(float32_t phase); + static float32_t Cos(float32_t phase); InterpolatedSineOscillator(float32_t sampling_rate, float32_t min_frequency = LFO_MIN_FREQUENCY, float32_t max_frequency = LFO_MAX_FREQUENCY, float32_t initial_phase = 0.0f, bool centered = true); virtual ~InterpolatedSineOscillator(); diff --git a/src/kernel.cpp b/src/kernel.cpp index edfc711..4397cd9 100644 --- a/src/kernel.cpp +++ b/src/kernel.cpp @@ -64,8 +64,12 @@ bool CKernel::Initialize (void) m_Config.Load (); - m_pDexed = new CMiniDexed (&m_Config, &mInterrupt, &m_GPIOManager, &m_I2CMaster, - &mFileSystem); + m_pDexed = new CMiniDexed ( + &m_Config, + &mInterrupt, + &m_GPIOManager, + &m_I2CMaster, + &mFileSystem); assert (m_pDexed); if (!m_pDexed->Initialize ()) diff --git a/src/minidexed.cpp b/src/minidexed.cpp index 64029e8..b9e21d0 100644 --- a/src/minidexed.cpp +++ b/src/minidexed.cpp @@ -30,9 +30,13 @@ LOGMODULE ("minidexed"); -CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt, - CGPIOManager *pGPIOManager, CI2CMaster *pI2CMaster, FATFS *pFileSystem) -: +CMiniDexed::CMiniDexed ( + CConfig *pConfig, + CInterruptSystem *pInterrupt, + CGPIOManager *pGPIOManager, + CI2CMaster *pI2CMaster, + FATFS *pFileSystem +) : #ifdef ARM_ALLOW_MULTI_CORE CMultiCoreSupport (CMemorySystem::Get ()), #endif @@ -99,14 +103,6 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt, m_pTG[i]->activate (); } -#if defined(MIXING_CONSOLE_ENABLE) - size_t end = MixerOutput::kFXCount - 1; - for(size_t ret = 0; ret < end; ++ret) - { - memset(this->m_nFXReturnLevel[ret], 0, MixerOutput::kFXCount * sizeof(unsigned)); - } -#endif - for (unsigned i = 0; i < CConfig::MaxUSBMIDIDevices; i++) { m_pMIDIKeyboard[i] = new CMIDIKeyboard (this, pConfig, &m_UI, i); @@ -149,60 +145,77 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt, } #endif - setMasterVolume(1.0); - + this->setMasterVolume(1.0); #if defined(MIXING_CONSOLE_ENABLE) - this->mixing_console_ = new Mixer(static_cast(pConfig->GetSampleRate()), pConfig->GetChunkSize()/2); + this->m_UI.log("Init Mixing Console..."); + this->mixing_console_ = new Mixer(static_cast(pConfig->GetSampleRate()), pConfig->GetChunkSize() / 2); + for (uint8_t i = 0; i < CConfig::ToneGenerators; i++) + { + this->mixing_console_->setInputSampleBuffer(i, m_OutputLevel[i]); + } // Tube parameters - this->SetParameter(ParameterFXTubeEnable, 1); - this->SetParameter(ParameterFXTubeOverdrive, 10); + this->SetParameter(TParameter::ParameterFXTubeEnable, 1); + this->SetParameter(TParameter::ParameterFXTubeOverdrive, 10); // Chorus parameters - this->SetParameter(ParameterFXChorusEnable, 1); - this->SetParameter(ParameterFXChorusRate, 50); - this->SetParameter(ParameterFXChorusDepth, 50); + this->SetParameter(TParameter::ParameterFXChorusEnable, 1); + this->SetParameter(TParameter::ParameterFXChorusRate, 50); + this->SetParameter(TParameter::ParameterFXChorusDepth, 50); // Flanger parameters - this->SetParameter(ParameterFXFlangerEnable, 1); - this->SetParameter(ParameterFXFlangerRate, 3); - this->SetParameter(ParameterFXFlangerDepth, 75); - this->SetParameter(ParameterFXFlangerFeedback, 50); + this->SetParameter(TParameter::ParameterFXFlangerEnable, 1); + this->SetParameter(TParameter::ParameterFXFlangerRate, 3); + this->SetParameter(TParameter::ParameterFXFlangerDepth, 75); + this->SetParameter(TParameter::ParameterFXFlangerFeedback, 50); // Orbitone parameters - this->SetParameter(ParameterFXOrbitoneEnable, 1); - this->SetParameter(ParameterFXOrbitoneRate, 40); - this->SetParameter(ParameterFXOrbitoneDepth, 50); + this->SetParameter(TParameter::ParameterFXOrbitoneEnable, 1); + this->SetParameter(TParameter::ParameterFXOrbitoneRate, 40); + this->SetParameter(TParameter::ParameterFXOrbitoneDepth, 50); // Phaser parameters - this->SetParameter(ParameterFXPhaserEnable, 1); - this->SetParameter(ParameterFXPhaserRate, 5); - this->SetParameter(ParameterFXPhaserDepth, 99); - this->SetParameter(ParameterFXPhaserFeedback, 50); - this->SetParameter(ParameterFXPhaserNbStages, 12); + this->SetParameter(TParameter::ParameterFXPhaserEnable, 1); + this->SetParameter(TParameter::ParameterFXPhaserRate, 5); + this->SetParameter(TParameter::ParameterFXPhaserDepth, 99); + this->SetParameter(TParameter::ParameterFXPhaserFeedback, 50); + this->SetParameter(TParameter::ParameterFXPhaserNbStages, 12); // Delay parameters - this->SetParameter(ParameterFXDelayEnable, 1); - this->SetParameter(ParameterFXDelayLeftDelayTime, 15); - this->SetParameter(ParameterFXDelayRightDelayTime, 22); - this->SetParameter(ParameterFXDelayFeedback, 35); + this->SetParameter(TParameter::ParameterFXDelayEnable, 1); + this->SetParameter(TParameter::ParameterFXDelayLeftDelayTime, 15); + this->SetParameter(TParameter::ParameterFXDelayRightDelayTime, 22); + this->SetParameter(TParameter::ParameterFXDelayFeedback, 35); // AudioEffectPlateReverb parameters - this->SetParameter(ParameterReverbEnable, 1); - this->SetParameter(ParameterReverbSize, 70); - this->SetParameter(ParameterReverbHighDamp, 50); - this->SetParameter(ParameterReverbLowDamp, 50); - this->SetParameter(ParameterReverbLowPass, 30); - this->SetParameter(ParameterReverbDiffusion, 65); - this->SetParameter(ParameterReverbLevel, 99); + this->SetParameter(TParameter::ParameterReverbEnable, 1); + this->SetParameter(TParameter::ParameterReverbSize, 70); + this->SetParameter(TParameter::ParameterReverbHighDamp, 50); + this->SetParameter(TParameter::ParameterReverbLowDamp, 50); + this->SetParameter(TParameter::ParameterReverbLowPass, 30); + this->SetParameter(TParameter::ParameterReverbDiffusion, 65); + this->SetParameter(TParameter::ParameterReverbLevel, 99); // Reverberator parameters - this->SetParameter(ParameterFXReverberatorEnable, 1); - this->SetParameter(ParameterFXReverberatorInputGain, 99); - this->SetParameter(ParameterFXReverberatorTime, 80); - this->SetParameter(ParameterFXReverberatorDiffusion, 80); - this->SetParameter(ParameterFXReverberatorLP, 70); + this->SetParameter(TParameter::ParameterFXReverberatorEnable, 1); + this->SetParameter(TParameter::ParameterFXReverberatorInputGain, 99); + this->SetParameter(TParameter::ParameterFXReverberatorTime, 80); + this->SetParameter(TParameter::ParameterFXReverberatorDiffusion, 80); + this->SetParameter(TParameter::ParameterFXReverberatorLP, 70); + + // Initializes Return parameters to 0 + size_t end = MixerOutput::kFXCount - 1; + for(size_t ret = 0; ret < end; ++ret) + { + for(size_t fx = 0; fx < MixerOutput::kFXCount; ++fx) + { + this->setMixingConsoleReturnLevel(static_cast(ret), static_cast(fx), 0); + } + } + + // Return all Reverb signal to MainOutput + this->SetParameter(TParameter::ParameterFXPlateReverb_MainOutput, 99); #elif defined(PLATE_REVERB_ENABLE) @@ -213,17 +226,18 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt, // BEGIN setup reverb reverb_send_mixer = new AudioStereoMixer(pConfig->GetChunkSize()/2); reverb = new AudioEffectPlateReverb(pConfig->GetSampleRate()); - SetParameter (ParameterReverbEnable, 1); - SetParameter (ParameterReverbSize, 70); - SetParameter (ParameterReverbHighDamp, 50); - SetParameter (ParameterReverbLowDamp, 50); - SetParameter (ParameterReverbLowPass, 30); - SetParameter (ParameterReverbDiffusion, 65); - SetParameter (ParameterReverbLevel, 99); + SetParameter (TParameter::ParameterReverbEnable, 1); + SetParameter (TParameter::ParameterReverbSize, 70); + SetParameter (TParameter::ParameterReverbHighDamp, 50); + SetParameter (TParameter::ParameterReverbLowDamp, 50); + SetParameter (TParameter::ParameterReverbLowPass, 30); + SetParameter (TParameter::ParameterReverbDiffusion, 65); + SetParameter (TParameter::ParameterReverbLevel, 99); // END setup reverb + #endif - SetParameter (ParameterCompressorEnable, 1); + this->SetParameter (TParameter::ParameterCompressorEnable, 1); }; bool CMiniDexed::Initialize (void) @@ -430,6 +444,10 @@ void CMiniDexed::Run (unsigned nCore) { assert (m_pTG[nTG]); m_pTG[nTG]->getSamples (m_OutputLevel[nTG],m_nFramesToProcess); + +#if defined(MIXING_CONSOLE_ENABLE) + this->mixing_console_->preProcessInputSampleBuffer(nTG); +#endif } } } @@ -514,15 +532,21 @@ void CMiniDexed::SetPan (unsigned nPan, unsigned nTG) #if defined(MIXING_CONSOLE_ENABLE) +unsigned CMiniDexed::getMixingConsoleSendLevel(unsigned nTG, MixerOutput fx) const +{ + assert (nTG < CConfig::ToneGenerators); + return this->m_nFXSendLevel[nTG][fx]; +} + void CMiniDexed::setMixingConsoleSendLevel(unsigned nTG, MixerOutput fx, unsigned nFXSend) { assert (nTG < CConfig::ToneGenerators); - nFXSend = constrain((int)nFXSend,0,99); + nFXSend = constrain((int)nFXSend, 0, 99); this->m_nFXSendLevel[nTG][fx] = nFXSend; this->mixing_console_->setSendLevel(nTG, fx, nFXSend / 99.0f); - this->m_UI.ParameterChanged (); + this->m_UI.ParameterChanged(); } void CMiniDexed::setMixingConsoleReturnLevel(MixerOutput ret, MixerOutput fx, unsigned nFXReturn) @@ -533,15 +557,16 @@ void CMiniDexed::setMixingConsoleReturnLevel(MixerOutput ret, MixerOutput fx, un { nFXReturn = 0; } +#if defined(DEBUG) else { - nFXReturn = constrain((int)nFXReturn,0,99); + nFXReturn = constrain((int)nFXReturn, 0, 99); } +#endif - this->m_nFXReturnLevel[ret][fx] = nFXReturn; this->mixing_console_->setReturnLevel(ret, fx, nFXReturn / 99.0f); - this->m_UI.ParameterChanged (); + this->m_UI.ParameterChanged(); } #elif defined(PLATE_REVERB_ENABLE) @@ -599,8 +624,6 @@ void CMiniDexed::SetResonance (int nResonance, unsigned nTG) m_UI.ParameterChanged (); } - - void CMiniDexed::SetMIDIChannel (uint8_t uchChannel, unsigned nTG) { assert (nTG < CConfig::ToneGenerators); @@ -716,7 +739,6 @@ void CMiniDexed::setModWheel (uint8_t value, unsigned nTG) m_pTG[nTG]->setModWheel (value); } - void CMiniDexed::setFootController (uint8_t value, unsigned nTG) { assert (nTG < CConfig::ToneGenerators); @@ -757,15 +779,15 @@ void CMiniDexed::SetParameter (TParameter Parameter, int nValue) #if defined(MIXING_CONSOLE_ENABLE) assert(this->mixing_console_); #elif defined(PLATE_REVERB_ENABLE) - assert(reverb); + assert(this->reverb); #endif - assert(Parameter < ParameterUnknown); + assert(Parameter < TParameter::ParameterUnknown); m_nParameter[Parameter] = nValue; switch (Parameter) { - case ParameterCompressorEnable: + case TParameter::ParameterCompressorEnable: for (unsigned nTG = 0; nTG < CConfig::ToneGenerators; nTG++) { assert(m_pTG[nTG]); @@ -774,14 +796,14 @@ void CMiniDexed::SetParameter (TParameter Parameter, int nValue) break; #if defined(MIXING_CONSOLE_ENABLE) + // Tube parameters - case ParameterFXTubeEnable: - nValue = constrain((int)nValue, 0, 1); + case TParameter::ParameterFXTubeEnable: this->m_FXSpinLock.Acquire(); - this->mixing_console_->getTube()->setMute(!nValue); + this->mixing_console_->getTube()->setMute(!!!nValue); this->m_FXSpinLock.Release(); break; - case ParameterFXTubeOverdrive: + case TParameter::ParameterFXTubeOverdrive: nValue = constrain((int)nValue, 0, 99); this->m_FXSpinLock.Acquire(); this->mixing_console_->getTube()->setOverdrive(nValue / 99.0f); @@ -789,19 +811,18 @@ void CMiniDexed::SetParameter (TParameter Parameter, int nValue) break; // Chorus parameters - case ParameterFXChorusEnable: - nValue = constrain((int)nValue, 0, 1); + case TParameter::ParameterFXChorusEnable: this->m_FXSpinLock.Acquire(); - this->mixing_console_->getChorus()->setMute(!nValue); + this->mixing_console_->getChorus()->setMute(!!!nValue); this->m_FXSpinLock.Release(); break; - case ParameterFXChorusRate: + case TParameter::ParameterFXChorusRate: nValue = constrain((int)nValue, 0, 99); this->m_FXSpinLock.Acquire(); this->mixing_console_->getChorus()->setRate(nValue / 99.0f); this->m_FXSpinLock.Release(); break; - case ParameterFXChorusDepth: + case TParameter::ParameterFXChorusDepth: nValue = constrain((int)nValue, 0, 99); this->m_FXSpinLock.Acquire(); this->mixing_console_->getChorus()->setDepth(nValue / 9.9f); @@ -809,25 +830,24 @@ void CMiniDexed::SetParameter (TParameter Parameter, int nValue) break; // Flanger parameters - case ParameterFXFlangerEnable: - nValue = constrain((int)nValue, 0, 1); + case TParameter::ParameterFXFlangerEnable: this->m_FXSpinLock.Acquire(); - this->mixing_console_->getFlanger()->setMute(!nValue); + this->mixing_console_->getFlanger()->setMute(!!!nValue); this->m_FXSpinLock.Release(); break; - case ParameterFXFlangerRate: + case TParameter::ParameterFXFlangerRate: nValue = constrain((int)nValue, 0, 99); this->m_FXSpinLock.Acquire(); this->mixing_console_->getFlanger()->setRate(nValue / 99.0f); this->m_FXSpinLock.Release(); break; - case ParameterFXFlangerDepth: + case TParameter::ParameterFXFlangerDepth: nValue = constrain((int)nValue, 0, 99); this->m_FXSpinLock.Acquire(); this->mixing_console_->getFlanger()->setDepth(nValue / 99.0f); this->m_FXSpinLock.Release(); break; - case ParameterFXFlangerFeedback: + case TParameter::ParameterFXFlangerFeedback: nValue = constrain((int)nValue, 0, 99); this->m_FXSpinLock.Acquire(); this->mixing_console_->getFlanger()->setFeedback(mapfloat(nValue, 0, 99, 0.0f, 0.97f)); @@ -835,19 +855,18 @@ void CMiniDexed::SetParameter (TParameter Parameter, int nValue) break; // Orbitone parameters - case ParameterFXOrbitoneEnable: - nValue = constrain((int)nValue, 0, 1); + case TParameter::ParameterFXOrbitoneEnable: this->m_FXSpinLock.Acquire(); - this->mixing_console_->getOrbitone()->setMute(!nValue); + this->mixing_console_->getOrbitone()->setMute(!!!nValue); this->m_FXSpinLock.Release(); break; - case ParameterFXOrbitoneRate: + case TParameter::ParameterFXOrbitoneRate: nValue = constrain((int)nValue, 0, 99); this->m_FXSpinLock.Acquire(); this->mixing_console_->getOrbitone()->setRate(nValue / 99.0f); this->m_FXSpinLock.Release(); break; - case ParameterFXOrbitoneDepth: + case TParameter::ParameterFXOrbitoneDepth: nValue = constrain((int)nValue, 0, 99); this->m_FXSpinLock.Acquire(); this->mixing_console_->getOrbitone()->setDepth(nValue / 99.0f); @@ -855,31 +874,30 @@ void CMiniDexed::SetParameter (TParameter Parameter, int nValue) break; // Phaser parameters - case ParameterFXPhaserEnable: - nValue = constrain((int)nValue, 0, 1); + case TParameter::ParameterFXPhaserEnable: this->m_FXSpinLock.Acquire(); - this->mixing_console_->getPhaser()->setMute(!nValue); + this->mixing_console_->getPhaser()->setMute(!!!nValue); this->m_FXSpinLock.Release(); break; - case ParameterFXPhaserRate: + case TParameter::ParameterFXPhaserRate: nValue = constrain((int)nValue, 0, 99); this->m_FXSpinLock.Acquire(); this->mixing_console_->getPhaser()->setRate(nValue / 99.0f); this->m_FXSpinLock.Release(); break; - case ParameterFXPhaserDepth: + case TParameter::ParameterFXPhaserDepth: nValue = constrain((int)nValue, 0, 99); this->m_FXSpinLock.Acquire(); this->mixing_console_->getPhaser()->setDepth(nValue / 99.0f); this->m_FXSpinLock.Release(); break; - case ParameterFXPhaserFeedback: + case TParameter::ParameterFXPhaserFeedback: nValue = constrain((int)nValue, 0, 99); this->m_FXSpinLock.Acquire(); this->mixing_console_->getPhaser()->setFeedback(mapfloat(nValue, 0, 99, 0.0f, 0.97f)); this->m_FXSpinLock.Release(); break; - case ParameterFXPhaserNbStages: + case TParameter::ParameterFXPhaserNbStages: nValue = constrain((int)nValue, 2, MAX_NB_PHASES); this->m_FXSpinLock.Acquire(); this->mixing_console_->getPhaser()->setNbStages(nValue); @@ -887,25 +905,24 @@ void CMiniDexed::SetParameter (TParameter Parameter, int nValue) break; // Delay parameters - case ParameterFXDelayEnable: - nValue = constrain((int)nValue, 0, 1); + case TParameter::ParameterFXDelayEnable: this->m_FXSpinLock.Acquire(); - this->mixing_console_->getDelay()->setMute(!nValue); + this->mixing_console_->getDelay()->setMute(!!!nValue); this->m_FXSpinLock.Release(); break; - case ParameterFXDelayLeftDelayTime: + case TParameter::ParameterFXDelayLeftDelayTime: nValue = constrain((int)nValue, 0, 99); this->m_FXSpinLock.Acquire(); this->mixing_console_->getDelay()->setLeftDelayTime(nValue / 99.0f); this->m_FXSpinLock.Release(); break; - case ParameterFXDelayRightDelayTime: + case TParameter::ParameterFXDelayRightDelayTime: nValue = constrain((int)nValue, 0, 99); this->m_FXSpinLock.Acquire(); this->mixing_console_->getDelay()->setRightDelayTime(nValue / 99.0f); this->m_FXSpinLock.Release(); break; - case ParameterFXDelayFeedback: + case TParameter::ParameterFXDelayFeedback: nValue = constrain((int)nValue, 0, 99); this->m_FXSpinLock.Acquire(); this->mixing_console_->getDelay()->setFeedback(nValue / 99.0f); @@ -913,43 +930,42 @@ void CMiniDexed::SetParameter (TParameter Parameter, int nValue) break; // AudioEffectPlateReverb parameters - case ParameterReverbEnable: - nValue=constrain((int)nValue,0,1); + case TParameter::ParameterReverbEnable: this->m_FXSpinLock.Acquire (); - this->mixing_console_->getPlateReverb()->set_bypass (!nValue); + this->mixing_console_->getPlateReverb()->set_bypass (!!!nValue); this->m_FXSpinLock.Release (); break; - case ParameterReverbSize: + case TParameter::ParameterReverbSize: nValue=constrain((int)nValue,0,99); this->m_FXSpinLock.Acquire (); this->mixing_console_->getPlateReverb()->size (nValue / 99.0f); this->m_FXSpinLock.Release (); break; - case ParameterReverbHighDamp: + case TParameter::ParameterReverbHighDamp: nValue=constrain((int)nValue,0,99); this->m_FXSpinLock.Acquire (); this->mixing_console_->getPlateReverb()->hidamp (nValue / 99.0f); this->m_FXSpinLock.Release (); break; - case ParameterReverbLowDamp: + case TParameter::ParameterReverbLowDamp: nValue=constrain((int)nValue,0,99); this->m_FXSpinLock.Acquire (); this->mixing_console_->getPlateReverb()->lodamp (nValue / 99.0f); this->m_FXSpinLock.Release (); break; - case ParameterReverbLowPass: + case TParameter::ParameterReverbLowPass: nValue=constrain((int)nValue,0,99); this->m_FXSpinLock.Acquire (); this->mixing_console_->getPlateReverb()->lowpass (nValue / 99.0f); this->m_FXSpinLock.Release (); break; - case ParameterReverbDiffusion: + case TParameter::ParameterReverbDiffusion: nValue=constrain((int)nValue,0,99); this->m_FXSpinLock.Acquire (); this->mixing_console_->getPlateReverb()->diffusion (nValue / 99.0f); this->m_FXSpinLock.Release (); break; - case ParameterReverbLevel: + case TParameter::ParameterReverbLevel: nValue=constrain((int)nValue,0,99); this->m_FXSpinLock.Acquire (); this->mixing_console_->getPlateReverb()->level (nValue / 99.0f); @@ -957,82 +973,481 @@ void CMiniDexed::SetParameter (TParameter Parameter, int nValue) break; // Reverberator parameters - case ParameterFXReverberatorEnable: - nValue = constrain((int)nValue, 0, 1); + case TParameter::ParameterFXReverberatorEnable: this->m_FXSpinLock.Acquire(); - this->mixing_console_->getReverberator()->setMute(!nValue); + this->mixing_console_->getReverberator()->setMute(!!!nValue); this->m_FXSpinLock.Release(); break; - case ParameterFXReverberatorInputGain: + case TParameter::ParameterFXReverberatorInputGain: nValue = constrain((int)nValue, 0, 99); this->m_FXSpinLock.Acquire(); this->mixing_console_->getReverberator()->setInputGain(nValue / 99.0f); this->m_FXSpinLock.Release(); break; - case ParameterFXReverberatorTime: + case TParameter::ParameterFXReverberatorTime: nValue = constrain((int)nValue, 0, 99); this->m_FXSpinLock.Acquire(); this->mixing_console_->getReverberator()->setTime(nValue / 99.0f); this->m_FXSpinLock.Release(); break; - case ParameterFXReverberatorDiffusion: + case TParameter::ParameterFXReverberatorDiffusion: nValue = constrain((int)nValue, 0, 99); this->m_FXSpinLock.Acquire(); this->mixing_console_->getReverberator()->setDiffusion(nValue / 99.0f); this->m_FXSpinLock.Release(); break; - case ParameterFXReverberatorLP: + case TParameter::ParameterFXReverberatorLP: nValue = constrain((int)nValue, 0, 99); this->m_FXSpinLock.Acquire(); this->mixing_console_->getReverberator()->setLP(nValue / 99.0f); this->m_FXSpinLock.Release(); break; + // Tube Return parameters + case TParameter::ParameterFXTube_ChorusReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Tube, MixerOutput::FX_Chorus, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXTube_FlangerReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Tube, MixerOutput::FX_Flanger, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXTube_OrbitoneReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Tube, MixerOutput::FX_Orbitone, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXTube_PhaserReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Tube, MixerOutput::FX_Phaser, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXTube_DelayReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Tube, MixerOutput::FX_Delay, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXTube_PlateReverbReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Tube, MixerOutput::FX_PlateReverb, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXTube_ReverberatorReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Tube, MixerOutput::FX_Reverberator, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXTube_MainOutput: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Tube, MixerOutput::MainOutput, nValue); + this->m_FXSpinLock.Release(); + break; + + // Chorus Return parameters + case TParameter::ParameterFXChorus_TubeReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Chorus, MixerOutput::FX_Tube, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXChorus_FlangerReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Chorus, MixerOutput::FX_Flanger, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXChorus_OrbitoneReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Chorus, MixerOutput::FX_Orbitone, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXChorus_PhaserReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Chorus, MixerOutput::FX_Phaser, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXChorus_DelayReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Chorus, MixerOutput::FX_Delay, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXChorus_PlateReverbReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Chorus, MixerOutput::FX_PlateReverb, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXChorus_ReverberatorReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Chorus, MixerOutput::FX_Reverberator, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXChorus_MainOutput: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Chorus, MixerOutput::MainOutput, nValue); + this->m_FXSpinLock.Release(); + break; + + // Flanger Return parameters + case TParameter::ParameterFXFlanger_TubeReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Flanger, MixerOutput::FX_Tube, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXFlanger_ChorusReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Flanger, MixerOutput::FX_Chorus, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXFlanger_OrbitoneReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Flanger, MixerOutput::FX_Orbitone, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXFlanger_PhaserReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Flanger, MixerOutput::FX_Phaser, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXFlanger_DelayReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Flanger, MixerOutput::FX_Delay, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXFlanger_PlateReverbReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Flanger, MixerOutput::FX_PlateReverb, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXFlanger_ReverberatorReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Flanger, MixerOutput::FX_Reverberator, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXFlanger_MainOutput: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Flanger, MixerOutput::MainOutput, nValue); + this->m_FXSpinLock.Release(); + break; + + // Orbitone Return parameters + case TParameter::ParameterFXOrbitone_TubeReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Orbitone, MixerOutput::FX_Tube, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXOrbitone_ChorusReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Orbitone, MixerOutput::FX_Chorus, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXOrbitone_FlangerReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Orbitone, MixerOutput::FX_Flanger, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXOrbitone_PhaserReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Orbitone, MixerOutput::FX_Phaser, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXOrbitone_DelayReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Orbitone, MixerOutput::FX_Delay, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXOrbitone_PlateReverbReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Orbitone, MixerOutput::FX_PlateReverb, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXOrbitone_ReverberatorReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Orbitone, MixerOutput::FX_Reverberator, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXOrbitone_MainOutput: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Orbitone, MixerOutput::MainOutput, nValue); + this->m_FXSpinLock.Release(); + break; + + // Phaser Return parameters + case TParameter::ParameterFXPhaser_TubeReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Phaser, MixerOutput::FX_Tube, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXPhaser_ChorusReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Phaser, MixerOutput::FX_Chorus, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXPhaser_FlangerReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Phaser, MixerOutput::FX_Flanger, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXPhaser_OrbitoneReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Phaser, MixerOutput::FX_Orbitone, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXPhaser_DelayReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Phaser, MixerOutput::FX_Delay, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXPhaser_PlateReverbReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Phaser, MixerOutput::FX_PlateReverb, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXPhaser_ReverberatorReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Phaser, MixerOutput::FX_Reverberator, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXPhaser_MainOutput: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Phaser, MixerOutput::MainOutput, nValue); + this->m_FXSpinLock.Release(); + break; + + // Delay Return parameters + case TParameter::ParameterFXDelay_TubeReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Delay, MixerOutput::FX_Tube, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXDelay_ChorusReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Delay, MixerOutput::FX_Chorus, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXDelay_FlangerReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Delay, MixerOutput::FX_Flanger, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXDelay_OrbitoneReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Delay, MixerOutput::FX_Orbitone, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXDelay_PhaserReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Delay, MixerOutput::FX_Phaser, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXDelay_PlateReverbReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Delay, MixerOutput::FX_PlateReverb, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXDelay_ReverberatorReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Delay, MixerOutput::FX_Reverberator, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXDelay_MainOutput: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Delay, MixerOutput::MainOutput, nValue); + this->m_FXSpinLock.Release(); + break; + + // Reverb Return parameters + case TParameter::ParameterFXPlateReverb_TubeReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_PlateReverb, MixerOutput::FX_Tube, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXPlateReverb_ChorusReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_PlateReverb, MixerOutput::FX_Chorus, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXPlateReverb_FlangerReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_PlateReverb, MixerOutput::FX_Flanger, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXPlateReverb_OrbitoneReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_PlateReverb, MixerOutput::FX_Orbitone, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXPlateReverb_PhaserReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_PlateReverb, MixerOutput::FX_Phaser, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXPlateReverb_DelayReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_PlateReverb, MixerOutput::FX_Delay, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXPlateReverb_ReverberatorReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_PlateReverb, MixerOutput::FX_Reverberator, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXPlateReverb_MainOutput: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_PlateReverb, MixerOutput::MainOutput, nValue); + this->m_FXSpinLock.Release(); + break; + + // Reverberator Return parameters + case TParameter::ParameterFXReverberator_TubeReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Reverberator, MixerOutput::FX_Tube, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXReverberator_ChorusReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Reverberator, MixerOutput::FX_Chorus, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXReverberator_FlangerReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Reverberator, MixerOutput::FX_Flanger, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXReverberator_OrbitoneReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Reverberator, MixerOutput::FX_Orbitone, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXReverberator_PhaserReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Reverberator, MixerOutput::FX_Phaser, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXReverberator_DelayReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Reverberator, MixerOutput::FX_Delay, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXReverberator_PlateReverbReturn: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Reverberator, MixerOutput::FX_PlateReverb, nValue); + this->m_FXSpinLock.Release(); + break; + case TParameter::ParameterFXReverberator_MainOutput: + nValue = constrain((int)nValue, 0, 99); + this->m_FXSpinLock.Acquire(); + this->setMixingConsoleReturnLevel(MixerOutput::FX_Reverberator, MixerOutput::MainOutput, nValue); + this->m_FXSpinLock.Release(); + break; + #elif defined(PLATE_REVERB_ENABLE) - case ParameterReverbEnable: + case TParameter::ParameterReverbEnable: nValue=constrain((int)nValue,0,1); m_FXSpinLock.Acquire (); reverb->set_bypass (!nValue); m_FXSpinLock.Release (); break; - case ParameterReverbSize: + case TParameter::ParameterReverbSize: nValue=constrain((int)nValue,0,99); m_FXSpinLock.Acquire (); reverb->size (nValue / 99.0f); m_FXSpinLock.Release (); break; - case ParameterReverbHighDamp: + case TParameter::ParameterReverbHighDamp: nValue=constrain((int)nValue,0,99); m_FXSpinLock.Acquire (); reverb->hidamp (nValue / 99.0f); m_FXSpinLock.Release (); break; - case ParameterReverbLowDamp: + case TParameter::ParameterReverbLowDamp: nValue=constrain((int)nValue,0,99); m_FXSpinLock.Acquire (); reverb->lodamp (nValue / 99.0f); m_FXSpinLock.Release (); break; - case ParameterReverbLowPass: + case TParameter::ParameterReverbLowPass: nValue=constrain((int)nValue,0,99); m_FXSpinLock.Acquire (); reverb->lowpass (nValue / 99.0f); m_FXSpinLock.Release (); break; - case ParameterReverbDiffusion: + case TParameter::ParameterReverbDiffusion: nValue=constrain((int)nValue,0,99); m_FXSpinLock.Acquire (); reverb->diffusion (nValue / 99.0f); m_FXSpinLock.Release (); break; - case ParameterReverbLevel: + case TParameter::ParameterReverbLevel: nValue=constrain((int)nValue,0,99); m_FXSpinLock.Acquire (); reverb->level (nValue / 99.0f); @@ -1058,63 +1473,65 @@ void CMiniDexed::SetTGParameter (TTGParameter Parameter, int nValue, unsigned nT 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 TTGParameter::TGParameterVoiceBank: BankSelectLSB (nValue, nTG); break; + case TTGParameter::TGParameterProgram: ProgramChange (nValue, nTG); break; + case TTGParameter::TGParameterVolume: SetVolume (nValue, nTG); break; + case TTGParameter::TGParameterPan: SetPan (nValue, nTG); break; + case TTGParameter::TGParameterMasterTune: SetMasterTune (nValue, nTG); break; + case TTGParameter::TGParameterCutoff: SetCutoff (nValue, nTG); break; + case TTGParameter::TGParameterResonance: SetResonance (nValue, nTG); break; + case TTGParameter::TGParameterPitchBendRange: setPitchbendRange (nValue, nTG); break; + case TTGParameter::TGParameterPitchBendStep: setPitchbendStep (nValue, nTG); break; + case TTGParameter::TGParameterPortamentoMode: setPortamentoMode (nValue, nTG); break; + case TTGParameter::TGParameterPortamentoGlissando: setPortamentoGlissando (nValue, nTG); break; + case TTGParameter::TGParameterPortamentoTime: setPortamentoTime (nValue, nTG); break; + case TTGParameter::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 TTGParameter::TGParameterMWRange: setModController(0, 0, nValue, nTG); break; + case TTGParameter::TGParameterMWPitch: setModController(0, 1, nValue, nTG); break; + case TTGParameter::TGParameterMWAmplitude: setModController(0, 2, nValue, nTG); break; + case TTGParameter::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 TTGParameter::TGParameterFCRange: setModController(1, 0, nValue, nTG); break; + case TTGParameter::TGParameterFCPitch: setModController(1, 1, nValue, nTG); break; + case TTGParameter::TGParameterFCAmplitude: setModController(1, 2, nValue, nTG); break; + case TTGParameter::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 TTGParameter::TGParameterBCRange: setModController(2, 0, nValue, nTG); break; + case TTGParameter::TGParameterBCPitch: setModController(2, 1, nValue, nTG); break; + case TTGParameter::TGParameterBCAmplitude: setModController(2, 2, nValue, nTG); break; + case TTGParameter::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 TTGParameter::TGParameterATRange: setModController(3, 0, nValue, nTG); break; + case TTGParameter::TGParameterATPitch: setModController(3, 1, nValue, nTG); break; + case TTGParameter::TGParameterATAmplitude: setModController(3, 2, nValue, nTG); break; + case TTGParameter::TGParameterATEGBias: setModController(3, 3, nValue, nTG); break; - case TGParameterMIDIChannel: + case TTGParameter::TGParameterMIDIChannel: assert (0 <= nValue && nValue <= 255); SetMIDIChannel ((uint8_t) nValue, nTG); break; #if defined(MIXING_CONSOLE_ENABLE) - case TGParameterMixingSendFXTube: this->setMixingConsoleSendLevel(nTG, MixerOutput::FX_Tube, nValue); break; - case TGParameterMixingSendFXChorus: this->setMixingConsoleSendLevel(nTG, MixerOutput::FX_Chorus, nValue); break; - case TGParameterMixingSendFXFlanger: this->setMixingConsoleSendLevel(nTG, MixerOutput::FX_Flanger, nValue); break; - case TGParameterMixingSendFXOrbittone: this->setMixingConsoleSendLevel(nTG, MixerOutput::FX_Orbitone, nValue); break; - case TGParameterMixingSendFXPhaser: this->setMixingConsoleSendLevel(nTG, MixerOutput::FX_Phaser, nValue); break; - case TGParameterMixingSendFXDelay: this->setMixingConsoleSendLevel(nTG, MixerOutput::FX_Delay, nValue); break; - case TGParameterMixingSendFXPlateReverb: this->setMixingConsoleSendLevel(nTG, MixerOutput::FX_PlateReverb, nValue); break; - case TGParameterMixingSendFXReverberator: this->setMixingConsoleSendLevel(nTG, MixerOutput::FX_Reverberator, nValue); break; - case TGParameterMixingSendFXMainOutput: this->setMixingConsoleSendLevel(nTG, MixerOutput::MainOutput, nValue); break; + case TTGParameter::TGParameterMixingSendFXTube: this->setMixingConsoleSendLevel(nTG, MixerOutput::FX_Tube, nValue); break; + case TTGParameter::TGParameterMixingSendFXChorus: this->setMixingConsoleSendLevel(nTG, MixerOutput::FX_Chorus, nValue); break; + case TTGParameter::TGParameterMixingSendFXFlanger: this->setMixingConsoleSendLevel(nTG, MixerOutput::FX_Flanger, nValue); break; + case TTGParameter::TGParameterMixingSendFXOrbittone: this->setMixingConsoleSendLevel(nTG, MixerOutput::FX_Orbitone, nValue); break; + case TTGParameter::TGParameterMixingSendFXPhaser: this->setMixingConsoleSendLevel(nTG, MixerOutput::FX_Phaser, nValue); break; + case TTGParameter::TGParameterMixingSendFXDelay: this->setMixingConsoleSendLevel(nTG, MixerOutput::FX_Delay, nValue); break; + case TTGParameter::TGParameterMixingSendFXPlateReverb: this->setMixingConsoleSendLevel(nTG, MixerOutput::FX_PlateReverb, nValue); break; + case TTGParameter::TGParameterMixingSendFXReverberator: this->setMixingConsoleSendLevel(nTG, MixerOutput::FX_Reverberator, nValue); break; + case TTGParameter::TGParameterMixingSendFXMainOutput: this->setMixingConsoleSendLevel(nTG, MixerOutput::MainOutput, nValue); break; #elif defined(PLATE_REVERB_ENABLE) - case TGParameterReverbSend: SetReverbSend (nValue, nTG); break; + case TTGParameter::TGParameterReverbSend: this->SetReverbSend (nValue, nTG); break; #endif // MIXING_CONSOLE_ENABLE default: assert (0); break; } + + this->m_UI.ParameterChanged(); } int CMiniDexed::GetTGParameter (TTGParameter Parameter, unsigned nTG) @@ -1123,43 +1540,53 @@ int CMiniDexed::GetTGParameter (TTGParameter Parameter, unsigned nTG) 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]; -#if defined(PLATE_REVERB_ENABLE) - case TGParameterReverbSend: return m_nReverbSend[nTG]; + case TTGParameter::TGParameterVoiceBank: return m_nVoiceBankID[nTG]; + case TTGParameter::TGParameterProgram: return m_nProgram[nTG]; + case TTGParameter::TGParameterVolume: return m_nVolume[nTG]; + case TTGParameter::TGParameterPan: return m_nPan[nTG]; + case TTGParameter::TGParameterMasterTune: return m_nMasterTune[nTG]; + case TTGParameter::TGParameterCutoff: return m_nCutoff[nTG]; + case TTGParameter::TGParameterResonance: return m_nResonance[nTG]; + case TTGParameter::TGParameterMIDIChannel: return m_nMIDIChannel[nTG]; +#if defined(MIXING_CONSOLE_ENABLE) + case TTGParameter::TGParameterMixingSendFXTube: return this->getMixingConsoleSendLevel(nTG, MixerOutput::FX_Tube); + case TTGParameter::TGParameterMixingSendFXChorus: return this->getMixingConsoleSendLevel(nTG, MixerOutput::FX_Chorus); + case TTGParameter::TGParameterMixingSendFXFlanger: return this->getMixingConsoleSendLevel(nTG, MixerOutput::FX_Flanger); + case TTGParameter::TGParameterMixingSendFXOrbittone: return this->getMixingConsoleSendLevel(nTG, MixerOutput::FX_Orbitone); + case TTGParameter::TGParameterMixingSendFXPhaser: return this->getMixingConsoleSendLevel(nTG, MixerOutput::FX_Phaser); + case TTGParameter::TGParameterMixingSendFXDelay: return this->getMixingConsoleSendLevel(nTG, MixerOutput::FX_Delay); + case TTGParameter::TGParameterMixingSendFXPlateReverb: return this->getMixingConsoleSendLevel(nTG, MixerOutput::FX_PlateReverb); + case TTGParameter::TGParameterMixingSendFXReverberator: return this->getMixingConsoleSendLevel(nTG, MixerOutput::FX_Reverberator); + case TTGParameter::TGParameterMixingSendFXMainOutput: return this->getMixingConsoleSendLevel(nTG, MixerOutput::MainOutput); +#elif defined(PLATE_REVERB_ENABLE) + case TTGParameter::TGParameterReverbSend: return m_nReverbSend[nTG]; #endif - 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 TTGParameter::TGParameterPitchBendRange: return m_nPitchBendRange[nTG]; + case TTGParameter::TGParameterPitchBendStep: return m_nPitchBendStep[nTG]; + case TTGParameter::TGParameterPortamentoMode: return m_nPortamentoMode[nTG]; + case TTGParameter::TGParameterPortamentoGlissando: return m_nPortamentoGlissando[nTG]; + case TTGParameter::TGParameterPortamentoTime: return m_nPortamentoTime[nTG]; + case TTGParameter::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 TTGParameter::TGParameterMWRange: return getModController(0, 0, nTG); + case TTGParameter::TGParameterMWPitch: return getModController(0, 1, nTG); + case TTGParameter::TGParameterMWAmplitude: return getModController(0, 2, nTG); + case TTGParameter::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 TTGParameter::TGParameterFCRange: return getModController(1, 0, nTG); + case TTGParameter::TGParameterFCPitch: return getModController(1, 1, nTG); + case TTGParameter::TGParameterFCAmplitude: return getModController(1, 2, nTG); + case TTGParameter::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 TTGParameter::TGParameterBCRange: return getModController(2, 0, nTG); + case TTGParameter::TGParameterBCPitch: return getModController(2, 1, nTG); + case TTGParameter::TGParameterBCAmplitude: return getModController(2, 2, nTG); + case TTGParameter::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); + case TTGParameter::TGParameterATRange: return getModController(3, 0, nTG); + case TTGParameter::TGParameterATPitch: return getModController(3, 1, nTG); + case TTGParameter::TGParameterATAmplitude: return getModController(3, 2, nTG); + case TTGParameter::TGParameterATEGBias: return getModController(3, 3, nTG); default: assert (0); @@ -1298,6 +1725,10 @@ void CMiniDexed::ProcessSound (void) { assert (m_pTG[i]); m_pTG[i]->getSamples (m_OutputLevel[i], nFrames); + +#if defined(MIXING_CONSOLE_ENABLE) + this->mixing_console_->preProcessInputSampleBuffer(i); +#endif } // wait for cores 2 and 3 to complete their work @@ -1333,11 +1764,6 @@ void CMiniDexed::ProcessSound (void) { this->m_FXSpinLock.Acquire (); - for (uint8_t i = 0; i < CConfig::ToneGenerators; i++) - { - this->mixing_console_->setInputSampleBuffer(i, m_OutputLevel[i]); - } - this->mixing_console_->process(SampleBuffer[indexL], SampleBuffer[indexR]); this->m_FXSpinLock.Release (); @@ -1516,39 +1942,109 @@ bool CMiniDexed::DoSavePerformance (void) #ifdef MIXING_CONSOLE_ENABLE this->m_PerformanceConfig.SetFXTubeEnable(!!this->m_nParameter[ParameterFXTubeEnable]); this->m_PerformanceConfig.SetFXTubeOverdrive(this->m_nParameter[ParameterFXTubeOverdrive]); + this->m_PerformanceConfig.SetFXChorusEnable(!!this->m_nParameter[ParameterFXChorusEnable]); this->m_PerformanceConfig.SetFXChorusRate(this->m_nParameter[ParameterFXChorusRate]); this->m_PerformanceConfig.SetFXChorusDepth(this->m_nParameter[ParameterFXChorusDepth]); + this->m_PerformanceConfig.SetFXFlangerEnable(!!this->m_nParameter[ParameterFXFlangerEnable]); this->m_PerformanceConfig.SetFXFlangerRate(this->m_nParameter[ParameterFXFlangerRate]); this->m_PerformanceConfig.SetFXFlangerDepth(this->m_nParameter[ParameterFXFlangerDepth]); this->m_PerformanceConfig.SetFXFlangerFeedback(this->m_nParameter[ParameterFXFlangerFeedback]); + this->m_PerformanceConfig.SetFXOrbitoneEnable(!!this->m_nParameter[ParameterFXOrbitoneEnable]); this->m_PerformanceConfig.SetFXOrbitoneRate(this->m_nParameter[ParameterFXOrbitoneRate]); this->m_PerformanceConfig.SetFXOrbitoneDepth(this->m_nParameter[ParameterFXOrbitoneDepth]); + this->m_PerformanceConfig.SetFXPhaserEnable(!!this->m_nParameter[ParameterFXPhaserEnable]); this->m_PerformanceConfig.SetFXPhaserRate(this->m_nParameter[ParameterFXPhaserRate]); this->m_PerformanceConfig.SetFXPhaserDepth(this->m_nParameter[ParameterFXPhaserDepth]); this->m_PerformanceConfig.SetFXPhaserFeedback(this->m_nParameter[ParameterFXPhaserFeedback]); this->m_PerformanceConfig.SetFXPhaserNbStages(this->m_nParameter[ParameterFXPhaserNbStages]); + this->m_PerformanceConfig.SetFXDelayEnable(!!this->m_nParameter[ParameterFXDelayEnable]); this->m_PerformanceConfig.SetFXDelayLeftDelayTime(this->m_nParameter[ParameterFXDelayLeftDelayTime]); this->m_PerformanceConfig.SetFXDelayRightDelayTime(this->m_nParameter[ParameterFXDelayRightDelayTime]); this->m_PerformanceConfig.SetFXDelayFeedback(this->m_nParameter[ParameterFXDelayFeedback]); + this->m_PerformanceConfig.SetFXReverberatorEnable(!!this->m_nParameter[ParameterFXReverberatorEnable]); this->m_PerformanceConfig.SetFXReverberatorInputGain(this->m_nParameter[ParameterFXReverberatorInputGain]); this->m_PerformanceConfig.SetFXReverberatorTime(this->m_nParameter[ParameterFXReverberatorTime]); this->m_PerformanceConfig.SetFXReverberatorDiffusion(this->m_nParameter[ParameterFXReverberatorDiffusion]); this->m_PerformanceConfig.SetFXReverberatorLP(this->m_nParameter[ParameterFXReverberatorLP]); - size_t end = MixerOutput::kFXCount - 1; - for(size_t ret = 0; ret < end; ++ret) - { - for(size_t fx = 0; fx < MixerOutput::kFXCount; ++fx) - { - this->m_PerformanceConfig.SetFXReturnLevel(static_cast(ret), static_cast(fx), this->m_nFXReturnLevel[ret][fx]); - } - } + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Tube, MixerOutput::FX_Chorus, this->m_nParameter[TParameter::ParameterFXTube_ChorusReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Tube, MixerOutput::FX_Flanger, this->m_nParameter[TParameter::ParameterFXTube_FlangerReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Tube, MixerOutput::FX_Orbitone, this->m_nParameter[TParameter::ParameterFXTube_OrbitoneReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Tube, MixerOutput::FX_Phaser, this->m_nParameter[TParameter::ParameterFXTube_PhaserReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Tube, MixerOutput::FX_Delay, this->m_nParameter[TParameter::ParameterFXTube_DelayReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Tube, MixerOutput::FX_PlateReverb, this->m_nParameter[TParameter::ParameterFXTube_PlateReverbReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Tube, MixerOutput::FX_Reverberator, this->m_nParameter[TParameter::ParameterFXTube_ReverberatorReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Tube, MixerOutput::MainOutput, this->m_nParameter[TParameter::ParameterFXTube_MainOutput]); + + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Chorus, MixerOutput::FX_Tube, this->m_nParameter[TParameter::ParameterFXChorus_TubeReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Chorus, MixerOutput::FX_Flanger, this->m_nParameter[TParameter::ParameterFXChorus_FlangerReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Chorus, MixerOutput::FX_Orbitone, this->m_nParameter[TParameter::ParameterFXChorus_OrbitoneReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Chorus, MixerOutput::FX_Phaser, this->m_nParameter[TParameter::ParameterFXChorus_PhaserReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Chorus, MixerOutput::FX_Delay, this->m_nParameter[TParameter::ParameterFXChorus_DelayReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Chorus, MixerOutput::FX_PlateReverb, this->m_nParameter[TParameter::ParameterFXChorus_PlateReverbReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Chorus, MixerOutput::FX_Reverberator, this->m_nParameter[TParameter::ParameterFXChorus_ReverberatorReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Chorus, MixerOutput::MainOutput, this->m_nParameter[TParameter::ParameterFXChorus_MainOutput]); + + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Flanger, MixerOutput::FX_Tube, this->m_nParameter[TParameter::ParameterFXFlanger_TubeReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Flanger, MixerOutput::FX_Chorus, this->m_nParameter[TParameter::ParameterFXFlanger_ChorusReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Flanger, MixerOutput::FX_Orbitone, this->m_nParameter[TParameter::ParameterFXFlanger_OrbitoneReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Flanger, MixerOutput::FX_Phaser, this->m_nParameter[TParameter::ParameterFXFlanger_PhaserReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Flanger, MixerOutput::FX_Delay, this->m_nParameter[TParameter::ParameterFXFlanger_DelayReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Flanger, MixerOutput::FX_PlateReverb, this->m_nParameter[TParameter::ParameterFXFlanger_PlateReverbReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Flanger, MixerOutput::FX_Reverberator, this->m_nParameter[TParameter::ParameterFXFlanger_ReverberatorReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Flanger, MixerOutput::MainOutput, this->m_nParameter[TParameter::ParameterFXFlanger_MainOutput]); + + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Orbitone, MixerOutput::FX_Tube, this->m_nParameter[TParameter::ParameterFXOrbitone_TubeReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Orbitone, MixerOutput::FX_Chorus, this->m_nParameter[TParameter::ParameterFXOrbitone_ChorusReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Orbitone, MixerOutput::FX_Flanger, this->m_nParameter[TParameter::ParameterFXOrbitone_FlangerReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Orbitone, MixerOutput::FX_Phaser, this->m_nParameter[TParameter::ParameterFXOrbitone_PhaserReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Orbitone, MixerOutput::FX_Delay, this->m_nParameter[TParameter::ParameterFXOrbitone_DelayReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Orbitone, MixerOutput::FX_PlateReverb, this->m_nParameter[TParameter::ParameterFXOrbitone_PlateReverbReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Orbitone, MixerOutput::FX_Reverberator, this->m_nParameter[TParameter::ParameterFXOrbitone_ReverberatorReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Orbitone, MixerOutput::MainOutput, this->m_nParameter[TParameter::ParameterFXOrbitone_MainOutput]); + + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Phaser, MixerOutput::FX_Tube, this->m_nParameter[TParameter::ParameterFXPhaser_TubeReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Phaser, MixerOutput::FX_Chorus, this->m_nParameter[TParameter::ParameterFXPhaser_ChorusReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Phaser, MixerOutput::FX_Flanger, this->m_nParameter[TParameter::ParameterFXPhaser_FlangerReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Phaser, MixerOutput::FX_Orbitone, this->m_nParameter[TParameter::ParameterFXPhaser_OrbitoneReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Phaser, MixerOutput::FX_Delay, this->m_nParameter[TParameter::ParameterFXPhaser_DelayReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Phaser, MixerOutput::FX_PlateReverb, this->m_nParameter[TParameter::ParameterFXPhaser_PlateReverbReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Phaser, MixerOutput::FX_Reverberator, this->m_nParameter[TParameter::ParameterFXPhaser_ReverberatorReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Phaser, MixerOutput::MainOutput, this->m_nParameter[TParameter::ParameterFXPhaser_MainOutput]); + + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Delay, MixerOutput::FX_Tube, this->m_nParameter[TParameter::ParameterFXDelay_TubeReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Delay, MixerOutput::FX_Chorus, this->m_nParameter[TParameter::ParameterFXDelay_ChorusReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Delay, MixerOutput::FX_Flanger, this->m_nParameter[TParameter::ParameterFXDelay_FlangerReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Delay, MixerOutput::FX_Orbitone, this->m_nParameter[TParameter::ParameterFXDelay_OrbitoneReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Delay, MixerOutput::FX_Phaser, this->m_nParameter[TParameter::ParameterFXDelay_PhaserReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Delay, MixerOutput::FX_PlateReverb, this->m_nParameter[TParameter::ParameterFXDelay_PlateReverbReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Delay, MixerOutput::FX_Reverberator, this->m_nParameter[TParameter::ParameterFXDelay_ReverberatorReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Delay, MixerOutput::MainOutput, this->m_nParameter[TParameter::ParameterFXDelay_MainOutput]); + + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_PlateReverb, MixerOutput::FX_Tube, this->m_nParameter[TParameter::ParameterFXPlateReverb_TubeReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_PlateReverb, MixerOutput::FX_Chorus, this->m_nParameter[TParameter::ParameterFXPlateReverb_ChorusReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_PlateReverb, MixerOutput::FX_Flanger, this->m_nParameter[TParameter::ParameterFXPlateReverb_FlangerReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_PlateReverb, MixerOutput::FX_Orbitone, this->m_nParameter[TParameter::ParameterFXPlateReverb_OrbitoneReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_PlateReverb, MixerOutput::FX_Phaser, this->m_nParameter[TParameter::ParameterFXPlateReverb_PhaserReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_PlateReverb, MixerOutput::FX_Delay, this->m_nParameter[TParameter::ParameterFXPlateReverb_DelayReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_PlateReverb, MixerOutput::FX_Reverberator, this->m_nParameter[TParameter::ParameterFXPlateReverb_ReverberatorReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_PlateReverb, MixerOutput::MainOutput, this->m_nParameter[TParameter::ParameterFXPlateReverb_MainOutput]); + + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Reverberator, MixerOutput::FX_Tube, this->m_nParameter[TParameter::ParameterFXReverberator_TubeReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Reverberator, MixerOutput::FX_Chorus, this->m_nParameter[TParameter::ParameterFXReverberator_ChorusReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Reverberator, MixerOutput::FX_Flanger, this->m_nParameter[TParameter::ParameterFXReverberator_FlangerReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Reverberator, MixerOutput::FX_Orbitone, this->m_nParameter[TParameter::ParameterFXReverberator_OrbitoneReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Reverberator, MixerOutput::FX_Phaser, this->m_nParameter[TParameter::ParameterFXReverberator_PhaserReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Reverberator, MixerOutput::FX_Delay, this->m_nParameter[TParameter::ParameterFXReverberator_DelayReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Reverberator, MixerOutput::FX_PlateReverb, this->m_nParameter[TParameter::ParameterFXReverberator_PlateReverbReturn]); + this->m_PerformanceConfig.SetFXReturnLevel(MixerOutput::FX_Reverberator, MixerOutput::MainOutput, this->m_nParameter[TParameter::ParameterFXReverberator_MainOutput]); + #endif if(m_bSaveAsDeault) @@ -1937,41 +2433,111 @@ void CMiniDexed::LoadPerformanceParameters(void) } #ifdef MIXING_CONSOLE_ENABLE - this->SetParameter(ParameterFXTubeEnable, this->m_PerformanceConfig.GetFXTubeEnable()); - this->SetParameter(ParameterFXTubeOverdrive, this->m_PerformanceConfig.GetFXTubeOverdrive()); - this->SetParameter(ParameterFXChorusEnable, this->m_PerformanceConfig.GetFXChorusEnable()); - this->SetParameter(ParameterFXChorusRate, this->m_PerformanceConfig.GetFXChorusRate()); - this->SetParameter(ParameterFXChorusDepth, this->m_PerformanceConfig.GetFXChorusDepth()); - this->SetParameter(ParameterFXFlangerEnable, this->m_PerformanceConfig.GetFXFlangerEnable()); - this->SetParameter(ParameterFXFlangerRate, this->m_PerformanceConfig.GetFXFlangerRate()); - this->SetParameter(ParameterFXFlangerDepth, this->m_PerformanceConfig.GetFXFlangerDepth()); - this->SetParameter(ParameterFXFlangerFeedback, this->m_PerformanceConfig.GetFXFlangerFeedback()); - this->SetParameter(ParameterFXOrbitoneEnable, this->m_PerformanceConfig.GetFXOrbitoneEnable()); - this->SetParameter(ParameterFXOrbitoneRate, this->m_PerformanceConfig.GetFXOrbitoneRate()); - this->SetParameter(ParameterFXOrbitoneDepth, this->m_PerformanceConfig.GetFXOrbitoneDepth()); - this->SetParameter(ParameterFXPhaserEnable, this->m_PerformanceConfig.GetFXPhaserEnable()); - this->SetParameter(ParameterFXPhaserRate, this->m_PerformanceConfig.GetFXPhaserRate()); - this->SetParameter(ParameterFXPhaserDepth, this->m_PerformanceConfig.GetFXPhaserDepth()); - this->SetParameter(ParameterFXPhaserFeedback, this->m_PerformanceConfig.GetFXPhaserFeedback()); - this->SetParameter(ParameterFXPhaserNbStages, this->m_PerformanceConfig.GetFXPhaserNbStages()); - this->SetParameter(ParameterFXDelayEnable, this->m_PerformanceConfig.GetFXDelayEnable()); - this->SetParameter(ParameterFXDelayLeftDelayTime, this->m_PerformanceConfig.GetFXDelayLeftDelayTime()); - this->SetParameter(ParameterFXDelayRightDelayTime, this->m_PerformanceConfig.GetFXDelayRightDelayTime()); - this->SetParameter(ParameterFXDelayFeedback, this->m_PerformanceConfig.GetFXDelayFeedback()); - this->SetParameter(ParameterFXReverberatorEnable, this->m_PerformanceConfig.GetFXReverberatorEnable()); - this->SetParameter(ParameterFXReverberatorInputGain, this->m_PerformanceConfig.GetFXReverberatorInputGain()); - this->SetParameter(ParameterFXReverberatorTime, this->m_PerformanceConfig.GetFXReverberatorTime()); - this->SetParameter(ParameterFXReverberatorDiffusion, this->m_PerformanceConfig.GetFXReverberatorDiffusion()); - this->SetParameter(ParameterFXReverberatorLP, this->m_PerformanceConfig.GetFXReverberatorLP()); + this->SetParameter(TParameter::ParameterFXTubeEnable, this->m_PerformanceConfig.GetFXTubeEnable()); + this->SetParameter(TParameter::ParameterFXTubeOverdrive, this->m_PerformanceConfig.GetFXTubeOverdrive()); + + this->SetParameter(TParameter::ParameterFXChorusEnable, this->m_PerformanceConfig.GetFXChorusEnable()); + this->SetParameter(TParameter::ParameterFXChorusRate, this->m_PerformanceConfig.GetFXChorusRate()); + this->SetParameter(TParameter::ParameterFXChorusDepth, this->m_PerformanceConfig.GetFXChorusDepth()); + + this->SetParameter(TParameter::ParameterFXFlangerEnable, this->m_PerformanceConfig.GetFXFlangerEnable()); + this->SetParameter(TParameter::ParameterFXFlangerRate, this->m_PerformanceConfig.GetFXFlangerRate()); + this->SetParameter(TParameter::ParameterFXFlangerDepth, this->m_PerformanceConfig.GetFXFlangerDepth()); + this->SetParameter(TParameter::ParameterFXFlangerFeedback, this->m_PerformanceConfig.GetFXFlangerFeedback()); + + this->SetParameter(TParameter::ParameterFXOrbitoneEnable, this->m_PerformanceConfig.GetFXOrbitoneEnable()); + this->SetParameter(TParameter::ParameterFXOrbitoneRate, this->m_PerformanceConfig.GetFXOrbitoneRate()); + this->SetParameter(TParameter::ParameterFXOrbitoneDepth, this->m_PerformanceConfig.GetFXOrbitoneDepth()); + + this->SetParameter(TParameter::ParameterFXPhaserEnable, this->m_PerformanceConfig.GetFXPhaserEnable()); + this->SetParameter(TParameter::ParameterFXPhaserRate, this->m_PerformanceConfig.GetFXPhaserRate()); + this->SetParameter(TParameter::ParameterFXPhaserDepth, this->m_PerformanceConfig.GetFXPhaserDepth()); + this->SetParameter(TParameter::ParameterFXPhaserFeedback, this->m_PerformanceConfig.GetFXPhaserFeedback()); + this->SetParameter(TParameter::ParameterFXPhaserNbStages, this->m_PerformanceConfig.GetFXPhaserNbStages()); + + this->SetParameter(TParameter::ParameterFXDelayEnable, this->m_PerformanceConfig.GetFXDelayEnable()); + this->SetParameter(TParameter::ParameterFXDelayLeftDelayTime, this->m_PerformanceConfig.GetFXDelayLeftDelayTime()); + this->SetParameter(TParameter::ParameterFXDelayRightDelayTime, this->m_PerformanceConfig.GetFXDelayRightDelayTime()); + this->SetParameter(TParameter::ParameterFXDelayFeedback, this->m_PerformanceConfig.GetFXDelayFeedback()); + + this->SetParameter(TParameter::ParameterFXReverberatorEnable, this->m_PerformanceConfig.GetFXReverberatorEnable()); + this->SetParameter(TParameter::ParameterFXReverberatorInputGain, this->m_PerformanceConfig.GetFXReverberatorInputGain()); + this->SetParameter(TParameter::ParameterFXReverberatorTime, this->m_PerformanceConfig.GetFXReverberatorTime()); + this->SetParameter(TParameter::ParameterFXReverberatorDiffusion, this->m_PerformanceConfig.GetFXReverberatorDiffusion()); + this->SetParameter(TParameter::ParameterFXReverberatorLP, this->m_PerformanceConfig.GetFXReverberatorLP()); + + this->SetParameter(TParameter::ParameterFXTube_ChorusReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Tube, MixerOutput::FX_Chorus)); + this->SetParameter(TParameter::ParameterFXTube_FlangerReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Tube, MixerOutput::FX_Flanger)); + this->SetParameter(TParameter::ParameterFXTube_OrbitoneReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Tube, MixerOutput::FX_Orbitone)); + this->SetParameter(TParameter::ParameterFXTube_PhaserReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Tube, MixerOutput::FX_Phaser)); + this->SetParameter(TParameter::ParameterFXTube_DelayReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Tube, MixerOutput::FX_Delay)); + this->SetParameter(TParameter::ParameterFXTube_PlateReverbReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Tube, MixerOutput::FX_PlateReverb)); + this->SetParameter(TParameter::ParameterFXTube_ReverberatorReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Tube, MixerOutput::FX_Reverberator)); + this->SetParameter(TParameter::ParameterFXTube_MainOutput, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Tube, MixerOutput::MainOutput)); + + this->SetParameter(TParameter::ParameterFXChorus_TubeReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Chorus, MixerOutput::FX_Tube)); + this->SetParameter(TParameter::ParameterFXChorus_FlangerReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Chorus, MixerOutput::FX_Flanger)); + this->SetParameter(TParameter::ParameterFXChorus_OrbitoneReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Chorus, MixerOutput::FX_Orbitone)); + this->SetParameter(TParameter::ParameterFXChorus_PhaserReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Chorus, MixerOutput::FX_Phaser)); + this->SetParameter(TParameter::ParameterFXChorus_DelayReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Chorus, MixerOutput::FX_Delay)); + this->SetParameter(TParameter::ParameterFXChorus_PlateReverbReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Chorus, MixerOutput::FX_PlateReverb)); + this->SetParameter(TParameter::ParameterFXChorus_ReverberatorReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Chorus, MixerOutput::FX_Reverberator)); + this->SetParameter(TParameter::ParameterFXChorus_MainOutput, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Chorus, MixerOutput::MainOutput)); + + this->SetParameter(TParameter::ParameterFXFlanger_TubeReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Flanger, MixerOutput::FX_Tube)); + this->SetParameter(TParameter::ParameterFXFlanger_ChorusReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Flanger, MixerOutput::FX_Chorus)); + this->SetParameter(TParameter::ParameterFXFlanger_OrbitoneReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Flanger, MixerOutput::FX_Orbitone)); + this->SetParameter(TParameter::ParameterFXFlanger_PhaserReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Flanger, MixerOutput::FX_Phaser)); + this->SetParameter(TParameter::ParameterFXFlanger_DelayReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Flanger, MixerOutput::FX_Delay)); + this->SetParameter(TParameter::ParameterFXFlanger_PlateReverbReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Flanger, MixerOutput::FX_PlateReverb)); + this->SetParameter(TParameter::ParameterFXFlanger_ReverberatorReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Flanger, MixerOutput::FX_Reverberator)); + this->SetParameter(TParameter::ParameterFXFlanger_MainOutput, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Flanger, MixerOutput::MainOutput)); + + this->SetParameter(TParameter::ParameterFXOrbitone_TubeReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Orbitone, MixerOutput::FX_Tube)); + this->SetParameter(TParameter::ParameterFXOrbitone_ChorusReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Orbitone, MixerOutput::FX_Chorus)); + this->SetParameter(TParameter::ParameterFXOrbitone_FlangerReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Orbitone, MixerOutput::FX_Flanger)); + this->SetParameter(TParameter::ParameterFXOrbitone_PhaserReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Orbitone, MixerOutput::FX_Phaser)); + this->SetParameter(TParameter::ParameterFXOrbitone_DelayReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Orbitone, MixerOutput::FX_Delay)); + this->SetParameter(TParameter::ParameterFXOrbitone_PlateReverbReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Orbitone, MixerOutput::FX_PlateReverb)); + this->SetParameter(TParameter::ParameterFXOrbitone_ReverberatorReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Orbitone, MixerOutput::FX_Reverberator)); + this->SetParameter(TParameter::ParameterFXOrbitone_MainOutput, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Orbitone, MixerOutput::MainOutput)); + + this->SetParameter(TParameter::ParameterFXPhaser_TubeReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Phaser, MixerOutput::FX_Tube)); + this->SetParameter(TParameter::ParameterFXPhaser_ChorusReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Phaser, MixerOutput::FX_Chorus)); + this->SetParameter(TParameter::ParameterFXPhaser_FlangerReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Phaser, MixerOutput::FX_Flanger)); + this->SetParameter(TParameter::ParameterFXPhaser_OrbitoneReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Phaser, MixerOutput::FX_Orbitone)); + this->SetParameter(TParameter::ParameterFXPhaser_DelayReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Phaser, MixerOutput::FX_Delay)); + this->SetParameter(TParameter::ParameterFXPhaser_PlateReverbReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Phaser, MixerOutput::FX_PlateReverb)); + this->SetParameter(TParameter::ParameterFXPhaser_ReverberatorReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Phaser, MixerOutput::FX_Reverberator)); + this->SetParameter(TParameter::ParameterFXPhaser_MainOutput, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Phaser, MixerOutput::MainOutput)); + + this->SetParameter(TParameter::ParameterFXDelay_TubeReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Delay, MixerOutput::FX_Tube)); + this->SetParameter(TParameter::ParameterFXDelay_ChorusReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Delay, MixerOutput::FX_Chorus)); + this->SetParameter(TParameter::ParameterFXDelay_FlangerReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Delay, MixerOutput::FX_Flanger)); + this->SetParameter(TParameter::ParameterFXDelay_OrbitoneReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Delay, MixerOutput::FX_Orbitone)); + this->SetParameter(TParameter::ParameterFXDelay_PhaserReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Delay, MixerOutput::FX_Phaser)); + this->SetParameter(TParameter::ParameterFXDelay_PlateReverbReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Delay, MixerOutput::FX_PlateReverb)); + this->SetParameter(TParameter::ParameterFXDelay_ReverberatorReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Delay, MixerOutput::FX_Reverberator)); + this->SetParameter(TParameter::ParameterFXDelay_MainOutput, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Delay, MixerOutput::MainOutput)); + + this->SetParameter(TParameter::ParameterFXPlateReverb_TubeReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_PlateReverb, MixerOutput::FX_Tube)); + this->SetParameter(TParameter::ParameterFXPlateReverb_ChorusReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_PlateReverb, MixerOutput::FX_Chorus)); + this->SetParameter(TParameter::ParameterFXPlateReverb_FlangerReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_PlateReverb, MixerOutput::FX_Flanger)); + this->SetParameter(TParameter::ParameterFXPlateReverb_OrbitoneReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_PlateReverb, MixerOutput::FX_Orbitone)); + this->SetParameter(TParameter::ParameterFXPlateReverb_PhaserReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_PlateReverb, MixerOutput::FX_Phaser)); + this->SetParameter(TParameter::ParameterFXPlateReverb_DelayReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_PlateReverb, MixerOutput::FX_Delay)); + this->SetParameter(TParameter::ParameterFXPlateReverb_ReverberatorReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_PlateReverb, MixerOutput::FX_Reverberator)); + this->SetParameter(TParameter::ParameterFXPlateReverb_MainOutput, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_PlateReverb, MixerOutput::MainOutput)); + + this->SetParameter(TParameter::ParameterFXReverberator_TubeReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Reverberator, MixerOutput::FX_Tube)); + this->SetParameter(TParameter::ParameterFXReverberator_ChorusReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Reverberator, MixerOutput::FX_Chorus)); + this->SetParameter(TParameter::ParameterFXReverberator_FlangerReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Reverberator, MixerOutput::FX_Flanger)); + this->SetParameter(TParameter::ParameterFXReverberator_OrbitoneReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Reverberator, MixerOutput::FX_Orbitone)); + this->SetParameter(TParameter::ParameterFXReverberator_PhaserReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Reverberator, MixerOutput::FX_Phaser)); + this->SetParameter(TParameter::ParameterFXReverberator_DelayReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Reverberator, MixerOutput::FX_Delay)); + this->SetParameter(TParameter::ParameterFXReverberator_PlateReverbReturn, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Reverberator, MixerOutput::FX_PlateReverb)); + this->SetParameter(TParameter::ParameterFXReverberator_MainOutput, this->m_PerformanceConfig.GetFXReturnLevel(MixerOutput::FX_Reverberator, MixerOutput::MainOutput)); - size_t end = MixerOutput::kFXCount - 1; - for(size_t ret = 0; ret < end; ++ret) - { - for(size_t fx = 0; fx < MixerOutput::kFXCount; ++fx) - { - this->setMixingConsoleReturnLevel(static_cast(ret), static_cast(fx), this->m_PerformanceConfig.GetFXReturnLevel(static_cast(ret), static_cast(fx))); - } - } #endif } diff --git a/src/minidexed.h b/src/minidexed.h index 9dd7cc4..2dfa611 100644 --- a/src/minidexed.h +++ b/src/minidexed.h @@ -57,8 +57,13 @@ class CMiniDexed #endif { public: - CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt, - CGPIOManager *pGPIOManager, CI2CMaster *pI2CMaster, FATFS *pFileSystem); + CMiniDexed( + CConfig *pConfig, + CInterruptSystem *pInterrupt, + CGPIOManager *pGPIOManager, + CI2CMaster *pI2CMaster, + FATFS *pFileSystem + ); bool Initialize (void); @@ -94,6 +99,7 @@ public: void setAftertouch (uint8_t value, unsigned nTG); #if defined(MIXING_CONSOLE_ENABLE) + unsigned getMixingConsoleSendLevel(unsigned nTG, MixerOutput fx) const; void setMixingConsoleSendLevel(unsigned nTG, MixerOutput fx, unsigned nFXSend); void setMixingConsoleReturnLevel(MixerOutput ret, MixerOutput fx, unsigned nFXReturn); #elif defined(PLATE_REVERB_ENABLE) @@ -151,8 +157,8 @@ public: ParameterReverbLevel, #endif - #ifdef MIXING_CONSOLE_ENABLE - // BEGIN FX global parameters definition + // BEGIN FX global parameters definition + #if defined(MIXING_CONSOLE_ENABLE) // Tube parameters ParameterFXTubeEnable, @@ -202,7 +208,7 @@ public: ParameterFXTube_OrbitoneReturn, ParameterFXTube_PhaserReturn, ParameterFXTube_DelayReturn, - ParameterFXTube_ReverbReturn, + ParameterFXTube_PlateReverbReturn, ParameterFXTube_ReverberatorReturn, ParameterFXTube_MainOutput, @@ -212,7 +218,7 @@ public: ParameterFXChorus_OrbitoneReturn, ParameterFXChorus_PhaserReturn, ParameterFXChorus_DelayReturn, - ParameterFXChorus_ReverbReturn, + ParameterFXChorus_PlateReverbReturn, ParameterFXChorus_ReverberatorReturn, ParameterFXChorus_MainOutput, @@ -222,7 +228,7 @@ public: ParameterFXFlanger_OrbitoneReturn, ParameterFXFlanger_PhaserReturn, ParameterFXFlanger_DelayReturn, - ParameterFXFlanger_ReverbReturn, + ParameterFXFlanger_PlateReverbReturn, ParameterFXFlanger_ReverberatorReturn, ParameterFXFlanger_MainOutput, @@ -232,7 +238,7 @@ public: ParameterFXOrbitone_FlangerReturn, ParameterFXOrbitone_PhaserReturn, ParameterFXOrbitone_DelayReturn, - ParameterFXOrbitone_ReverbReturn, + ParameterFXOrbitone_PlateReverbReturn, ParameterFXOrbitone_ReverberatorReturn, ParameterFXOrbitone_MainOutput, @@ -242,7 +248,7 @@ public: ParameterFXPhaser_FlangerReturn, ParameterFXPhaser_OrbitoneReturn, ParameterFXPhaser_DelayReturn, - ParameterFXPhaser_ReverbReturn, + ParameterFXPhaser_PlateReverbReturn, ParameterFXPhaser_ReverberatorReturn, ParameterFXPhaser_MainOutput, @@ -252,19 +258,19 @@ public: ParameterFXDelay_FlangerReturn, ParameterFXDelay_OrbitoneReturn, ParameterFXDelay_PhaserReturn, - ParameterFXDelay_ReverbReturn, + ParameterFXDelay_PlateReverbReturn, ParameterFXDelay_ReverberatorReturn, ParameterFXDelay_MainOutput, - // Reverb Return parameters - ParameterFXReverb_TubeReturn, - ParameterFXReverb_ChorusReturn, - ParameterFXReverb_FlangerReturn, - ParameterFXReverb_OrbitoneReturn, - ParameterFXReverb_PhaserReturn, - ParameterFXReverb_DelayReturn, - ParameterFXReverb_ReverberatorReturn, - ParameterFXReverb_MainOutput, + // Plate Reverb Return parameters + ParameterFXPlateReverb_TubeReturn, + ParameterFXPlateReverb_ChorusReturn, + ParameterFXPlateReverb_FlangerReturn, + ParameterFXPlateReverb_OrbitoneReturn, + ParameterFXPlateReverb_PhaserReturn, + ParameterFXPlateReverb_DelayReturn, + ParameterFXPlateReverb_ReverberatorReturn, + ParameterFXPlateReverb_MainOutput, // Reverberator Return parameters ParameterFXReverberator_TubeReturn, @@ -273,11 +279,11 @@ public: ParameterFXReverberator_OrbitoneReturn, ParameterFXReverberator_PhaserReturn, ParameterFXReverberator_DelayReturn, - ParameterFXReverberator_ReverbReturn, + ParameterFXReverberator_PlateReverbReturn, ParameterFXReverberator_MainOutput, - // END FX global parameters definition #endif + // END FX global parameters definition ParameterUnknown }; @@ -301,7 +307,7 @@ public: TGParameterCutoff, TGParameterResonance, TGParameterMIDIChannel, -#ifdef PLATE_REVERB_ENABLE +#if defined(PLATE_REVERB_ENABLE) TGParameterReverbSend, #endif TGParameterPitchBendRange, @@ -331,7 +337,7 @@ public: TGParameterATAmplitude, TGParameterATEGBias, -#ifdef MIXING_CONSOLE_ENABLE +#if defined(MIXING_CONSOLE_ENABLE) TGParameterMixingSendFXTube, TGParameterMixingSendFXChorus, TGParameterMixingSendFXFlanger, @@ -415,8 +421,7 @@ private: #ifdef MIXING_CONSOLE_ENABLE unsigned m_nFXSendLevel[CConfig::ToneGenerators][MixerOutput::kFXCount]; - unsigned m_nFXReturnLevel[MixerOutput::kFXCount - 1][MixerOutput::kFXCount]; -#else +#elif defined(PLATE_REVERB_ENABLE) unsigned m_nReverbSend[CConfig::ToneGenerators]; #endif @@ -448,11 +453,9 @@ private: CPerformanceTimer m_GetChunkTimer; bool m_bProfileEnabled; -#ifdef MIXING_CONSOLE_ENABLE +#if defined(MIXING_CONSOLE_ENABLE) Mixer* mixing_console_; -#endif - -#ifdef PLATE_REVERB_ENABLE +#elif defined(PLATE_REVERB_ENABLE) AudioEffectPlateReverb* reverb; AudioStereoMixer* tg_mixer; AudioStereoMixer* reverb_send_mixer; diff --git a/src/mixing_console.hpp b/src/mixing_console.hpp index 4a388b5..3a28bf0 100644 --- a/src/mixing_console.hpp +++ b/src/mixing_console.hpp @@ -49,6 +49,7 @@ public: inline void setInputSample(size_t in, float32_t sampleL, float32_t sampleR); inline void setInputSampleBuffer(size_t in, float32_t* samples); inline void setInputSampleBuffer(size_t in, float32_t* samplesL, float32_t* samplesR); + inline void preProcessInputSampleBuffer(size_t in); // Return section inline void setReturnLevel(MixerOutput ret, MixerOutput dest, float32_t lvl); @@ -82,6 +83,7 @@ private: float32_t channel_level_[nb_inputs]; float32_t pan_[StereoChannels::kNumChannels + 1][nb_inputs]; + float32_t* tg_input_sample_buffer_[nb_inputs]; float32_t* input_sample_buffer_[StereoChannels::kNumChannels][nb_inputs]; float32_t input_samples_[StereoChannels::kNumChannels][nb_inputs + MixerOutput::kFXCount - 1]; float32_t levels_[MixerOutput::kFXCount][nb_inputs + MixerOutput::kFXCount - 1]; @@ -319,6 +321,7 @@ MixingConsole::MixingConsole(float32_t sampling_rate, size_t buffer_s { for(size_t i = 0; i < nb_inputs; ++i) { + this->tg_input_sample_buffer_[i] = nullptr; this->input_sample_buffer_[StereoChannels::Left ][i] = new float32_t[this->BufferSize]; this->input_sample_buffer_[StereoChannels::Right][i] = new float32_t[this->BufferSize]; memset(this->input_sample_buffer_[StereoChannels::Left ][i], 0, sizeof(float32_t) * this->BufferSize); @@ -350,6 +353,7 @@ MixingConsole::~MixingConsole() { delete[] this->input_sample_buffer_[StereoChannels::Left ][i]; delete[] this->input_sample_buffer_[StereoChannels::Right][i]; + this->tg_input_sample_buffer_[i] = nullptr; } } @@ -401,21 +405,13 @@ void MixingConsole::setInputSampleBuffer(size_t in, float32_t* sample { assert(in < nb_inputs); - if(samples != nullptr) - { - arm_scale_f32(samples, this->pan_[StereoChannels::Left ][in], this->input_sample_buffer_[StereoChannels::Left ][in], this->BufferSize); - arm_scale_f32(samples, this->pan_[StereoChannels::Right][in], this->input_sample_buffer_[StereoChannels::Right][in], this->BufferSize); - } - else - { - memset(this->input_sample_buffer_[StereoChannels::Left ][in], 0, this->BufferSize * sizeof(float32_t)); - memset(this->input_sample_buffer_[StereoChannels::Right][in], 0, this->BufferSize * sizeof(float32_t)); - } + this->tg_input_sample_buffer_[in] = samples; } template void MixingConsole::setInputSampleBuffer(size_t in, float32_t* samplesL, float32_t* samplesR) { + // Only used to input stereo samples assert(in < nb_inputs); if(samplesL != nullptr) { @@ -436,6 +432,39 @@ void MixingConsole::setInputSampleBuffer(size_t in, float32_t* sample } } +template +void MixingConsole::preProcessInputSampleBuffer(size_t in) +{ + assert(in < nb_inputs); + + float32_t* samples = this->tg_input_sample_buffer_[in]; + if(samples != nullptr) + { + if(this->pan_[StereoChannels::Left ][in] != 0.0f) + { + arm_scale_f32(samples, this->pan_[StereoChannels::Left ][in], this->input_sample_buffer_[StereoChannels::Left ][in], this->BufferSize); + } + else + { + memset(this->input_sample_buffer_[StereoChannels::Left ][in], 0, this->BufferSize * sizeof(float32_t)); + } + + if(this->pan_[StereoChannels::Right][in] != 0.0f) + { + arm_scale_f32(samples, this->pan_[StereoChannels::Right][in], this->input_sample_buffer_[StereoChannels::Right][in], this->BufferSize); + } + else + { + memset(this->input_sample_buffer_[StereoChannels::Right][in], 0, this->BufferSize * sizeof(float32_t)); + } + } + else + { + memset(this->input_sample_buffer_[StereoChannels::Left ][in], 0, this->BufferSize * sizeof(float32_t)); + memset(this->input_sample_buffer_[StereoChannels::Right][in], 0, this->BufferSize * sizeof(float32_t)); + } +} + // Return section template void MixingConsole::setReturnLevel(MixerOutput ret, MixerOutput dest, float32_t lvl) @@ -618,9 +647,19 @@ void MixingConsole::process(float32_t* outL, float32_t* outR) template void MixingConsole::updatePan(size_t in) { - float32_t pan = mapfloat(this->pan_[StereoChannels::kNumChannels][in], 0.0f, 1.0f, 0.0, Constants::MPI_2); - this->pan_[StereoChannels::Left ][in] = arm_cos_f32(pan) * this->channel_level_[in]; - this->pan_[StereoChannels::Right][in] = arm_sin_f32(pan) * this->channel_level_[in]; + float32_t pan = this->pan_[StereoChannels::kNumChannels][in] * Constants::MPI_2; + if(this->channel_level_[in] != 0.0f) + { + // this->pan_[StereoChannels::Left ][in] = arm_cos_f32(pan) * this->channel_level_[in]; + // this->pan_[StereoChannels::Right][in] = arm_sin_f32(pan) * this->channel_level_[in]; + this->pan_[StereoChannels::Left ][in] = InterpolatedSineOscillator::Cos(pan) * this->channel_level_[in]; + this->pan_[StereoChannels::Right][in] = InterpolatedSineOscillator::Sin(pan) * this->channel_level_[in]; + } + else + { + this->pan_[StereoChannels::Left ][in] = + this->pan_[StereoChannels::Right][in] = 0.0f; + } } template diff --git a/src/performance.ini b/src/performance.ini index 3db8fcb..7d55fb6 100644 --- a/src/performance.ini +++ b/src/performance.ini @@ -275,6 +275,7 @@ AftertouchTarget8=0 # Effects CompressorEnable=1 + ReverbEnable=1 ReverbSize=70 ReverbHighDamp=50 @@ -283,39 +284,190 @@ ReverbLowPass=30 ReverbDiffusion=65 ReverbLevel=99 -# FXRack -FXChainEnable=1 -FXChainWet=99 -FXChainTubeEnable=0 -FXChainTubeWet=50 -FXChainTubeOverdrive=10 -FXChainChorusEnable=0 -FXChainChorusWet=50 -FXChainChorusRate=40 -FXChainChorusDepth=50 -FXChainFlangerEnable=0 -FXChainFlangerWet=50 -FXChainFlangerRate=3 -FXChainFlangerDepth=75 -FXChainFlangerFeedback=50 -FXChainOrbitoneEnable=0 -FXChainOrbitoneWet=80 -FXChainOrbitoneRate=40 -FXChainOrbitoneDepth=50 -FXChainPhaserEnable=0 -FXChainPhaserWet=50 -FXChainPhaserRate=5 -FXChainPhaserDepth=99 -FXChainPhaserFeedback=70 -FXChainPhaserNbStages=12 -FXChainDelayEnable=0 -FXChainDelayWet=50 -FXChainDelayLeftDelayTime=15 -FXChainDelayRightDelayTime=22 -FXChainDelayFeedback=35 -FXChainReverberatorEnable=1 -FXChainReverberatorWet=70 -FXChainReverberatorInputGain=55 -FXChainReverberatorTime=75 -FXChainReverberatorDiffusion=75 -FXChainReverberatorLP=80 +# Mixing Console +FXTubeEnable=1 +FXTubeOverdrive=10 + +FXChorusEnable=1 +FXChorusRate=40 +FXChorusDepth=50 + +FXFlangerEnable=1 +FXFlangerRate=3 +FXFlangerDepth=75 +FXFlangerFeedback=50 + +FXOrbitoneEnable=1 +FXOrbitoneRate=40 +FXOrbitoneDepth=50 + +FXPhaserEnable=1 +FXPhaserRate=5 +FXPhaserDepth=99 +FXPhaserFeedback=70 +FXPhaserNbStages=12 + +FXDelayEnable=1 +FXDelayLeftDelayTime=15 +FXDelayRightDelayTime=22 +FXDelayFeedback=35 +FXDelayFlutterRate=0 +FXDelayFlutterAmount=0 + +FXReverberatorEnable=1 +FXReverberatorInputGain=55 +FXReverberatorTime=75 +FXReverberatorDiffusion=75 +FXReverberatorLP=80 + +FXSendLevel_0_x_Tube=0 +FXSendLevel_0_x_Chorus=0 +FXSendLevel_0_x_Flanger=0 +FXSendLevel_0_x_Orbitone=0 +FXSendLevel_0_x_Phaser=0 +FXSendLevel_0_x_Delay=0 +FXSendLevel_0_x_PlateReverb=0 +FXSendLevel_0_x_Reverberator=0 +FXSendLevel_0_x_MainOutput=0 + +FXSendLevel_1_x_Tube=0 +FXSendLevel_1_x_Chorus=0 +FXSendLevel_1_x_Flanger=0 +FXSendLevel_1_x_Orbitone=0 +FXSendLevel_1_x_Phaser=0 +FXSendLevel_1_x_Delay=0 +FXSendLevel_1_x_PlateReverb=0 +FXSendLevel_1_x_Reverberator=0 +FXSendLevel_1_x_MainOutput=0 + +FXSendLevel_2_x_Tube=0 +FXSendLevel_2_x_Chorus=0 +FXSendLevel_2_x_Flanger=0 +FXSendLevel_2_x_Orbitone=0 +FXSendLevel_2_x_Phaser=0 +FXSendLevel_2_x_Delay=0 +FXSendLevel_2_x_PlateReverb=0 +FXSendLevel_2_x_Reverberator=0 +FXSendLevel_2_x_MainOutput=0 + +FXSendLevel_3_x_Tube=0 +FXSendLevel_3_x_Chorus=0 +FXSendLevel_3_x_Flanger=0 +FXSendLevel_3_x_Orbitone=0 +FXSendLevel_3_x_Phaser=0 +FXSendLevel_3_x_Delay=0 +FXSendLevel_3_x_PlateReverb=0 +FXSendLevel_3_x_Reverberator=0 +FXSendLevel_3_x_MainOutput=0 + +FXSendLevel_4_x_Tube=0 +FXSendLevel_4_x_Chorus=0 +FXSendLevel_4_x_Flanger=0 +FXSendLevel_4_x_Orbitone=0 +FXSendLevel_4_x_Phaser=0 +FXSendLevel_4_x_Delay=0 +FXSendLevel_4_x_PlateReverb=0 +FXSendLevel_4_x_Reverberator=0 +FXSendLevel_4_x_MainOutput=0 + +FXSendLevel_5_x_Tube=0 +FXSendLevel_5_x_Chorus=0 +FXSendLevel_5_x_Flanger=0 +FXSendLevel_5_x_Orbitone=0 +FXSendLevel_5_x_Phaser=0 +FXSendLevel_5_x_Delay=0 +FXSendLevel_5_x_PlateReverb=0 +FXSendLevel_5_x_Reverberator=0 +FXSendLevel_5_x_MainOutput=0 + +FXSendLevel_6_x_Tube=0 +FXSendLevel_6_x_Chorus=0 +FXSendLevel_6_x_Flanger=0 +FXSendLevel_6_x_Orbitone=0 +FXSendLevel_6_x_Phaser=0 +FXSendLevel_6_x_Delay=0 +FXSendLevel_6_x_PlateReverb=0 +FXSendLevel_6_x_Reverberator=0 +FXSendLevel_6_x_MainOutput=0 + +FXSendLevel_7_x_Tube=0 +FXSendLevel_7_x_Chorus=0 +FXSendLevel_7_x_Flanger=0 +FXSendLevel_7_x_Orbitone=0 +FXSendLevel_7_x_Phaser=0 +FXSendLevel_7_x_Delay=0 +FXSendLevel_7_x_PlateReverb=0 +FXSendLevel_7_x_Reverberator=0 +FXSendLevel_7_x_MainOutput=0 + +FXReturnLevel_Tube_x_Chorus=0 +FXReturnLevel_Tube_x_Flanger=0 +FXReturnLevel_Tube_x_Orbitone=0 +FXReturnLevel_Tube_x_Phaser=0 +FXReturnLevel_Tube_x_Delay=0 +FXReturnLevel_Tube_x_PlateReverb=0 +FXReturnLevel_Tube_x_Reverberator=0 +FXReturnLevel_Tube_x_MainOutput=0 + +FXReturnLevel_Chorus_x_Tube=0 +FXReturnLevel_Chorus_x_Flanger=0 +FXReturnLevel_Chorus_x_Orbitone=0 +FXReturnLevel_Chorus_x_Phaser=0 +FXReturnLevel_Chorus_x_Delay=0 +FXReturnLevel_Chorus_x_PlateReverb=0 +FXReturnLevel_Chorus_x_Reverberator=0 +FXReturnLevel_Chorus_x_MainOutput=0 + +FXReturnLevel_Flanger_x_Tube=0 +FXReturnLevel_Flanger_x_Chorus=0 +FXReturnLevel_Flanger_x_Orbitone=0 +FXReturnLevel_Flanger_x_Phaser=0 +FXReturnLevel_Flanger_x_Delay=0 +FXReturnLevel_Flanger_x_PlateReverb=0 +FXReturnLevel_Flanger_x_Reverberator=0 +FXReturnLevel_Flanger_x_MainOutput=0 + +FXReturnLevel_Orbitone_x_Tube=0 +FXReturnLevel_Orbitone_x_Chorus=0 +FXReturnLevel_Orbitone_x_Flanger=0 +FXReturnLevel_Orbitone_x_Phaser=0 +FXReturnLevel_Orbitone_x_Delay=0 +FXReturnLevel_Orbitone_x_PlateReverb=0 +FXReturnLevel_Orbitone_x_Reverberator=0 +FXReturnLevel_Orbitone_x_MainOutput=0 + +FXReturnLevel_Phaser_x_Tube=0 +FXReturnLevel_Phaser_x_Chorus=0 +FXReturnLevel_Phaser_x_Flanger=0 +FXReturnLevel_Phaser_x_Orbitone=0 +FXReturnLevel_Phaser_x_Delay=0 +FXReturnLevel_Phaser_x_PlateReverb=0 +FXReturnLevel_Phaser_x_Reverberator=0 +FXReturnLevel_Phaser_x_MainOutput=0 + +FXReturnLevel_Delay_x_Tube=0 +FXReturnLevel_Delay_x_Chorus=0 +FXReturnLevel_Delay_x_Flanger=0 +FXReturnLevel_Delay_x_Orbitone=0 +FXReturnLevel_Delay_x_Phaser=0 +FXReturnLevel_Delay_x_PlateReverb=0 +FXReturnLevel_Delay_x_Reverberator=0 +FXReturnLevel_Delay_x_MainOutput=0 + +FXReturnLevel_PlateReverb_x_Tube=0 +FXReturnLevel_PlateReverb_x_Chorus=0 +FXReturnLevel_PlateReverb_x_Flanger=0 +FXReturnLevel_PlateReverb_x_Orbitone=0 +FXReturnLevel_PlateReverb_x_Phaser=0 +FXReturnLevel_PlateReverb_x_Delay=0 +FXReturnLevel_PlateReverb_x_Reverberator=0 +FXReturnLevel_PlateReverb_x_MainOutput=0 + +FXReturnLevel_Reverberator_x_Tube=0 +FXReturnLevel_Reverberator_x_Chorus=0 +FXReturnLevel_Reverberator_x_Flanger=0 +FXReturnLevel_Reverberator_x_Orbitone=0 +FXReturnLevel_Reverberator_x_Phaser=0 +FXReturnLevel_Reverberator_x_Delay=0 +FXReturnLevel_Reverberator_x_PlateReverb=0 +FXReturnLevel_Reverberator_x_MainOutput=0 diff --git a/src/performanceconfig.cpp b/src/performanceconfig.cpp index ad87af6..89c656f 100644 --- a/src/performanceconfig.cpp +++ b/src/performanceconfig.cpp @@ -152,36 +152,46 @@ bool CPerformanceConfig::Load (void) m_bCompressorEnable = m_Properties.GetNumber ("CompressorEnable", 1) != 0; - m_bReverbEnable = m_Properties.GetNumber ("ReverbEnable", 1) != 0; - m_nReverbSize = m_Properties.GetNumber ("ReverbSize", 70); - m_nReverbHighDamp = m_Properties.GetNumber ("ReverbHighDamp", 50); - m_nReverbLowDamp = m_Properties.GetNumber ("ReverbLowDamp", 50); - m_nReverbLowPass = m_Properties.GetNumber ("ReverbLowPass", 30); - m_nReverbDiffusion = m_Properties.GetNumber ("ReverbDiffusion", 65); - m_nReverbLevel = m_Properties.GetNumber ("ReverbLevel", 99); +#if defined(PLATE_REVERB_ENABLE) || defined(MIXING_CONSOLE_ENABLE) + this->m_bReverbEnable = this->m_Properties.GetNumber ("ReverbEnable", 1) != 0; + this->m_nReverbSize = this->m_Properties.GetNumber ("ReverbSize", 70); + this->m_nReverbHighDamp = this->m_Properties.GetNumber ("ReverbHighDamp", 50); + this->m_nReverbLowDamp = this->m_Properties.GetNumber ("ReverbLowDamp", 50); + this->m_nReverbLowPass = this->m_Properties.GetNumber ("ReverbLowPass", 30); + this->m_nReverbDiffusion = this->m_Properties.GetNumber ("ReverbDiffusion", 65); + this->m_nReverbLevel = this->m_Properties.GetNumber ("ReverbLevel", 99); +#endif -#ifdef MIXING_CONSOLE_ENABLE +#if defined(MIXING_CONSOLE_ENABLE) this->m_bFXTubeEnable = this->m_Properties.GetNumber("FXTubeEnable", 1); this->m_nFXTubeOverdrive = this->m_Properties.GetNumber("FXTubeOverdrive", 10); + this->m_bFXChorusEnable = this->m_Properties.GetNumber("FXChorusEnable", 1); this->m_nFXChorusRate = this->m_Properties.GetNumber("FXChorusRate", 50); this->m_nFXChorusDepth = this->m_Properties.GetNumber("FXChorusDepth", 50); + this->m_bFXFlangerEnable = this->m_Properties.GetNumber("FXFlangerEnable", 1); this->m_nFXFlangerRate = this->m_Properties.GetNumber("FXFlangerRate", 15); this->m_nFXFlangerDepth = this->m_Properties.GetNumber("FXFlangerDepth", 10); this->m_nFXFlangerFeedback = this->m_Properties.GetNumber("FXFlangerFeedback", 20); + this->m_bFXOrbitoneEnable = this->m_Properties.GetNumber("FXOrbitoneEnable", 1); this->m_nFXOrbitoneRate = this->m_Properties.GetNumber("FXOrbitoneRate", 40); this->m_nFXOrbitoneDepth = this->m_Properties.GetNumber("FXOrbitoneDepth", 50); + this->m_bFXPhaserEnable = this->m_Properties.GetNumber("FXPhaserEnable", 1); this->m_nFXPhaserRate = this->m_Properties.GetNumber("FXPhaserRate", 5); this->m_nFXPhaserDepth = this->m_Properties.GetNumber("FXPhaserDepth", 99); this->m_nFXPhaserFeedback = this->m_Properties.GetNumber("FXPhaserFeedback", 50); this->m_nFXPhaserNbStages = this->m_Properties.GetNumber("FXPhaserNbStages", 12); + this->m_bFXDelayEnable = this->m_Properties.GetNumber("FXDelayEnable", 1); this->m_nFXDelayLeftDelayTime = this->m_Properties.GetNumber("FXDelayLeftDelayTime", 15); this->m_nFXDelayRightDelayTime = this->m_Properties.GetNumber("FXDelayRightDelayTime", 22); this->m_nFXDelayFeedback = this->m_Properties.GetNumber("FXDelayFeedback", 35); + this->m_nFXDelayFlutterRate = this->m_Properties.GetNumber("FXDelayFlutterRate", 0); + this->m_nFXDelayFlutterAmount = this->m_Properties.GetNumber("FXDelayFlutterAmount", 0); + this->m_bFXReverberatorEnable = this->m_Properties.GetNumber("FXReverberatorEnable", 1); this->m_nFXReverberatorInputGain = this->m_Properties.GetNumber("FXReverberatorInputGain", 30); this->m_nFXReverberatorTime = this->m_Properties.GetNumber("FXReverberatorTime", 30); @@ -193,7 +203,7 @@ bool CPerformanceConfig::Load (void) for(unsigned fx = 0; fx < MixerOutput::kFXCount; ++fx) { std::ostringstream oss("FXSendLevel_"); - oss << in << "_x_" << fx; + oss << in << "_x_" << toString(static_cast(fx)); unsigned defaultLevel = 0; if(fx == MixerOutput::MainOutput) defaultLevel = 50; else if(fx == MixerOutput::FX_PlateReverb) defaultLevel = 50; @@ -207,7 +217,7 @@ bool CPerformanceConfig::Load (void) for(size_t fx = 0; fx < MixerOutput::kFXCount; ++fx) { std::ostringstream oss("FXReturnLevel_"); - oss << ret << "_x_" << fx; + oss << toString(static_cast(ret)) << "_x_" << toString(static_cast(fx)); unsigned defaultLevel = 0; if(ret == MixerOutput::FX_PlateReverb && fx == MixerOutput::MainOutput) defaultLevel = 50; this->m_nFXReturnLevel[ret][fx] = this->m_Properties.GetNumber(oss.str().c_str(), defaultLevel); @@ -334,50 +344,58 @@ bool CPerformanceConfig::Save (void) m_Properties.SetNumber ("ReverbLevel", m_nReverbLevel); #ifdef MIXING_CONSOLE_ENABLE - this->m_Properties.SetNumber("FXTubeEnable", m_bFXTubeEnable ? 1 : 0); - this->m_Properties.SetNumber("FXTubeOverdrive", m_nFXTubeOverdrive); - this->m_Properties.SetNumber("FXChorusEnable", m_bFXChorusEnable ? 1 : 0); - this->m_Properties.SetNumber("FXChorusRate", m_nFXChorusRate); - this->m_Properties.SetNumber("FXChorusDepth", m_nFXChorusDepth); - this->m_Properties.SetNumber("FXFlangerEnable", m_bFXFlangerEnable ? 1 : 0); - this->m_Properties.SetNumber("FXFlangerRate", m_nFXFlangerRate); - this->m_Properties.SetNumber("FXFlangerDepth", m_nFXFlangerDepth); - this->m_Properties.SetNumber("FXFlangerFeedback", m_nFXFlangerFeedback); - this->m_Properties.SetNumber("FXOrbitoneEnable", m_bFXOrbitoneEnable ? 1 : 0); - this->m_Properties.SetNumber("FXOrbitoneRate", m_nFXOrbitoneRate); - this->m_Properties.SetNumber("FXOrbitoneDepth", m_nFXOrbitoneDepth); - this->m_Properties.SetNumber("FXPhaserEnable", m_bFXPhaserEnable ? 1 : 0); - this->m_Properties.SetNumber("FXPhaserRate", m_nFXPhaserRate); - this->m_Properties.SetNumber("FXPhaserDepth", m_nFXPhaserDepth); - this->m_Properties.SetNumber("FXPhaserFeedback", m_nFXPhaserFeedback); - this->m_Properties.SetNumber("FXPhaserNbStages", m_nFXPhaserNbStages); - this->m_Properties.SetNumber("FXDelayEnable", m_bFXDelayEnable ? 1 : 0); - this->m_Properties.SetNumber("FXDelayLeftDelayTime", m_nFXDelayLeftDelayTime); - this->m_Properties.SetNumber("FXDelayRightDelayTime", m_nFXDelayRightDelayTime); - this->m_Properties.SetNumber("FXDelayFeedback", m_nFXDelayFeedback); - this->m_Properties.SetNumber("FXReverberatorEnable", m_bFXReverberatorEnable ? 1 : 0); - this->m_Properties.SetNumber("FXReverberatorInputGain", m_nFXReverberatorInputGain); - this->m_Properties.SetNumber("FXReverberatorTime", m_nFXReverberatorTime); - this->m_Properties.SetNumber("FXReverberatorDiffusion", m_nFXReverberatorDiffusion); - this->m_Properties.SetNumber("FXReverberatorLP", m_nFXReverberatorLP); + this->m_Properties.SetNumber("FXTubeEnable", this->m_bFXTubeEnable ? 1 : 0); + this->m_Properties.SetNumber("FXTubeOverdrive", this->m_nFXTubeOverdrive); + + this->m_Properties.SetNumber("FXChorusEnable", this->m_bFXChorusEnable ? 1 : 0); + this->m_Properties.SetNumber("FXChorusRate", this->m_nFXChorusRate); + this->m_Properties.SetNumber("FXChorusDepth", this->m_nFXChorusDepth); + + this->m_Properties.SetNumber("FXFlangerEnable", this->m_bFXFlangerEnable ? 1 : 0); + this->m_Properties.SetNumber("FXFlangerRate", this->m_nFXFlangerRate); + this->m_Properties.SetNumber("FXFlangerDepth", this->m_nFXFlangerDepth); + this->m_Properties.SetNumber("FXFlangerFeedback", this->m_nFXFlangerFeedback); + + this->m_Properties.SetNumber("FXOrbitoneEnable", this->m_bFXOrbitoneEnable ? 1 : 0); + this->m_Properties.SetNumber("FXOrbitoneRate", this->m_nFXOrbitoneRate); + this->m_Properties.SetNumber("FXOrbitoneDepth", this->m_nFXOrbitoneDepth); + + this->m_Properties.SetNumber("FXPhaserEnable", this->m_bFXPhaserEnable ? 1 : 0); + this->m_Properties.SetNumber("FXPhaserRate", this->m_nFXPhaserRate); + this->m_Properties.SetNumber("FXPhaserDepth", this->m_nFXPhaserDepth); + this->m_Properties.SetNumber("FXPhaserFeedback", this->m_nFXPhaserFeedback); + this->m_Properties.SetNumber("FXPhaserNbStages", this->m_nFXPhaserNbStages); + + this->m_Properties.SetNumber("FXDelayEnable", this->m_bFXDelayEnable ? 1 : 0); + this->m_Properties.SetNumber("FXDelayLeftDelayTime", this->m_nFXDelayLeftDelayTime); + this->m_Properties.SetNumber("FXDelayRightDelayTime", this->m_nFXDelayRightDelayTime); + this->m_Properties.SetNumber("FXDelayFeedback", this->m_nFXDelayFeedback); + this->m_Properties.SetNumber("FXDelayFlutterRate", this->m_nFXDelayFlutterRate); + this->m_Properties.SetNumber("FXDelayFlutterAmount", this->m_nFXDelayFlutterAmount); + + this->m_Properties.SetNumber("FXReverberatorEnable", this->m_bFXReverberatorEnable ? 1 : 0); + this->m_Properties.SetNumber("FXReverberatorInputGain", this->m_nFXReverberatorInputGain); + this->m_Properties.SetNumber("FXReverberatorTime", this->m_nFXReverberatorTime); + this->m_Properties.SetNumber("FXReverberatorDiffusion", this->m_nFXReverberatorDiffusion); + this->m_Properties.SetNumber("FXReverberatorLP", this->m_nFXReverberatorLP); for(unsigned in = 0; in < CConfig::ToneGenerators; ++in) { - for(unsigned fx = 0; fx < MixerOutput::kFXCount; ++fx) + for(size_t fx = 0; fx < MixerOutput::kFXCount; ++fx) { std::ostringstream oss("FXSendLevel_"); - oss << in << "_x_" << fx; + oss << in << "_x_" << toString(static_cast(fx)); this->m_Properties.SetNumber(oss.str().c_str(), this->m_nFXSendLevel[in][fx]); } } size_t end = MixerOutput::kFXCount - 1; - for(unsigned ret = 0; ret < end; ++ret) + for(size_t ret = 0; ret < end; ++ret) { - for(unsigned fx = 0; fx < MixerOutput::kFXCount; ++fx) + for(size_t fx = 0; fx < MixerOutput::kFXCount; ++fx) { std::ostringstream oss("FXReturnLevel_"); - oss << ret << "_x_" << fx; + oss << toString(static_cast(ret)) << "_x_" << toString(static_cast(fx)); this->m_Properties.SetNumber(oss.str().c_str(), this->m_nFXReturnLevel[ret][fx]); } } @@ -1137,6 +1155,16 @@ unsigned CPerformanceConfig::GetFXDelayFeedback(void) const return this->m_nFXDelayFeedback; } +unsigned CPerformanceConfig::GetFXDelayFlutterRate(void) const +{ + return this->m_nFXDelayFlutterRate; +} + +unsigned CPerformanceConfig::GetFXDelayFlutterAmount(void) const +{ + return this->m_nFXDelayFlutterAmount; +} + bool CPerformanceConfig::GetFXReverberatorEnable(void) const { return this->m_bFXReverberatorEnable; @@ -1281,6 +1309,16 @@ void CPerformanceConfig::SetFXDelayFeedback(unsigned nValue) this->m_nFXDelayFeedback = nValue; } +void CPerformanceConfig::SetFXDelayFlutterRate(unsigned nValue) +{ + this->m_nFXDelayFlutterRate = nValue; +} + +void CPerformanceConfig::SetFXDelayFlutterAmount(unsigned nValue) +{ + this->m_nFXDelayFlutterAmount = nValue; +} + void CPerformanceConfig::SetFXReverberatorEnable(unsigned bValue) { this->m_bFXReverberatorEnable = bValue; diff --git a/src/performanceconfig.h b/src/performanceconfig.h index 8b5d225..3247a93 100644 --- a/src/performanceconfig.h +++ b/src/performanceconfig.h @@ -121,25 +121,33 @@ public: #ifdef MIXING_CONSOLE_ENABLE bool GetFXTubeEnable(void) const; unsigned GetFXTubeOverdrive(void) const; + bool GetFXChorusEnable(void) const; unsigned GetFXChorusRate(void) const; unsigned GetFXChorusDepth(void) const; + bool GetFXFlangerEnable(void) const; unsigned GetFXFlangerRate(void) const; unsigned GetFXFlangerDepth(void) const; unsigned GetFXFlangerFeedback(void) const; + bool GetFXOrbitoneEnable(void) const; unsigned GetFXOrbitoneRate(void) const; unsigned GetFXOrbitoneDepth(void) const; + bool GetFXPhaserEnable(void) const; unsigned GetFXPhaserRate(void) const; unsigned GetFXPhaserDepth(void) const; unsigned GetFXPhaserFeedback(void) const; unsigned GetFXPhaserNbStages(void) const; + bool GetFXDelayEnable(void) const; unsigned GetFXDelayLeftDelayTime(void) const; unsigned GetFXDelayRightDelayTime(void) const; unsigned GetFXDelayFeedback(void) const; + unsigned GetFXDelayFlutterRate(void) const; + unsigned GetFXDelayFlutterAmount(void) const; + bool GetFXReverberatorEnable(void) const; unsigned GetFXReverberatorInputGain(void) const; unsigned GetFXReverberatorTime(void) const; @@ -150,30 +158,39 @@ public: void SetFXTubeEnable(bool bValue); void SetFXTubeOverdrive(unsigned nValue); + void SetFXChorusEnable(bool bValue); void SetFXChorusRate(unsigned nValue); void SetFXChorusDepth(unsigned nValue); + void SetFXFlangerEnable(bool bValue); void SetFXFlangerRate(unsigned nValue); void SetFXFlangerDepth(unsigned nValue); void SetFXFlangerFeedback(unsigned nValue); + void SetFXOrbitoneEnable(bool bValue); void SetFXOrbitoneRate(unsigned nValue); void SetFXOrbitoneDepth(unsigned nValue); + void SetFXPhaserEnable(bool bValue); void SetFXPhaserRate(unsigned nValue); void SetFXPhaserDepth(unsigned nValue); void SetFXPhaserFeedback(unsigned nValue); void SetFXPhaserNbStages(unsigned nValue); + void SetFXDelayEnable(unsigned nValue); void SetFXDelayLeftDelayTime(unsigned nValue); void SetFXDelayRightDelayTime(unsigned nValue); void SetFXDelayFeedback(unsigned nValue); + void SetFXDelayFlutterRate(unsigned nValue); + void SetFXDelayFlutterAmount(unsigned nValue); + void SetFXReverberatorEnable(unsigned nValue); void SetFXReverberatorInputGain(unsigned nValue); void SetFXReverberatorTime(unsigned nValue); void SetFXReverberatorDiffusion(unsigned nValue); void SetFXReverberatorLP(unsigned nValue); + void SetFXSendLevel(unsigned in, MixerOutput fx, unsigned nValue); void SetFXReturnLevel(MixerOutput ret, MixerOutput fx, unsigned nValue); #endif @@ -249,25 +266,33 @@ private: bool m_bFXTubeEnable; unsigned m_nFXTubeWet; unsigned m_nFXTubeOverdrive; + bool m_bFXChorusEnable; unsigned m_nFXChorusRate; unsigned m_nFXChorusDepth; + bool m_bFXFlangerEnable; unsigned m_nFXFlangerRate; unsigned m_nFXFlangerDepth; unsigned m_nFXFlangerFeedback; + bool m_bFXOrbitoneEnable; unsigned m_nFXOrbitoneRate; unsigned m_nFXOrbitoneDepth; + bool m_bFXPhaserEnable; unsigned m_nFXPhaserRate; unsigned m_nFXPhaserDepth; unsigned m_nFXPhaserFeedback; unsigned m_nFXPhaserNbStages; + bool m_bFXDelayEnable; unsigned m_nFXDelayLeftDelayTime; unsigned m_nFXDelayRightDelayTime; unsigned m_nFXDelayFeedback; + unsigned m_nFXDelayFlutterRate; + unsigned m_nFXDelayFlutterAmount; + bool m_bFXReverberatorEnable; unsigned m_nFXReverberatorInputGain; unsigned m_nFXReverberatorTime; diff --git a/src/test/test_fx_mixing_console.cpp b/src/test/test_fx_mixing_console.cpp index 3ec5e22..347302b 100644 --- a/src/test/test_fx_mixing_console.cpp +++ b/src/test/test_fx_mixing_console.cpp @@ -205,7 +205,8 @@ void setupMixingConsoleFX(Mixer* mixer, int scenarioId) TEST(MixingConsole, ZeroSamplesTest) { - const size_t length = 4; + static const size_t length = 4; + Mixer mixer(SAMPLING_FREQUENCY, length); ASSERT_EQ(0, FULL_INSPECT((&mixer), true)); @@ -223,6 +224,7 @@ TEST(MixingConsole, ZeroSamplesTest) float32_t samples[] = {0.0f, 0.0f, 0.0f, 0.0f}; mixer.setInputSampleBuffer(0, samples); + mixer.preProcessInputSampleBuffer(0); ASSERT_EQ(0, FULL_INSPECT((&mixer), true)); mixer.setSendLevel(0, MixerOutput::MainOutput, 1.0f); @@ -247,8 +249,8 @@ TEST(MixingConsole, ZeroSamplesTest) TEST(MixingConsole, DryProcessing) { - const float32_t epsilon = 1e-7; - const size_t length = 2; + static const float32_t epsilon = 1e-4; + static const size_t length = 2; Mixer mixer(SAMPLING_FREQUENCY, length); mixer.reset(); @@ -277,6 +279,7 @@ TEST(MixingConsole, DryProcessing) for(size_t i = 0; i < StereoChannels::kNumChannels; ++i) memset(out[i], 0, length * sizeof(float32_t)); mixer.setInputSampleBuffer(0, in); + mixer.preProcessInputSampleBuffer(0); ASSERT_EQ(0, INSPECT((&mixer), fullInspector)); mixer.process( @@ -293,8 +296,8 @@ TEST(MixingConsole, DryProcessing) TEST(MixingConsole, ReverberatorProcessing) { - const float32_t epsilon = 1e-7; - const size_t length = 2; + static const float32_t epsilon = 1e-7; + static const size_t length = 2; Mixer mixer(SAMPLING_FREQUENCY, length); mixer.reset(); @@ -340,7 +343,7 @@ TEST(MixingConsole, ReverberatorProcessing) TEST(MixingConsole, ReverberatorNoiseProcessing) { - const size_t length = 1024; + static const size_t length = 1024; Mixer mixer(SAMPLING_FREQUENCY, length); mixer.reset(); diff --git a/src/test/test_fx_mixing_console_unitary.cpp b/src/test/test_fx_mixing_console_unitary.cpp index fcad513..565d4bf 100644 --- a/src/test/test_fx_mixing_console_unitary.cpp +++ b/src/test/test_fx_mixing_console_unitary.cpp @@ -7,6 +7,7 @@ typedef MixingConsole<1> Mixer; TEST(MixingConsole, ShortBuffer) { static const float32_t SINPI_4 = std::sqrt(2.0f) / 2.0f; + static const float32_t epsilon = 1e-4; const testing::TestInfo* test_info = testing::UnitTest::GetInstance()->current_test_info(); std::string full_test_name = test_info->test_case_name(); @@ -28,14 +29,15 @@ TEST(MixingConsole, ShortBuffer) memset(outSamples[1], 0, size * sizeof(float32_t)); mixer->setInputSampleBuffer(0, inSamples); + mixer->preProcessInputSampleBuffer(0); ASSERT_EQ(0, FULL_INSPECT(mixer, true)) << full_test_name << " Mixer.setInputSampleBuffer"; mixer->process(outSamples[0], outSamples[1]); ASSERT_EQ(0, FULL_INSPECT(mixer, true)) << full_test_name << " Mixer.process"; for(size_t s = 0; s < size; ++s) { - EXPECT_FLOAT_EQ(outSamples[0][s], outSamples[1][s]); - EXPECT_FLOAT_EQ(outSamples[0][s], inSamples[s] * SINPI_4); + EXPECT_NEAR(outSamples[0][s], outSamples[1][s], epsilon); + EXPECT_NEAR(outSamples[0][s], inSamples[s] * SINPI_4, epsilon); } delete mixer; @@ -70,6 +72,7 @@ TEST(MixingConsole, ReverberatorShortBuffer) memset(outSamples[1], 0, size * sizeof(float32_t)); mixer->setInputSampleBuffer(0, inSamples); + mixer->preProcessInputSampleBuffer(0); ASSERT_EQ(0, FULL_INSPECT(mixer, true)) << full_test_name << " Mixer.setInputSampleBuffer"; mixer->process(outSamples[0], outSamples[1]); @@ -86,7 +89,7 @@ TEST(MixingConsole, DrySamplesBoundariesTest) full_test_name += test_info->name(); size_t size; - float32_t** inSamples =readWaveFile(AUDIO_SOURCE_FILE, size); + float32_t** inSamples = readWaveFile(AUDIO_SOURCE_FILE, size); Mixer* mixer = new Mixer(SAMPLING_FREQUENCY, size); mixer->reset(); @@ -97,6 +100,7 @@ TEST(MixingConsole, DrySamplesBoundariesTest) mixer->setSendLevel(0, MixerOutput::MainOutput, 1.0f); mixer->setInputSampleBuffer(0, inSamples[0]); + mixer->preProcessInputSampleBuffer(0); float32_t** outSamples = new float32_t*[2]; outSamples[0] = new float32_t[size]; @@ -133,7 +137,7 @@ TEST(MixingConsole, ReverberatorSamplesBoundariesTest) full_test_name += test_info->name(); size_t size; - float32_t** inSamples =readWaveFile(AUDIO_SOURCE_FILE, size); + float32_t** inSamples = readWaveFile(AUDIO_SOURCE_FILE, size); float32_t** outSamples = new float32_t*[2]; outSamples[0] = new float32_t[size]; @@ -157,6 +161,7 @@ TEST(MixingConsole, ReverberatorSamplesBoundariesTest) mixer->getReverberator()->setLP(0.7f); mixer->setInputSampleBuffer(0, inSamples[0]); + mixer->preProcessInputSampleBuffer(0); mixer->process(outSamples[0], outSamples[1]); ASSERT_EQ(0, FULL_INSPECT2(mixer, true, full_test_name + "Mixer.process")) << full_test_name << " Mixer.process"; diff --git a/src/uimenu.cpp b/src/uimenu.cpp index 7372bf4..fe98444 100644 --- a/src/uimenu.cpp +++ b/src/uimenu.cpp @@ -34,112 +34,119 @@ using namespace std; const CUIMenu::TMenuItem CUIMenu::s_MenuRoot[] = { - {"MiniDexed", MenuHandler, CUIMenu::s_MainMenu}, + {"MiniDexed", CUIMenu::MenuHandler, CUIMenu::s_MainMenu}, {0} }; // inserting menu items before "TG1" affect TGShortcutHandler() const CUIMenu::TMenuItem CUIMenu::s_MainMenu[] = { - {"TG1", MenuHandler, CUIMenu::s_TGMenu, 0}, + {"TG1", CUIMenu::MenuHandler, CUIMenu::s_TGMenu, 0}, #ifdef ARM_ALLOW_MULTI_CORE - {"TG2", MenuHandler, CUIMenu::s_TGMenu, 1}, - {"TG3", MenuHandler, CUIMenu::s_TGMenu, 2}, - {"TG4", MenuHandler, CUIMenu::s_TGMenu, 3}, - {"TG5", MenuHandler, CUIMenu::s_TGMenu, 4}, - {"TG6", MenuHandler, CUIMenu::s_TGMenu, 5}, - {"TG7", MenuHandler, CUIMenu::s_TGMenu, 6}, - {"TG8", MenuHandler, CUIMenu::s_TGMenu, 7}, + {"TG2", CUIMenu::MenuHandler, CUIMenu::s_TGMenu, 1}, + {"TG3", CUIMenu::MenuHandler, CUIMenu::s_TGMenu, 2}, + {"TG4", CUIMenu::MenuHandler, CUIMenu::s_TGMenu, 3}, + {"TG5", CUIMenu::MenuHandler, CUIMenu::s_TGMenu, 4}, + {"TG6", CUIMenu::MenuHandler, CUIMenu::s_TGMenu, 5}, + {"TG7", CUIMenu::MenuHandler, CUIMenu::s_TGMenu, 6}, + {"TG8", CUIMenu::MenuHandler, CUIMenu::s_TGMenu, 7}, #endif - {"Effects", MenuHandler, CUIMenu::s_EffectsMenu}, - {"Performance", MenuHandler, CUIMenu::s_PerformanceMenu}, + {"Effects", CUIMenu::MenuHandler, CUIMenu::s_EffectsMenu}, + {"Performance", CUIMenu::MenuHandler, CUIMenu::s_PerformanceMenu}, {0} }; +#if defined(MIXING_CONSOLE_ENABLE) +const CUIMenu::TMenuItem CUIMenu::s_TGFXMenu[] = +{ + {"Tube-Send", CUIMenu::EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterMixingSendFXTube}, + {"Chorus-Send", CUIMenu::EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterMixingSendFXChorus}, + {"FlangR-Send", CUIMenu::EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterMixingSendFXFlanger}, + {"Orb-Send", CUIMenu::EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterMixingSendFXOrbittone}, + {"Phaser-Send", CUIMenu::EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterMixingSendFXPhaser}, + {"Delay-Send", CUIMenu::EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterMixingSendFXDelay}, + {"Plate-Send", CUIMenu::EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterMixingSendFXPlateReverb}, + {"Rev-Send", CUIMenu::EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterMixingSendFXReverberator}, + {"Main Out", CUIMenu::EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterMixingSendFXMainOutput}, + {0} +}; +#endif + const CUIMenu::TMenuItem CUIMenu::s_TGMenu[] = { - {"Voice", EditProgramNumber}, - {"Bank", EditVoiceBankNumber}, - {"Volume", EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterVolume}, + {"Voice", CUIMenu::EditProgramNumber}, + {"Bank", CUIMenu::EditVoiceBankNumber}, + {"Volume", CUIMenu::EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterVolume}, #ifdef ARM_ALLOW_MULTI_CORE - {"Pan", EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterPan}, + {"Pan", CUIMenu::EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterPan}, #endif #if defined(MIXING_CONSOLE_ENABLE) - {"Tube-Send", EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterMixingSendFXTube}, - {"Chorus-Send", EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterMixingSendFXChorus}, - {"FlangR-Send", EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterMixingSendFXFlanger}, - {"Orb-Send", EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterMixingSendFXOrbittone}, - {"Phaser-Send", EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterMixingSendFXPhaser}, - {"Delay-Send", EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterMixingSendFXDelay}, - {"Plate-Send", EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterMixingSendFXPlateReverb}, - {"Rev-Send", EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterMixingSendFXReverberator}, - {"Main Out", EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterMixingSendFXMainOutput}, + {"FX-Send", CUIMenu::MenuHandler, CUIMenu::s_TGFXMenu}, +#elif defined(PLATE_REVERB_ENABLE) + {"Reverb-Send", CUIMenu::EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterReverbSend}, #endif -#if defined(PLATE_REVERB_ENABLE) - {"Reverb-Send", EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterReverbSend}, -#endif - {"Detune", EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterMasterTune}, - {"Cutoff", EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterCutoff}, - {"Resonance", EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterResonance}, - {"Pitch Bend", MenuHandler, CUIMenu::s_EditPitchBendMenu}, - {"Portamento", MenuHandler, CUIMenu::s_EditPortamentoMenu}, - {"Poly/Mono", EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterMonoMode}, - {"Modulation", MenuHandler, CUIMenu::s_ModulationMenu}, - {"Channel", EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterMIDIChannel}, - {"Edit Voice", MenuHandler, CUIMenu::s_EditVoiceMenu}, + {"Detune", CUIMenu::EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterMasterTune}, + {"Cutoff", CUIMenu::EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterCutoff}, + {"Resonance", CUIMenu::EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterResonance}, + {"Pitch Bend", CUIMenu::MenuHandler, CUIMenu::s_EditPitchBendMenu}, + {"Portamento", CUIMenu::MenuHandler, CUIMenu::s_EditPortamentoMenu}, + {"Poly/Mono", CUIMenu::EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterMonoMode}, + {"Modulation", CUIMenu::MenuHandler, CUIMenu::s_ModulationMenu}, + {"Channel", CUIMenu::EditTGParameter, 0, CMiniDexed::TTGParameter::TGParameterMIDIChannel}, + {"Edit Voice", CUIMenu::MenuHandler, CUIMenu::s_EditVoiceMenu}, {0} }; const CUIMenu::TMenuItem CUIMenu::s_EffectsMenu[] = { - {"Compress", EditGlobalParameter, 0, CMiniDexed::ParameterCompressorEnable}, + {"Compress",CUIMenu::EditGlobalParameter, 0, CMiniDexed::ParameterCompressorEnable}, #if defined(MIXING_CONSOLE_ENABLE) - {"Tube", MenuHandler, CUIMenu::s_FXTube}, - {"Chorus", MenuHandler, CUIMenu::s_FXChorus}, - {"FlangR", MenuHandler, CUIMenu::s_FXFlanger}, - {"Orb", MenuHandler, CUIMenu::s_FXOrbitone}, - {"PhasR", MenuHandler, CUIMenu::s_FXPhaser}, - {"Delay", MenuHandler, CUIMenu::s_FXDelay}, + {"Tube", CUIMenu::MenuHandler, CUIMenu::s_FXTube}, + {"Chorus", CUIMenu::MenuHandler, CUIMenu::s_FXChorus}, + {"FlangR", CUIMenu::MenuHandler, CUIMenu::s_FXFlanger}, + {"Orb", CUIMenu::MenuHandler, CUIMenu::s_FXOrbitone}, + {"PhasR", CUIMenu::MenuHandler, CUIMenu::s_FXPhaser}, + {"Delay", CUIMenu::MenuHandler, CUIMenu::s_FXDelay}, #endif #if defined(PLATE_REVERB_ENABLE) - {"Reverb", MenuHandler, CUIMenu::s_FXPlateReverb}, + {"Reverb", CUIMenu::MenuHandler, CUIMenu::s_FXPlateReverb}, #elif defined(MIXING_CONSOLE_ENABLE) - {"Plate Reverb", MenuHandler, CUIMenu::s_FXPlateReverb}, - {"Reverberator", MenuHandler, CUIMenu::s_FXReverberator}, + {"Plt Rvb", CUIMenu::MenuHandler, CUIMenu::s_FXPlateReverb}, + {"Rvbrtor", CUIMenu::MenuHandler, CUIMenu::s_FXReverberator}, #endif {0} }; const CUIMenu::TMenuItem CUIMenu::s_EditPitchBendMenu[] = { - {"Bend Range", EditTGParameter2, 0, CMiniDexed::TTGParameter::TGParameterPitchBendRange}, - {"Bend Step", EditTGParameter2, 0, CMiniDexed::TTGParameter::TGParameterPitchBendStep}, + {"Bend Range", CUIMenu::EditTGParameter2, 0, CMiniDexed::TTGParameter::TGParameterPitchBendRange}, + {"Bend Step", CUIMenu::EditTGParameter2, 0, CMiniDexed::TTGParameter::TGParameterPitchBendStep}, {0} }; const CUIMenu::TMenuItem CUIMenu::s_EditPortamentoMenu[] = { - {"Mode", EditTGParameter2, 0, CMiniDexed::TTGParameter::TGParameterPortamentoMode}, - {"Glissando", EditTGParameter2, 0, CMiniDexed::TTGParameter::TGParameterPortamentoGlissando}, - {"Time", EditTGParameter2, 0, CMiniDexed::TTGParameter::TGParameterPortamentoTime}, + {"Mode", CUIMenu::EditTGParameter2, 0, CMiniDexed::TTGParameter::TGParameterPortamentoMode}, + {"Glissando", CUIMenu::EditTGParameter2, 0, CMiniDexed::TTGParameter::TGParameterPortamentoGlissando}, + {"Time", CUIMenu::EditTGParameter2, 0, CMiniDexed::TTGParameter::TGParameterPortamentoTime}, {0} }; const CUIMenu::TMenuItem CUIMenu::s_ModulationMenu[] = { - {"Mod. Wheel", MenuHandler, CUIMenu::s_ModulationMenuParameters, CMiniDexed::TTGParameter::TGParameterMWRange}, - {"Foot Control", MenuHandler, CUIMenu::s_ModulationMenuParameters, CMiniDexed::TTGParameter::TGParameterFCRange}, - {"Breath Control", MenuHandler, CUIMenu::s_ModulationMenuParameters, CMiniDexed::TTGParameter::TGParameterBCRange}, - {"Aftertouch", MenuHandler, CUIMenu::s_ModulationMenuParameters, CMiniDexed::TTGParameter::TGParameterATRange}, + {"Mod. Wheel", CUIMenu::MenuHandler, CUIMenu::s_ModulationMenuParameters, CMiniDexed::TTGParameter::TGParameterMWRange}, + {"Foot Control", CUIMenu::MenuHandler, CUIMenu::s_ModulationMenuParameters, CMiniDexed::TTGParameter::TGParameterFCRange}, + {"Breath Control", CUIMenu::MenuHandler, CUIMenu::s_ModulationMenuParameters, CMiniDexed::TTGParameter::TGParameterBCRange}, + {"Aftertouch", CUIMenu::MenuHandler, CUIMenu::s_ModulationMenuParameters, CMiniDexed::TTGParameter::TGParameterATRange}, {0} }; const CUIMenu::TMenuItem CUIMenu::s_ModulationMenuParameters[] = { - {"Range", EditTGParameterModulation, 0, 0}, - {"Pitch", EditTGParameterModulation, 0, 1}, - {"Amplitude", EditTGParameterModulation, 0, 2}, - {"EG Bias", EditTGParameterModulation, 0, 3}, + {"Range", CUIMenu::EditTGParameterModulation, 0, 0}, + {"Pitch", CUIMenu::EditTGParameterModulation, 0, 1}, + {"Amplitude", CUIMenu::EditTGParameterModulation, 0, 2}, + {"EG Bias", CUIMenu::EditTGParameterModulation, 0, 3}, {0} }; @@ -147,15 +154,15 @@ const CUIMenu::TMenuItem CUIMenu::s_ModulationMenuParameters[] = const CUIMenu::TMenuItem CUIMenu::s_FXPlateReverb[] = { - {"Enable", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterReverbEnable}, - {"Size", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterReverbSize}, - {"High damp", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterReverbHighDamp}, - {"Low damp", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterReverbLowDamp}, - {"Low pass", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterReverbLowPass}, - {"Diffusion", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterReverbDiffusion}, - {"Level", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterReverbLevel}, + {"Enable", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterReverbEnable}, + {"Size", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterReverbSize}, + {"High damp", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterReverbHighDamp}, + {"Low damp", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterReverbLowDamp}, + {"Low pass", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterReverbLowPass}, + {"Diffusion", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterReverbDiffusion}, + {"Level", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterReverbLevel}, #if defined(MIXING_CONSOLE_ENABLE) - {"Return", MenuHandler, CUIMenu::s_FXPlateReverbReturn}, + {"Return", CUIMenu::MenuHandler, CUIMenu::s_FXPlateReverbReturn}, #endif {0} }; @@ -166,175 +173,175 @@ const CUIMenu::TMenuItem CUIMenu::s_FXPlateReverb[] = const CUIMenu::TMenuItem CUIMenu::s_FXTube[] = { - {"Enable", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXTubeEnable}, - {"Overdrv", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXTubeOverdrive}, - {"Return", MenuHandler, CUIMenu::s_FXTubeReturn}, + {"Enable", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXTubeEnable}, + {"Overdrv", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXTubeOverdrive}, + {"Return", CUIMenu::MenuHandler, CUIMenu::s_FXTubeReturn}, {0} }; const CUIMenu::TMenuItem CUIMenu::s_FXChorus[] = { - {"Enable", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXChorusEnable}, - {"Rate", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXChorusRate}, - {"Depth", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXChorusDepth}, - {"Return", MenuHandler, CUIMenu::s_FXChorusReturn}, + {"Enable", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXChorusEnable}, + {"Rate", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXChorusRate}, + {"Depth", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXChorusDepth}, + {"Return", CUIMenu::MenuHandler, CUIMenu::s_FXChorusReturn}, {0} }; const CUIMenu::TMenuItem CUIMenu::s_FXFlanger[] = { - {"Enable", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXFlangerEnable}, - {"Rate", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXFlangerRate}, - {"Depth", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXFlangerDepth}, - {"Feedbck", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXFlangerFeedback}, - {"Return", MenuHandler, CUIMenu::s_FXFlangerReturn}, + {"Enable", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXFlangerEnable}, + {"Rate", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXFlangerRate}, + {"Depth", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXFlangerDepth}, + {"Feedbck", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXFlangerFeedback}, + {"Return", CUIMenu::MenuHandler, CUIMenu::s_FXFlangerReturn}, {0} }; const CUIMenu::TMenuItem CUIMenu::s_FXOrbitone[] = { - {"Enable", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXOrbitoneEnable}, - {"Rate", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXOrbitoneRate}, - {"Depth", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXOrbitoneDepth}, - {"Return", MenuHandler, CUIMenu::s_FXOrbitoneReturn}, + {"Enable", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXOrbitoneEnable}, + {"Rate", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXOrbitoneRate}, + {"Depth", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXOrbitoneDepth}, + {"Return", CUIMenu::MenuHandler, CUIMenu::s_FXOrbitoneReturn}, {0} }; const CUIMenu::TMenuItem CUIMenu::s_FXPhaser[] = { - {"Enable", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaserEnable}, - {"Rate", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaserRate}, - {"Depth", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaserDepth}, - {"Feedbck", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaserFeedback}, - {"Stages", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaserNbStages}, - {"Return", MenuHandler, CUIMenu::s_FXPhaserReturn}, + {"Enable", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaserEnable}, + {"Rate", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaserRate}, + {"Depth", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaserDepth}, + {"Feedbck", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaserFeedback}, + {"Stages", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaserNbStages}, + {"Return", CUIMenu::MenuHandler, CUIMenu::s_FXPhaserReturn}, {0} }; const CUIMenu::TMenuItem CUIMenu::s_FXDelay[] = { - {"Enable", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelayEnable}, - {"L Delay", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelayLeftDelayTime}, - {"R Delay", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelayRightDelayTime}, - {"Feedbck", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelayFeedback}, - {"Flt Rte", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelayFlutterRate}, - {"Flt Amt", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelayFlutterAmount}, - {"Return", MenuHandler, CUIMenu::s_FXDelayReturn}, + {"Enable", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelayEnable}, + {"L Delay", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelayLeftDelayTime}, + {"R Delay", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelayRightDelayTime}, + {"Feedbck", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelayFeedback}, + {"Flt Rte", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelayFlutterRate}, + {"Flt Amt", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelayFlutterAmount}, + {"Return", CUIMenu::MenuHandler, CUIMenu::s_FXDelayReturn}, {0} }; const CUIMenu::TMenuItem CUIMenu::s_FXReverberator[] = { - {"Enable", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberatorEnable}, - {"Gain", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberatorInputGain}, - {"Time", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberatorTime}, - {"Diffus", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberatorDiffusion}, - {"LowPass", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberatorLP}, - {"Return", MenuHandler, CUIMenu::s_FXReverberatorReturn}, + {"Enable", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberatorEnable}, + {"Gain", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberatorInputGain}, + {"Time", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberatorTime}, + {"Diffus", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberatorDiffusion}, + {"LowPass", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberatorLP}, + {"Return", CUIMenu::MenuHandler, CUIMenu::s_FXReverberatorReturn}, {0} }; const CUIMenu::TMenuItem CUIMenu::s_FXTubeReturn[] = { - {"ChR Rtn", EditGlobalParameter, 0, CMiniDexed::ParameterFXTube_ChorusReturn}, - {"Flg Rtn", EditGlobalParameter, 0, CMiniDexed::ParameterFXTube_FlangerReturn}, - {"Orb Rtn", EditGlobalParameter, 0, CMiniDexed::ParameterFXTube_OrbitoneReturn}, - {"PhR Rtn", EditGlobalParameter, 0, CMiniDexed::ParameterFXTube_PhaserReturn}, - {"Dly Rtn", EditGlobalParameter, 0, CMiniDexed::ParameterFXTube_DelayReturn}, - {"Plt Rtn", EditGlobalParameter, 0, CMiniDexed::ParameterFXTube_ReverbReturn}, - {"Rev Rtn", EditGlobalParameter, 0, CMiniDexed::ParameterFXTube_ReverberatorReturn}, - {"MainOut", EditGlobalParameter, 0, CMiniDexed::ParameterFXTube_MainOutput}, + {"ChR Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::ParameterFXTube_ChorusReturn}, + {"Flg Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::ParameterFXTube_FlangerReturn}, + {"Orb Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::ParameterFXTube_OrbitoneReturn}, + {"PhR Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::ParameterFXTube_PhaserReturn}, + {"Dly Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::ParameterFXTube_DelayReturn}, + {"Plt Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::ParameterFXTube_PlateReverbReturn}, + {"Rev Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::ParameterFXTube_ReverberatorReturn}, + {"MainOut", CUIMenu::EditGlobalParameter, 0, CMiniDexed::ParameterFXTube_MainOutput}, {0} }; const CUIMenu::TMenuItem CUIMenu::s_FXChorusReturn[] = { - {"Tub Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXChorus_TubeReturn}, - {"Flg Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXChorus_FlangerReturn}, - {"Orb Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXChorus_OrbitoneReturn}, - {"PhR Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXChorus_PhaserReturn}, - {"Dly Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXChorus_DelayReturn}, - {"Plt Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXChorus_ReverbReturn}, - {"Rev Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXChorus_ReverberatorReturn}, - {"MainOut", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXChorus_MainOutput}, + {"Tub Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXChorus_TubeReturn}, + {"Flg Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXChorus_FlangerReturn}, + {"Orb Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXChorus_OrbitoneReturn}, + {"PhR Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXChorus_PhaserReturn}, + {"Dly Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXChorus_DelayReturn}, + {"Plt Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXChorus_PlateReverbReturn}, + {"Rev Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXChorus_ReverberatorReturn}, + {"MainOut", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXChorus_MainOutput}, {0} }; const CUIMenu::TMenuItem CUIMenu::s_FXFlangerReturn[] = { - {"Tub Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXFlanger_TubeReturn}, - {"ChR Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXFlanger_ChorusReturn}, - {"Orb Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXFlanger_OrbitoneReturn}, - {"PhR Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXFlanger_PhaserReturn}, - {"Dly Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXFlanger_DelayReturn}, - {"Plt Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXFlanger_ReverbReturn}, - {"Rev Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXFlanger_ReverberatorReturn}, - {"MainOut", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXFlanger_MainOutput}, + {"Tub Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXFlanger_TubeReturn}, + {"ChR Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXFlanger_ChorusReturn}, + {"Orb Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXFlanger_OrbitoneReturn}, + {"PhR Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXFlanger_PhaserReturn}, + {"Dly Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXFlanger_DelayReturn}, + {"Plt Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXFlanger_PlateReverbReturn}, + {"Rev Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXFlanger_ReverberatorReturn}, + {"MainOut", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXFlanger_MainOutput}, {0} }; const CUIMenu::TMenuItem CUIMenu::s_FXOrbitoneReturn[] = { - {"Tub Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXOrbitone_TubeReturn}, - {"ChR Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXOrbitone_ChorusReturn}, - {"Flg Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXOrbitone_FlangerReturn}, - {"PhR Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXOrbitone_PhaserReturn}, - {"Dly Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXOrbitone_DelayReturn}, - {"Plt Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXOrbitone_ReverbReturn}, - {"Rev Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXOrbitone_ReverberatorReturn}, - {"MainOut", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXOrbitone_MainOutput}, + {"Tub Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXOrbitone_TubeReturn}, + {"ChR Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXOrbitone_ChorusReturn}, + {"Flg Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXOrbitone_FlangerReturn}, + {"PhR Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXOrbitone_PhaserReturn}, + {"Dly Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXOrbitone_DelayReturn}, + {"Plt Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXOrbitone_PlateReverbReturn}, + {"Rev Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXOrbitone_ReverberatorReturn}, + {"MainOut", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXOrbitone_MainOutput}, {0} }; const CUIMenu::TMenuItem CUIMenu::s_FXPhaserReturn[] = { - {"Tub Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaser_TubeReturn}, - {"ChR Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaser_ChorusReturn}, - {"Flg Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaser_FlangerReturn}, - {"Orb Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaser_OrbitoneReturn}, - {"Dly Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaser_DelayReturn}, - {"Plt Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaser_ReverbReturn}, - {"Rev Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaser_ReverberatorReturn}, - {"MainOut", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaser_MainOutput}, + {"Tub Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaser_TubeReturn}, + {"ChR Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaser_ChorusReturn}, + {"Flg Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaser_FlangerReturn}, + {"Orb Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaser_OrbitoneReturn}, + {"Dly Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaser_DelayReturn}, + {"Plt Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaser_PlateReverbReturn}, + {"Rev Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaser_ReverberatorReturn}, + {"MainOut", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPhaser_MainOutput}, {0} }; const CUIMenu::TMenuItem CUIMenu::s_FXDelayReturn[] = { - {"Tub Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelay_TubeReturn}, - {"ChR Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelay_ChorusReturn}, - {"Flg Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelay_FlangerReturn}, - {"Orb Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelay_OrbitoneReturn}, - {"PhR Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelay_PhaserReturn}, - {"Plt Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelay_ReverbReturn}, - {"Rev Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelay_ReverberatorReturn}, - {"MainOut", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelay_MainOutput}, + {"Tub Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelay_TubeReturn}, + {"ChR Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelay_ChorusReturn}, + {"Flg Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelay_FlangerReturn}, + {"Orb Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelay_OrbitoneReturn}, + {"PhR Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelay_PhaserReturn}, + {"Plt Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelay_PlateReverbReturn}, + {"Rev Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelay_ReverberatorReturn}, + {"MainOut", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXDelay_MainOutput}, {0} }; const CUIMenu::TMenuItem CUIMenu::s_FXPlateReverbReturn[] = { - {"Tub Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverb_TubeReturn}, - {"ChR Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverb_ChorusReturn}, - {"Flg Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverb_FlangerReturn}, - {"Orb Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverb_OrbitoneReturn}, - {"PhR Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverb_PhaserReturn}, - {"Dly Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverb_DelayReturn}, - {"Rev Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverb_ReverberatorReturn}, - {"MainOut", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverb_MainOutput}, + {"Tub Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPlateReverb_TubeReturn}, + {"ChR Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPlateReverb_ChorusReturn}, + {"Flg Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPlateReverb_FlangerReturn}, + {"Orb Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPlateReverb_OrbitoneReturn}, + {"PhR Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPlateReverb_PhaserReturn}, + {"Dly Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPlateReverb_DelayReturn}, + {"Rev Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPlateReverb_ReverberatorReturn}, + {"MainOut", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXPlateReverb_MainOutput}, {0} }; const CUIMenu::TMenuItem CUIMenu::s_FXReverberatorReturn[] = { - {"Tub Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberator_TubeReturn}, - {"ChR Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberator_ChorusReturn}, - {"Flg Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberator_FlangerReturn}, - {"Orb Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberator_OrbitoneReturn}, - {"PhR Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberator_PhaserReturn}, - {"Dly Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberator_DelayReturn}, - {"Plt Rtn", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberator_ReverbReturn}, - {"MainOut", EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberator_MainOutput}, + {"Tub Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberator_TubeReturn}, + {"ChR Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberator_ChorusReturn}, + {"Flg Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberator_FlangerReturn}, + {"Orb Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberator_OrbitoneReturn}, + {"PhR Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberator_PhaserReturn}, + {"Dly Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberator_DelayReturn}, + {"Plt Rtn", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberator_PlateReverbReturn}, + {"MainOut", CUIMenu::EditGlobalParameter, 0, CMiniDexed::TParameter::ParameterFXReverberator_MainOutput}, {0} }; @@ -343,79 +350,77 @@ const CUIMenu::TMenuItem CUIMenu::s_FXReverberatorReturn[] = // inserting menu items before "OP1" affect OPShortcutHandler() const CUIMenu::TMenuItem CUIMenu::s_EditVoiceMenu[] = { - {"OP1", MenuHandler, CUIMenu::s_OperatorMenu, 0}, - {"OP2", MenuHandler, CUIMenu::s_OperatorMenu, 1}, - {"OP3", MenuHandler, CUIMenu::s_OperatorMenu, 2}, - {"OP4", MenuHandler, CUIMenu::s_OperatorMenu, 3}, - {"OP5", MenuHandler, CUIMenu::s_OperatorMenu, 4}, - {"OP6", MenuHandler, CUIMenu::s_OperatorMenu, 5}, - {"Algorithm", EditVoiceParameter, 0, DEXED_ALGORITHM}, - {"Feedback", EditVoiceParameter, 0, DEXED_FEEDBACK}, - {"P EG Rate 1", EditVoiceParameter, 0, DEXED_PITCH_EG_R1}, - {"P EG Rate 2", EditVoiceParameter, 0, DEXED_PITCH_EG_R2}, - {"P EG Rate 3", EditVoiceParameter, 0, DEXED_PITCH_EG_R3}, - {"P EG Rate 4", EditVoiceParameter, 0, DEXED_PITCH_EG_R4}, - {"P EG Level 1",EditVoiceParameter, 0, DEXED_PITCH_EG_L1}, - {"P EG Level 2",EditVoiceParameter, 0, DEXED_PITCH_EG_L2}, - {"P EG Level 3",EditVoiceParameter, 0, DEXED_PITCH_EG_L3}, - {"P EG Level 4",EditVoiceParameter, 0, DEXED_PITCH_EG_L4}, - {"Osc Key Sync",EditVoiceParameter, 0, DEXED_OSC_KEY_SYNC}, - {"LFO Speed", EditVoiceParameter, 0, DEXED_LFO_SPEED}, - {"LFO Delay", EditVoiceParameter, 0, DEXED_LFO_DELAY}, - {"LFO PMD", EditVoiceParameter, 0, DEXED_LFO_PITCH_MOD_DEP}, - {"LFO AMD", EditVoiceParameter, 0, DEXED_LFO_AMP_MOD_DEP}, - {"LFO Sync", EditVoiceParameter, 0, DEXED_LFO_SYNC}, - {"LFO Wave", EditVoiceParameter, 0, DEXED_LFO_WAVE}, - {"P Mod Sens.", EditVoiceParameter, 0, DEXED_LFO_PITCH_MOD_SENS}, - {"Transpose", EditVoiceParameter, 0, DEXED_TRANSPOSE}, - {"Name", InputTxt, 0, 3}, + {"OP1", CUIMenu::MenuHandler, CUIMenu::s_OperatorMenu, 0}, + {"OP2", CUIMenu::MenuHandler, CUIMenu::s_OperatorMenu, 1}, + {"OP3", CUIMenu::MenuHandler, CUIMenu::s_OperatorMenu, 2}, + {"OP4", CUIMenu::MenuHandler, CUIMenu::s_OperatorMenu, 3}, + {"OP5", CUIMenu::MenuHandler, CUIMenu::s_OperatorMenu, 4}, + {"OP6", CUIMenu::MenuHandler, CUIMenu::s_OperatorMenu, 5}, + {"Algorithm", CUIMenu::EditVoiceParameter, 0, DEXED_ALGORITHM}, + {"Feedback", CUIMenu::EditVoiceParameter, 0, DEXED_FEEDBACK}, + {"P EG Rate 1", CUIMenu::EditVoiceParameter, 0, DEXED_PITCH_EG_R1}, + {"P EG Rate 2", CUIMenu::EditVoiceParameter, 0, DEXED_PITCH_EG_R2}, + {"P EG Rate 3", CUIMenu::EditVoiceParameter, 0, DEXED_PITCH_EG_R3}, + {"P EG Rate 4", CUIMenu::EditVoiceParameter, 0, DEXED_PITCH_EG_R4}, + {"P EG Level 1",CUIMenu::EditVoiceParameter, 0, DEXED_PITCH_EG_L1}, + {"P EG Level 2",CUIMenu::EditVoiceParameter, 0, DEXED_PITCH_EG_L2}, + {"P EG Level 3",CUIMenu::EditVoiceParameter, 0, DEXED_PITCH_EG_L3}, + {"P EG Level 4",CUIMenu::EditVoiceParameter, 0, DEXED_PITCH_EG_L4}, + {"Osc Key Sync",CUIMenu::EditVoiceParameter, 0, DEXED_OSC_KEY_SYNC}, + {"LFO Speed", CUIMenu::EditVoiceParameter, 0, DEXED_LFO_SPEED}, + {"LFO Delay", CUIMenu::EditVoiceParameter, 0, DEXED_LFO_DELAY}, + {"LFO PMD", CUIMenu::EditVoiceParameter, 0, DEXED_LFO_PITCH_MOD_DEP}, + {"LFO AMD", CUIMenu::EditVoiceParameter, 0, DEXED_LFO_AMP_MOD_DEP}, + {"LFO Sync", CUIMenu::EditVoiceParameter, 0, DEXED_LFO_SYNC}, + {"LFO Wave", CUIMenu::EditVoiceParameter, 0, DEXED_LFO_WAVE}, + {"P Mod Sens.", CUIMenu::EditVoiceParameter, 0, DEXED_LFO_PITCH_MOD_SENS}, + {"Transpose", CUIMenu::EditVoiceParameter, 0, DEXED_TRANSPOSE}, + {"Name", CUIMenu::InputTxt, 0, 3}, {0} }; const CUIMenu::TMenuItem CUIMenu::s_OperatorMenu[] = { - {"Output Level",EditOPParameter, 0, DEXED_OP_OUTPUT_LEV}, - {"Freq Coarse", EditOPParameter, 0, DEXED_OP_FREQ_COARSE}, - {"Freq Fine", EditOPParameter, 0, DEXED_OP_FREQ_FINE}, - {"Osc Detune", EditOPParameter, 0, DEXED_OP_OSC_DETUNE}, - {"Osc Mode", EditOPParameter, 0, DEXED_OP_OSC_MODE}, - {"EG Rate 1", EditOPParameter, 0, DEXED_OP_EG_R1}, - {"EG Rate 2", EditOPParameter, 0, DEXED_OP_EG_R2}, - {"EG Rate 3", EditOPParameter, 0, DEXED_OP_EG_R3}, - {"EG Rate 4", EditOPParameter, 0, DEXED_OP_EG_R4}, - {"EG Level 1", EditOPParameter, 0, DEXED_OP_EG_L1}, - {"EG Level 2", EditOPParameter, 0, DEXED_OP_EG_L2}, - {"EG Level 3", EditOPParameter, 0, DEXED_OP_EG_L3}, - {"EG Level 4", EditOPParameter, 0, DEXED_OP_EG_L4}, - {"Break Point", EditOPParameter, 0, DEXED_OP_LEV_SCL_BRK_PT}, - {"L Key Depth", EditOPParameter, 0, DEXED_OP_SCL_LEFT_DEPTH}, - {"R Key Depth", EditOPParameter, 0, DEXED_OP_SCL_RGHT_DEPTH}, - {"L Key Scale", EditOPParameter, 0, DEXED_OP_SCL_LEFT_CURVE}, - {"R Key Scale", EditOPParameter, 0, DEXED_OP_SCL_RGHT_CURVE}, - {"Rate Scaling",EditOPParameter, 0, DEXED_OP_OSC_RATE_SCALE}, - {"A Mod Sens.", EditOPParameter, 0, DEXED_OP_AMP_MOD_SENS}, - {"K Vel. Sens.",EditOPParameter, 0, DEXED_OP_KEY_VEL_SENS}, - {"Enable", EditOPParameter, 0, DEXED_OP_ENABLE}, + {"Output Level",CUIMenu::EditOPParameter, 0, DEXED_OP_OUTPUT_LEV}, + {"Freq Coarse", CUIMenu::EditOPParameter, 0, DEXED_OP_FREQ_COARSE}, + {"Freq Fine", CUIMenu::EditOPParameter, 0, DEXED_OP_FREQ_FINE}, + {"Osc Detune", CUIMenu::EditOPParameter, 0, DEXED_OP_OSC_DETUNE}, + {"Osc Mode", CUIMenu::EditOPParameter, 0, DEXED_OP_OSC_MODE}, + {"EG Rate 1", CUIMenu::EditOPParameter, 0, DEXED_OP_EG_R1}, + {"EG Rate 2", CUIMenu::EditOPParameter, 0, DEXED_OP_EG_R2}, + {"EG Rate 3", CUIMenu::EditOPParameter, 0, DEXED_OP_EG_R3}, + {"EG Rate 4", CUIMenu::EditOPParameter, 0, DEXED_OP_EG_R4}, + {"EG Level 1", CUIMenu::EditOPParameter, 0, DEXED_OP_EG_L1}, + {"EG Level 2", CUIMenu::EditOPParameter, 0, DEXED_OP_EG_L2}, + {"EG Level 3", CUIMenu::EditOPParameter, 0, DEXED_OP_EG_L3}, + {"EG Level 4", CUIMenu::EditOPParameter, 0, DEXED_OP_EG_L4}, + {"Break Point", CUIMenu::EditOPParameter, 0, DEXED_OP_LEV_SCL_BRK_PT}, + {"L Key Depth", CUIMenu::EditOPParameter, 0, DEXED_OP_SCL_LEFT_DEPTH}, + {"R Key Depth", CUIMenu::EditOPParameter, 0, DEXED_OP_SCL_RGHT_DEPTH}, + {"L Key Scale", CUIMenu::EditOPParameter, 0, DEXED_OP_SCL_LEFT_CURVE}, + {"R Key Scale", CUIMenu::EditOPParameter, 0, DEXED_OP_SCL_RGHT_CURVE}, + {"Rate Scaling",CUIMenu::EditOPParameter, 0, DEXED_OP_OSC_RATE_SCALE}, + {"A Mod Sens.", CUIMenu::EditOPParameter, 0, DEXED_OP_AMP_MOD_SENS}, + {"K Vel. Sens.",CUIMenu::EditOPParameter, 0, DEXED_OP_KEY_VEL_SENS}, + {"Enable", CUIMenu::EditOPParameter, 0, DEXED_OP_ENABLE}, {0} }; const CUIMenu::TMenuItem CUIMenu::s_SaveMenu[] = { - {"Overwrite", SavePerformance, 0, 0}, - {"New", InputTxt,0 , 1}, - {"Save as default", SavePerformance, 0, 1}, + {"Overwrite", CUIMenu::SavePerformance, 0, 0}, + {"New", CUIMenu::InputTxt, 0, 1}, + {"Save as default", CUIMenu::SavePerformance, 0, 1}, {0} }; // must match CMiniDexed::TParameter -const CUIMenu::TParameter CUIMenu::s_GlobalParameter[CMiniDexed::ParameterUnknown] = +const CUIMenu::TParameter CUIMenu::s_GlobalParameter[CMiniDexed::TParameter::ParameterUnknown] = { {0, 1, 1, ToOnOff} // ParameterCompressorEnable - -#if defined(MIXING_CONSOLE_ENABLE) || defined(PLATE_REVERB_ENABLE) +#if defined(PLATE_REVERB_ENABLE) || defined(MIXING_CONSOLE_ENABLE) , - {0, 1, 1, ToOnOff}, // ParameterReverbEnable {0, 99, 1}, // ParameterReverbSize {0, 99, 1}, // ParameterReverbHighDamp @@ -428,7 +433,6 @@ const CUIMenu::TParameter CUIMenu::s_GlobalParameter[CMiniDexed::ParameterUnknow // BEGIN FX global parameters mapping definition #if defined(MIXING_CONSOLE_ENABLE) , - // FX > Tube parameters {0, 1, 1, ToOnOff}, // ParameterFXTubeEnable {0, 99, 1}, // ParameterFXTubeOverdrive @@ -477,7 +481,7 @@ const CUIMenu::TParameter CUIMenu::s_GlobalParameter[CMiniDexed::ParameterUnknow {0, 99, 1}, // ParameterFXTube_OrbitoneReturn, {0, 99, 1}, // ParameterFXTube_PhaserReturn, {0, 99, 1}, // ParameterFXTube_DelayReturn, - {0, 99, 1}, // ParameterFXTube_ReverbReturn, + {0, 99, 1}, // ParameterFXTube_PlateReverbReturn, {0, 99, 1}, // ParameterFXTube_ReverberatorReturn, {0, 99, 1}, // ParameterFXTube_MainOutput, @@ -487,7 +491,7 @@ const CUIMenu::TParameter CUIMenu::s_GlobalParameter[CMiniDexed::ParameterUnknow {0, 99, 1}, // ParameterFXChorus_OrbitoneReturn, {0, 99, 1}, // ParameterFXChorus_PhaserReturn, {0, 99, 1}, // ParameterFXChorus_DelayReturn, - {0, 99, 1}, // ParameterFXChorus_ReverbReturn, + {0, 99, 1}, // ParameterFXChorus_PlateReverbReturn, {0, 99, 1}, // ParameterFXChorus_ReverberatorReturn, {0, 99, 1}, // ParameterFXChorus_MainOutput, @@ -497,7 +501,7 @@ const CUIMenu::TParameter CUIMenu::s_GlobalParameter[CMiniDexed::ParameterUnknow {0, 99, 1}, // ParameterFXFlanger_OrbitoneReturn, {0, 99, 1}, // ParameterFXFlanger_PhaserReturn, {0, 99, 1}, // ParameterFXFlanger_DelayReturn, - {0, 99, 1}, // ParameterFXFlanger_ReverbReturn, + {0, 99, 1}, // ParameterFXFlanger_PlateReverbReturn, {0, 99, 1}, // ParameterFXFlanger_ReverberatorReturn, {0, 99, 1}, // ParameterFXFlanger_MainOutput, @@ -507,7 +511,7 @@ const CUIMenu::TParameter CUIMenu::s_GlobalParameter[CMiniDexed::ParameterUnknow {0, 99, 1}, // ParameterFXOrbitone_FlangerReturn, {0, 99, 1}, // ParameterFXOrbitone_PhaserReturn, {0, 99, 1}, // ParameterFXOrbitone_DelayReturn, - {0, 99, 1}, // ParameterFXOrbitone_ReverbReturn, + {0, 99, 1}, // ParameterFXOrbitone_PlateReverbReturn, {0, 99, 1}, // ParameterFXOrbitone_ReverberatorReturn, {0, 99, 1}, // ParameterFXOrbitone_MainOutput, @@ -517,7 +521,7 @@ const CUIMenu::TParameter CUIMenu::s_GlobalParameter[CMiniDexed::ParameterUnknow {0, 99, 1}, // ParameterFXPhaser_FlangerReturn, {0, 99, 1}, // ParameterFXPhaser_OrbitoneReturn, {0, 99, 1}, // ParameterFXPhaser_DelayReturn, - {0, 99, 1}, // ParameterFXPhaser_ReverbReturn, + {0, 99, 1}, // ParameterFXPhaser_PlateReverbReturn, {0, 99, 1}, // ParameterFXPhaser_ReverberatorReturn, {0, 99, 1}, // ParameterFXPhaser_MainOutput, @@ -527,7 +531,7 @@ const CUIMenu::TParameter CUIMenu::s_GlobalParameter[CMiniDexed::ParameterUnknow {0, 99, 1}, // ParameterFXDelay_FlangerReturn, {0, 99, 1}, // ParameterFXDelay_OrbitoneReturn, {0, 99, 1}, // ParameterFXDelay_PhaserReturn, - {0, 99, 1}, // ParameterFXDelay_ReverbReturn, + {0, 99, 1}, // ParameterFXDelay_PlateReverbReturn, {0, 99, 1}, // ParameterFXDelay_ReverberatorReturn, {0, 99, 1}, // ParameterFXDelay_MainOutput, @@ -548,101 +552,113 @@ const CUIMenu::TParameter CUIMenu::s_GlobalParameter[CMiniDexed::ParameterUnknow {0, 99, 1}, // ParameterFXReverberator_OrbitoneReturn, {0, 99, 1}, // ParameterFXReverberator_PhaserReturn, {0, 99, 1}, // ParameterFXReverberator_DelayReturn, - {0, 99, 1}, // ParameterFXReverberator_ReverbReturn, - {0, 99, 1}, // ParameterFXReverberator_MainOutput, + {0, 99, 1}, // ParameterFXReverberator_PlateReverbReturn, + {0, 99, 1} // ParameterFXReverberator_MainOutput, #endif // END FX global parameters mapping definition - }; // must match CMiniDexed::TTGParameter const CUIMenu::TParameter CUIMenu::s_TGParameter[CMiniDexed::TTGParameter::TGParameterUnknown] = { - {0, CSysExFileLoader::MaxVoiceBankID, 1}, // TGParameterVoiceBank - {0, CSysExFileLoader::VoicesPerBank-1, 1}, // TGParameterProgram - {0, 127, 8, ToVolume}, // TGParameterVolume - {0, 127, 8, ToPan}, // TGParameterPan - {-99, 99, 1}, // TGParameterMasterTune - {0, 99, 1}, // TGParameterCutoff - {0, 99, 1}, // TGParameterResonance - {0, CMIDIDevice::ChannelUnknown-1, 1, ToMIDIChannel}, // TGParameterMIDIChannel - {0, 99, 1}, // TGParameterReverbSend - {0, 12, 1}, // TGParameterPitchBendRange - {0, 12, 1}, // TGParameterPitchBendStep - {0, 1, 1, ToPortaMode}, // TGParameterPortamentoMode - {0, 1, 1, ToPortaGlissando}, // TGParameterPortamentoGlissando - {0, 99, 1}, // TGParameterPortamentoTime - {0, 1, 1, ToPolyMono}, // TGParameterMonoMode - {0, 99, 1}, //MW Range - {0, 1, 1, ToOnOff}, //MW Pitch - {0, 1, 1, ToOnOff}, //MW Amp - {0, 1, 1, ToOnOff}, //MW EGBias - {0, 99, 1}, //FC Range - {0, 1, 1, ToOnOff}, //FC Pitch - {0, 1, 1, ToOnOff}, //FC Amp - {0, 1, 1, ToOnOff}, //FC EGBias - {0, 99, 1}, //BC Range - {0, 1, 1, ToOnOff}, //BC Pitch - {0, 1, 1, ToOnOff}, //BC Amp - {0, 1, 1, ToOnOff}, //BC EGBias - {0, 99, 1}, //AT Range - {0, 1, 1, ToOnOff}, //AT Pitch - {0, 1, 1, ToOnOff}, //AT Amp - {0, 1, 1, ToOnOff} //AT EGBias - + {0, CSysExFileLoader::MaxVoiceBankID, 1}, // TGParameterVoiceBank + {0, CSysExFileLoader::VoicesPerBank-1, 1}, // TGParameterProgram + {0, 127, 8, ToVolume}, // TGParameterVolume + {0, 127, 8, ToPan}, // TGParameterPan + {-99, 99, 1}, // TGParameterMasterTune + {0, 99, 1}, // TGParameterCutoff + {0, 99, 1}, // TGParameterResonance + {0, CMIDIDevice::ChannelUnknown-1, 1, ToMIDIChannel}, // TGParameterMIDIChannel +#if defined(PLATE_REVERB_ENABLE) + {0, 99, 1}, // TGParameterReverbSend +#endif + {0, 12, 1}, // TGParameterPitchBendRange + {0, 12, 1}, // TGParameterPitchBendStep + {0, 1, 1, ToPortaMode}, // TGParameterPortamentoMode + {0, 1, 1, ToPortaGlissando}, // TGParameterPortamentoGlissando + {0, 99, 1}, // TGParameterPortamentoTime + {0, 1, 1, ToPolyMono}, // TGParameterMonoMode + {0, 99, 1}, //MW Range + {0, 1, 1, ToOnOff}, //MW Pitch + {0, 1, 1, ToOnOff}, //MW Amp + {0, 1, 1, ToOnOff}, //MW EGBias + {0, 99, 1}, //FC Range + {0, 1, 1, ToOnOff}, //FC Pitch + {0, 1, 1, ToOnOff}, //FC Amp + {0, 1, 1, ToOnOff}, //FC EGBias + {0, 99, 1}, //BC Range + {0, 1, 1, ToOnOff}, //BC Pitch + {0, 1, 1, ToOnOff}, //BC Amp + {0, 1, 1, ToOnOff}, //BC EGBias + {0, 99, 1}, //AT Range + {0, 1, 1, ToOnOff}, //AT Pitch + {0, 1, 1, ToOnOff}, //AT Amp + {0, 1, 1, ToOnOff} //AT EGBias +#if defined(MIXING_CONSOLE_ENABLE) + , + {0, 99, 1}, // TGParameterMixingSendFXTube, + {0, 99, 1}, // TGParameterMixingSendFXChorus, + {0, 99, 1}, // TGParameterMixingSendFXFlanger, + {0, 99, 1}, // TGParameterMixingSendFXOrbittone, + {0, 99, 1}, // TGParameterMixingSendFXPhaser, + {0, 99, 1}, // TGParameterMixingSendFXDelay, + {0, 99, 1}, // TGParameterMixingSendFXPlateReverb, + {0, 99, 1}, // TGParameterMixingSendFXReverberator, + {0, 99, 1} // TGParameterMixingSendFXMainOutput, +#endif // MIXING_CONSOLE_ENABLE }; // must match DexedVoiceParameters in Synth_Dexed const CUIMenu::TParameter CUIMenu::s_VoiceParameter[] = { - {0, 99, 1}, // DEXED_PITCH_EG_R1 - {0, 99, 1}, // DEXED_PITCH_EG_R2 - {0, 99, 1}, // DEXED_PITCH_EG_R3 - {0, 99, 1}, // DEXED_PITCH_EG_R4 - {0, 99, 1}, // DEXED_PITCH_EG_L1 - {0, 99, 1}, // DEXED_PITCH_EG_L2 - {0, 99, 1}, // DEXED_PITCH_EG_L3 - {0, 99, 1}, // DEXED_PITCH_EG_L4 - {0, 31, 1, ToAlgorithm}, // DEXED_ALGORITHM - {0, 7, 1}, // DEXED_FEEDBACK - {0, 1, 1, ToOnOff}, // DEXED_OSC_KEY_SYNC - {0, 99, 1}, // DEXED_LFO_SPEED - {0, 99, 1}, // DEXED_LFO_DELAY - {0, 99, 1}, // DEXED_LFO_PITCH_MOD_DEP - {0, 99, 1}, // DEXED_LFO_AMP_MOD_DEP - {0, 1, 1, ToOnOff}, // DEXED_LFO_SYNC - {0, 5, 1, ToLFOWaveform}, // DEXED_LFO_WAVE - {0, 7, 1}, // DEXED_LFO_PITCH_MOD_SENS - {0, 48, 1, ToTransposeNote}, // DEXED_TRANSPOSE - {0, 1, 1} // Voice Name - Dummy parameters for in case new item would be added in future + {0, 99, 1}, // DEXED_PITCH_EG_R1 + {0, 99, 1}, // DEXED_PITCH_EG_R2 + {0, 99, 1}, // DEXED_PITCH_EG_R3 + {0, 99, 1}, // DEXED_PITCH_EG_R4 + {0, 99, 1}, // DEXED_PITCH_EG_L1 + {0, 99, 1}, // DEXED_PITCH_EG_L2 + {0, 99, 1}, // DEXED_PITCH_EG_L3 + {0, 99, 1}, // DEXED_PITCH_EG_L4 + {0, 31, 1, ToAlgorithm}, // DEXED_ALGORITHM + {0, 7, 1}, // DEXED_FEEDBACK + {0, 1, 1, ToOnOff}, // DEXED_OSC_KEY_SYNC + {0, 99, 1}, // DEXED_LFO_SPEED + {0, 99, 1}, // DEXED_LFO_DELAY + {0, 99, 1}, // DEXED_LFO_PITCH_MOD_DEP + {0, 99, 1}, // DEXED_LFO_AMP_MOD_DEP + {0, 1, 1, ToOnOff}, // DEXED_LFO_SYNC + {0, 5, 1, ToLFOWaveform}, // DEXED_LFO_WAVE + {0, 7, 1}, // DEXED_LFO_PITCH_MOD_SENS + {0, 48, 1, ToTransposeNote}, // DEXED_TRANSPOSE + {0, 1, 1} // Voice Name - Dummy parameters for in case new item would be added in future }; // must match DexedVoiceOPParameters in Synth_Dexed const CUIMenu::TParameter CUIMenu::s_OPParameter[] = { - {0, 99, 1}, // DEXED_OP_EG_R1 - {0, 99, 1}, // DEXED_OP_EG_R2 - {0, 99, 1}, // DEXED_OP_EG_R3 - {0, 99, 1}, // DEXED_OP_EG_R4 - {0, 99, 1}, // DEXED_OP_EG_L1 - {0, 99, 1}, // DEXED_OP_EG_L2 - {0, 99, 1}, // DEXED_OP_EG_L3 - {0, 99, 1}, // DEXED_OP_EG_L4 - {0, 99, 1, ToBreakpointNote}, // DEXED_OP_LEV_SCL_BRK_PT - {0, 99, 1}, // DEXED_OP_SCL_LEFT_DEPTH - {0, 99, 1}, // DEXED_OP_SCL_RGHT_DEPTH - {0, 3, 1, ToKeyboardCurve}, // DEXED_OP_SCL_LEFT_CURVE - {0, 3, 1, ToKeyboardCurve}, // DEXED_OP_SCL_RGHT_CURVE - {0, 7, 1}, // DEXED_OP_OSC_RATE_SCALE - {0, 3, 1}, // DEXED_OP_AMP_MOD_SENS - {0, 7, 1}, // DEXED_OP_KEY_VEL_SENS - {0, 99, 1}, // DEXED_OP_OUTPUT_LEV - {0, 1, 1, ToOscillatorMode}, // DEXED_OP_OSC_MODE - {0, 31, 1}, // DEXED_OP_FREQ_COARSE - {0, 99, 1}, // DEXED_OP_FREQ_FINE - {0, 14, 1, ToOscillatorDetune}, // DEXED_OP_OSC_DETUNE - {0, 1, 1, ToOnOff} // DEXED_OP_ENABLE + {0, 99, 1}, // DEXED_OP_EG_R1 + {0, 99, 1}, // DEXED_OP_EG_R2 + {0, 99, 1}, // DEXED_OP_EG_R3 + {0, 99, 1}, // DEXED_OP_EG_R4 + {0, 99, 1}, // DEXED_OP_EG_L1 + {0, 99, 1}, // DEXED_OP_EG_L2 + {0, 99, 1}, // DEXED_OP_EG_L3 + {0, 99, 1}, // DEXED_OP_EG_L4 + {0, 99, 1, ToBreakpointNote}, // DEXED_OP_LEV_SCL_BRK_PT + {0, 99, 1}, // DEXED_OP_SCL_LEFT_DEPTH + {0, 99, 1}, // DEXED_OP_SCL_RGHT_DEPTH + {0, 3, 1, ToKeyboardCurve}, // DEXED_OP_SCL_LEFT_CURVE + {0, 3, 1, ToKeyboardCurve}, // DEXED_OP_SCL_RGHT_CURVE + {0, 7, 1}, // DEXED_OP_OSC_RATE_SCALE + {0, 3, 1}, // DEXED_OP_AMP_MOD_SENS + {0, 7, 1}, // DEXED_OP_KEY_VEL_SENS + {0, 99, 1}, // DEXED_OP_OUTPUT_LEV + {0, 1, 1, ToOscillatorMode}, // DEXED_OP_OSC_MODE + {0, 31, 1}, // DEXED_OP_FREQ_COARSE + {0, 99, 1}, // DEXED_OP_FREQ_FINE + {0, 14, 1, ToOscillatorDetune}, // DEXED_OP_OSC_DETUNE + {0, 1, 1, ToOnOff} // DEXED_OP_ENABLE }; const char CUIMenu::s_NoteName[100][4] = @@ -661,15 +677,14 @@ static const unsigned NoteC3 = 27; const CUIMenu::TMenuItem CUIMenu::s_PerformanceMenu[] = { - {"Load", PerformanceMenu, 0, 0}, - {"Save", MenuHandler, s_SaveMenu}, - {"Delete", PerformanceMenu, 0, 1}, + {"Load", CUIMenu::PerformanceMenu, 0, 0}, + {"Save", CUIMenu::MenuHandler, s_SaveMenu}, + {"Delete", CUIMenu::PerformanceMenu, 0, 1}, {0} }; - -CUIMenu::CUIMenu (CUserInterface *pUI, CMiniDexed *pMiniDexed) -: m_pUI (pUI), +CUIMenu::CUIMenu (CUserInterface *pUI, CMiniDexed *pMiniDexed) : + m_pUI (pUI), m_pMiniDexed (pMiniDexed), m_pParentMenu (s_MenuRoot), m_pCurrentMenu (s_MainMenu), @@ -678,6 +693,7 @@ CUIMenu::CUIMenu (CUserInterface *pUI, CMiniDexed *pMiniDexed) m_nCurrentParameter (0), m_nCurrentMenuDepth (0) { + assert(pMiniDexed); } void CUIMenu::EventHandler (TMenuEvent Event) diff --git a/src/uimenu.h b/src/uimenu.h index 5786ce3..1055777 100644 --- a/src/uimenu.h +++ b/src/uimenu.h @@ -139,7 +139,8 @@ private: static const TMenuItem s_MainMenu[]; static const TMenuItem s_TGMenu[]; static const TMenuItem s_EffectsMenu[]; -#ifdef MIXING_CONSOLE_ENABLE +#if defined(MIXING_CONSOLE_ENABLE) + static const TMenuItem s_TGFXMenu[]; static const TMenuItem s_FXTube[]; static const TMenuItem s_FXTubeReturn[]; static const TMenuItem s_FXChorus[]; @@ -156,7 +157,7 @@ private: #if defined(PLATE_REVERB_ENABLE) || defined(MIXING_CONSOLE_ENABLE) static const TMenuItem s_FXPlateReverb[]; #endif -#ifdef MIXING_CONSOLE_ENABLE +#if defined(MIXING_CONSOLE_ENABLE) static const TMenuItem s_FXPlateReverbReturn[]; static const TMenuItem s_FXReverberator[]; static const TMenuItem s_FXReverberatorReturn[]; diff --git a/src/userinterface.cpp b/src/userinterface.cpp index 308c052..0027aab 100644 --- a/src/userinterface.cpp +++ b/src/userinterface.cpp @@ -27,8 +27,13 @@ LOGMODULE ("ui"); -CUserInterface::CUserInterface (CMiniDexed *pMiniDexed, CGPIOManager *pGPIOManager, CI2CMaster *pI2CMaster, CConfig *pConfig) -: m_pMiniDexed (pMiniDexed), +CUserInterface::CUserInterface ( + CMiniDexed *pMiniDexed, + CGPIOManager *pGPIOManager, + CI2CMaster *pI2CMaster, + CConfig *pConfig +) : + m_pMiniDexed (pMiniDexed), m_pGPIOManager (pGPIOManager), m_pI2CMaster (pI2CMaster), m_pConfig (pConfig), @@ -231,67 +236,90 @@ void CUserInterface::DisplayWrite (const char *pMenu, const char *pParam, const LCDWrite (Msg); } -#ifdef DEBUG -#include "cstring" +// #if defined(DEBUG) +#include +#include +#include +#include void CUserInterface::clear() { static size_t nbChars = this->m_pConfig->GetLCDColumns() * this->m_pConfig->GetLCDRows(); - std::string txt("\x1B[H\E[?25l"); - txt.append(nbChars, ' '); - txt.append("\x1B[K"); - if (this->m_pLCDBuffered) { + std::string txt("\x1B[H\E[?25l"); + txt.append(nbChars, ' '); + txt.append("\x1B[K"); + this->m_pLCDBuffered->Write(txt.c_str(), txt.length()); this->m_pLCDBuffered->Update (); } } -void CUserInterface::log(const char* txt) +void CUserInterface::log(const char* txt, bool clear) { if (this->m_pLCDBuffered) { + if(clear) + { + this->clear(); + } + this->m_pLCDBuffered->Write(txt, strlen(txt)); this->m_pLCDBuffered->Update (); } } -void CUserInterface::log(float32_t v) +void CUserInterface::log(float32_t v, bool clear) { - std::ostringstream ss; - ss << std::fixed << std::setprecision(2) << v; - std::string txt = ss.str(); if (this->m_pLCDBuffered) { + if(clear) + { + this->clear(); + } + + std::ostringstream ss; + ss << std::fixed << std::setprecision(2) << v; + std::string txt = ss.str(); + this->m_pLCDBuffered->Write(txt.c_str(), txt.length()); this->m_pLCDBuffered->Update (); } } -void CUserInterface::log(unsigned v) +void CUserInterface::log(unsigned v, bool clear) { - std::string txt = std::to_string(v); if (this->m_pLCDBuffered) { + if(clear) + { + this->clear(); + } + + std::string txt = std::to_string(v); this->m_pLCDBuffered->Write(txt.c_str(), txt.length()); this->m_pLCDBuffered->Update (); } } -void CUserInterface::log(int v) +void CUserInterface::log(int v, bool clear) { - std::string txt = std::to_string(v); if (this->m_pLCDBuffered) { + if(clear) + { + this->clear(); + } + + std::string txt = std::to_string(v); this->m_pLCDBuffered->Write(txt.c_str(), txt.length()); this->m_pLCDBuffered->Update (); } } - -#endif +// #endif void CUserInterface::LCDWrite (const char *pString) { diff --git a/src/userinterface.h b/src/userinterface.h index ac307e8..ac5a09e 100644 --- a/src/userinterface.h +++ b/src/userinterface.h @@ -23,6 +23,7 @@ #include "config.h" #include "uimenu.h" #include "uibuttons.h" +#include #include #include #include @@ -35,7 +36,11 @@ class CMiniDexed; class CUserInterface { public: - CUserInterface (CMiniDexed *pMiniDexed, CGPIOManager *pGPIOManager, CI2CMaster *pI2CMaster, CConfig *pConfig); + CUserInterface ( + CMiniDexed *pMiniDexed, + CGPIOManager *pGPIOManager, + CI2CMaster *pI2CMaster, + CConfig *pConfig); ~CUserInterface (void); bool Initialize (void); @@ -55,16 +60,16 @@ public: // To be called from the MIDI device on reception of a MIDI CC message void UIMIDICmdHandler (unsigned nMidiCh, unsigned nMidiCmd, unsigned nMidiData1, unsigned nMidiData2); -#ifdef DEBUG +// #ifdef DEBUG public: void clear(); - void log(const char* txt); - void log(float32_t v); - void log(unsigned v); - void log(int v); -#else + void log(const char* txt, bool clear = true); + void log(float32_t v, bool clear = true); + void log(unsigned v, bool clear = true); + void log(int v, bool clear = true); +// #else private: -#endif +// #endif void LCDWrite (const char *pString); // Print to optional HD44780 display private: