pvsinfo — Get information from a PVOC-EX formatted source.


Get format information about fsrc, whether created by an opcode such as pvsanal, or obtained from a PVOCEX file by pvsfread. This information is available at init time, and can be used to set parameters for other pvs opcodes, and in particular for creating function tables (e.g. for pvsftw), or setting the number of oscillators for pvsadsyn.


ioverlap, inumbins, iwinsize, iformat pvsinfo fsrc


ioverlap -- The stream overlap size.

inumbins -- The number of analysis bins (amplitude+frequency) in fsrc. The underlying FFT size is calculated as (inumbins -1) * 2.

iwinsize -- The analysis window size. May be larger than the FFT size.

iformat -- The analysis frame format. If fsrc is created by an opcode, iformat will always be 0, signifying amplitude+frequency. If fsrc is defined from a PVOC-EX file, iformat may also have the value 1 or 2 (amplitude+phase, complex).


Here is an example of the pvsinfo opcode. It uses the file pvsinfo.csd.

Example 825. Example of the pvsinfo opcode.

See the sections Real-time Audio and Command Line Flags for more information on using command line flags.

; Select audio/midi flags here according to platform
-odac  ;;;realtime audio out
;-iadc    ;;;uncomment -iadc if realtime audio input is needed too
; For Non-realtime ouput leave only the line below:
; -o pvsinfo.wav -W ;;; for file output any platform

sr = 44100
ksmps = 32
nchnls = 2
0dbfs  = 1

instr 1
; create a PVOC-EX (*.pvx) file with PVANAL first
idur filelen  "fox.pvx"		;find duration of analysis file
kpos line     0,p3,idur		;to ensure we process whole file
fsrc pvsfread kpos, "fox.pvx"	;create fsig from (mono) file

iovl,inb,iws,ifmt pvsinfo fsrc	;get info
print iovl,inb,iws,ifmt		;print info

aout pvsynth fsrc
     outs aout, aout


i 1 0 3

The example will produce the following output:

instr 1:  iovl = 256.000  inb = 513.000  iws = 2048.000  ifmt = 0.000


Author: Richard Dobson
August 2001

New in version 4.13