|
|
|
|
fr pvsfread ktimpnt, ifilcod[,ichan]
Create an fsig stream by reading a selected channel from a PVOC-EX analysis file loaded into memory.
ifilcod – name of the analysis file, in double quotes. This must have the .pvx file extension. A multi-channel PVOC-EX file can be generated using the extended pvanal utility.
ichan – the channel to read (counting from 0). Default is 0.
ktimpnt – time to read through PVOC-EX analysis file, in seconds. ktimpnt must always be positive, but can move forwards or backwards in time, be stationary or discontinuous, as a pointer into the analysis file.
pvsfread creates an fsig stream by reading a selected channel from a PVOC-EX analysis file loaded into memory (ifilcod), with frame interpolation. Only format 0 files (amplitude + frequency) are currently supported. The operation of this opcode mirrors that of pvoc, but outputs an fsig instead of a resynthesized signal.
Note that analysis files can be very large, especially if multichannel. Reading such files into memory will very likely incur breaks in the audio during real-time performance. As the file is read only once, and is then available to all other interested opcodes, it may be advantageous to preload a large analysis filesat startup, using a dedicated instrument.
idur filelen "test.pvx" ; find dur of (stereo) analysis file kpos line 0, p3, idur ; to ensure we process whole file fsigr pvsfread kpos, "test.pvx", 1 ; create fsig from R channel
Note: As this example shows, the filelen opcode has been extended to accept both old and new analysis file formats.
Richard Dobson
Somerset, England
August, 2001
New in Csound 4.14
|
|
|
|