KUIML Persistence

Official support for: bluecataudio.com
Post Reply New Topic
RELATED
PRODUCTS

Post

I am evaluating Blue Cat Audio Plug n Script and feel as though I am slowly understanding some of the broader concepts. However, despite some excellent documentation available both from Blue Cat and LetiMix, for some reason I'm having some difficulty getting over a couple of hurdles.

For context, I am familiar with writing plugins using JUCE and have also evaluated HISE, so I come to this with a general understanding of the separation of duties between the DSP and UI and the asynchronous nature of communication between them.

Let me start with the most immediate question I have and based on the response we will see in what order I should tackle any remaining questions. This question has been asked before (viewtopic.php?t=601452) but was not answered.

In short, I am wondering whether I am able to declare PARAMs in my KUIML skin and have those persist to a preset. Further - am I able to declare such PARAMs as an alternative to declaring inputParameters in my DSP script?

I understand that I can declare a PARAM in KUIML and specify that I want it to be persistent. However, I am not understanding in what manner it is persisted. The LetiMix documentation mentions that is should be saved as follows:
When you make a param persistent (meaning its value is kept even when you reload the script) this parameter value is also saved within the preset (and within the default preset, called "Init" internally).
I interpret this to mean that the PARAM value will be saved as part of the preset. I have tried saving a preset, but I don't see the value making its way into the resulting XML and reloading the preset does not restore the value. I think I must be misinterpreting this, and perhaps am misunderstanding the purpose of the PARAM element.

Any guidance here would be much appreciated. Thanks in advance!

Post

If you are writing your own skin from scratch, parameters or strings defined with persistent="true" will indeed be saved in the session or the preset.

However in Plug'n Script if you are using a .kuiml file with your DSP script (a "subskin"), it will ot work by default, because the subskin has not been defined as persistent (yet). It is in the plans to change this but it has not been release yet.

This can however be easily fixed by changing line 315 in Plug'n Script factory default.sml skin file. Changing:

Code: Select all

 <KUIML_WIDGET id="controls_widget" src="custom_controls.kuiml.inc"/>
to

Code: Select all

<KUIML_WIDGET id="controls_widget" src="custom_controls.kuiml.inc" persistent="true"/>
should do the trick.

It has not been released yet as it requires a bit of testing on our side, since the content of the skin is generated on the fly and it could maybe in some particular cases conflict with the saved state.

I hope this helps!

Post

Ah! - that rings a bell from your response to this topic (although a different context): viewtopic.php?t=604946

I am not (yet) writing a complete custom skin and am indeed including a .kuiml file as a subskin. I had, in fact, been trying to figure out why values persisted in the LM Skin would persist but mine would not, and you have answered that, too, since LM Skin is a completely custom skin.

That gets me a little further forward, thanks, and I think that by reading between the lines in the documentation, here and on the Facebook group I now have a clearer understanding of the separation between the DSP script and any GUI script. Armed with this additional knowledge I will see if I can get where I want to be to satisfy myself that I will be able to quickly iterate with Plug n Script. If so, you should see me raking through my pockets soon enough to shovel over a collection of pennies for the full version.

By the way, what I have seen so far indicates that you have done a tremendous job of successfully filling a middle ground between the likes of JUCE and Reaktor. The ability to focus on functionality and UX directly inside of a host without having to spend time on configuring, building, reloading is a real boon. Great job!

Post

Confirmed - thank you!

And for completeness, the LM Skin can be similarly updated by changing line 238 in main-body.inc to:

Code: Select all

<KUIML_WIDGET id="subskin_widget" v_margin="$BODY_PAD_V$" h_margin="$BODY_PAD_H$" v_align="$BODY_V_ALIGN$" innerKUIML="" exposed="true" width="$RE100$" height="$RE100$" persistent="true"/>

Post

mackemlad wrote: Mon Sep 09, 2024 8:54 pm Confirmed - thank you!

And for completeness, the LM Skin can be similarly updated by changing line 238 in main-body.inc to:

Code: Select all

<KUIML_WIDGET id="subskin_widget" v_margin="$BODY_PAD_V$" h_margin="$BODY_PAD_H$" v_align="$BODY_V_ALIGN$" innerKUIML="" exposed="true" width="$RE100$" height="$RE100$" persistent="true"/>
Thanks! I hope the change can be released in the next update (there is quite a bit of testing required to check that it work in all cases for the generic Plug'n Script GUI).

Post Reply

Return to “Blue Cat Audio”