Dynamic Container - how to use?
-
I'm struggling to wrap my head around this new component, it may be T-shirt time for me but I've been going in circles with it. Please correct my mistakes here, and share an example if you have one!
I dug pretty deep into the Scripting API and source code and I think I understand it but I'm not able to get it to do much.
It looks to me like these are the most important functions:
-
updateContentPropertyInternal()
What property IDs are valid for this method? The documentation mentions updating "the internal content data object" but doesn't specify the property system. -
updateValueFromProcessorConnection()
: This one does compile when I connect it to a Hardcoded Master FX. It looks like it should sync component properties/values to the module parameters. -
setData
should store the configuration JSON data, but there is nogetData
method, onlygetValue
which returns a control value, not the data. Is there an API to retrieve the data?
This next section is just assumptions:
My intuition is I should set the dynamic container's processorID to a Hardcoded MasterFx, but I may be misreading this (it isn't supported in the property editor).
Based on the C++ side it seems to make sense, I think there is an interconnection fromJSON method to convert the Javascript object into a ValueTree structure, so when you call setData, it is not storing JSON directly, it converts HISE's internal ValueTree Format.
There is also something about a
DragContainerHandler
but I am not seeing this on the HISE side of things. From the source:/** A data handler that manages the drag container connection to a FX chain. It performs these steps * * - on value change it will switch the order of the FX processing * - on child add / remove it will call HotswappableProcessor::setEffect() with the `text` property of * the child element (or an empty string if removed). It will also bypass the FX that are not active */
-
-
Still no progress. @Christoph-Hart is the API for this component completed? I can't find a way of getting any data written to the component, out of the component.
HiseSnippet 1293.3ocuWE0aaaCDlJNpqwqcXcnCXOJ3mT1BRsbRVVVvPxhcbqQWRMpSRCvvP.sDULgkHEjnShaQea+d1C6Ov1Oks+A6ev1cTxVzItcAAaUuXxi2GuOd2w6n6lJ8YYYxThU0iFmvHVOvt2XgZPyATtfzoEw5yraMVPi49MkBEHjkR1abBMKiEPrrp7TTOqkVjn+9qc1iFQE9rRQDxIRtO6G3wbUozt69bdTTaZ.6Hdrg1quaGeonoLRNB3TE65jDp+P54rConZKXSdFMa.w5Ksqy52OHr+ZawZ340XqMpuwl8a.hVi4SaDt45d02biMarEPx6se.WIS6onJVFwZw8jAi6MPdoH2.mvy38iX3DOROvx4haKiBviHJkzb.OJn6DmUFA1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BOgy4.JjwBuP4TMOJuyXRlCYpKkoCA7148CIGvuxrFUKZbBWbtonWMysUPvjKESlaU4VeB8d+N3WJGo.qe.Et4fowGNJtG7BYeF3eg9hQXAeqEvJg4yqiyQRziIBzS9a3qXQObtUwhdSV7ChMho9oxy7yKWigt6qk.mag988KYe.N2YNE4g5Q7y78mcqtAvF2UfqcWAt9cE3F2Ufe8cE3l2Ufey+NP7e378iTx37hODxAc2W2R0xZeAExx0WyH+Cfv7BfP
Content.makeFrontInterface(400, 300); const var FxSlot1 = Synth.getSlotFX("FxSlot1"); const var testButton = Content.addButton("TestUpdate", 10, 50); const var knob1 = Content.addKnob("DynKnob1", 10, 10); knob1.set("parentComponent", "dc_1"); const var simpleData = ["param0", "param1", "param2"]; const var dc_1 = Content.getComponent("dc_1"); dc_1.setData(simpleData); // Test the data inline function onTestUpdate(component, value) { if (value) { FxSlot1.setEffect("Reverb"); // set the property id, so DynKnob1 here dc_1.updateContentPropertyInternal(0, 0.7); dc_1.updateValueFromProcessorConnection(); Console.print("Knob value: " + knob1.getValue()); } } testButton.setControlCallback(onTestUpdate);