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 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 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 . We will introduce one object class here.
:
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 mosesobject so that only
successful pitch estimates (nonzero ones) are considered. These are converted
to units of frequency by the mtofobject. Finally, the frequency estimates
are either reduced by or else multiplied by 15, depending on the
selected multiplier, to provide the modulation frequency.