# Chaining effects and their GUIs

**URL:** <https://forum.juce.com/t/chaining-effects-and-their-guis/37562>\
**Category:** General JUCE discussion\
**Created:** [February 11, 2020, 5:46pm UTC](https://forum.juce.com/t/chaining-effects-and-their-guis/37562 "2020-02-11T17:46:58Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![daniel](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/daniel/32/790_2.png) [@daniel](https://forum.juce.com/u/daniel)\
**Post date:** [February 18, 2020, 11:49am UTC](https://forum.juce.com/t/chaining-effects-and-their-guis/37562/4 "2020-02-18T11:49:33Z")

</div>

You can add to each of your processor classes a static function, that will create the Parameters suitable to be put into a ParameterGroup. In your main AudioProcessor you will then just add all parameters together (and possibly put each sub block into a ParameterGroup)

- Note 1) The parameter creation cannot be dynamically, so you cannot add parameters later.  
It will happen during the creation of the main AudioProcessor (injected from a static createParameterLayout() method that you define)
- Note 2) AudioProcessorGraph is best for dynamic setups, vs. dsp::ProcessorChain is best for static setups, because the compiler can optimise the code

In this thread there are several good approaches:

> [@AudioProcessorValueTreeState Improvements](https://forum.juce.com/t/audioprocessorvaluetreestate-improvements/29872/11):
>
> Sure, I was just suggesting something that was easy to fit into the initialization list. AudioProcessorValueTreeState::ParameterLayout createParameterLayout() { std::vector\<std::unique\_ptr\<RangedAudioParameter\>\> params; // Add your other parameters programmatically auto param = std::make\_unique\<AudioParameterInt\> ("intParam", "Int Param", 2, 7, 5); yourIntParam = param.get(); params.push\_back (std::move (param)); return { params.begin(), params.end() }; } YourProcess…

Hope that helps

---

_[View the full topic](https://forum.juce.com/t/chaining-effects-and-their-guis/37562)._
