| 1 | |
| 2 | <refentry id="pvsmaska"> |
| 3 | <indexterm id="IndexPvsmaska"><primary>pvsmaska</primary></indexterm> |
| 4 | <refentryinfo><title>Spectral Processing:Streaming</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>pvsmaska</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>pvsmaska</refname> |
| 11 | <refpurpose> |
| 12 | Modify amplitudes using a function table, with dynamic scaling. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para> |
| 19 | Modify amplitudes of fsrc using function table, with dynamic scaling. |
| 20 | </para> |
| 21 | </refsect1> |
| 22 | |
| 23 | <refsect1> |
| 24 | <title>Syntax</title> |
| 25 | <synopsis>fsig <command>pvsmaska</command> fsrc, ifn, kdepth</synopsis> |
| 26 | </refsect1> |
| 27 | |
| 28 | <refsect1> |
| 29 | <title>Initialization</title> |
| 30 | <para> |
| 31 | <emphasis>ifn</emphasis> -- The f-table to use. Given fsrc has N analysis bins, table ifn must be of size N or larger. The table need not be normalized, but values should lie within the range 0 to 1. It can be supplied from the score in the usual way, or from within the orchestra by using <link linkend="pvsinfo"><citetitle>pvsinfo</citetitle></link> to find the size of fsrc, (returned by pvsinfo in inbins), which can then be passed to ftgen to create the f-table. |
| 32 | </para> |
| 33 | </refsect1> |
| 34 | |
| 35 | <refsect1> |
| 36 | <title>Performance</title> |
| 37 | <para> |
| 38 | <emphasis>kdepth</emphasis> -- Controls the degree of modification applied to fsrc, using simple linear scaling. 0 leaves amplitudes unchanged, 1 applies the full profile of ifn. |
| 39 | </para> |
| 40 | |
| 41 | <para> |
| 42 | Note that power-of-two FFT sizes are particularly convenient when using table-based processing, as the number of analysis bins (inbins) is then a power-of-two plus one, for which an exactly matching f-table can be created. In this case it is important that the f-table be created with a size of inbins, rather than as a power of two, as the latter will copy the first table value to the guard point, which is inappropriate for this opcode. |
| 43 | </para> |
| 44 | <warning> |
| 45 | <para> |
| 46 | It is unsafe to use the same f-variable for both input and output of pvs opcodes. Using the same one might lead to undefined behavior on some opcodes. Use a different one on the left and right sides of the opcode. |
| 47 | </para> |
| 48 | </warning> |
| 49 | |
| 50 | </refsect1> |
| 51 | |
| 52 | <refsect1> |
| 53 | <title>Examples</title> |
| 54 | <para> |
| 55 | Here is an example of the use of the <emphasis>pvsmaska</emphasis> opcode. It uses the file <ulink url="examples/pvsmaska.csd"><citetitle>pvsmaska.csd</citetitle></ulink>. |
| 56 | <example> |
| 57 | <title>Example of the <emphasis>pvsmaska</emphasis> opcode.</title> |
| 58 | <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> |
| 59 | <xi:include href="examples-xml/pvsmaska.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 60 | </example> |
| 61 | </para> |
| 62 | </refsect1> |
| 63 | |
| 64 | <refsect1> |
| 65 | <title>See also</title> |
| 66 | <para><link linkend="SpectralRealTime"><citetitle>Tools for Real-time Spectral Processing (pvs opcodes)</citetitle></link></para> |
| 67 | </refsect1> |
| 68 | |
| 69 | <refsect1> |
| 70 | <title>Credits</title> |
| 71 | <para> |
| 72 | <simplelist> |
| 73 | <member>Author: &namerichard;</member> |
| 74 | <member>August 2001 </member> |
| 75 | </simplelist> |
| 76 | </para> |
| 77 | |
| 78 | <para>New in version 4.13</para> |
| 79 | </refsect1> |
| 80 | </refentry> |