Hello everyone,
I’ve been recently digging into Foleys’ librairy recently, and I’ve been looking for a way to get some pointers on my differents GUI elements.
I’m making a compressor, with sliders that let the user define different parameters.
One of theses sliders, (the threshold) has a special look and feel with a value that can be updated with the inputVolume of the plugin (and it should allow to display the current input volume on the button).
For the moment, I tried different approach to access the slider from my GUI and update it :
thresholdSlider = magicState.getObjectWithTypejuce::Slider(“thresholdSlider”);
I tried getting it like this : only getting nullptr…
Here’s how is defined my slider in the GUI :
Then, but I assume it doesn’t work because I can’t get the object, I was planning on doing this at each processBlock call :
void CompressorAudioProcessor::updateVolumeAngle(float inputVolume){
LookAndFeelThreshold& lookAndFeel = dynamic_cast<LookAndFeelThreshold&>(thresholdSlider->getLookAndFeel());
lookAndFeel.setEndAngle(inputVolume);
}
But for the moment, it prevent my whole sound processing to run,
Do anyone of you have an idea to fix this ? Do you know where is the thing I have missunderstood ?
Thanks for your help !
Here’s the github repo if anybody want to use this as template or anything ! GitHub - MariusBoucard/Compressor