Skip to main content

short_repr

Function short_repr 

Source
pub fn short_repr(
    at_end: bool,
    offset: &str,
    priority: &str,
    class_sort_order: &str,
    not_grace: bool,
    insert_index: &str,
) -> String
Expand description

A tuple written short, each part already written as Python writes it: 1.0 <0.20.323>, or End <4.7.[Grace].200> for a grace note stored at the end, whose offset is left out.

use music21::sorting::short_repr;

assert_eq!(short_repr(false, "1.0", "0", "20", true, "323"), "1.0 <0.20.323>");
assert_eq!(short_repr(true, "1.0", "4", "7", false, "200"), "End <4.7.[Grace].200>");