Pstep is a "sample and hold" pattern: The value returned by next
is held at each value in levels
for the corresponding duration in durs
. This cycling is similar to Ptuple, in that the current repeat ends when eiher pattern returns nil.
Pstep measures elapsed time using the thread's logical time. That is, it assumes it will be evaluated only exactly when needed, not before.
See Pseg for a pattern whose value changes like an Env.
Create an instance of Pstep.
levels |
A number, collection, or Pattern that returns the levels. |
durs |
A number, collection, or Pattern that returns segments durations in beats. |
repeats |
An integer, or |