summaryrefslogtreecommitdiff
path: root/opcodes/pvstanal.xml
blob: c7700a2d8d1952ad8cf2b44da1f4f4f121b78ef9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<refentry id="pvstanal">
<indexterm id="IndexPvstanal"><primary>pvstanal</primary></indexterm>
  <refentryinfo><title>Spectral Processing:Streaming</title></refentryinfo>
  <refmeta>
    <refentrytitle>pvstanal</refentrytitle>
  </refmeta>



  <refnamediv>
    <refname>pvstanal</refname>
    <refpurpose>
Phase vocoder analysis processing with onset detection/processing.
          </refpurpose>
  </refnamediv>
  
  <refsect1>
    <title>Description</title>
    <para>
<emphasis>pvstanal</emphasis> implements phase vocoder analysis by reading function tables
containing sampled-sound sources, with <link linkend="GEN01"><citetitle>GEN01</citetitle></link>, and
<emphasis>pvstanal</emphasis> will accept deferred allocation tables.
  </para>
  <para>
This opcode allows for time and frequency-independent scaling. Time is advanced internally, but controlled by a tempo scaling parameter; when an onset is detected, timescaling is momentarily stopped to avoid smearing of attacks. The quality of the effect is generally improved with phase locking switched on. 
  </para>
  <para>
<emphasis>pvstanal</emphasis> will also scale pitch, independently of frequency, using a transposition factor (k-rate).
  </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis>fsig <command>pvstanal</command> ktimescal, kamp, kpitch, ktab, [kdetect, kwrap, ioffset,ifftsize, ihop, idbthresh]
      </synopsis>
  </refsect1>

  <refsect1>
    <title>Initialization</title>
      <para>
      <emphasis>ifftsize</emphasis> -- FFT size (power-of-two), defaults to 2048.
    </para>
	      <para>
      <emphasis>ihop</emphasis> -- hopsize, defaults to 512
    </para>
<para>
      <emphasis>ioffset</emphasis> -- startup read offset into table, in secs.
    </para>

		      <para>
      <emphasis>idbthresh</emphasis> -- threshold for onset detection, based on dB power spectrum ratio between two successive windows. A detected ratio above it will cancel timescaling momentarily, to avoid smearing (defaults to 1).
      By default anything more than a 1 dB inter-frame power difference will be detected as an onset.
    </para>
	
  </refsect1>
  
  <refsect1>
    <title>Performance</title>
  <para>
      <emphasis>ktimescal</emphasis> -- timescaling ratio, &lt; 1 stretch, > 1 contract.
    </para>
    <para>
      <emphasis>kamp</emphasis> -- amplitude scaling
    </para>
    <para>
      <emphasis>kpitch</emphasis> -- grain pitch scaling (1=normal pitch, &lt; 1 lower, > 1 higher; negative, backwards)
    </para>

    <para>
      <emphasis>kdetect</emphasis> -- 0 or 1, to switch onset detection/processing. The onset detector checks for power difference between analysis windows. If more than what has been specified in the dbthresh parameter, an onset is declared.
It suspends timescaling momentarily so the onsets are not modified.
    </para>
    <para>
      <emphasis>ktab</emphasis> -- source signal function table. Deferred-allocation tables (see
      <link linkend="GEN01"><citetitle>GEN01</citetitle></link>) are accepted, but the opcode
      expects a mono source. Tables can be switched at k-rate.
    </para>
 <para>
      <emphasis>kwrap</emphasis> -- 0 or 1, to switch on/off table wrap-around read (default to 1)
    </para>
  </refsect1>
  
  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the pvstanal opcode. It uses the file <ulink url="examples/pvstanal.csd"><citetitle>pvstanal.csd</citetitle></ulink>.
      <example>
        <title>Example of the pvstanal opcode.</title>
        <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>
          <xi:include href="examples-xml/pvstanal.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
      </example>
    </para>
  </refsect1>

  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: &namevictor;</member>
        <member>February 2010</member>
      </simplelist>
    </para>

    <para>New plugin in version 5.13</para>
    <para>February 2005.</para>
  </refsect1>
</refentry>