pub fn measure_ticks(
marks: &[MeasureMark],
min: FloatType,
max: FloatType,
span: MeasureSpan,
) -> Result<Vec<(FloatType, String)>>Expand description
The measure ticks of an offset axis, of the measures starting from
min to max: music21’s OffsetAxis._measureTicks.
use music21::graph::axis::{MeasureMark, MeasureSpan, measure_ticks};
let marks: Vec<MeasureMark> = (0..9)
.map(|n| MeasureMark { offset: f64::from(n) * 4.0, number: n.to_string(), strong: false })
.collect();
let ticks = measure_ticks(&marks, 0.0, 32.0, MeasureSpan::Ends)?;
assert_eq!(ticks, vec![(0.0, "0".to_string()), (32.0, "8".to_string())]);§Errors
No measure starting in the range, or a span that leaves no room for any more ticks.