Script dialog
The ScriptDialog
class is used to create and control dialog windows when
running audio scripts.
ScriptDialog
Used to create and read attributes from a script dialog
__init__
Used to define a script which can be used by Edison.
This object can then be used to add inputs to the script.
When the properties are generated, the script should begin by calling
the Execute()
method which returns whether the script should run or
not.
Args:
title
(str
): the title to use for the scriptdescription
(str
): a description for what the script does
AddInput
Add an input to the dialog, which accepts a floating point value
between 0.0
and 1.0
. The input will display as a text box and an
associated knob.
Args:
-
name
(str
): name of the input. -
default_value
(float
): the starting value of the input (clamped between0.0
and1.0
)
AddInputKnob
Add an input to the dialog, which accepts a floating point value
between min_value
and max_value
. The input will display as a text
box and an associated knob.
Args:
-
name
(str
): the name of the input -
default_value
(float
): the default value for the knob -
min_value
(float
): the minimum value for the knob -
max_value
(float
): the maximum value for the knob
AddInputCombo
Add an input to the dialog, which accepts values from a selection of options from a drop-down menu.
Args:
-
name
(str
): the name of the input -
values
(str
): the collection of values that are allowed. This should be a single string, where each option is separated by a comma. -
default_value
(int
): an integer representing the default value of the input.
GetInputValue
Get the result of an input that has been added.
This should be called only after calling the Execute()
method to
ensure the value has been initialized.
Args:
name
(str
): the name of the input to get the value from
Returns:
-
float
: the float value chosen for knob inputs -
float
: a poorly-rounded integer representing the index of the option that the user selected for combo boxes.