Rust implementation of “The Euclidean Algorithm Generates Traditional Musical Rhythms”.
Effectively a port of a python implementation, which is a port of the original paper's implementation.
Generating the bell pattern of Adowa: Mpre, traditional Ashanti music from Ghana.
rust
let mut pattern = [0 as u8; 12];
let pulses = 7;
euclidian_rythm(&mut pattern, pulses).unwrap();
println!("{:?}", pattern);
// [1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0]
Either of: