next up previous contents index
Next: Waveshaping and difference tones Up: Examples Previous: Ring modulation and spectra   Contents   Index


Octave divider and formant adder

As suggested in Section 5.2, when considering the result of modulating a complex harmonic (i.e., periodic) signal by a sinusoid, an interesting special case is to set the modulating oscillator to $1/2$ the fundamental frequency, which drops the resulting sound an octave with only a relatively small deformation of the spectral envelope. Another is to modulate by a sinusoid at several times the fundamental frequency, which in effect displaces the spectral envelope without changing the fundamental frequency of the result. This is demonstrated in Patch E03.octave.divider.pd(Figure 5.10). The signal we process here is a recorded, spoken voice.

Figure 5.10: Lowering the pitch of a sound by an octave by determinating its pitch and modulating at half the fundamental.
\begin{figure}\psfig{file=figs/fig05.10.ps}\end{figure}

The subpatches pd looper and pd delay hide details. The first is a looping sampler as introduced in Chapter 2. The second is a delay of 1024 samples, which uses objects that are introduced later in Chapter 7. We will introduce one object class here.


\fbox{ \texttt{fiddle\~}}: pitch tracker. The one inlet takes a signal to analyze, and messages to change settings. Depending on its creation arguments fiddle~may have a variable number of outlets offering various information about the input signal. As shown here, with only one creation argument to specify window size, the third outlet attempts to report the pitch of the input, and the amplitude of that portion of the input which repeats (at least approximately) at the reported pitch. These are reported as a list of two numbers. The pitch, which is in MIDI units, is reported as zero if none could be identified.

In this patch the third outlet is unpacked into its pitch and amplitude components, and the pitch component is filtered by the moses object so that only successful pitch estimates (nonzero ones) are considered. These are converted to units of frequency by the mtof object. Finally, the frequency estimates are either reduced by $1/2$ or else multiplied by 15, depending on the selected multiplier, to provide the modulation frequency. In the first case we get an octave divider, and in the second, additional high harmonics that deform the vowels.


next up previous contents index
Next: Waveshaping and difference tones Up: Examples Previous: Ring modulation and spectra   Contents   Index
Miller Puckette 2006-03-03