pvsarp — Arpeggiate the spectral components of a streaming pv signal.
This opcode arpeggiates spectral components, by amplifying one bin and attenuating all the others around it. Used with an LFO it will provide a spectral arpeggiator similar to Trevor Wishart's CDP program specarp.
fsig -- output pv stream
fsigin -- input pv stream
kbin -- target bin, normalised 0 - 1 (0Hz - Nyquist).
kdepth -- depth of attenuation of surrounding bins
kgain -- gain boost applied to target bin
![]() |
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. |
Example 296. Example
asig in ; get the signal in fsig pvsanal asig, 1024, 256, 1024, 1 ; analyse it kbin oscili 0.1, 0.5, 1 ; ftable 1 in the 0-1 range ftps pvsarp fsig, kbin+0.01, 0, 2 ; arpeggiate it (range 220.5 - 2425.5) atps pvsynth ftps ; synthesise it out atps
The example above shows a spectral arpeggiator working in the 220.5 - 2425.5 range (sr=44100). The LFO outputs a positive-only signal, so its ftable will be defined in the 0 - 1 range (a hanning window can be used, for instance).