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) 481 B
/** * Generates a Euclidean rhythm sequence. * @param steps The number of steps in the sequence. * @param notes The number of notes in the sequence. * @param rotation The rotation of the sequence (default: 0). * @returns An array of indices representing the Euclidean rhythm sequence. * @example * euclideanSequencer(8, 3, 1) * // Returns [1, 3, 6] */ export declare const euclideanSequencer: (steps: number, notes: number, rotation?: number) => Array<number>;