diff --git a/Plugin/Source/GUI/Assets/gui.xml b/Plugin/Source/GUI/Assets/gui.xml index 183b9ecd..d2cb1c79 100644 --- a/Plugin/Source/GUI/Assets/gui.xml +++ b/Plugin/Source/GUI/Assets/gui.xml @@ -1,246 +1,260 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Plugin/Source/GUI/OnOffManager.cpp b/Plugin/Source/GUI/OnOffManager.cpp index 8f6230f1..ca2abd71 100644 --- a/Plugin/Source/GUI/OnOffManager.cpp +++ b/Plugin/Source/GUI/OnOffManager.cpp @@ -9,7 +9,7 @@ static const std::unordered_map triggerMap { { String ("tone_onoff"), StringArray ({ "Bass", "Treble", "Transition Frequency" }) }, { String ("loss_onoff"), StringArray ({ "Gap", "Thickness", "Spacing", "Speed", "3.75 ips", "7.5 ips", "15 ips", "30 ips" }) }, { String ("chew_onoff"), StringArray ({ "Chew Depth", "Chew Frequency", "Chew Variance" }) }, - { String ("deg_onoff"), StringArray ({ "Depth", "Amount", "Variance", "Envelope" }) }, + { String ("deg_onoff"), StringArray ({ "Depth", "Amount", "Variance", "Envelope", "0.1x" }) }, { String ("flutter_onoff"), StringArray ({ "Flutter Depth", "Flutter Rate", "Wow Depth", "Wow Rate", "Wow Variance", "Wow Drift" }) }, }; diff --git a/Plugin/Source/Processors/Degrade/DegradeProcessor.cpp b/Plugin/Source/Processors/Degrade/DegradeProcessor.cpp index d59dcb4c..ccb57d06 100644 --- a/Plugin/Source/Processors/Degrade/DegradeProcessor.cpp +++ b/Plugin/Source/Processors/Degrade/DegradeProcessor.cpp @@ -2,6 +2,7 @@ DegradeProcessor::DegradeProcessor (AudioProcessorValueTreeState& vts) { + point1xParam = vts.getRawParameterValue ("deg_point1x"); onOffParam = vts.getRawParameterValue ("deg_onoff"); depthParam = vts.getRawParameterValue ("deg_depth"); amtParam = vts.getRawParameterValue ("deg_amt"); @@ -11,6 +12,7 @@ DegradeProcessor::DegradeProcessor (AudioProcessorValueTreeState& vts) void DegradeProcessor::createParameterLayout (std::vector>& params) { + params.push_back (std::make_unique ("deg_point1x", "Degrade Point1x", false)); params.push_back (std::make_unique ("deg_onoff", "Degrade On/Off", false)); params.push_back (std::make_unique ("deg_depth", "Degrade Depth", 0.0f, 1.0f, 0.0f)); params.push_back (std::make_unique ("deg_amt", "Degrade Amount", 0.0f, 1.0f, 0.0f)); @@ -20,12 +22,15 @@ void DegradeProcessor::createParameterLayout (std::vector (point1xParam->load()); + auto depthValue = point1x ? depthParam->load() * 0.1f : depthParam->load(); + float freqHz = 200.0f * powf (20000.0f / 200.0f, 1.0f - *amtParam); - float gainDB = -24.0f * *depthParam; + float gainDB = -24.0f * depthValue; for (int ch = 0; ch < 2; ++ch) { - noiseProc[ch].setGain (0.5f * *depthParam * *amtParam); + noiseProc[ch].setGain (0.5f * depthValue * *amtParam); filterProc[ch].setFreq (jmin (freqHz + (*varParam * (freqHz / 0.6f) * (random.nextFloat() - 0.5f)), 0.49f * fs)); } diff --git a/Plugin/Source/Processors/Degrade/DegradeProcessor.h b/Plugin/Source/Processors/Degrade/DegradeProcessor.h index 58498c07..169035d3 100644 --- a/Plugin/Source/Processors/Degrade/DegradeProcessor.h +++ b/Plugin/Source/Processors/Degrade/DegradeProcessor.h @@ -18,6 +18,7 @@ class DegradeProcessor void processBlock (AudioBuffer& buffer, MidiBuffer& midi); private: + std::atomic* point1xParam = nullptr; std::atomic* onOffParam = nullptr; std::atomic* depthParam = nullptr; std::atomic* amtParam = nullptr;