pvstrace
Process a PV stream by retaining only the N bins with the highest amplitude, zeroing the others.
Syntax
Initialization
isort -- if nonzero, sort the reported bins in kBins by decreasing amplitude, optional (default 0, off).
imin, imax -- if nonzero, search between a min and max value (default 0, no min or max).
Performance
fsig -- output pv stream
kBins[] -- an array of size fftsize/2 + 1 values, whose first N values report the kn bin numbers retained by pvstrace. Other locations are set to 0. It can be sorted or unsorted.
fsigin -- input pv stream
kn -- number of bins to be retained
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 pvstrace opcode. It uses the file pvstrace.csd.
See also
Tools for Real-time Spectral Processing (pvs opcodes)
Credits
Author: Victor Lazzarini
2017
New plugin in version 6.09