Debian Codegraph @

opcodes/pvscale.xml

raw symbols SCIP
1
2 <refentry id="pvscale">
3 <indexterm id="IndexPvscale"><primary>pvscale</primary></indexterm>
4 <refentryinfo><title>Spectral Processing:Streaming</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>pvscale</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>pvscale</refname>
11 <refpurpose>
12 Scale the frequency components of a pv stream.
13 </refpurpose>
14 </refnamediv>
15
16 <refsect1>
17 <title>Description</title>
18 <para>
19 Scale the frequency components of a pv stream, resulting
20 in pitch shift. Output amplitudes can be optionally modified in order
21 to attempt formant preservation.
22 </para>
23 </refsect1>
24
25 <refsect1>
26 <title>Syntax</title>
27 <synopsis>fsig <command>pvscale</command> fsigin, kscal[, kkeepform, kgain, kcoefs]</synopsis>
28 </refsect1>
29
30 <refsect1>
31 <title>Performance</title>
32 <para>
33 <emphasis>fsig</emphasis> -- output pv stream
34 </para>
35
36 <para>
37 <emphasis>fsigin</emphasis> -- input pv stream
38 </para>
39
40 <para>
41 <emphasis>kscal</emphasis> -- scaling ratio.
42 </para>
43
44 <para>
45 <emphasis>kkeepform</emphasis> -- attempt to keep input signal
46 formants; 0: do not keep formants;
47 1: keep formants using a liftered cepstrum method; 2: keep formants by
48 using a true envelope method
49 (defaults to 0).
50 </para>
51
52 <para>
53 <emphasis>kgain</emphasis> -- amplitude scaling (defaults to 1).
54 </para>
55
56 <para>
57 <emphasis>kcoefs</emphasis> -- number of cepstrum coefs used in formant preservation (defaults to 80).
58 </para>
59
60
61 <para>
62 The quality of the pitch shift will be improved with the use of a
63 Hanning window in the pvoc analysis. Formant preservation method 1 is less intensive than method 2, which might not be suited
64 to realtime use.
65 </para>
66 <warning>
67 <para>
68 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.
69 </para>
70 </warning>
71
72 </refsect1>
73 <refsect1>
74 <title>Examples</title>
75 <para>
76 <example>
77 <title>Example</title>
78 <programlisting>
79 asig <emphasis role="opc">in</emphasis> <emphasis role="comment">; get the signal in</emphasis>
80
81 fsig <emphasis role="opc">pvsanal</emphasis> asig, 1024, 256, 1024, 1 <emphasis role="comment">; analyse it</emphasis>
82 ftps <emphasis role="opc">pvscale</emphasis> fsig, 1.5, 1, 1 <emphasis role="comment">; transpose it keeping formants</emphasis>
83 atps <emphasis role="opc">pvsynth</emphasis> ftps <emphasis role="comment">; synthesise it</emphasis>
84
85 adp <emphasis role="opc">delayr</emphasis> 0.1 <emphasis role="comment">; delay original signal</emphasis>
86 adel <emphasis role="opc">deltapn</emphasis> 1024 <emphasis role="comment">; by 1024 samples</emphasis>
87 <emphasis role="opc">delayw</emphasis> asig
88 <emphasis role="opc">out</emphasis> atps <emphasis role="op">+</emphasis> adel <emphasis role="comment">; add tranposed and original</emphasis></programlisting>
89 </example>
90 </para>
91 <para>
92 The example above shows a vocal harmoniser. The delay is necessary to
93 time-align the signals, as the analysis-synthesis process will imply a
94 delay of 1024 samples between the analysis input and the synthesis output.
95 </para>
96 <para>
97 Here is an example of the use of the <emphasis>pvscale</emphasis> opcode. It uses the file <ulink url="examples/pvscale.csd"><citetitle>pvscale.csd</citetitle></ulink>.
98 <example>
99 <title>Example of the <emphasis>pvscale</emphasis> opcode.</title>
100 <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>
101 <xi:include href="examples-xml/pvscale.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
102 </example>
103 </para>
104 </refsect1>
105
106 <refsect1>
107 <title>See also</title>
108 <para><link linkend="SpectralRealTime"><citetitle>Tools for Real-time Spectral Processing (pvs opcodes)</citetitle></link></para>
109 </refsect1>
110
111 <refsect1>
112 <title>Credits</title>
113 <para>
114 <simplelist>
115 <member>Author: &namevictor;</member>
116 <member>November 2004 </member>
117 </simplelist>
118 </para>
119
120 <para>New plugin in version 5</para>
121 <para>November 2004.</para>
122 </refsect1>
123 </refentry>