Is this what I think it is? :D
-
Are we finally going to be able to construct/deconstruct any UI component dynamically that is in this container?
https://github.com/christophhart/HISE/commit/268a66dacb822c88bc8e3c1152aed609bff0542b
-
@HISEnberg yup, but it's still very experimental and far from feature complete.
-
@HISEnberg This looks interesting! Can you explain a little bit of what that means to "construct/deconstruct" a UI component?
-
@Chazrox Great question!
Essentially it means being able to add, remove or modify a component (knobs, buttons, etc.) to the user interface face after it has been initialized (runtime modification). Usually when you ship your plugin the knobs, components are static, they remain in the same place and do the same thing at all times. The dynamic container (assuming I understand it correctly), would allow you to add in or remove components to the UI even after the plugin is initialized. The only component that can do something like this is the ScriptPanel, so the dynamic container will extend this behaviour to all the other component.
A primary use case for this would be a modular FX system (reordering of the FX chain). I've posted about this several times and why it is so challenging/annoying to setup. Say you have 4 slots, with 4 different effects (compressor, reverb, filter, delay). You either have to preallocate a bunch of UI components for the different FX slots (so create 4 compressors, 4 reverbs, etc. for each slot), or just use the scriptPanel and redraw everything so you can move it around.
The Dynamic Container extends this runtime flexibility to all standard HISE components. So instead of having to pre-create 4 empty effect slots that sit there unused, you can now add and remove knobs, buttons, etc. on the fly after the plugin is already running.
In short it doesn't necessarily solve any issue that you couldn't already resolve but is a real time saver!
-
@HISEnberg great answer! Thank you.
I imagine this will definitely make it easier for somebody like me when the time comes. I can already imagine a few use cases but I already know my scripting wont allow it at the moment haha.
I'll definitely take the time to learn this when it drops!
Thanks again!
-
@HISEnberg said in Is this what I think it is? :D:
In short it doesn't necessarily solve any issue that you couldn't already resolve but is a real time saver!
My experience is that if you set this up correctly(use a data model) then its really not much time at all...
-
@Lindon Yes I recall debating this a few months ago in one of the HISE meetings. You're essentially right as it looks like the dynamic container is essentially doing this anyways on the backend, just dumping the data to JSON (and
writeToStream
which is a new one I am not familiar with).Probably it boils down to preference, I like having as few UI components doing the heavy lifting with scripting.