I have added two new streaming pv opcodes to csound5 CVS,
which will be included in the upcoming (5.02) binary release next
week. For those of you using cvs, you can check them out straight
away.
The opcodes are pvsfreeze, which, as requested on this list, freezes
the spectral evolution of an input, and pvsmooth, which smooths
the amp & freq spectral functions over time.
Here’s the summary:
===================================================
pvsfreeze
This opcodes ‘freezes’ the evolution of pvs stream by locking into steady
amplitude and/or
frequency values for each bin. The freezing is controlled, independently
for amplitudes and
frequencies, by a control-rate trigger, which switches the freezing ‘on’ if
equal to or above
1 and ‘off’ if below 1.
fsig pvsfreeze fsigin, kfreeza, kfreezf
fsig — output pv stream
fsigin — input pv stream.
kfreeza — freezing switch for amplitudes. Freezing is on if above or
equal to 1 and off if below 1.
kfcf — freezing switch for frequencies. Freezing is on if above or
equal to 1 and off if below 1.
========================================================
pvsmooth
Smooth the amplitude and frequency time functions of a pv stream using a
1st order
lowpass IIR with time-varying cutoff frequency. This opcode uses the same
filter
as the ‘tone’ opcode, but this time acting separately on the amplitude and
frequency
time functions that make up a pv stream. The cutoff frequency parameter
runs at the
control-rate, but unlike tone and tonek, it is not specified in Hz, but as
fractions
of 1/2 frame-rate (actually the pv stream sampling rate), which is easier to
understand. This means that the highest cutoff frequency is 1 and the
lowest 0; the lower
the frequency the smoother the functions and more pronounced the effect
will be. This
opcode produces effects that are more or less similar to pvsblur, but with
two important
differences: 1.smoothing of amplitudes and frequencies use separate sets of
filters; and 2. there is
no increase in computational cost when higher amounts of ‘blurring’
(smoothing) are desired.
fsig pvsmooth fsigin, kacf, kfcf
fsig — output pv stream
fsigin — input pv stream.
kacf — amount of cutoff frequency for amplitude function filtering,
between 0 and 1,
in fractions of 1/2 frame-rate.
kfcf — amount of cutoff frequency for frequency function filtering,
between 0 and 1,
in fractions of 1/2 frame-rate.
Victor Lazzarini
Music Technology Laboratory
Music Department
National University of Ireland, Maynooth
—