| 1 |
|
| 2 |
<refentry id="bpf"> |
| 3 |
<indexterm id="IndexBpf"><primary>bpf</primary></indexterm> |
| 4 |
|
| 5 |
<refentryinfo><title>Signal Generators:Linear and Exponential Generators</title></refentryinfo> |
| 6 |
<refmeta> |
| 7 |
<refentrytitle>bpf</refentrytitle> |
| 8 |
</refmeta> |
| 9 |
|
| 10 |
<refnamediv> |
| 11 |
<refname>bpf</refname> |
| 12 |
<refpurpose> |
| 13 |
Break point function with linear interpolation |
| 14 |
</refpurpose> |
| 15 |
</refnamediv> |
| 16 |
|
| 17 |
<refsect1> |
| 18 |
<title>Description</title> |
| 19 |
<para>Plugin opcode in emugens.</para> |
| 20 |
<para> |
| 21 |
Break-point function with linear interpolation. |
| 22 |
</para> |
| 23 |
</refsect1> |
| 24 |
|
| 25 |
<refsect1> |
| 26 |
<title>Syntax</title> |
| 27 |
|
| 28 |
<synopsis>ky <command>bpf</command> kx, kx1, ky1, kx2, ..., kxn, kyn</synopsis> |
| 29 |
<synopsis>iy <command>bpf</command> ix, ix1, iy1, ix2, ..., ixn, iyn</synopsis> |
| 30 |
<synopsis>kys[] <command>bpf</command> kxs[], kx1, ky1, kx2, ..., kxn, kyn</synopsis> |
| 31 |
<synopsis>iys[] <command>bpf</command> ixs[], ix1, iy1, ix2, ..., ixn, iyn</synopsis> |
| 32 |
<synopsis>ky <command>bpf</command> kx, kxs[], kys[]</synopsis> |
| 33 |
<synopsis>iy <command>bpf</command> ix, ixs[], iys[]</synopsis> |
| 34 |
|
| 35 |
<synopsis>ay <command>bpf</command> ax, kx1, ky1, kx2, ..., kxn, kyn</synopsis> |
| 36 |
<synopsis>ay <command>bpf</command> ax, kxs[], kys[]</synopsis> |
| 37 |
|
| 38 |
<synopsis>ky, kw <command>bpf</command> kx, kxs[], kys[], kws[]</synopsis> |
| 39 |
|
| 40 |
</refsect1> |
| 41 |
|
| 42 |
<refsect1> |
| 43 |
|
| 44 |
<title>Performance</title> |
| 45 |
|
| 46 |
<para> |
| 47 |
<emphasis role="strong">kx</emphasis> -- Input value |
| 48 |
</para> |
| 49 |
<para> |
| 50 |
<emphasis role="strong">kxn, kyn</emphasis> -- Defines a breakpoint. Can be |
| 51 |
changed at krate, but all <emphasis>kx</emphasis>s must be sorted |
| 52 |
</para> |
| 53 |
|
| 54 |
<para> |
| 55 |
The points (kx1, ky1), (kx2, ky2), etc, define a linearly |
| 56 |
interpolated function. This function is evaluated at point |
| 57 |
<emphasis>kx</emphasis>. This function extends to both -inf |
| 58 |
and +inf, so if kx < kx1 then ky = ky1 and the same holds true |
| 59 |
the other end. |
| 60 |
</para> |
| 61 |
<para>These are equivalent: |
| 62 |
</para> |
| 63 |
<programlisting> |
| 64 |
ky bpf kx, 0, 0, 0.5, 10, 1.02, 200 |
| 65 |
|
| 66 |
itab ftgenonce 0, 0, -27, 0, 0, 50, 10, 102, 200 |
| 67 |
ky = tablei(limit(kx, 0, 1.02)*100, itab) |
| 68 |
</programlisting> |
| 69 |
|
| 70 |
<note> |
| 71 |
<para> |
| 72 |
x values need to be sorted. Both x and y values can change but |
| 73 |
x values must stay sorted. |
| 74 |
</para> |
| 75 |
</note> |
| 76 |
</refsect1> |
| 77 |
<refsect1> |
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
<title>Examples</title> |
| 82 |
<para> |
| 83 |
Here is an example of the bpf opcode. It uses the file <ulink url="examples/bpf.csd"><citetitle>bpf.csd</citetitle></ulink>. |
| 84 |
<example> |
| 85 |
<title>Example of the bpf opcode.</title> |
| 86 |
<xi:include href="examples-xml/bpf.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 87 |
</example> |
| 88 |
</para> |
| 89 |
</refsect1> |
| 90 |
|
| 91 |
<refsect1> |
| 92 |
<title>See also</title> |
| 93 |
<para><link linkend="SiggenLineexp"><citetitle>Linear and Exponential Generators</citetitle></link></para> |
| 94 |
</refsect1> |
| 95 |
|
| 96 |
<refsect1> |
| 97 |
|
| 98 |
<title>Credits</title> |
| 99 |
<para>By: &nameeduardo; 2017</para> |
| 100 |
</refsect1> |
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
</refentry> |