pvsoscSpectral Processing:Streamingpvsoscpvsosc
PVS-based oscillator simulator.
Description
Generates periodic signal spectra in AMP-FREQ format, with the option of four wave types:
sawtooth-like (harmonic weight 1/n, where n is partial number)square-like (similar to 1., but only odd partials)pulse (all harmonics with same weight)cosine
Complex waveforms (ie. all types except cosine) contain all harmonics up to the Nyquist. This makes pvsosc an option for generation of band-limited periodic waves. In addition, types can be changed using a k-rate variable.
Syntaxfsig pvsosc kamp, kfreq, ktype, isize [,ioverlap] [, iwinsize] [, iwintype] [, iformat]Initialisationfsig -- output pv stream set to zero.
isize -- size of analysis frame and window.
ioverlap -- (Optional) size of overlap, defaults to isize/4.
iwinsize -- (Optional) window size, defaults to isize.
iwintype -- (Optional) window type, defaults to Hanning. The choices are currently:
0 = Hamming window1 = von Hann windowiformat -- (Optional) data format, defaults to 0 which produces AMP:FREQ data. That is currently the only option.
Performancekamp -- signal amplitude. Note that the actual signal amplitude can,
depending on wave type and frequency, vary slightly above or below this value. Generally
the amplitude will tend to exceed kamp on higher frequencies (> 1000 Hz) and be reduced on
lower ones. Also due to the overlap-add process, when resynthesing with pvsynth, frequency
glides will cause the output amplitude to fluctuate above and below kamp.
kfreq -- fundamental frequency in Hz.
ktype -- wave type: 1. sawtooh-like, 2.square-like, 3.pulse and any other
value for cosine.
Examples
Here is an example of the pvsosc opcode. It uses the file pvsosc.csd.
Example of the pvsosc opcodeSee 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;August 2006