Specifications

42 Pure Data Audio
*~ 64
tabread~ A
tabsend~ B
phasor~ 3000
dac~
*~ 0.1
B
A
fig 4.4: Table oscillator
kit1-01
loadbang
soundfiler
hip~ 5
r phase
vline~
kit1-02 kit1-03
kit1-04
r snum
tabread4~
;
snum set kit1-01;
phase 1, 4.41e+08 1e+07;
;
snum set kit1-02;
phase 1, 4.41e+08 1e+07;
;
snum set kit1-03;
phase 1, 4.41e+08 1e+07;
;
snum set kit1-04;
phase 1, 4.41e+08 1e+07;
dac~
*~ 0.5
read ./sounds/ttsnr.wav kit1-01, read ./sounds/jrsnr.wav
kit1-02, read ./sounds/dlsnr.wav kit1-03, read
./sounds/ezsnr.wav kit1-04
fig 4.5: Sample replay from arrays
array. The message boxes in Fig. 4.5 a llow a single object to play back from
more than one sample table. First the target array is given via a mes sage to
snum, and then a message is sent to phase which sets
vline~
moving up at 4410 0
samples p e r second. The arrays are initially loaded, using a multi-part message,
from a sounds folder in the current patch directory.
Audio line objects
For signal rate control data the
line~
object is useful. It is generally prog rammed
with a sequence of lists. Each list consists of a pair of numbers, the first being a
level to move to and the second number is the time in milliseconds to take getting
there. The range is usually between 1.0 and 0.0 when us e d as an audio control
signal, but it can be any value such as when using
line~
to index a table. A
more versatile line object is called
vline~
, which we will meet in much more detail
later. Among st its advantages are very accurate sub-millisecond timing and the
ability to read multi-segment lists in one go and to delay stages of movement.
Both these objects are essential for constructing envelope generators and other
control signals.