DERF wrote:In this code the "center" correspond to 100, the "bandwith" to 20 and "n" to 2. It is right?
Yes that's correct.
DERF wrote:why to note in a so complicated way the value of the "center"?
Code: Select all
;control f "medium frequency" int "[Hz]" 1000 100 4000
;control fl "lfo frequency" real "[Hz]" 1 0.1 5
(reson s (sum f (mult f 0.5 (lfo fl)))(/ f 2.0) 2)
The centre of this reson filter is defined by
(sum f (mult f 0.5 (lfo fl)))
Note the expression (lfo fl)
http://www.cs.cmu.edu/~rbd/doc/nyquist/ ... l#index337
(lfo fl) is a low frequency oscillator. It produces a low frequency sine wave, the frequency of which is set by "fl".
The amplitude of lfo is between 1.0 and -1.0
Try running this:
Code: Select all
(force-srate *sound-srate*
(lfo 3))
LFO generates a sine wave at 3 Hz. FORCE-SRATE is used to force the sample rate of the sine wave to match the audio track sample rate (LFO would normally generate the sine wave at the "control rate", which is 1/20th of the sound sample rate.
So, let's say that "f" = 100 and "fl" = 1.0
(lfo fl) will produce a sine wave, amplitude +/- 1.0 with a frequency of 1.0 Hz.
(mult 100 0.5 (lfo fl)) will produce a sine wave with an amplitude +/- 50.0
(sum 100 (mult 100 0.5 (lfo fl))) will produce a sine wave with an amplitude +50 to +150.
Thus we have a control signal that rises and falls at 1 cycle per second (1 Hz) between +50 and +150 (the average value is thus 100, which is the value "f").
We then use this control signal to set the centre frequency of the "reson" filter. So the filter does not have a fixed frequency, but has a frequency that rises and falls cyclically at a rate set by "fl" and with an average centre frequency of "f".