use-key 0.0.1

Key signature metadata primitives for RustUse.
Documentation
  • Coverage
  • 2%
    1 out of 50 items documented1 out of 31 items with examples
  • Size
  • Source code size: 15.86 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.06 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-music
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-key

Key signature metadata primitives for RustUse.

Experimental

use-key is experimental while use-music remains below version 0.3.0.

Example

use use_key::{KeyMode, KeySignature};

let signature = KeySignature::new(1, KeyMode::Major)?;

assert!(signature.is_sharp_key());
assert_eq!(signature.accidental_count().value(), 1);
# Ok::<(), use_key::KeyError>(())

Scope

  • Key names, tonics, modes, key signatures, accidental counts, circle-of-fifths positions, and relative/parallel labels.
  • Accidental counts use negative values for flats and positive values for sharps.

Relationship to use-acoustics

use-music keeps symbolic music metadata separate from use-acoustics, which owns physical sound calculations such as frequency, wavelength, decibels, sound pressure, sound intensity, period, angular frequency, and speed-of-sound approximations.

Non-goals

  • Full tonal analysis, modulation analysis, generated harmony, or audio playback.

License

Licensed under either Apache-2.0 or MIT.