18dB attenuation when radio button is clicked?

Hi,
I created a series of radio buttons and I need them to attenuate the signal by 18dB and 6dB depending on the button clicked. I already created everything I need in the GUI I now need to assign an attenuation once the button is ON. How can I proceed on that? any good demo code to check out? thank you!

Your question involves multiple problems to solve. You have successfully created a GUI with the controls you want. Now you need to implement the signal attenuation in the processor and need to figure out how to send the changes from the GUI to the processor. Which of these both tasks is unclear to you?

I think you might want to have a look at the simple gain plugin example and tutorial. Your use case is just a specialization of that plugin with three discrete gain values (0dB attenuation, 6dB attenuation, 18dB attenuation).

1 Like

You can find a lot of Demo code on https://juce.com/learn/tutorials

Here is one for Parameters: tutorial_audio_parameter

1 Like

Thank you for your answer! I can’t quite figure out how to connect the signal attenuation changes with the GUI radio buttons.