pvscross
Performs cross-synthesis between two source fsigs.
Syntax
Performance
For each bin, the output adds the amplitude from fsrc scaled by abs(kamp1) to the amplitude from fdest scaled by abs(kamp2). It keeps the frequency from fsrc. For amplitude+phase input, it keeps the phase from fsrc instead. Unlike pvcross, it reads f-signals and does not preserve the spectral envelope.
kamp1 and kamp2 use their absolute values: negative gains act like positive gains. Values above 1 amplify the input; gains are not clipped to 1. Use values between 0 and 1 for a crossfade.
Both inputs must use amplitude+frequency (format 0) or amplitude+phase (format 1), with matching FFT size, hop size, window size, window type, format and sliding mode. Complex frames and partial tracks are not supported. Use pvsanal to generate inputs from real-time audio.
For ordinary analysis frames, the output updates when fsrc supplies a new frame, using the latest frame from fdest. Sliding signals process each active sample in the control block. Samples before the note starts or after it ends have zero output.
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
Here is an example of the use of the pvscross opcode. It uses the file pvscross.csd.
See also
Tools for Real-time Spectral Processing (pvs opcodes)
Credits
Author: Richard Dobson
August 2001
November 2003. Thanks to Kanata Motohashi, fixed the link to the pvcross opcode.
New in version 4.13