Crates.io | polyrhythm |
lib.rs | polyrhythm |
version | 0.1.1 |
source | src |
created_at | 2022-04-09 18:18:57.708831 |
updated_at | 2022-04-09 18:27:43.61185 |
description | Utilities for generating polyrhythms. |
homepage | https://github.com/bring-shrubbery/polyrhythm |
repository | https://github.com/bring-shrubbery/polyrhythm |
max_upload_size | |
id | 564831 |
size | 21,368 |
Generate polyrhythms in Rust.
fn get_polyrhythm(beats: &Vec<usize>) -> Option<Vec<Vec<usize>>>
Example usage:
let beats = vec![2, 3];
let result = get_polyrhythm(&beats);
// result:
// vec![
// vec![1, 0, 0, 1, 0, 0],
// vec![1, 0, 1, 0, 1, 0]
// ]