| 1 | |
| 2 | <refentry id="osciliktp"> |
| 3 | <indexterm id="IndexOsciliktp"><primary>osciliktp</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Generators:Basic Oscillators</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>osciliktp</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>osciliktp</refname> |
| 11 | <refpurpose> |
| 12 | A linearly interpolated oscillator that allows allows phase modulation. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para> |
| 19 | <emphasis>osciliktp</emphasis> allows phase modulation (which is actually implemented as k-rate frequency modulation, by differentiating phase input). The disadvantage is that there is no amplitude control, and frequency can be varied only at the control-rate. This opcode can be faster or slower than <link linkend="oscilikt"><citetitle>oscilikt</citetitle></link>, depending on the control-rate. |
| 20 | </para> |
| 21 | </refsect1> |
| 22 | |
| 23 | <refsect1> |
| 24 | <title>Syntax</title> |
| 25 | <synopsis>ares <command>osciliktp</command> kcps, kfn, kphs [, istor]</synopsis> |
| 26 | </refsect1> |
| 27 | |
| 28 | <refsect1> |
| 29 | <title>Initialization</title> |
| 30 | <para> |
| 31 | <emphasis>istor</emphasis> (optional, defaults to 0) -- Skips initialization. |
| 32 | </para> |
| 33 | </refsect1> |
| 34 | |
| 35 | <refsect1> |
| 36 | <title>Performance</title> |
| 37 | <para> |
| 38 | <emphasis>ares</emphasis> -- audio-rate ouptut signal. |
| 39 | </para> |
| 40 | |
| 41 | <para> |
| 42 | <emphasis>kcps</emphasis> -- frequency in Hz. Zero and negative values are allowed. However, the absolute value must be less than <link linkend="sr"><citetitle>sr</citetitle></link> (and recommended to be less than <emphasis>sr/</emphasis>2). |
| 43 | |
| 44 | </para> |
| 45 | <para> |
| 46 | <emphasis>kfn</emphasis> -- function table number. Can be varied at control rate (useful to <quote>morph</quote> waveforms, or select from a set of band-limited tables generated by <link linkend="GEN30"><citetitle>GEN30</citetitle></link>). |
| 47 | |
| 48 | </para> |
| 49 | <para> |
| 50 | <emphasis>kphs</emphasis> -- phase (k-rate), the expected range is 0 to 1. The absolute value of the difference of the current and previous value of <emphasis>kphs</emphasis> must be less than <link linkend="ksmps"><citetitle>ksmps</citetitle></link>. |
| 51 | </para> |
| 52 | </refsect1> |
| 53 | |
| 54 | <refsect1> |
| 55 | <title>Examples</title> |
| 56 | <para> |
| 57 | Here is an example of the osciliktp opcode. It uses the file <ulink url="examples/osciliktp.csd"><citetitle>osciliktp.csd</citetitle></ulink>. |
| 58 | |
| 59 | <example> |
| 60 | <title>Example of the osciliktp opcode.</title> |
| 61 | <para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para> |
| 62 | <xi:include href="examples-xml/osciliktp.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 63 | </example> |
| 64 | </para> |
| 65 | </refsect1> |
| 66 | |
| 67 | <refsect1> |
| 68 | <title>See also</title> |
| 69 | <para><link linkend="SiggenBasic"><citetitle>Basic Oscillators</citetitle></link></para> |
| 70 | </refsect1> |
| 71 | |
| 72 | <refsect1> |
| 73 | <title>Credits</title> |
| 74 | <para>Author: &nameistvan;</para> |
| 75 | <para>New in version 4.22</para> |
| 76 | </refsect1> |
| 77 | </refentry> |