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. Patch 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 arithmetic expressions. Variables appear as $f1, $f2, and so on, corresponding to the object's inlets. Arithmetic expressions 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 $\mathrm{send}$ and $\mathrm{receive}$. An audio signal sent to a $\mathrm{send}\sim$ appears at the outlets of any and all $\mathrm{receive}\sim$ objects of the same name. Unlike $\mathrm{send}$ and $\mathrm{receive}$, you may not have more than one $\mathrm{send}\sim$ object with the same name (in that connection, see the $\mathrm{throw}\sim$ and $\mathrm{catch}\sim$ 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 $\mathrm{phasor}\sim$ object, and the second by adding 0.5 and wrapping, thereby subtracting 0.5 cycles ($\pi$ radians) from the phase. The two phase signals are each used, with the same range adjustments as before, to calculate indices into the wavetable and the $\mathrm{cos}\sim$ object, and to control the two $\mathrm{samphold}\sim$ objects. Finally, the outputs 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
msp 2003-08-09