pvsfilter

pvsfilter — Multiply amplitudes of a pvoc stream by those of a second pvoc stream, with dynamic scaling.

Description

Multiply amplitudes of a pvoc stream by those of a second pvoc stream, with dynamic scaling.

Syntax

fsig pvsfilter fsigin, fsigfil, kdepth[, igain]

Performance

fsig -- output pv stream

fsigin -- input pv stream.

fsigfil -- filtering pvoc stream.

kdepth -- controls the depth of filtering of fsigin by fsigfil .

igain -- amplitude scaling (optional, defaults to 1).

Here the input pvoc stream amplitudes are modified by the filtering stream, keeping its frequencies intact. As usual, both signals have to be in the same format.

[Warning] Warning

It is unsafe to use the same f-variable for both input and output of pvs opcodes. Using the same one might lead to undefined behavior on some opcodes. Use a different one on the left and right sides of the opcode.

Examples

Example 357. Example

kfreq  expon 500, p3, 4000           ; 3-octave sweep
kdepth linseg 1, p3/2, 0.5, p3/2, 1  ; varying filter depth

asig  in                             ; input
afil  oscili  1, kfreq, 1            ; filter t-domain signal

fim   pvsanal  asig,1024,256,1024,0  ; pvoc analysis
fil   pvsanal  afil,1024,256,1024,0  
fou   pvsfilter fim, fil, kdepth     ; filter signal
aout  pvsynth  fou                   ; pvoc synthesis
        


In the example above the filter curve will depend on the spectral envelope of afil; in the simple case of a sinusoid, it will be equivalent to a narrowband band-pass filter.

Credits

Author: Victor Lazzarini;
November 2004

New plugin in version 5

November 2004.