| 1 | |
| 2 | <refentry id="pvsftw"> |
| 3 | <indexterm id="IndexPvsftw"><primary>pvsftw</primary></indexterm> |
| 4 | <refentryinfo><title>Spectral Processing:Streaming</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>pvsftw</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>pvsftw</refname> |
| 13 | <refpurpose> |
| 14 | Writes amplitude and/or frequency data to function tables. |
| 15 | </refpurpose> |
| 16 | </refnamediv> |
| 17 | |
| 18 | <refsect1> |
| 19 | <title>Description</title> |
| 20 | <para> |
| 21 | Writes amplitude and/or frequency data to function tables. |
| 22 | </para> |
| 23 | </refsect1> |
| 24 | |
| 25 | <refsect1> |
| 26 | <title>Syntax</title> |
| 27 | <synopsis>kflag <command>pvsftw</command> fsrc, ifna [, ifnf]</synopsis> |
| 28 | </refsect1> |
| 29 | |
| 30 | <refsect1> |
| 31 | <title>Initialization</title> |
| 32 | <para> |
| 33 | <emphasis>ifna</emphasis> -- A table, at least inbins in size, that stores amplitude data. Ignored if ifna = 0 |
| 34 | </para> |
| 35 | |
| 36 | <para> |
| 37 | <emphasis>ifnf</emphasis> -- A table, at least inbins in size, that stores frequency data. Ignored if ifnf = 0 |
| 38 | </para> |
| 39 | </refsect1> |
| 40 | |
| 41 | <refsect1> |
| 42 | <title>Performance</title> |
| 43 | <para> |
| 44 | <emphasis>kflag</emphasis> -- A flag that has the value of 1 when new data is available, 0 otherwise. |
| 45 | </para> |
| 46 | |
| 47 | <para> |
| 48 | <emphasis>fsrc</emphasis> -- a PVOC-EX formatted source. |
| 49 | </para> |
| 50 | |
| 51 | <para> |
| 52 | Enables the contents of <emphasis>fsrc</emphasis> to be exchanged with function tables, for custom processing. Except when the frame overlap equals <emphasis>ksmps</emphasis> (which will generally not be the case), the frame data is not updated each control period. The data in <emphasis>ifna</emphasis>, <emphasis>ifnf</emphasis> should only be processed when <emphasis>kflag</emphasis> is set to 1. To process only frequency data, set <emphasis>ifna</emphasis> to zero. |
| 53 | </para> |
| 54 | |
| 55 | <para> |
| 56 | As the functions tables are required only to store data from <emphasis>fsrc</emphasis>, there is no advantage in defining then in the score. They should generally be created in the instrument using <link linkend="ftgen"><citetitle>ftgen</citetitle></link>. |
| 57 | </para> |
| 58 | |
| 59 | <para> |
| 60 | By exporting amplitude data, say, from one fsig and importing it into another, basic cross-synthesis (as in <link linkend="pvscross"><citetitle>pvscross</citetitle></link>) can be performed, with the option to modify the data beforehand using the table manipulation opodes. |
| 61 | </para> |
| 62 | |
| 63 | <para> |
| 64 | Note that the format data in the source fsig is not written to the tables. This therefore offers a means of transferring amplitude and frequency data between non-identical fsigs. Used this way, these opcodes become potentially pathological, and can be relied upon to produce unexpected results. In such cases, resynthesis using <link linkend="pvsadsyn"><citetitle>pvsadsyn</citetitle></link> would almost certainly be required. |
| 65 | </para> |
| 66 | |
| 67 | <para> |
| 68 | To perform a straight copy from one fsig to another one of identical format, the conventional assignment syntax can be used: |
| 69 | |
| 70 | <literallayout> |
| 71 | fsig1 = fsig2 |
| 72 | </literallayout> |
| 73 | |
| 74 | It is not necessary to use function tables in this case. |
| 75 | </para> |
| 76 | </refsect1> |
| 77 | |
| 78 | <refsect1> |
| 79 | <title>Examples</title> |
| 80 | <para> |
| 81 | Here is an example of the pvsftw opcode. It uses the file <ulink url="examples/pvsftw.csd"><citetitle>pvsftw.csd</citetitle></ulink>. |
| 82 | <example> |
| 83 | <title>Example of the pvsftw opcode.</title> |
| 84 | <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> |
| 85 | <xi:include href="examples-xml/pvsftw.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 86 | </example> |
| 87 | </para> |
| 88 | </refsect1> |
| 89 | |
| 90 | <refsect1> |
| 91 | <title>See also</title> |
| 92 | <para><link linkend="SpectralRealTime"><citetitle>Tools for Real-time Spectral Processing (pvs opcodes)</citetitle></link></para> |
| 93 | </refsect1> |
| 94 | |
| 95 | <refsect1> |
| 96 | <title>Credits</title> |
| 97 | <para> |
| 98 | <simplelist> |
| 99 | <member>Author: &namerichard;</member> |
| 100 | <member>August 2001 </member> |
| 101 | </simplelist> |
| 102 | </para> |
| 103 | |
| 104 | <para>New in version 4.13</para> |
| 105 | </refsect1> |
| 106 | </refentry> |