cyclesPer

A pattern measuring the duration of events, in cycles per event. cyclesPer doesn't have structure itself, but takes structure, and therefore event durations, from the pattern that it is combined with. For example cyclesPer.struct("1 1 [1 1] 1") would give the same as "0.25 0.25 [0.125 0.125] 0.25". See also its reciprocal, per, also known as perCycle.

// Shorter events are lower in pitch
sound("saw saw [saw saw] saw")
  .note(cyclesPer.range(50, 100))
sound("bd sd [bd bd] sd*4 [- sd] [bd [bd bd]]")
  .note(cyclesPer.add(20))
mentioned in (1)