QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Next 

pvadd

    a2   pvadd        ktimpnt, kfmod, ifile, ifn, ibins [, ibinoffset,
                        ibinincr]

DESCRIPTION

pvadd reads from a pvoc file and uses the data to perform additive synthesis using an internal array of interpolating oscillators. The user supplies the wave table (usually one period of a sine wave), and can choose which analysis bins will be used in the re-synthesis.
 

INITIALISATION

ifn is the table number of a stored function containing a sine wave.

ibins is the number of bins that will be used in the resynthesis (each bin counts as one oscillator in the re-synthesis).

ibinoffset is the first bin used (it is optional and defaults to 0).

ifile is used in the same way as in pvoc.

ibinincr sets an increment by which pvadd counts up from ibinoffset for ibins components in the re-synthesis (see below for a further explanation).

PERFORMANCE

ktimpnt, kfmod are also used in the way as in pvoc
 
 

EXAMPLE:

    ktime   line    0, p3, p3
    asig    pvadd   ktime, 1, "oboe.pvoc", 1, 100, 2
 

In the above, ibins is 100 and ibinoffset is 2. Using these settings the resynthesis will contain 100 components beginning with bin #2  (bins are counted starting with 0). That is, resynthesis will be done using bins 2-101 inclusive. It is usually a good idea to begin with  bin 1 or 2 since the 0th and often 1st bin have data that is neither necessary nor even helpful for creating good clean resynthesis.
 

    ktime   line   0, p3, p3
    asig    pvadd  ktime, 1, "oboe.pvoc", 1,100, 2, 2
 

The above is the same as the previous example with the addition of  the value 2 used for the optional ibinincr argument. This result will  still result in 100 components in the resynthesis, but pvadd will  count through the bins by 2 instead of by 1. It will use bins 2, 4,  6, 8, 10, and so on. For ibins=10, ibinoffset=10, and ibinincr=10,  pvadd would use bins 10, 20, 30, 40, up to and including 100.

USEFUL HINTS:

By using several pvadd units together, one can gradually fade in  different parts of the resynthesis, creating various "filtering"  effects. The author uses pvadd to synthesise one bin at a time to have  control over each separate component of the re-synthesis.

If any combination of ibins, ibinoffset, and ibinincr, creates a  situation where pvadd is asked to used a bin number greater than the  number of bins in the analysis, it will just use all of the available  bins and give no complain.  So to use every bin just make ibins a big  number (ie. 2000).

Expect to have to scale up the amplitudes by factors of 10-100 by the  way.
 

AUTHOR:

Richard Karpen
Seattle, Wash.
1998
 
 

QUICK-REF - CsoundManual - Top of this section - Previous - Contents - Index - Next 
HTML Csound Manual - © Jean Piché & Peter J. Nix, 1994-97