hapsi 0.0.3

A music theory package
Documentation
  • Coverage
  • 9.68%
    6 out of 62 items documented1 out of 8 items with examples
  • Size
  • Source code size: 33.07 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 8.44 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • zen-en-tonal/hapsi
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • zen-en-tonal

hapsi

A package that represents a musical concept.

Example

use hapsi::prelude::*;

let scale = Diatonic::major(&"C".parse().unwrap());
let scaled = Scaled::new(scale, Twelve);
let keyboard = Keyboard::new(scaled);
let mut tones = keyboard.class_iter();

assert_eq!(tones.next(), Some(&"C".parse().unwrap()));
assert_eq!(tones.next(), Some(&"D".parse().unwrap()));
assert_eq!(tones.next(), Some(&"E".parse().unwrap()));
assert_eq!(tones.next(), Some(&"F".parse().unwrap()));
assert_eq!(tones.next(), Some(&"G".parse().unwrap()));
assert_eq!(tones.next(), Some(&"A".parse().unwrap()));
assert_eq!(tones.next(), Some(&"B".parse().unwrap()));
assert_eq!(tones.next(), None);

WIP