pvsbufread2Spectral Processing:Streamingpvsbufread2pvsbufread2
This opcode reads a circular buffer of f-signals (streaming PV signals), with binwise additional delays.
Description
This opcode reads from a circular buffer of length ilen (secs),
taking a handle for the buffer and a time pointer, which holds the
current read position (also in seconds). It is used in conjunction with a pvsbuffer opocde.
Reading is circular, wrapping around at the end of the buffer. Extra delay times are taken from
a function table, with each point on it defining a delay time in seconds affecting the corresponding bin.
Syntaxfsig pvsbufread2 ktime, khandle, ift1, ift2 Initializationift1 -- function table with at least fftisze/2+1 points where delays (in secs) for bin amplitudes are
set (function table positions are equivalent to bin numbers)
ift2 -- function table with at least fftisze/2+1 points where delays (in secs) for bin frequencies are
set (function table positions are equivalent to bin numbers)
Performancefsig -- output pv stream
ktime -- time position of reading pointer (in secs).
khandle -- handle identifying the buffer to be read. When using k-rate
handles, it is important to initialise the k-rate variable to a given existing handle. When changing
buffers, fsig buffers need to be compatible (same fsig format).
With this opcode and pvsbuffer, it is possible to, among other things:
time-stretch/compress a fsig stream, by reading it at
different ratesdelay a fsig or portions of it.'brassage' two or more fsigs by switching buffers, since
the reading handles are k-rate. Note that, when using k-rate
handles, it is important to initialise the k-rate variable to a
given handle (so that the fsig initialisation can take place)
and it is only possible to switch handles between compatible
fsig buffers (with the same fftsize and overlap).
It is important that the handle value passed to pvsbufread2 is valid and was created by pvsbuffer. Csound will crash with invalid handles.
Examples
Here is an example of the pvsbufread2 opcode. It uses the file pvsbufread2.csd.
Example of the pvsbufread2 opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.See alsoTools for Real-time Spectral Processing (pvs opcodes)CreditsAuthor: &namevictor;July 2011