pvstrace Spectral Processing:Streaming pvstrace pvstrace Retain only the N loudest bins. Description Process a PV stream by retaining only the N bins with the highest amplitude, zeroing the others. Syntax fsig pvstrace fsigin, kn fsig, kBins[] pvstrace fsigin, kn[, isort, imin, imax] 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 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. Example of the <emphasis>pvstrace</emphasis> opcode. See the sections Real-time Audio and Command Line Flags for more information on using command line flags. See also Tools for Real-time Spectral Processing (pvs opcodes) Credits Author: &namevictor; 2017 New plugin in version 6.09