home/ atoms/ strudel-ply-segment-event-density

ply subdivides each event into n repeats; segment resamples the whole pattern at n events per cycle

ply(n) repeats each event n times inside its own slot, subdividing that event’s duration — a single hit becomes n faster hits — while segment(n) (alias seg) samples the whole pattern at n equally spaced points per cycle, turning a continuous pattern into a discrete one. The distinction: ply acts on individual events; segment samples the pattern as a whole. Typical uses are ply("1 2 4") for variable subdivision rolls and velocity(rand).segment(16) for a stepped random control signal.

Examples

s(“bd sd”).ply(2) // bd bd sd sd note(sine).segment(16) // 16-step staircase from a sine velocity(rand).segment(8) // 8 random velocity steps per cycle

Assessment

For s("bd cp").ply(3), how many hits play per cycle and what are their durations? Then use segment(4) to turn a sine into four discrete steps.

“The ply function repeats each event the given number of times.”