summaryrefslogtreecommitdiff
path: root/opcodes/trshift.xml
blob: a09c6635365bcc5a16e519efc310b3012b0b5ca4 (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
<refentry id="trshift">
<indexterm id="Indextrshift"><primary>trshift</primary></indexterm>

  <refentryinfo><title>Spectral Processing:Streaming</title></refentryinfo>
  <refmeta>
    <refentrytitle>trshift</refentrytitle>
  </refmeta>



  <refnamediv>
    <refname>trshift</refname>
    <refpurpose>
    Streaming partial track frequency scaling.
      
    </refpurpose>
  </refnamediv>
  
  <refsect1>
    <title>Description</title>
    <para>
  The trshift opcode takes an input containg a TRACKS pv streaming signal (as generated,
  for instance by partials) and shifts all frequencies by a k-rate frequency. It can also, optionally,
  scale the gain of the signal by a k-rate amount (default 1). The result is frequency shifting of
  the input tracks.
	      </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis>fsig <command>trshift</command> fin, kpshift[, kgain]</synopsis>
  </refsect1>

  <refsect1>
    <title>Performance</title>
	    <para>
      <emphasis>fsig</emphasis> -- output pv stream in TRACKS format
    </para>
	
    <para>
      <emphasis>fin</emphasis> -- input pv stream in TRACKS format
    </para>
    <para>
      <emphasis>kshift</emphasis> -- frequency shift in Hz
    </para>
    <para>
      <emphasis>kgain</emphasis> -- amplitude scaling (default 1)
    </para>
  <para>
    
  </para>    
    
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <para>
      <example>
        <title>Example</title>
        <programlisting>
ain inch 1                  ; input signal
fs1,fsi2 pvsifd ain,2048,512,1 ; ifd analysis
fst  partials fs1,fsi2,.003,1,3,500  ; partial tracking
fscl trshift  fst, 150 ; frequency shift (adds 150Hz to all tracks)
      aout  tradsyn fscl, 1, 1, 500, 1 ; resynthesis 
out aout
        </programlisting>
      </example>


    </para>
    
    <para>
The example above shows partial tracking of an ifd-analysis signal and
linear additive resynthesis with frequency shifting. 
    
    </para>
    
  </refsect1>
 
  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: &namevictor;</member>
        <member>February 2006 </member>
      </simplelist>
    </para>
    <para>New in Csound5.01</para>

  </refsect1>
</refentry>