pvread

pvread — Reads from a phase vocoder analysis file and returns the frequency and amplitude from a single analysis channel or bin.

Description

pvread reads from a pvoc file and returns the frequency and amplitude from a single analysis channel or bin. The returned values can be used anywhere else in the Csound instrument. For example, one can use them as arguments to an oscillator to synthesize a single component from an analyzed signal or a bank of pvreads can be used to resynthesize the analyzed sound using additive synthesis by passing the frequency and magnitude values to a bank of oscillators.

Syntax

kfreq, kamp pvread ktimpnt, ifile, ibin

Initialization

ifile -- the pvoc number (n in pvoc.n) or the name in quotes of the analysis file made using pvanal. (See pvoc.)

ibin -- the number of the analysis channel from which to return frequency in Hz and magnitude.

Performance

kfreq, kamp -- outputs of the pvread unit. These values, retrieved from a phase vocoder analysis file, represent the values of frequency and amplitude from a single analysis channel specified in the ibin argument. Interpolation between analysis frames is performed at k-rate resolution and dependent of course upon the rate and direction of ktimpnt.

ktimpnt -- the passage of time, in seconds, through this file. ktimpnt must always be positive, but can move forwards or backwards in time, be stationary or discontinuous, as a pointer into the analysis file.

Examples

The example below shows the use pvread to synthesize a single component from a phase vocoder analysis file. It should be noted that the kfreq and kamp outputs can be used for any kind of synthesis, filtering, processing, and so on.

ktime         line    0, p3, 3 
kfreq, kamp   pvread  ktime, "pvoc.file", 7 ; read
                                      ;data from 7th analysis bin.  
asig          oscili  kamp, kfreq, 1  ; function 1
                                      ;is a stored sine
        

See Also

pvbufread, pvcross, pvinterp, tableseg, tablexseg

Credits

Author: Richard Karpen
Seattle, Wash
1997

New in version 3.44