Then I must be doing something wrong as that’s what I thought it should do out the box
PluginProcessor
DynamicsAudioProcessor::DynamicsAudioProcessor()
#ifndef JucePlugin_PreferredChannelConfigurations
: AudioProcessor (BusesProperties()
#if ! JucePlugin_IsMidiEffect
#if ! JucePlugin_IsSynth
.withInput ("Input", AudioChannelSet::stereo(), true)
#endif
.withOutput ("Output", AudioChannelSet::stereo(), true)
#endif
), undoManager(3000, 30), params(*this, &undoManager, "dynamics",
{
std::make_unique<AudioParameterFloat>("tube_type", TRANS("Tube Type"), NormalisableRange<float>(0.0, 10, 1), mTubeType.get()),
std::make_unique<AudioParameterFloat>("activation", TRANS("Activation"), NormalisableRange<float>(0.0, 1000, 0.1), mActivationPercent.get()),
std::make_unique<AudioParameterFloat>("release", TRANS("Release"), NormalisableRange<float>(2.0, 1000, 0.1), mRelease.get()),
std::make_unique<AudioParameterFloat>("threshold", TRANS("Envelope Threshold"), NormalisableRange<float>(-15.0, 6.0, 0.1), mEnvThresholdDb.get()),
std::make_unique<AudioParameterFloat>("ceiling", TRANS("Ceiling"), NormalisableRange<float>(-15.0, 6.0, 0.1), mCeilingDb.get()),
std::make_unique<AudioParameterFloat>("stereo_link", TRANS("Stereo Link"), NormalisableRange<float>(0, 100, 0.1), mStereoLink.get()),
std::make_unique<AudioParameterFloat>("peak_link", TRANS("Peak Link"), NormalisableRange<float>(0.0, 100, 0.1), mPeakLink.get()),
}
)
My Plugin Editor
DynamicsAudioProcessorEditor::DynamicsAudioProcessorEditor(DynamicsAudioProcessor& p, AudioProcessorValueTreeState& vt)
: AudioProcessorEditor(&p), processor(p), assets(std::make_shared<Assets>()), params(vt),
controls(assets, p, vt),
header(assets),
footer(assets),
visuals(assets)
And my controls.cpp where the sliders are
Controls::Controls(std::shared_ptr<Assets> _assets, DynamicsAudioProcessor& p, AudioProcessorValueTreeState& vt)
: assets(_assets),
processor(p),
params(vt),
activationAttachment(vt,"activation",ctrlActivation),
releaseAttachment(vt, "release",ctrlRelease),
envThresholdAttachment(vt, "threshold", ctrlEnvelopeThreshold),
ceilingAttachment(vt, "ceiling", ctrlCeiling),
peakLinkAttachment(vt, "peak_link", ctrlPeakLink),
stereoLinkAttachment(vt, "stereo_link", ctrlStereoLink),
ctrlSingleTube{ _assets },
ctrlDualTube{ _assets },
ctrlBrokenTube{ _assets }
Is it because my sliders aren’t inited in the editor. I have tried to pass the construction arguments in initialisation so thought that should work?