next up previous contents index
Next: Automatic read point precession Up: Examples Previous: Looping samplers   Contents   Index

Overlapping sample looper

As described in Section 2.3, it is sometimes desirable to use two or more overlapping looping samplers to produce a reasonably continuous sound without having to envelope too sharply at the ends of the loop. This is especially likely in situations where the chunk that is looped is short, a tenth of a second or less. Example B10.sampler.overlap.pd, shown in Figure 2.16 (part a), realizes two looping samplers a half-cycle out of phase from each other. New object classes are:

Figure 2.16: (a) two overlapped looping samplers (B10.sampler.overlap.pd); (b) the same, but with a phasor-controlled read point (B11.sampler.rockafella.pd).
\begin{figure}\psfig{file=figs/fig02.16.ps}\end{figure}


\fbox{ $\mathrm{loadbang}$\ }: output a ``bang" message on load. This is used in this patch to make sure the division of transposition by chunk size will have a valid transposition factor in case ``chunk size" is moused on first.


\fbox{ $\mathrm{expr}$\ }: evaluate mathematical expressions. Variables appear as $f1, $f2, and so on, corresponding to the object's inlets. Arithmetic operations are allowed, with parentheses for grouping, and many library functions are supplied, such as exponentiation, which shows up in this example as ``pow" (the power function).


\fbox{$\mathrm{wrap}\sim$}: wrap to the interval from 0 to 1. So, for instance, 1.2 becomes 0.2; 0.5 remains unchanged; and -0.6 goes to 0.4.


\fbox{ $\mathrm{send}\sim$\ }, \fbox{ $\mathrm{s}\sim$\ }: \fbox{ $\mathrm{receive}\sim$\ }, \fbox{ $\mathrm{r}\sim$\ }: signal versions of send and receive. An audio signal sent to a send~ object appears at the outlets of any and all receive~ objects of the same name. Unlike send and receive, you may not have more than one send~ object with the same name (in that connection, see the throw~ and catch~ objects).

In the example, part of the wavetable reading machinery is duplicated, using identical calculations of ``chunk-size-samples" (a message stream) and ``read-pt" (an audio signal smoothed as before). However, the ``phase" audio signal, in the other copy, is replaced by ``phase2". The top part of the figure shows the calculation of the two phase signals: the first one as the output of a phasor~ object, and the second by adding 0.5 and wrapping, thereby adding 0.5 cycles ($\pi $ radians) to the phase. The two phase signals are each used, with the same range adjustments as before, to calculate indices into the wavetable and the cos~ object, and to control the two samphold~ objects. Finally, the results of the two copies are added for output.


next up previous contents index
Next: Automatic read point precession Up: Examples Previous: Looping samplers   Contents   Index
Miller Puckette 2006-09-24