GUI: How to scale a script to all inserts FX?

Aulicon
Aulicon Member Posts: 4 Member
edited October 2024 in Scripting Workshop

I've been working on building a GUI that allows the user to select and manipulate every single insert FX available in Kontakt at the instrument level. I am using a menu to select the effect you want (chorus, distortion, and all the filters and subtypes etc). All the sliders and menus are declared in the init callback and I'm using the menu to show/hide parameters. works great. Needles to say it was a non trivial amount of work just to make sure all the controls are associated to the correct engine_params. I want to scale this code for all the inserts. The user will be able to put any effect on any insert (6 total) and view their controls by clicking on the associated button (insert 1 button shows the controls for the first insert, insert 2 button the second one and so on) What is the best way to do this? I am thinking to just re-declare all the controls X6 using a macro but I wonder if there is a more elegant and efficient solution.

Comments

  • medusa
    medusa Member Posts: 98 Helper

    If you want to allow any insert on any of the six slots (allowing repeated effects, ie. chorus twice) then you will run out of available sliders if you dedicate a slider to each control. As far as I know there are just two solutions: 1. limit each effect to a single instance, or 2. build a generalized effect panel where the same sliders/switches etc are used for various effects.

  • Aulicon
    Aulicon Member Posts: 4 Member

    Thanks! I actually figured out a way to achieve the above, however I decided to course correct the project by having less sliders anyway.

  • theodorech
    theodorech Member Posts: 72 Member

    It depends on how you set up your code. Basically, you'll need an array to hold all the engine parameters, another string array with all the possible knob names, and probably another array to track the number of knobs available in the selected script. This way, you can hide and unhide sliders as needed. And as medusa said, you don't even need thousands of sliders to be declared - you declare 10-12 sliders and you hide/unhide them based on the FX selected. It's a bit of a tedious process. 😅

  • Gablux
    Gablux Member Posts: 88 Helper

    Also remember that if you use a panel for multiple instances of a certain FX, you probably will want to disable automation assignment for these ui controls, as multiplexing is not supported in Kontakt as in the automation received by one ui control would only be passed to the engine parameter of the showing FX not to its other instances and even if it were passed that would be quite messy.
    In case you want automation and are going with multiple instances of the same FX you would need to duplicate the parameters. ouch

This discussion has been closed.
Back To Top