Multiple fixes - intermediate debugging

pull/409/head
abscisys 2 years ago
parent 63a9460a1b
commit 1b33d6b94e
  1. 3
      .gitignore
  2. 25
      src/extra_features.h
  3. 21
      src/fx_rack.cpp
  4. 4
      src/fx_rack.h
  5. 3
      src/fx_tape_delay.cpp
  6. 179
      src/minidexed.cpp
  7. 11
      src/minidexed.h
  8. 103
      src/uimenu.cpp
  9. 3
      src/uimenu.h

3
.gitignore vendored

@ -46,3 +46,6 @@ sdcard
*.swp
*.swo
.vscode/
# temporary tests
src/test/

@ -0,0 +1,25 @@
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// extra_features.h
//
// Header file that centralizes MACROS to enable / disable extra features
//
#pragma once
#if defined(ARM_ALLOW_MULTI_CORE)
#define FXRACK_ENABLE //Add support for the FXRack
#endif

@ -7,7 +7,7 @@ FXRack::FXRack(float32_t sampling_rate, bool enable, float32_t wet) :
FXElement(sampling_rate),
enable_(enable),
wet_level_(wet),
fx_chain_(sampling_rate)
fx_chain_()
{
this->fxTube_ = new FXUnit<Tube>(sampling_rate);
this->fxChorus_ = new FXUnit<Chorus>(sampling_rate);
@ -39,7 +39,7 @@ FXRack::~FXRack()
delete this->fxShimmerReverb_;
}
void FXRack::processSample(float32_t inL, float32_t inR, float32_t& outL, float32_t& outR)
inline void FXRack::processSample(float32_t inL, float32_t inR, float32_t& outL, float32_t& outR)
{
for(FXChain::iterator it = this->fx_chain_.begin(); it != this->fx_chain_.end(); it++)
{
@ -67,23 +67,24 @@ void FXRack::process(float32_t* left_input, float32_t* right_input, float32_t* l
if(this->isEnable())
{
this->processSample(sampleInL, sampleInR, sampleOutL, sampleOutR);
float32_t dryLevel = 1.0f - this->getWetLevel();
*left_output = this->getWetLevel() * sampleOutL + dryLevel * (*left_input);
*right_output = this->getWetLevel() * sampleOutR + dryLevel * (*right_input);
}
else
{
sampleOutL = sampleInL;
sampleOutR = sampleInR;
*left_output = sampleInL;
*right_output = sampleInR;
}
*left_output = sampleOutL;
*right_output = sampleOutR;
// Move inputs by 1 sample
++left_input;
++right_input;
// Move outputs by 1 sample
++left_input;
++right_input;
++left_output;
++right_output;
}
}

@ -16,7 +16,6 @@
//
// Rack of audio effects proposed in the context of the MiniDexed project
//
#pragma once
#include "fx.h"
@ -57,6 +56,7 @@ public:
else
{
_FXElement::processSample(inL, inR, outL, outR);
float32_t dry = 1.0f - this->getWetLevel();
outL = this->getWetLevel() * outL + dry * inL;
outR = this->getWetLevel() * outR + dry * inR;
@ -98,7 +98,7 @@ public:
FXRack(float32_t sampling_rate, bool enable = true, float32_t wet = 1.0f);
virtual ~FXRack();
virtual void processSample(float32_t inL, float32_t inR, float32_t& outL, float32_t& outR) override;
virtual inline void processSample(float32_t inL, float32_t inR, float32_t& outL, float32_t& outR) override;
virtual void process(float32_t* left_input, float32_t* right_input, float32_t* left_output, float32_t* right_output, size_t nSamples) override;
void setEnable(bool enable = true);

@ -3,6 +3,8 @@
#include <cmath>
#include <algorithm>
#include <iostream>
TapeDelay::TapeDelay(const float32_t sampling_rate, float32_t default_delay_time, float32_t default_flutter_level, float32_t default_feedback_level) :
FXElement(sampling_rate),
MaxSampleDelayTime(2.0f * sampling_rate * MAX_DELAY_TIME),
@ -26,6 +28,7 @@ TapeDelay::~TapeDelay()
void TapeDelay::processSample(float32_t inL, float32_t inR, float32_t& outL, float32_t& outR)
{
std::cout << "Processing effect: " << typeid(this).name() << std::endl;
// calculate the fluttered delay time
float32_t fluttered_delay_time_L = (MAX_DELAY_TIME * this->getLeftDelayTime() + this->getFlutteredDelayTime()) * this->getSamplingRate();
// Calculate write positions

@ -159,7 +159,7 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt,
SetParameter (ParameterCompressorEnable, 1);
// BEGIN setup FXRack
#ifdef ARM_ALLOW_MULTI_CORE
#ifdef FXRACK_ENABLE
this->fx_rack = new FXRack(static_cast<float32_t>(pConfig->GetSampleRate()));
// FXChain parameters
@ -213,7 +213,7 @@ CMiniDexed::CMiniDexed (CConfig *pConfig, CInterruptSystem *pInterrupt,
this->SetParameter(ParameterFXChainShimmerReverbFrequency, 20);
this->SetParameter(ParameterFXChainShimmerReverbAmplitude, 15);
this->SetParameter(ParameterFXChainShimmerReverbDecayTime, 65);
#endif
#endif
// END setup FXRack
};
@ -257,19 +257,15 @@ bool CMiniDexed::Initialize (void)
reverb_send_mixer->pan(i,mapfloat(m_nPan[i],0,127,0.0f,1.0f));
reverb_send_mixer->gain(i,mapfloat(m_nReverbSend[i],0,99,0.0f,1.0f));
}
this->m_UI.LCDWrite("Initialize: before perf loading");
if (m_PerformanceConfig.Load ())
{
this->m_UI.LCDWrite("Initialize: load perf");
LoadPerformanceParameters();
this->m_UI.LCDWrite("Initialize: load perf done");
}
else
{
SetMIDIChannel (CMIDIDevice::OmniMode, 0);
}
this->m_UI.LCDWrite("Initialize: done");
// load performances file list, and attempt to create the performance folder
if (!m_PerformanceConfig.ListPerformances())
@ -688,7 +684,6 @@ void CMiniDexed::SetParameter (TParameter Parameter, int nValue)
assert (Parameter < ParameterUnknown);
m_nParameter[Parameter] = nValue;
float32_t fValue = 0.0f;
switch (Parameter)
{
@ -749,8 +744,8 @@ void CMiniDexed::SetParameter (TParameter Parameter, int nValue)
m_FXSpinLock.Release ();
break;
#ifdef ARM_ALLOW_MULTI_CORE
// BEGIN FXChain parameters
#ifdef FXRACK_ENABLE
case ParameterFXChainEnable:
nValue = constrain((int)nValue, 0, 1);
this->m_FXSpinLock.Acquire();
@ -759,9 +754,8 @@ void CMiniDexed::SetParameter (TParameter Parameter, int nValue)
break;
case ParameterFXChainWet:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.0f, 1.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainWet(fValue);
this->setFXChainWet(nValue / 99.0f);
this->m_FXSpinLock.Release();
break;
@ -774,16 +768,14 @@ void CMiniDexed::SetParameter (TParameter Parameter, int nValue)
break;
case ParameterFXChainTubeWet:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.0f, 1.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainTubeWet(fValue);
this->setFXChainTubeWet(nValue / 99.0f);
this->m_FXSpinLock.Release();
break;
case ParameterFXChainTubeOverdrive:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.0f, 1.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainTubeOverdrive(fValue);
this->setFXChainTubeOverdrive(nValue / 99.0f);
this->m_FXSpinLock.Release();
break;
@ -796,30 +788,26 @@ void CMiniDexed::SetParameter (TParameter Parameter, int nValue)
break;
case ParameterFXChainChorusWet:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.0f, 1.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainChorusWet(fValue);
this->setFXChainChorusWet(nValue / 99.0f);
this->m_FXSpinLock.Release();
break;
case ParameterFXChainChorusRate:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.1f, 1.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainChorusRate(fValue);
this->setFXChainChorusRate(mapfloat(nValue, 0, 99, 0.1f, 1.0f));
this->m_FXSpinLock.Release();
break;
case ParameterFXChainChorusDepth:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.0f, 10.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainChorusDepth(fValue);
this->setFXChainChorusDepth(nValue / 9.9f);
this->m_FXSpinLock.Release();
break;
case ParameterFXChainChorusFeedback:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.0f, 1.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainChorusFeedback(fValue);
this->setFXChainChorusFeedback(nValue / 99.0f);
this->m_FXSpinLock.Release();
break;
@ -832,37 +820,32 @@ void CMiniDexed::SetParameter (TParameter Parameter, int nValue)
break;
case ParameterFXChainFlangerWet:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.0f, 1.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainFlangerWet(fValue);
this->setFXChainFlangerWet(nValue / 99.0f);
this->m_FXSpinLock.Release();
break;
case ParameterFXChainFlangerDelayTime:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.0f, 10.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainFlangerDelayTime(fValue);
this->setFXChainFlangerDelayTime(nValue / 9.9f);
this->m_FXSpinLock.Release();
break;
case ParameterFXChainFlangerRate:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.1f, 10.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainFlangerRate(fValue);
this->setFXChainFlangerRate(0.1f + nValue / 9.8f);
this->m_FXSpinLock.Release();
break;
case ParameterFXChainFlangerDepth:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.0f, 10.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainFlangerDepth(fValue);
this->setFXChainFlangerDepth(nValue / 9.9f);
this->m_FXSpinLock.Release();
break;
case ParameterFXChainFlangerFeedback:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.0f, 1.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainFlangerFeedback(fValue);
this->setFXChainFlangerFeedback(nValue / 99.0f);
this->m_FXSpinLock.Release();
break;
@ -875,16 +858,14 @@ void CMiniDexed::SetParameter (TParameter Parameter, int nValue)
break;
case ParameterFXChainOrbitoneWet:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.0f, 1.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainOrbitoneWet(fValue);
this->setFXChainOrbitoneWet(nValue / 99.0f);
this->m_FXSpinLock.Release();
break;
case ParameterFXChainOrbitoneFeedback:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.0f, 1.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainOrbitoneFeedback(fValue);
this->setFXChainOrbitoneFeedback(nValue / 99.0f);
this->m_FXSpinLock.Release();
break;
@ -897,23 +878,20 @@ void CMiniDexed::SetParameter (TParameter Parameter, int nValue)
break;
case ParameterFXChainPhaserWet:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.0f, 1.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainPhaserWet(fValue);
this->setFXChainPhaserWet(nValue / 99.0f);
this->m_FXSpinLock.Release();
break;
case ParameterFXChainPhaserRate:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.01f, 5.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainPhaserRate(fValue);
this->setFXChainPhaserRate(mapfloat(nValue, 0, 99, 0.01f, 5.0f));
this->m_FXSpinLock.Release();
break;
case ParameterFXChainPhaserResonance:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.5f, 10.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainPhaserResonance(fValue);
this->setFXChainPhaserResonance(mapfloat(nValue, 0, 99, 0.5f, 10.0f));
this->m_FXSpinLock.Release();
break;
@ -926,37 +904,32 @@ void CMiniDexed::SetParameter (TParameter Parameter, int nValue)
break;
case ParameterFXChainTapeDelayWet:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.0f, 1.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainTapeDelayWet(fValue);
this->setFXChainTapeDelayWet(nValue / 99.0f);
this->m_FXSpinLock.Release();
break;
case ParameterFXChainTapeDelayLeftDelayTime:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.0f, 1.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainTapeDelayLeftDelayTime(0);
this->setFXChainTapeDelayLeftDelayTime(nValue / 99.0f);
this->m_FXSpinLock.Release();
break;
case ParameterFXChainTapeDelayRightDelayTime:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.0f, 1.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainTapeDelayRightDelayTime(0);
this->setFXChainTapeDelayRightDelayTime(nValue / 99.0f);
this->m_FXSpinLock.Release();
break;
case ParameterFXChainTapeDelayFlutter:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.0f, 0.1f);
this->m_FXSpinLock.Acquire();
this->setFXChainTapeDelayFlutter(fValue);
this->setFXChainTapeDelayFlutter(nValue / 990.0f);
this->m_FXSpinLock.Release();
break;
case ParameterFXChainTapeDelayFeedback:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.0f, 1.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainTapeDelayFeedback(fValue);
this->setFXChainTapeDelayFeedback(nValue / 99.0f);
this->m_FXSpinLock.Release();
break;
@ -969,48 +942,42 @@ void CMiniDexed::SetParameter (TParameter Parameter, int nValue)
break;
case ParameterFXChainShimmerReverbWet:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.0f, 1.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainShimmerReverbWet(fValue);
this->setFXChainShimmerReverbWet(nValue / 99.0f);
this->m_FXSpinLock.Release();
break;
case ParameterFXChainShimmerReverbDelayTimeLeft:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.0f, 2.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainShimmerReverbDelayTimeLeft(fValue);
this->setFXChainShimmerReverbDelayTimeLeft(2.0f * nValue / 99.0f);
this->m_FXSpinLock.Release();
break;
case ParameterFXChainShimmerReverbDelayTimeRight:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.0f, 2.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainShimmerReverbDelayTimeRight(fValue);
this->setFXChainShimmerReverbDelayTimeRight(2.0f * nValue / 99.0f);
this->m_FXSpinLock.Release();
break;
case ParameterFXChainShimmerReverbFrequency:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.0f, static_cast<float32_t>(this->m_pConfig->GetSampleRate() >> 1));
this->m_FXSpinLock.Acquire();
this->setFXChainShimmerReverbFrequency(fValue);
this->setFXChainShimmerReverbFrequency(2.0f * nValue / static_cast<float32_t>(this->m_pConfig->GetSampleRate()));
this->m_FXSpinLock.Release();
break;
case ParameterFXChainShimmerReverbAmplitude:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.0f, 1.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainShimmerReverbAmplitude(fValue);
this->setFXChainShimmerReverbAmplitude(nValue / 99.0f);
this->m_FXSpinLock.Release();
break;
case ParameterFXChainShimmerReverbDecayTime:
nValue = constrain((int)nValue, 0, 99);
fValue = mapfloat(nValue, 0, 99, 0.0f, 2.0f);
this->m_FXSpinLock.Acquire();
this->setFXChainShimmerReverbDecayTime(fValue);
this->setFXChainShimmerReverbDecayTime(2.0f * nValue / 99.0f);
this->m_FXSpinLock.Release();
break;
#endif
// END FXChain parameters
#endif
default:
assert (0);
@ -1330,41 +1297,16 @@ void CMiniDexed::ProcessSound (void)
// END adding reverb
// BEGIN adding FXRack
#ifdef FXRACK_ENABLE
if(this->fx_rack->isEnable() && this->fx_rack->getWetLevel() > 0.0f)
{
// scale down and add left FXRack buffer by reverb level
if(this->fx_rack->getWetLevel() == 1.0f)
{
this->m_FXSpinLock.Acquire();
this->fx_rack->process(SampleBuffer[indexL], SampleBuffer[indexR], SampleBuffer[indexL], SampleBuffer[indexR], nFrames);
this->m_FXSpinLock.Release();
}
else
{
float32_t DryFXRackSendBuffer[2][nFrames];
float32_t WetFXRackBuffer[2][nFrames];
arm_fill_f32(0.0f, DryFXRackSendBuffer[indexR], nFrames);
arm_fill_f32(0.0f, DryFXRackSendBuffer[indexL], nFrames);
arm_fill_f32(0.0f, WetFXRackBuffer[indexL], nFrames);
arm_fill_f32(0.0f, WetFXRackBuffer[indexR], nFrames);
this->m_FXSpinLock.Acquire();
this->m_FXSpinLock.Acquire();
this->fx_rack->process(SampleBuffer[indexL], SampleBuffer[indexR], WetFXRackBuffer[indexL], WetFXRackBuffer[indexR], nFrames);
this->fx_rack->process(SampleBuffer[indexL], SampleBuffer[indexR], SampleBuffer[indexL], SampleBuffer[indexR], nFrames);
// scale down and add left FXRack buffer by reverb level
arm_scale_f32(WetFXRackBuffer[indexL], this->fx_rack->getWetLevel(), WetFXRackBuffer[indexL], nFrames);
arm_scale_f32(SampleBuffer[indexL], 1.0f - this->fx_rack->getWetLevel(), DryFXRackSendBuffer[indexL], nFrames);
arm_add_f32(DryFXRackSendBuffer[indexL], WetFXRackBuffer[indexL], SampleBuffer[indexL], nFrames);
// scale down and add right FXRack buffer by reverb level
arm_scale_f32(WetFXRackBuffer[indexR], this->fx_rack->getWetLevel(), WetFXRackBuffer[indexR], nFrames);
arm_scale_f32(SampleBuffer[indexR], 1.0f - this->fx_rack->getWetLevel(), DryFXRackSendBuffer[indexR], nFrames);
arm_add_f32(DryFXRackSendBuffer[indexR], WetFXRackBuffer[indexR], SampleBuffer[indexR], nFrames);
this->m_FXSpinLock.Release();
}
this->m_FXSpinLock.Release();
}
#endif
// END adding FXRack
// Convert dual float array (left, right) to single int16 array (left/right)
@ -1455,7 +1397,7 @@ bool CMiniDexed::DoSavePerformance (void)
m_PerformanceConfig.SetReverbLevel (m_nParameter[ParameterReverbLevel]);
// BEGIN FXRack parameters
#ifdef ARM_ALLOW_MULTI_CORE
#ifdef FXRACK_ENABLE
this->m_PerformanceConfig.SetFXChainEnable(!!this->m_nParameter[ParameterFXChainEnable]);
this->m_PerformanceConfig.SetFXChainWet(this->m_nParameter[ParameterFXChainWet]);
this->m_PerformanceConfig.SetFXChainTubeEnable(!!this->m_nParameter[ParameterFXChainTubeEnable]);
@ -1492,8 +1434,8 @@ bool CMiniDexed::DoSavePerformance (void)
this->m_PerformanceConfig.SetFXChainShimmerReverbFrequency(this->m_nParameter[ParameterFXChainShimmerReverbFrequency]);
this->m_PerformanceConfig.SetFXChainShimmerReverbAmplitude(this->m_nParameter[ParameterFXChainShimmerReverbAmplitude]);
this->m_PerformanceConfig.SetFXChainShimmerReverbDecayTime(this->m_nParameter[ParameterFXChainShimmerReverbDecayTime]);
#endif
// END FXRqck pqrqmeters
#endif
// END FXRack parameters
if(m_bSaveAsDeault)
{
@ -1883,6 +1825,45 @@ void CMiniDexed::LoadPerformanceParameters(void)
SetParameter (ParameterReverbLowPass, m_PerformanceConfig.GetReverbLowPass ());
SetParameter (ParameterReverbDiffusion, m_PerformanceConfig.GetReverbDiffusion ());
SetParameter (ParameterReverbLevel, m_PerformanceConfig.GetReverbLevel ());
#ifdef FXRACK_ENABLE
this->SetParameter(ParameterFXChainEnable, this->m_PerformanceConfig.GetFXChainEnable());
this->SetParameter(ParameterFXChainWet, this->m_PerformanceConfig.GetFXChainWet());
this->SetParameter(ParameterFXChainTubeEnable, this->m_PerformanceConfig.GetFXChainTubeEnable());
this->SetParameter(ParameterFXChainTubeWet, this->m_PerformanceConfig.GetFXChainTubeWet());
this->SetParameter(ParameterFXChainTubeOverdrive, this->m_PerformanceConfig.GetFXChainTubeOverdrive());
this->SetParameter(ParameterFXChainChorusEnable, this->m_PerformanceConfig.GetFXChainChorusEnable());
this->SetParameter(ParameterFXChainChorusWet, this->m_PerformanceConfig.GetFXChainChorusWet());
this->SetParameter(ParameterFXChainChorusRate, this->m_PerformanceConfig.GetFXChainChorusRate());
this->SetParameter(ParameterFXChainChorusDepth, this->m_PerformanceConfig.GetFXChainChorusDepth());
this->SetParameter(ParameterFXChainChorusFeedback, this->m_PerformanceConfig.GetFXChainChorusFeedback());
this->SetParameter(ParameterFXChainFlangerEnable, this->m_PerformanceConfig.GetFXChainFlangerEnable());
this->SetParameter(ParameterFXChainFlangerWet, this->m_PerformanceConfig.GetFXChainFlangerWet());
this->SetParameter(ParameterFXChainFlangerDelayTime, this->m_PerformanceConfig.GetFXChainFlangerDelayTime());
this->SetParameter(ParameterFXChainFlangerRate, this->m_PerformanceConfig.GetFXChainFlangerRate());
this->SetParameter(ParameterFXChainFlangerDepth, this->m_PerformanceConfig.GetFXChainFlangerDepth());
this->SetParameter(ParameterFXChainFlangerFeedback, this->m_PerformanceConfig.GetFXChainFlangerFeedback());
this->SetParameter(ParameterFXChainOrbitoneEnable, this->m_PerformanceConfig.GetFXChainOrbitoneEnable());
this->SetParameter(ParameterFXChainOrbitoneWet, this->m_PerformanceConfig.GetFXChainOrbitoneWet());
this->SetParameter(ParameterFXChainOrbitoneFeedback, this->m_PerformanceConfig.GetFXChainOrbitoneFeedback());
this->SetParameter(ParameterFXChainPhaserEnable, this->m_PerformanceConfig.GetFXChainPhaserEnable());
this->SetParameter(ParameterFXChainPhaserWet, this->m_PerformanceConfig.GetFXChainPhaserWet());
this->SetParameter(ParameterFXChainPhaserRate, this->m_PerformanceConfig.GetFXChainPhaserRate());
this->SetParameter(ParameterFXChainPhaserResonance, this->m_PerformanceConfig.GetFXChainPhaserResonance());
this->SetParameter(ParameterFXChainTapeDelayEnable, this->m_PerformanceConfig.GetFXChainTapeDelayEnable());
this->SetParameter(ParameterFXChainTapeDelayWet, this->m_PerformanceConfig.GetFXChainTapeDelayWet());
this->SetParameter(ParameterFXChainTapeDelayLeftDelayTime, this->m_PerformanceConfig.GetFXChainTapeDelayLeftDelayTime());
this->SetParameter(ParameterFXChainTapeDelayRightDelayTime, this->m_PerformanceConfig.GetFXChainTapeDelayRightDelayTime());
this->SetParameter(ParameterFXChainTapeDelayFlutter, this->m_PerformanceConfig.GetFXChainTapeDelayFlutter());
this->SetParameter(ParameterFXChainTapeDelayFeedback, this->m_PerformanceConfig.GetFXChainTapeDelayFeedback());
this->SetParameter(ParameterFXChainShimmerReverbEnable, this->m_PerformanceConfig.GetFXChainShimmerReverbEnable());
this->SetParameter(ParameterFXChainShimmerReverbWet, this->m_PerformanceConfig.GetFXChainShimmerReverbWet());
this->SetParameter(ParameterFXChainShimmerReverbDelayTimeLeft, this->m_PerformanceConfig.GetFXChainShimmerReverbDelayTimeLeft());
this->SetParameter(ParameterFXChainShimmerReverbDelayTimeRight, this->m_PerformanceConfig.GetFXChainShimmerReverbDelayTimeRight());
this->SetParameter(ParameterFXChainShimmerReverbFrequency, this->m_PerformanceConfig.GetFXChainShimmerReverbFrequency());
this->SetParameter(ParameterFXChainShimmerReverbAmplitude, this->m_PerformanceConfig.GetFXChainShimmerReverbAmplitude());
this->SetParameter(ParameterFXChainShimmerReverbDecayTime, this->m_PerformanceConfig.GetFXChainShimmerReverbDecayTime());
#endif
}
std::string CMiniDexed::GetNewPerformanceDefaultName(void)
@ -2067,7 +2048,7 @@ unsigned CMiniDexed::getModController (unsigned controller, unsigned parameter,
}
#ifdef ARM_ALLOW_MULTI_CORE
#ifdef FXRACK_ENABLE
void CMiniDexed::setFXChainEnable(bool value)
{
this->fx_rack->setEnable(value);

@ -20,6 +20,7 @@
#ifndef _minidexed_h
#define _minidexed_h
#include "extra_features.h"
#include "dexedadapter.h"
#include "config.h"
#include "userinterface.h"
@ -140,7 +141,7 @@ public:
ParameterReverbLevel,
// BEGIN FXRack global parameters definition
#ifdef ARM_ALLOW_MULTI_CORE
#ifdef FXRACK_ENABLE
// FXChain parameters
ParameterFXChainEnable,
ParameterFXChainWet,
@ -192,7 +193,7 @@ public:
ParameterFXChainShimmerReverbFrequency,
ParameterFXChainShimmerReverbAmplitude,
ParameterFXChainShimmerReverbDecayTime,
#endif
#endif
// END FXRack global parameters definition
ParameterUnknown
@ -264,7 +265,7 @@ public:
void setMasterVolume (float32_t vol);
// BEGIN FXRack parameters setters
#ifdef ARM_ALLOW_MULTI_CORE
#ifdef FXRACK_ENABLE
void setFXChainEnable(bool value);
void setFXChainWet(float32_t value);
void setFXChainTubeEnable(bool value);
@ -301,7 +302,7 @@ public:
void setFXChainShimmerReverbFrequency(float32_t value);
void setFXChainShimmerReverbAmplitude(float32_t value);
void setFXChainShimmerReverbDecayTime(float32_t value);
#endif
#endif
// END FXRack parameters setters
private:
@ -392,7 +393,9 @@ private:
CSpinLock m_FXSpinLock;
#ifdef FXRACK_ENABLE
FXRack* fx_rack;
#endif
bool m_bSavePerformance;
bool m_bSavePerformanceNewFile;

@ -82,7 +82,9 @@ const CUIMenu::TMenuItem CUIMenu::s_EffectsMenu[] =
{"Compress", EditGlobalParameter, 0, CMiniDexed::ParameterCompressorEnable},
#ifdef ARM_ALLOW_MULTI_CORE
{"Reverb", MenuHandler, s_ReverbMenu},
{"FX Chain", MenuHandler, s_FXChainMenu},
#endif
#ifdef FXRACK_ENABLE
{"FXChain", MenuHandler, s_FXChainMenu},
#endif
{0}
};
@ -134,88 +136,92 @@ const CUIMenu::TMenuItem CUIMenu::s_ReverbMenu[] =
{0}
};
#endif
#ifdef FXRACK_ENABLE
const CUIMenu::TMenuItem CUIMenu::s_FXChainMenu[] =
{
// FXChain
{"Enable", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainEnable},
{"Wet Level", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainEnable},
{"Tube", MenuHandler, s_FXChainTube},
{"Chorus", MenuHandler, s_FXChainChorus},
{"Flanger", MenuHandler, s_FXChainFlanger},
{"Orbitone", MenuHandler, s_FXChainOrbitone},
{"Phaser", MenuHandler, s_FXChainPhaser},
{"TapeDelay", MenuHandler, s_FXChainTapeDelay},
{"ShimmerReverb", MenuHandler, s_FXChainShimmerReverb},
{"Enable", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainEnable},
{"Wet Lvl", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainWet},
{"Tube", MenuHandler, s_FXChainTube},
{"Chorus", MenuHandler, s_FXChainChorus},
{"FlangR", MenuHandler, s_FXChainFlanger},
{"Orb", MenuHandler, s_FXChainOrbitone},
{"PhasR", MenuHandler, s_FXChainPhaser},
{"Delay", MenuHandler, s_FXChainTapeDelay},
{"Shimmer", MenuHandler, s_FXChainShimmerReverb},
{0}
};
const CUIMenu::TMenuItem CUIMenu::s_FXChainTube[] =
{
{"Enable", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainTubeEnable},
{"Wet Level", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainTubeWet},
{"Overdrive", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainTubeOverdrive},
{"Enable", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainTubeEnable},
{"Wet Lvl", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainTubeWet},
{"Overdrv", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainTubeOverdrive},
{0}
};
const CUIMenu::TMenuItem CUIMenu::s_FXChainChorus[] =
{
{"Enable", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainChorusEnable},
{"Wet Level", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainChorusWet},
{"LFO Rate", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainChorusRate},
{"Depth", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainChorusDepth},
{"Feedback", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainChorusFeedback},
{"Enable", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainChorusEnable},
{"Wet Lvl", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainChorusWet},
{"Rate", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainChorusRate},
{"Depth", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainChorusDepth},
{"Feedbck", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainChorusFeedback},
{0}
};
const CUIMenu::TMenuItem CUIMenu::s_FXChainFlanger[] =
{
{"Enable", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainFlangerEnable},
{"Wet Level", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainFlangerWet},
{"Delay Time", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainFlangerDelayTime},
{"LFO Rate", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainFlangerRate},
{"Depth", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainFlangerDepth},
{"Feedback", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainFlangerFeedback},
{"Enable", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainFlangerEnable},
{"Wet Lvl", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainFlangerWet},
{"Delay", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainFlangerDelayTime},
{"Rate", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainFlangerRate},
{"Depth", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainFlangerDepth},
{"Feedbck", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainFlangerFeedback},
{0}
};
const CUIMenu::TMenuItem CUIMenu::s_FXChainOrbitone[] =
{
{"Enable", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainOrbitoneEnable},
{"Wet Level", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainOrbitoneWet},
{"Feedback", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainOrbitoneFeedback},
{"Enable", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainOrbitoneEnable},
{"Wet Lvl", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainOrbitoneWet},
{"Feedbck", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainOrbitoneFeedback},
{0}
};
const CUIMenu::TMenuItem CUIMenu::s_FXChainPhaser[] =
{
{"Enable", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainPhaserEnable},
{"Wet Level", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainPhaserWet},
{"LFO Rate", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainPhaserRate},
{"Resonance", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainPhaserResonance},
{"Enable", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainPhaserEnable},
{"Wet Lvl", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainPhaserWet},
{"Rate", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainPhaserRate},
{"Res", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainPhaserResonance},
{0}
};
const CUIMenu::TMenuItem CUIMenu::s_FXChainTapeDelay[] =
{
{"Enable", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainTapeDelayEnable},
{"Wet Level", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainTapeDelayWet},
{"Left Delay", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainTapeDelayLeftDelayTime},
{"Right Delay", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainTapeDelayRightDelayTime},
{"Flutter", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainTapeDelayFlutter},
{"Feedback", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainTapeDelayFeedback},
{"Enable", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainTapeDelayEnable},
{"Wet Lvl", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainTapeDelayWet},
{"L Delay", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainTapeDelayLeftDelayTime},
{"R Delay", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainTapeDelayRightDelayTime},
{"Flutter", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainTapeDelayFlutter},
{"Feedbck", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainTapeDelayFeedback},
{0}
};
const CUIMenu::TMenuItem CUIMenu::s_FXChainShimmerReverb[] =
{
{"Enable", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainShimmerReverbEnable},
{"Wet Level", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainShimmerReverbWet},
{"Delay Left", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainShimmerReverbDelayTimeLeft},
{"Delay Right", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainShimmerReverbDelayTimeRight},
{"Frequency", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainShimmerReverbFrequency},
{"Amplitude", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainShimmerReverbAmplitude},
{"Decay Time", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainShimmerReverbDecayTime},
{"Enable", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainShimmerReverbEnable},
{"Wet Lvl", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainShimmerReverbWet},
{"L Delay", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainShimmerReverbDelayTimeLeft},
{"R Delay", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainShimmerReverbDelayTimeRight},
{"Freq", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainShimmerReverbFrequency},
{"Amp", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainShimmerReverbAmplitude},
{"Decay", EditGlobalParameter, 0, CMiniDexed::ParameterFXChainShimmerReverbDecayTime},
{0}
};
@ -301,10 +307,10 @@ const CUIMenu::TParameter CUIMenu::s_GlobalParameter[CMiniDexed::ParameterUnknow
{0, 99, 1} // ParameterReverbLevel
// BEGIN FXRack global parameters mapping definition
#ifdef ARM_ALLOW_MULTI_CORE
#ifdef FXRACK_ENABLE
,
// FXChain parameters
{0, 1, 1, ToOnOff}, // ParameterFXChainEnable
{0, 1, 1, ToOnOff}, // ParameterFXChainEnable
{0, 99, 1}, // ParameterFXChainWet
// FXChain > Tube parameters
@ -354,7 +360,8 @@ const CUIMenu::TParameter CUIMenu::s_GlobalParameter[CMiniDexed::ParameterUnknow
{0, 99, 1}, // ParameterFXChainShimmerReverbFrequency
{0, 99, 1}, // ParameterFXChainShimmerReverbAmplitude
{0, 99, 1}, // ParameterFXChainShimmerReverbDecayTime
#endif
#endif
// END FXRack global parameters mapping definition
};

@ -23,6 +23,7 @@
#ifndef _uimenu_h
#define _uimenu_h
#include "extra_features.h"
#include <string>
#include <circle/timer.h>
@ -140,6 +141,8 @@ private:
static const TMenuItem s_EffectsMenu[];
#ifdef ARM_ALLOW_MULTI_CORE
static const TMenuItem s_ReverbMenu[];
#endif
#ifdef FXRACK_ENABLE
static const TMenuItem s_FXChainMenu[];
static const TMenuItem s_FXChainTube[];
static const TMenuItem s_FXChainChorus[];

Loading…
Cancel
Save