Plugnscript: How to set param values with $script_input_string0$ and $script_output_string0$

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

Post

I am using code below to create UI for FM synth operator matrix for 10x14 parameters and this works fine when I modify from UI and output all sound settings with a single $script_input_string0$ text string to a DSP side where it is parsed to a sound object.

This sound settings string also got saved to preset settings xml files but problem is how to save all these params / param_text_control states as they reset to default values when I save settings to preset file?

I was hoping that persistent="true" would save all param/input values to preset xml file but it does not work for me? Do I have to use custom_params here or could I somehow parse and set default values from saved $script_input_string0$ value to all these params & input widgets?

Thanks!



<!-- waveform params -->
<TABLE v_spacing="8px" h_spacing="8px">
<TABLE_ROW>
<TEXT value="ID" font_size="13" font_weight="bold"/>
<TEXT value="Type" font_size="13" font_weight="bold"/>
<TEXT value="Waveform" font_size="13" font_weight="bold"/>
<TEXT value="Pan" font_size="13" font_weight="bold"/>
<TEXT value="CoarseTune" font_size="13" font_weight="bold"/>
<TEXT value="FineTune" font_size="13" font_weight="bold"/>
<TEXT value="Amplitude" font_size="13" font_weight="bold"/>
<TEXT value="Attack" font_size="13" font_weight="bold"/>
<TEXT value="Decay" font_size="13" font_weight="bold"/>
<TEXT value="Sustain" font_size="13" font_weight="bold"/>
<TEXT value="Release" font_size="13" font_weight="bold"/>
<TEXT value="VelCurve" font_size="13" font_weight="bold"/>
<TEXT value="VelSens" font_size="13" font_weight="bold"/>
<TEXT value="Feedback" font_size="13" font_weight="bold"/>
<TEXT value="Target" font_size="13" font_weight="bold"/>
</TABLE_ROW>


<REPEAT count="10" start="0">
<TABLE_ROW spacing="0" h_margin="20" v_margin="20">
<PARAM id="type$index$" type="enumeration" default="1" enum_values="OFF;CARRIER;MODULATOR;AM_MODULATOR;PM_MODULATOR" persistent="true"/>
<PARAM id="waveform$index$" type="enumeration" enum_values="SINE;SQUARE;TRIANGLE;SAW;FMX_SINE_SAW;FMX_SQUARE_SINE;FMX_TRIANGLE_SAW;FMX_SAW_SQUARE;LINEAR;NOISE;BROWN_NOISE;REVERSE_SAW;RANDOM" persistent="true"/>
<PARAM id="pan$index$" min="-1" max="1" default="0" persistent="true" value_format="2.2"/>
<PARAM id="coarse_tune$index$" min="0" max="10" default="1" persistent="true" value_format="2.2"/>
<PARAM id="fine_tune$index$" min="0" max="10" default="1" persistent="true" value_format="2.2"/>
<PARAM id="amplitude$index$" min="0" max="1" default="0.5" persistent="true" value_format="2.2"/>
<PARAM id="attack$index$" min="0" max="10" default="0" persistent="true" value_format="2.2"/>
<PARAM id="decay$index$" min="0" max="1" default="0" persistent="true" value_format="2.2"/>
<PARAM id="sustain$index$" min="0" max="1" default="1" persistent="true" value_format="2.2"/>
<PARAM id="release$index$" min="0" max="1" default="0" persistent="true" value_format="2.2"/>
<PARAM id="velocity_curve$index$" min="0" max="3" default="1" persistent="true" value_format="2.2"/>
<PARAM id="velocity_sensitivity$index$" min="0" max="1" default="1" persistent="true" value_format="2.2"/>
<PARAM id="feedback$index$" min="0" max="1" default="0" persistent="true" value_format="2.2"/>
<PARAM id="target_index$index$" min="-1" max="10" default="-1" type="integer" persistent="true"/>

