Bruno Ruviaro edited Panning.tex  almost 10 years ago

Commit id: ee0ea2ecfbd10f308d10d76d61d7aa44e0dd99cd

deletions | additions      

       

\item What part of the code is controlling the rhythm?  \end{enumerate}  Answers are at the end.\footnote{(a) below.\footnote{(a)  The variable \texttt{lfn} simply holds a \texttt{LFNoise2}. The role of \texttt{LFNoise2} in life is to generate a new random number every second (between -1 and +1), and slide to it from the previous random number (differently from \texttt{LFNoise0}, that jumps to the new number immediately). The first use of this variable \texttt{lfn} is in the \texttt{freq} argument of the BPF: \texttt{lfn.range(500, 2500)}. This takes the numbers between -1 and +1 and scales them to the range 500-2500. These numbers are then used as the center frequency of the filter. These frequencies are the pitches that we hear sliding up and down. Finally, \texttt{lfn} is used again to control the position of the panner \texttt{Pan2}. It is used directly (without a \texttt{.range} message) because the numbers are already in the range we want (-1 to +1). The nice result of this is that we couple the change of frequency with the change of position. How? Every second, \texttt{LFNoise2} starts to slide toward a new random number, and this becomes a synchronized change in frequency of the filter and panning position. If we had two different \texttt{LFNoise2} in each place, the changes would be uncorrelated (which might be fine too, but it's a different aural result). \\ (b) a \texttt{mul:} of 1 would just be too soft. Because the filter is so sharp, it takes so much out of the original signal that the amplitude drops too much. We need to boost the signal back to a reasonably audible range, so that's why we have \texttt{mul: 20} at the end of the \texttt{BPF} line. \\  (c) The rhythm is driven by the \texttt{LFPulse} that is the \texttt{mul:} argument of the \texttt{Saw}. \texttt{LFPulse} frequency (how many pulses per second) is controlled by an \texttt{LFNoise1} that produces numbers between 1 and 10 (interpolating between them). Those numbers are the ``how many notes per second'' of this patch.   }