Skip to main content

abc_clef_for_pitches

Function abc_clef_for_pitches 

Source
pub fn abc_clef_for_pitches(pitches: &[Pitch]) -> AbcClef
Expand description

Chooses a compact treble or bass clef for the supplied pitches.

The heuristic favors bass clef when the average MIDI number is below middle C or any pitch is below C3.