#exploring #music #pitch #back #johnston #intonation #lattices

app johnston-cli

A utility for exploring just intonation

1 unstable release

0.4.0 Sep 6, 2021

#5 in #exploring

23 downloads per month

Custom license

21KB
475 lines

Johnston

ci build Crates.io

A library for working with JI pitch lattices. Very much a work in-progess.

Started in Common Lisp, then Clojure and back. old repo

Example

Generate a lattice

use johnston::{lattice::LatticeDimension, pitch::Pitch};

fn main() {
    let pitch = Pitch::new((5, 4));
    let lattice_dimension = LatticeDimension::new(pitch);
    let notes = lattice_dimension.take(6);
	
    for note in notes {
        println!("{:?}", note);
    }
}
Pitch { cents: 386.3137, ratio: Ratio { numerator: 5, denominator: 4 }, limit: 5, ordinal: Otonal }
Pitch { cents: 772.6274, ratio: Ratio { numerator: 25, denominator: 16 }, limit: 5, ordinal: Otonal }
Pitch { cents: 1158.9412, ratio: Ratio { numerator: 125, denominator: 64 }, limit: 5, ordinal: Otonal }
Pitch { cents: 345.25482, ratio: Ratio { numerator: 625, denominator: 512 }, limit: 5, ordinal: Otonal }
Pitch { cents: 731.56854, ratio: Ratio { numerator: 3125, denominator: 2048 }, limit: 5, ordinal: Otonal }
Pitch { cents: 1117.8822, ratio: Ratio { numerator: 15625, denominator: 8192 }, limit: 5, ordinal: Otonal }

Dependencies

~4.5MB
~81K SLoC