How do I add modules during runtime?
I need to add modules similar to chainer, like LFOs, ADSRs, etc. I want to have a + button to add a new modulator in a section of the GUI where my LFOs currently are in Mushroom Generator.
actually, you do that the very same way as on construction time. just create the new module with new and add it via the function AudioModule::addChildAudioModule to the parent module. remove it via removeChildAudioModule. you will also need to add the child-editor using addChildEditor (it's in the editor baseclass of AudioModuleEditor).
you may also look at AudioModuleChain::addModule, although, it's a bit unnecessarily complicated for your use case as i'm using factory methods there to create a module instead just the plain new operator