Debian Codegraph @

opcodes/pvsbufread2.xml

raw symbols SCIP
1
2 <refentry id="pvsbufread2">
3 <indexterm id="Indexpvsbufread2"><primary>pvsbufread2</primary></indexterm>
4
5 <refentryinfo><title>Spectral Processing:Streaming</title></refentryinfo>
6 <refmeta>
7 <refentrytitle>pvsbufread2</refentrytitle>
8 </refmeta>
9 <refnamediv>
10 <refname>pvsbufread2</refname>
11 <refpurpose>
12 This opcode reads a circular buffer of f-signals (streaming PV signals), with binwise additional delays.
13 </refpurpose>
14 </refnamediv>
15
16 <refsect1>
17 <title>Description</title>
18 <para>
19 This opcode reads from a circular buffer of length ilen (secs),
20 taking a handle for the buffer and a time pointer, which holds the
21 current read position (also in seconds). It is used in conjunction with a <emphasis>pvsbuffer</emphasis> opocde.
22 Reading is circular, wrapping around at the end of the buffer. Extra delay times are taken from
23 a function table, with each point on it defining a delay time in seconds affecting the corresponding bin.
24 </para>
25 </refsect1>
26
27 <refsect1>
28 <title>Syntax</title>
29 <synopsis>fsig <command>pvsbufread2</command> ktime, khandle, ift1, ift2 </synopsis>
30 </refsect1>
31
32 <refsect1>
33 <title>Initialization</title>
34 <para>
35 <emphasis>ift1</emphasis> -- function table with at least fftisze/2+1 points where delays (in secs) for bin amplitudes are
36 set (function table positions are equivalent to bin numbers)
37 </para>
38 <para>
39 <emphasis>ift2</emphasis> -- function table with at least fftisze/2+1 points where delays (in secs) for bin frequencies are
40 set (function table positions are equivalent to bin numbers)
41 </para>
42 </refsect1>
43
44 <refsect1>
45 <title>Performance</title>
46 <para>
47 <emphasis>fsig</emphasis> -- output pv stream
48 </para>
49 <para>
50 <emphasis>ktime</emphasis> -- time position of reading pointer (in secs).
51 </para>
52 <para>
53 <emphasis>khandle</emphasis> -- handle identifying the buffer to be read. When using k-rate
54 handles, it is important to initialise the k-rate variable to a given existing handle. When changing
55 buffers, fsig buffers need to be compatible (same fsig format).
56 </para>
57 <para>
58 With this opcode and <link linkend="pvsbuffer"><citetitle>pvsbuffer</citetitle></link>, it is possible to, among other things:
59 <itemizedlist>
60 <listitem><simpara>time-stretch/compress a fsig stream, by reading it at
61 different rates</simpara></listitem>
62 <listitem><simpara>delay a fsig or portions of it.</simpara></listitem>
63 <listitem><simpara>'brassage' two or more fsigs by switching buffers, since
64 the reading handles are k-rate. Note that, when using k-rate
65 handles, it is important to initialise the k-rate variable to a
66 given handle (so that the fsig initialisation can take place)
67 and it is only possible to switch handles between compatible
68 fsig buffers (with the same fftsize and overlap).</simpara></listitem>
69 </itemizedlist>
70 </para>
71 <note>
72 <para>
73 It is important that the handle value passed to <emphasis>pvsbufread2</emphasis> is valid and was created by <link linkend="pvsbuffer"><citetitle>pvsbuffer</citetitle></link>. Csound will crash with invalid handles.
74 </para>
75 </note>
76 </refsect1>
77
78 <refsect1>
79 <title>Examples</title>
80 <para>
81 Here is an example of the pvsbufread2 opcode. It uses the file <ulink url="examples/pvsbufread2.csd"><citetitle>pvsbufread2.csd</citetitle></ulink>.
82 <example>
83 <title>Example of the pvsbufread2 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/pvsbufread2.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: &namevictor;</member>
100 <member>July 2011</member>
101 </simplelist>
102 </para>
103 </refsect1>
104 </refentry>