UNPKG

data-fns

Version:

This library provides utility functions for working with array data that are useful in many contexts, including creative coding. It offers generic functions that perform common operations such as offsetting an array, generating an array based on a callbac

12 lines (11 loc) 540 B
/** * Generates a sequence of indices representing the "silences" (i.e. rests) in a Euclidean rhythm. * @param steps The number of steps in the rhythm. * @param notes The number of notes in the rhythm. * @param rotation The rotation of the rhythm (default: 0). * @returns An array of indices representing the silences in the Euclidean rhythm. * @example * euclideanSilences(8, 3) * // Returns [1, 3, 4, 6, 7] */ export declare const euclideanSilences: (steps: number, notes: number, rotation?: number) => Array<number>;