hapsi

Crates.iohapsi
lib.rshapsi
version0.0.3
sourcesrc
created_at2023-08-26 09:01:37.179136
updated_at2023-08-30 10:39:16.513432
descriptionA music theory package
homepage
repositoryhttps://github.com/zen-en-tonal/hapsi
max_upload_size
id955421
size33,164
Takeru KODAMA (zen-en-tonal)

documentation

README

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

Commit count: 28

cargo fmt