bpfcosSignal Generators:Linear and Exponential Generatorsbpfcosbpfcos
Break point function with cosine (easy-in/easy-out) interpolation
DescriptionPlugin opcode in emugens.
Break-point function with cosine interpolation.
Given an x value and a series of pairs (x, y), it returns
the corresponding y value in the half cosine curve defined
by the pairs.
It works both at i- and k- time
Syntaxky bpfcos kx, kx1, ky1, kx2, ..., kxn, kynkys[] bpfcos kxs[], kx1, ky1, kx2, ..., kxn, kynky bpfcos kx, kxs[], kys[]ky bpfcos kx, ixs[], iys[]ky, kz bpfcos kx, kxs[], kys[], kzs[] ky, kz bpfcos kx, ixs[], iys[], izs[] Performancekx -- Input value. Can also be an array
kxn, kyn -- Defines a breakpoint. Can be
changed at krate, but all kxs must be sorted
The points (kx1, ky1), (kx2, ky2), etc, define a cosine
interpolated function. This function is evaluated at point
kx. This function extends to both -inf
and +inf, so if kx < kx1 then ky = ky1 and the same holds true
the other end.
Array Variantskys[] bpfcos kxs[], kx1, ky1, kx2, ..., kxn, kyn
For each x in kxs, calculate the y value defined by the points (kx1, ky1), ... (kxn, kyn)
ky bpfcos kx, ixs[], iys[]
In this variants the points are defined through arrays. ixs contains all the x values,
iys contains all the y values
ky, kz bpfcos kx, kxs[], kys[], kzs[]
The same as the variant above, but for multidimensional points. Given two curves sharing
the same x points, calculate the value at x for both dimensions simultaneously.
(see example)
x values need to be sorted. Both x and y values can change but
x values must stay sorted.
Examples
Here is an example of the bpfcos opcode. It uses the file bpfcos.csd.
Example of the bpfcos opcode.See alsoLinear and Exponential GeneratorsCreditsBy: &nameeduardo; 2018New plugin in version 6.12Array versions in version 6.14