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
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 at a time 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.
See Also
Short-time Fourier Transform (STFT) Resynthesis
Credits
Author: Richard Karpen
Seattle, Wash
1997
New in version 3.44