use-note 0.0.1

Musical note spelling metadata primitives for RustUse.
Documentation
  • Coverage
  • 2.08%
    1 out of 48 items documented1 out of 22 items with examples
  • Size
  • Source code size: 12.91 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 941.69 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 4s 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-note

Musical note spelling metadata primitives for RustUse.

Experimental

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

Example

use use_note::{Accidental, NoteLetter, NoteName, Octave};

let note = NoteName::new("C#4")?;
let octave = Octave::new(4)?;

assert_eq!(note.as_str(), "C#4");
assert_eq!(note.letter(), NoteLetter::C);
assert_eq!(note.accidental(), Accidental::Sharp);
assert_eq!(note.octave(), Some(octave));
# Ok::<(), use_note::NoteError>(())

Scope

  • Note letters, accidentals, octave values, note names, note spellings, and scientific pitch notation.
  • Lightweight parsing for common spellings such as C, C#, Db, F##, Gbb, A4, and C#4.

Relationship to use-acoustics

use-note models symbolic note spellings only. Physical frequency and sound calculations belong in use-acoustics and wave behavior belongs in use-wave.

Non-goals

  • Calculating frequency, wavelength, pitch detection, audio playback, MIDI I/O, or synthesis.

License

Licensed under either Apache-2.0 or MIT.