| 1 | |
| 2 | <refentry id="vco2ift"> |
| 3 | <indexterm id="IndexVco2ift"><primary>vco2ift</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Generators:Dynamic Spectrum Oscillators</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>vco2ift</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>vco2ift</refname> |
| 13 | <refpurpose> |
| 14 | Returns a table number at i-time for a given oscillator frequency and wavform. |
| 15 | </refpurpose> |
| 16 | </refnamediv> |
| 17 | |
| 18 | <refsect1> |
| 19 | <title>Description</title> |
| 20 | <para> |
| 21 | <emphasis>vco2ift</emphasis> is the same as <link linkend="vco2ft"><citetitle>vco2ft</citetitle></link>, but works at i-time. It is suitable for use with opcodes that expect an i-rate table number (for example, <link linkend="oscili"><citetitle>oscili</citetitle></link>). |
| 22 | </para> |
| 23 | </refsect1> |
| 24 | |
| 25 | <refsect1> |
| 26 | <title>Syntax</title> |
| 27 | <synopsis>ifn <command>vco2ift</command> icps, iwave [, inyx]</synopsis> |
| 28 | </refsect1> |
| 29 | |
| 30 | <refsect1> |
| 31 | <title>Initialization</title> |
| 32 | <para> |
| 33 | <emphasis>ifn</emphasis> -- the ftable number. |
| 34 | </para> |
| 35 | |
| 36 | <para> |
| 37 | <emphasis>icps</emphasis> -- frequency in Hz. Zero and negative values are allowed. However, if the absolute value exceeds <link linkend="sr"><citetitle>sr</citetitle></link>/2 (or <emphasis>sr</emphasis> * <emphasis>inyx</emphasis>), the selected table will contain silence. |
| 38 | </para> |
| 39 | |
| 40 | <para> |
| 41 | <emphasis>iwave</emphasis> -- the waveform for which table number is to be selected. Allowed values are: |
| 42 | <itemizedlist> |
| 43 | <listitem><para>0: sawtooth</para></listitem> |
| 44 | <listitem><para>1: 4 * x * (1 - x) (integrated sawtooth)</para></listitem> |
| 45 | <listitem><para>2: pulse (not normalized)</para></listitem> |
| 46 | <listitem><para>3: square wave</para></listitem> |
| 47 | <listitem><para>4: triangle</para></listitem> |
| 48 | </itemizedlist> |
| 49 | </para> |
| 50 | |
| 51 | <para> |
| 52 | Additionally, negative <emphasis>iwave</emphasis> values select user defined waveforms (see also <link linkend="vco2init"><citetitle>vco2init</citetitle></link>). |
| 53 | </para> |
| 54 | |
| 55 | <para> |
| 56 | <emphasis>inyx</emphasis> (optional, default=0.5) -- bandwidth of the generated waveform, as percentage (0 to 1) of the sample rate. The expected range is 0 to 0.5 (i.e. up to <link linkend="sr"><citetitle>sr</citetitle></link>/2), other values are limited to the allowed range. |
| 57 | </para> |
| 58 | |
| 59 | <para> |
| 60 | Setting <emphasis>inyx</emphasis> to 0.25 (<emphasis>sr</emphasis>/4), or 0.3333 (<emphasis>sr</emphasis>/3) can produce a <quote>fatter</quote> sound in some cases, although it is more likely to reduce quality. |
| 61 | </para> |
| 62 | </refsect1> |
| 63 | |
| 64 | <refsect1> |
| 65 | <title>Examples</title> |
| 66 | <para> |
| 67 | Here is an example of the vco2ift opcode. It uses the file <ulink url="examples/vco2ift.csd"><citetitle>vco2ift.csd</citetitle></ulink>. |
| 68 | <example> |
| 69 | <title>Example of the vco2ift opcode.</title> |
| 70 | <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> |
| 71 | <xi:include href="examples-xml/vco2ift.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 72 | </example> |
| 73 | Its output should include a line like these: |
| 74 | <screen> |
| 75 | instr 1: ifn = 22.000 |
| 76 | instr 1: ifn = 8.000 |
| 77 | instr 1: ifn = 3.000 |
| 78 | </screen> |
| 79 | </para> |
| 80 | <para> |
| 81 | See the example for the <link linkend="vco2"><citetitle>vco2</citetitle></link> opcode too. |
| 82 | </para> |
| 83 | </refsect1> |
| 84 | |
| 85 | <refsect1> |
| 86 | <title>See Also</title> |
| 87 | <para> |
| 88 | <link linkend="SiggenDynamic"><citetitle>Dynamic Spectrum Oscillators</citetitle></link> |
| 89 | </para> |
| 90 | </refsect1> |
| 91 | |
| 92 | <refsect1> |
| 93 | <title>Credits</title> |
| 94 | <para>Author: &nameistvan;</para> |
| 95 | <para>New in version 4.22</para> |
| 96 | </refsect1> |
| 97 | </refentry> |