Hello,
I left Juce and plugins programming for more than one year , and I try to make working an old plugins I made with the latest Juce Version.
I use Reaper , the plugins works , it’s a guitar pedal simulation but with only with one of my amp sim plugins It crash when the GUI of the plugins is hidden and reopen . I tried tu debug it with Visual Studio and before it stop this is the assert :
jassert (style != TwoValueHorizontal && style != TwoValueVertical);
What I don’t understand is that there is no Two values Slider in this plug :
in editor.h
MyLookAndFeel myLookAndFeel;
Slider gainPot;
Slider bassPot;
Slider midPot;
Slider hardClipThresholdPot;
Slider volumePot;
Slider bassClipPot;
Slider highClipPot;
ScopedPointer <AudioProcessorValueTreeState::SliderAttachment> gainPotAttachement;
ScopedPointer <AudioProcessorValueTreeState::SliderAttachment> bassPotAttachement;
ScopedPointer <AudioProcessorValueTreeState::SliderAttachment> midPotAttachement;
ScopedPointer <AudioProcessorValueTreeState::SliderAttachment>
volumePotAttachement;
ScopedPointer <AudioProcessorValueTreeState::SliderAttachment>
hardClipThresholdPotAttachement;
ScopedPointer <AudioProcessorValueTreeState::SliderAttachment>
highclipPotAttachement;
ScopedPointer
<AudioProcessorValueTreeState::SliderAttachment>BassClipPotAttachement;
in editor.cpp all the sliders are created like this one :
gainPot.setSliderStyle(Slider::RotaryHorizontalVerticalDrag);
gainPot.setRange(0.01f, 60.0f);
gainPot.setTextBoxStyle(Slider::NoTextBox, false, 80, 20);
gainPot.setBounds(20, 28, 80, 80);
//gainPot.addListener(this);
gainPot.setLookAndFeel(&myLookAndFeel);
addAndMakeVisible(gainPot);
gainPotAttachement = new
AudioProcessorValueTreeState::SliderAttachment(processor.tree, "gain", gainPot);
and in processor.cpp
NormalisableRange<float> gainParam(0.0f, 80.0f);
NormalisableRange<float> bassParam(-16.0f, 16.0f);
NormalisableRange<float> midParam(-20.0f, 20.0f);
NormalisableRange<float> volumeParam(-48.0f, 0.0f);
NormalisableRange<float> bassClipParam(6000.0f, 15000.0f);
NormalisableRange<float> highClipParam(0.01f, 1000.0f);
NormalisableRange<float> thresholdParam(0.3f, 2.0f);
String paramID = "foo";
tree.createAndAddParameter("gain", "Gain", "Gain", gainParam, 0.0f, nullptr, nullptr);
tree.createAndAddParameter("bass", "Bass", "Attack OSC1", bassParam, 0.0f, nullptr,
nullptr);
tree.createAndAddParameter("mid", "Mids", "Mids", midParam, 0.0f, nullptr, nullptr);
tree.createAndAddParameter("volume", "volume", "volume", volumeParam, -20.0f, nullptr,
nullptr);
tree.state = ValueTree("Foo");
Thanks,