Function:
 Stores
and retrieves numeric values by
index, with separate indexes for read and write. The module can optionally
save values to a text file when it closes, and load them from a text file when
it opens, to provide
persistent storage, or to pre-load the array with a predefined set of values.
File Load and Save operations can also be initiated while the module
is running. Essentially, DH_FloatArray provides the same functions for
GUI Float parameter data that
DH_Array2
provides for voltage data.
In addition, DH_FloatArray can take as input the entire array
from one of the GUI controls
DH_BreakpointInput, DH_ContourInput,
and DH_MultiStepInput, and can output an array
for graphic display by these GUI controls.
Left-hand side pins:
Array In - Connects to an Array Out pin on a
DH_BreakpointInput, DH_ContourInput, a DH_MultiStepInput. Provides a conduit
between the modules for array values.
Input - Value to be stored
Read Index In - Selects the output slot. Range is 0 to the Array Size - 1.
Index input is rounded to the nearest integer.
Write Index In - Selects the slot to which the Input value will be written.
Range is 0 to the Array Size - 1. Index input is rounded to the nearest
integer.
Write - Writes the Input value to the currently indexed slot on a TRUE to
FALSE change.
Load - Loads the array from a file.
Save - Saves the current array values to file.
Clear - Deletes the saved file and resets all slots to 0.
Output - Provides the value of the slot currently indexed by the Read
Index.
Right-hand side pins:
File Name - Should be used to give the module's data file a unique name. More
than one instance of a module may read the same file, but results may be
unpredictable if more than one writes to it.
Output: Provides the value of the slot currently indexed by the Read
Index.
Parameters: (right-click Properties)
Array Size - The size of the array is set automatically to
accommodate arrays loaded from file and arrays input via the Array In
pin, so most of the time, you can ignore this setting. Use it to set the number of
elements in the array manually if you are building an array dynamically
using the Input and Write pins . Note that the index numbers start at 0,
so the highest index will be 1 less than the Array Size.
Load on open - Enables or disables automatically loading the file on
GUI module initialization.
Save on close - Enables or disables automatically saving the file on
GUI module close.
Notes:
Text
File Format:
The module's memory can be preloaded by providing a text file with
the desired numeric values, separated by spaces, tabs, commas, or
new lines. The values are read in from left to right, top to bottom, just
as you would read English language text.
Saving as VST:
If you want the array to be preloaded from a text file when your VST is
opened, do the following:
Put the file in your SynthEdit folder.
Use just the filename, without a path,
in the module's File Name field.
When you save as VST, go to the
Embedded Files tab, and Add the file.
The file will then be unloaded into the
directory that the VST creates for its .sep/.sem modules, and DH_FloatArray will
find it there.
top |