Skip to main content

slash_compound_to_fraction

Function slash_compound_to_fraction 

Source
pub fn slash_compound_to_fraction(
    value: &str,
) -> Vec<(UnsignedIntegerType, UnsignedIntegerType)>
Expand description

A compound meter as the ratio of each of its parts, leaving out a part that is not one: music21’s slashCompoundToFraction.

use music21::meter::tools::slash_compound_to_fraction;

assert_eq!(slash_compound_to_fraction("3/8+2/4"), [(3, 8), (2, 4)]);