Rhythmoffers a small collection of utility functions for describing rhythm. We adopt the same convention as Tonal.js for patterns. A pattern is a binary array (ones and zeros) where1represents a rhythmic event (a whack) and0represents a rest. Many of these functions are implemented by Tonal but collected here for convenience.
These functions reside within the Rhythm namespace.
| Function | Description | 
|---|---|
Arp(index) | 
Return one of 15 (0-14) predefined 16-step patterns. Used in synth arpeggiators. | 
Euclid(steps, beats) | 
Generates a Euclidian rhythm pattern. | 
Binary(a, ...) | 
Create a rhythm pattern from a number or concatenation of numbers in binary form. | 
Hex(a) | 
Create a rhythmic pattern using an hexadecimal numbers. | 
Random(length,threshold=.5) | 
Create a random rhythm pattern with a specified length. | 
Probability(thresholds) | 
Create a rhythm pattern based on the given probability thresholds. | 
Rotate(pattern, steps) | 
Circularly rotate a pattern right. |