Next: MIDI-style synthesizer Up: Examples Previous: Signals to controls Contents Index

## Analog-style sequencer

Example C08.analog.sequencer.pd (Figure 3.15) realizes the analog sequencer and envelope generation described in Section 3.7. The "sequence" table, with nine elements, holds a sequence of frequencies. The `phasor~` object at top cycles through the sequence table at 0.6 Hertz. Non-interpolating table lookup (`tabread~` instead of `tabread4~`) is used to read the frequencies in discrete steps. (Such situations, in which we prefer non-interpolating table lookup, are rare.)

Figure 3.15: An analog-synthesizer-style sequencer.

The `wrap~` object converts the amplitude-9 sawtooth to a unit-amplitude one as described earlier in Figure 3.8, which is then used to obtain an envelope function from a second wavetable. This is used to control grain size in a looping sampler (from Section 2.6). Here the wavetable consists of six periods of a sinusoid. The grains are smoothed by multiplying by a raised cosine function (`cos~` and `+ 1`).

Example C09.sample.hold.pd (not pictured here) shows a sample-and-hold unit, another useful device for doing control tasks in the audio signal domain.

Next: MIDI-style synthesizer Up: Examples Previous: Signals to controls Contents Index