Skip to main content

integer_ticks

Function integer_ticks 

Source
pub fn integer_ticks(data: &[FloatType], steps: i64) -> Vec<i64>
Expand description

Ticks for a count from nought to the most of data, about steps apart: music21’s Graph.setIntegerTicksFromData.

use music21::graph::primitives::integer_ticks;

assert_eq!(integer_ticks(&[10.0, 5.0, 3.0, 8.0, 20.0, 11.0], 4), vec![0, 5, 10, 15, 20]);