Debian Codegraph @

opcodes/pvcross.xml

raw symbols SCIP
1
2 <refentry id="pvcross">
3 <indexterm id="IndexPvcross"><primary>pvcross</primary></indexterm>
4 <refentryinfo><title>Spectral Processing:STFT</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>pvcross</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>pvcross</refname>
11 <refpurpose>
12 Applies the amplitudes from one phase vocoder analysis file to the data from a second file.
13 </refpurpose>
14 </refnamediv>
15
16 <refsect1>
17 <title>Description</title>
18 <para>
19 <emphasis>pvcross</emphasis> applies the amplitudes from one phase vocoder analysis file to the data from a second file and then performs the resynthesis. The data is passed, as described above, from a previously called <link linkend="pvbufread"><citetitle>pvbufread</citetitle></link> unit. The two k-rate amplitude arguments are used to scale the amplitudes of each files separately before they are added together and used in the resynthesis (see below for further explanation). The frequencies of the first file are not used at all in this process. This unit simply allows for cross-synthesis through the application of the amplitudes of the spectra of one signal to the frequencies of a second signal. Unlike <link linkend="pvinterp"><citetitle>pvinterp</citetitle></link>, <emphasis>pvcross</emphasis> does allow for the use of the <emphasis>ispecwp</emphasis> as in <link linkend="pvoc"><citetitle>pvoc</citetitle></link> and <link linkend="vpvoc"><citetitle>vpvoc</citetitle></link>.
20 </para>
21 </refsect1>
22
23 <refsect1>
24 <title>Syntax</title>
25 <synopsis>ares <command>pvcross</command> ktimpnt, kfmod, ifile, kampscale1, kampscale2 [, ispecwp]</synopsis>
26 </refsect1>
27
28 <refsect1>
29 <title>Initialization</title>
30 <para>
31 <emphasis>ifile</emphasis> -- the <emphasis>pvoc</emphasis> number (n in pvoc.n) or the name in quotes of the analysis file made using <emphasis>pvanal</emphasis>. (See <link linkend="pvoc"><citetitle>pvoc</citetitle></link>.)
32 </para>
33
34 <para>
35 <emphasis>ispecwp</emphasis> (optional, default=0) -- if non-zero, attempts to preserve the spectral envelope while
36 its frequency content is varied by <emphasis>kfmod</emphasis>. The default value is zero.
37 </para>
38 </refsect1>
39
40 <refsect1>
41 <title>Performance</title>
42 <para>
43 <emphasis>ktimpnt</emphasis> -- the passage of time, in seconds, through this file. <emphasis>ktimpnt</emphasis> must always be positive, but can move forwards or backwards in time, be stationary or discontinuous, as a pointer into the analysis file.
44 </para>
45
46 <para>
47 <emphasis>kfmod</emphasis> -- a control-rate transposition factor: a value of 1 incurs no transposition, 1.5 transposes up a perfect fifth, and 0.5 down an octave.
48 </para>
49
50 <para>
51 <emphasis>kampscale1, kampscale2</emphasis> -- used to scale the amplitudes stored in each frame of the phase vocoder analysis file. <emphasis>kampscale1</emphasis> scale the amplitudes of the data from the file read by the previously called <emphasis>pvbufread</emphasis>. <emphasis>kampscale2</emphasis> scale the amplitudes of the file named by <emphasis>ifile</emphasis>.
52 </para>
53
54 <para>
55 By using these arguments, it is possible to adjust these values before applying the interpolation. For example, if file1 is much louder than file2, it might be desirable to scale down the amplitudes of file1 or scale up those of file2 before interpolating. Likewise one can adjust the frequencies of each to bring them more in accord with one another (or just the opposite, of course!) before the interpolation is performed.
56 </para>
57 </refsect1>
58
59 <refsect1>
60 <title>Examples</title>
61 <para>
62 Below is an example using <link linkend="pvbufread"><citetitle>pvbufread</citetitle></link> with <emphasis>pvcross</emphasis>. In this example the amplitudes used in the resynthesis gradually change from those of the oboe to those of the clarinet. The frequencies, of course, remain those of the clarinet throughout the process since <emphasis>pvcross</emphasis> does not use the frequency data from the file read by <emphasis>pvbufread</emphasis>.
63 </para>
64
65 <para>
66 <informalexample>
67 <programlisting>
68 ktime1 <emphasis role="opc">line</emphasis> 0, p3, 3.5 <emphasis role="comment">; used as index in the &quot;oboe.pvoc&quot; file</emphasis>
69 ktime2 <emphasis role="opc">line</emphasis> 0, p3, 4.5 <emphasis role="comment">; used as index in the &quot;clar.pvoc&quot; file</emphasis>
70 kcross <emphasis role="opc">expon</emphasis> 0.001, p3, 1
71 <emphasis role="opc">pvbufread</emphasis> ktime1, &quot;oboe.pvoc&quot;
72 apv <emphasis role="opc">pvcross</emphasis> ktime2, 1, &quot;clar.pvoc&quot;, 1<emphasis role="op">-</emphasis>kcross, kcross</programlisting>
73 </informalexample>
74 </para>
75 <para>
76 Here is a complete example of the pvcross opcode. It uses the file <ulink url="examples/pvcross.csd"><citetitle>pvcross.csd</citetitle></ulink>
77 <example>
78 <title>Example of the pvcross opcode.</title>
79 <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>
80 <xi:include href="examples-xml/pvcross.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
81 </example>
82 </para>
83 </refsect1>
84
85 <refsect1>
86 <title>See Also</title>
87 <para>
88 <link linkend="SiggenStft"><citetitle>Short-time Fourier Transform (STFT) Resynthesis</citetitle></link>
89 </para>
90 </refsect1>
91
92 <refsect1>
93 <title>Credits</title>
94 <para>
95 <simplelist>
96 <member>Author: Richard Karpen</member>
97 <member>Seattle, Wash</member>
98 <member>1997</member>
99 </simplelist>
100 </para>
101 <para>New in version 3.44</para>
102 </refsect1>
103 </refentry>