Function tune::scala::create_rank2_temperament_scale [−][src]
pub fn create_rank2_temperament_scale(
description: impl Into<Option<String>>,
generator: Ratio,
num_pos_generations: u16,
num_neg_generations: u16,
period: Ratio
) -> Result<Scl, SclBuildError>
Expand description
Creates a rank-2-temperament scale.
Examples
let pythagorean_major =
scala::create_rank2_temperament_scale(
None, Ratio::from_float(1.5), 5, 1, Ratio::octave(),
).unwrap();
assert_eq!(
format!("{}", pythagorean_major.export()).lines().collect::<Vec<_>>(),
["5 positive and 1 negative generations of generator 1.5000 (+702.0c) with period 2.0000",
"7", "203.910", "407.820", "498.045", "701.955", "905.865", "1109.775", "1200.000"]
);