
SAMPLING 2 / FORMULA SAMPLE (GUI)
---------------------------------

PLEASE REFER TO THE DOCUMENT "FormulaParserSynthaxReference.txt" IN MAIN EDM ARCHIVE FOR PROPER SYNTHAX AND SUPPORTED FUNCTIONS


Generates a v2 GUI sample of specified length basing on a parametric formula.

Minimum sample length is 10 samples. No maximum size has been imposed, but keep in mind that at present Patch Memories can't store samples longer than about 5 MB.

X ranges from 0.0 to-and-excluding 1.0 thru the whole specified sample Length.

Six external parameters A,B,C,D,F,G can be specified and referenced in the formula (case-insensitive; 'E' can't be used for a parameter since it is Euler's constant).

When Auto Recalc is enabled, a new sample is generated everytime any of the module pins is set.
When Auto Recalc is disabled, generation can be triggered by the Recalc pin.

To prevent flooding of sample data and CPU congestion, in particular when adjusting the parameters, output update rate is internally limited to 10 Hz.

Since formula parsing is a CPU intensive process and can block audio, no DSP version of this module is provided. Also, sample rendering from a formula is a more suitable task to be performed "offline" i.e on the GUI side, and the result stored to a Patch Memory Sample.

No sample is computed at startup, to avoid conflicts with the content of a Patch Memory Sample.

To include hard-coded samples made by a formula in your projects, rather store them in UU64 format with the Constant Sample module using the respective converter. Do not waste preset memory using a Patch Memory, if a sample is meant to be fixed for all of your presets.

Infinities and NANs are flushed to zero. 
The resulting sample can be automatically normalized to the specified float value (1.0 = 10 V), as long as a nonzero value is specified.
No clipping is performed.

In case of synthax errors, a void sample will be generated and optionally an error dialog can be opened (Windows only).

This module supports the additional variable "ym1" for iterative computations, whose value corresponds to the value of the previously computed y, and is zero at beginning. Keep in mind that the result of iterative formulas will highly differ for different sample lengths (they won't scale with length). When iterative functions are used, please choose a fixed sample length and rely on external resampling for sample scaling.






