Debian Codegraph @

opcodes/pvshift.xml

raw symbols SCIP
1
2 <refentry id="pvshift">
3 <indexterm id="IndexPvshift"><primary>pvshift</primary></indexterm>
4 <refentryinfo><title>Spectral Processing:Streaming</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>pvshift</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>pvshift</refname>
11 <refpurpose>
12 Shift the frequency components of a pv stream, stretching/compressing
13 its spectrum.
14 </refpurpose>
15 </refnamediv>
16
17 <refsect1>
18 <title>Description</title>
19 <para>
20 Shift the frequency components of a pv stream, stretching/compressing
21 its spectrum.
22 </para>
23 </refsect1>
24
25 <refsect1>
26 <title>Syntax</title>
27 <synopsis>fsig <command>pvshift</command> fsigin, kshift, klowest[, kkeepform, igain, 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>kshift</emphasis> -- shift amount (in Hz, positive or negative).
42 </para>
43
44 <para>
45 <emphasis>klowest</emphasis> -- lowest frequency to be shifted.
46 </para>
47
48 <para>
49 <emphasis>kkeepform</emphasis> -- attempt to keep input signal
50 formants; 0: do not keep formants;
51 1: keep formants using a liftered cepstrum method; 2: keep formants by
52 using a true envelope method
53 (defaults to 0).
54 </para>
55
56 <para>
57 <emphasis>kgain</emphasis> -- amplitude scaling (defaults to 1).
58 </para>
59 <para>
60 <emphasis>kcoefs</emphasis> -- number of cepstrum coefs used in formant preservation (defaults to 80).
61 </para>
62 <para>
63 This opcode will shift the components of a pv stream, from a certain
64 frequency upwards, up or down a fixed amount (in Hz). It can be used to
65 transform a harmonic spectrum into an inharmonic one. The <emphasis>kkeepform</emphasis> flag
66 can be used to try and preserve formants for possibly interesting and unusual
67 spectral modifications.
68 </para>
69
70 <warning>
71 <para>
72 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.
73 </para>
74 </warning>
75
76 </refsect1>
77
78 <refsect1>
79 <title>Examples</title>
80 <para>
81 <example>
82 <title>Example</title>
83 <programlisting>
84 asig <emphasis role="opc">in</emphasis> <emphasis role="comment">; get the signal in</emphasis>
85
86 fsig <emphasis role="opc">pvsanal</emphasis> asig, 1024, 256, 1024, 1 <emphasis role="comment">; analyse it</emphasis>
87 ftps <emphasis role="opc">pvshift</emphasis> fsig, 100, 0 <emphasis role="comment">; add 100 Hz to each component</emphasis>
88 atps <emphasis role="opc">pvsynth</emphasis> ftps <emphasis role="comment">; synthesise it</emphasis></programlisting>
89 </example>
90 </para>
91
92 <para>
93 Depending on the input, this will transform a pitched sound into an inharmonic,
94 bell-like sound.
95 </para>
96 <para>
97 Here is an example of the use of the <emphasis>pvshift</emphasis> opcode. It uses the file <ulink url="examples/pvshift.csd"><citetitle>pvshift.csd</citetitle></ulink>.
98 <example>
99 <title>Example of the <emphasis>pvshift</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/pvshift.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>