Specifications

80 Pure Data essentials
bination of
==
and
select
with a number box attached to the cold inlet of
==
and the current time going to the left inlet.
Partitioning time
s time
timebase 60 4 0
moses 128
- 128
80
208
r time
moses 256
16
208
mod 64
select 0 16 32 48
127
fig 7.21: Bar offset by
partitioning time
For long musical compositions, interactive installations
or generating event structures for a long game or an-
imation you may want to offset timing sequences by
a large number but keep the relative timings within a
section. This is how bars and measures work in a tr adi-
tional sequencer . In Fig. 7.21
moses
is used to split the
global time into smaller frames of reference. A chain
of
moses
objects splits off numbers that fall within a
range. You can see that the last value present on the
left outlet of the first split was 127. Numbers of 128
or more are passing through the right outlet and into
the second
moses
which partitions values between 128
and 255 . We subtr act the base value o f 128 from this
stream to reposition it, as if it we re a sequence start-
ing at zero. This can be further processed, such as
wrapping it into the range 0 to 64 to create 2 bar s of 64 beats in the range 128
to 256. In Fig. 7.21 you see the timebase at 208, which is in the second bar of
the partitioned timeframe.
Dividing time
s time
timebase 60 4 0
r time
/ 2
change
change
/ 4
trigger f f
362
181
725
int
int
fig 7.22 : Divid-
ing time into different
rates
With time expressed as a number you can perform arith-
metic o n it to obtain different rates. Be aware that al-
though the value of numerical time changes with a differ-
ent scale it still updates at the rate set by the timebase.
Since for musical purposes you want to express time in
whole beats and bars a problem is presented. Dividing
time by two and rounding it to an inte ger means two mes-
sages will now be sent with the same value. To get around
this problem
change
is used so that redundant messages are
eliminated. Using
int
means values are rounded to the
time floor, so if rhythms constructed this way seem one
beat out of alignment you can try using a “closest integer”
rounding explained earlier. Sometimes rounding time is not what you want as
shown in the next example.
Event synchronised LFO
An application and pitfall of timebase division is shown in Fig. 7.23 where low
frequency control signals ar e derived from the timebase. Notice how the sine
wave is not interpo lated, so you get two or four consecutive equal values when
using a divided timebase. This makes the LFO jumpy so to avoid it we scale
the raw time values befo re the trig ope ration using a higher
mod
and
/
. It