Trying AudioProcessorValueTreeState.
If I wrote this:
AudioPluginAudioProcessor::AudioPluginAudioProcessor()
: AudioProcessor(BusesProperties()
#if !JucePlugin_IsMidiEffect
#if !JucePlugin_IsSynth
.withInput("Input", juce::AudioChannelSet::stereo(), true)
#endif
.withOutput("Output", juce::AudioChannelSet::stereo(), true)
#endif
),
parameters(*this, nullptr, juce::Identifier("MyJuceParams"),
{
std::make_unique<juce::AudioParameterFloat>("gainParam", "Gain", -70.0f, 6.0f, -16.26f),
})
{
all seems ok.
If I use in combination with NormalisableRange:
AudioPluginAudioProcessor::AudioPluginAudioProcessor()
: AudioProcessor(BusesProperties()
#if !JucePlugin_IsMidiEffect
#if !JucePlugin_IsSynth
.withInput("Input", juce::AudioChannelSet::stereo(), true)
#endif
.withOutput("Output", juce::AudioChannelSet::stereo(), true)
#endif
),
rangeGain{-70.0f, 6.0f}, // its a juce::NormalisableRange<float>
parameters(*this, nullptr, juce::Identifier("MyJuceParams"),
{
std::make_unique<juce::AudioParameterFloat>("gainParam", "Gain", rangeGain, -16.26f),
})
{
it crash when I load on DAW.
Where am I wrong?
And also: how would you set rangeGain.setSkewForCentre(-16.26f); using this CTOR init?
Thanks