diff --git a/src/PluginProcessor.cpp b/src/PluginProcessor.cpp index c8a88ad4..130b2100 100644 --- a/src/PluginProcessor.cpp +++ b/src/PluginProcessor.cpp @@ -125,6 +125,8 @@ ValentineAudioProcessor::~ValentineAudioProcessor() juce::AudioProcessorValueTreeState::ParameterLayout ValentineAudioProcessor::createParameterLayout() { + using namespace tote_bag; + std::vector> params; for (size_t i = 0; i < numParams; ++i) @@ -138,7 +140,7 @@ juce::AudioProcessorValueTreeState::ParameterLayout const bool defaultValue = FFCompParameterDefaults[i] > 0.5f; params.push_back (std::make_unique ( - juce::ParameterID {FFCompParameterID()[i], ValentineParameterVersion}, + juce::ParameterID {valentine::parameterID (i), ValentineParameterVersion}, FFCompParameterLabel()[i], defaultValue)); } diff --git a/src/ValentineParameters.h b/src/ValentineParameters.h index 3f7848dc..c9c5a652 100644 --- a/src/ValentineParameters.h +++ b/src/ValentineParameters.h @@ -89,6 +89,32 @@ inline constexpr std::array kThresholdControlPoin static constexpr auto numParams = static_cast (VParameter::TOTAL_NUM_PARAMETERS); +namespace tote_bag +{ +namespace valentine +{ +inline const juce::String& parameterID (const size_t index) +{ + static const std::array parameterIDs = { + "Crush", + "CrushEnable", + "Compress", + "Saturate", + "SaturateEnable", + "Ratio", + "AttackTime", + "ReleaseTime", + "Makeup", + "Mix", + "Bypass", + "OutputClipEnable", + }; + + return parameterIDs[index]; +} +} // namespace valentine +} // namespace tote_bag + inline const std::array& FFCompParameterID() { static const std::array parameterIDs = {