<TEXT value="$index$" font_size="13" font_weight="bold"/>
<PARAM_TEXT_CONTROL param_id="type$index$" cursor="system::size_v"/>
<PARAM_TEXT_CONTROL param_id="waveform$index$" cursor="system::size_v"/>
<PARAM_TEXT_CONTROL param_id="pan$index$" cursor="system::size_v"/>
<PARAM_TEXT_CONTROL param_id="coarse_tune$index$" cursor="system::size_v"/>
<PARAM_TEXT_CONTROL param_id="fine_tune$index$" cursor="system::size_v"/>
<PARAM_TEXT_CONTROL param_id="amplitude$index$" cursor="system::size_v"/>
<PARAM_TEXT_CONTROL param_id="attack$index$" cursor="system::size_v"/>
<PARAM_TEXT_CONTROL param_id="decay$index$" cursor="system::size_v"/>
<PARAM_TEXT_CONTROL param_id="sustain$index$" cursor="system::size_v"/>
<PARAM_TEXT_CONTROL param_id="release$index$" cursor="system::size_v"/>
<PARAM_TEXT_CONTROL param_id="velocity_curve$index$" cursor="system::size_v"/>
<PARAM_TEXT_CONTROL param_id="velocity_sensitivity$index$" cursor="system::size_v"/>
<PARAM_TEXT_CONTROL param_id="feedback$index$" cursor="system::size_v"/>
<PARAM_TEXT_CONTROL param_id="target_index$index$" cursor="system::size_v"/>


<STRING id="_type$index$" />
<STRING id="_waveform$index$" />
<STRING id="_pan$index$" />
<STRING id="_coarse_tune$index$" />
<STRING id="_fine_tune$index$" />
<STRING id="_amplitude$index$" />
<STRING id="_attack$index$" />
<STRING id="_decay$index$" />
<STRING id="_sustain$index$" />
<STRING id="_release$index$" />
<STRING id="_velocity_curve$index$" />
<STRING id="_velocity_sensitivity$index$" />
<STRING id="_feedback$index$" />
<STRING id="_target_index$index$" />


<PARAM_TO_STRING_LINK from="type$index$" to="_type$index$" content="{value}" />
<PARAM_TO_STRING_LINK from="waveform$index$" to="_waveform$index$" content="{value}" />
<PARAM_TO_STRING_LINK from="pan$index$" to="_pan$index$" />
<PARAM_TO_STRING_LINK from="coarse_tune$index$" to="_coarse_tune$index$" />
<PARAM_TO_STRING_LINK from="fine_tune$index$" to="_fine_tune$index$" />
<PARAM_TO_STRING_LINK from="amplitude$index$" to="_amplitude$index$" />
<PARAM_TO_STRING_LINK from="attack$index$" to="_attack$index$" />
<PARAM_TO_STRING_LINK from="decay$index$" to="_decay$index$" />
<PARAM_TO_STRING_LINK from="sustain$index$" to="_sustain$index$" />
<PARAM_TO_STRING_LINK from="release$index$" to="_release$index$" />
<PARAM_TO_STRING_LINK from="velocity_curve$index$" to="_velocity_curve$index$" />
<PARAM_TO_STRING_LINK from="velocity_sensitivity$index$" to="_velocity_sensitivity$index$" />
<PARAM_TO_STRING_LINK from="feedback$index$" to="_feedback$index$" />
<PARAM_TO_STRING_LINK from="target_index$index$" to="_target_index$index$" />


<STRING id="_row$index$" />

<STRING_MULTI_LINK from="_type$index$;_waveform$index$;_pan$index$;_coarse_tune$index$;_fine_tune$index$;_amplitude$index$;_attack$index$;_decay$index$;_sustain$index$;_release$index$;_velocity_curve$index$;_velocity_sensitivity$index$;_feedback$index$;_target_index$index$" to="_row$index$" separator="," />
</TABLE_ROW>
</REPEAT>


</TABLE>


<STRING_MULTI_LINK from="_row0;_row1;_row2;_row3;_row4;_row5;_row6;_row7;_row8;_row9" to="$script_input_string0$" separator=";" />
<TEXT_EDIT_BOX string_id="$script_input_string0$" width="100%" />

Post

Hi,

Sorry for the delay! presistent="true" should indeed work. Are you using a .kuiml file ("sub-skin") or is it a fully custom skin for the entire plug-in?

Post Reply

Return to “Blue Cat Audio”