libkeynotation

Crates.iolibkeynotation
lib.rslibkeynotation
version0.2.0
sourcesrc
created_at2023-11-30 14:35:59.299291
updated_at2024-01-26 03:06:18.453302
descriptionA (musical) key notation parser and transposer
homepage
repositoryhttps://codeberg.org/obsoleszenz/libkeynotation
max_upload_size
id1054199
size76,871
obsoleszenz (obsoleszenz)

documentation

README

crates.io badge docs.rs badge gpl license badge

libkeynotation - A (musical) key notation parser and transposer

This library supports parsing musical keys notated in different formats and transposing the key. You can freely convert between the different formats and also transpose the key if the track is being played faster/slower.

Supported notations

  • Traditional (eg. F#m, Abm, G♭,...)
  • OpenKey (1m, 1d, 12m, 12d..)
  • Lancelot (1A, 1B... 12A, 12B)

Example:

use libkeynotation::Key;
let key = Key::from_string("F#m").unwrap();
assert_eq!(key.lancelot(), "11A");
assert_eq!(key.open_key(), "4m");
assert_eq!(key.transpose_bpm(135.0, 140.4).lancelot(), "6A");
Commit count: 0

cargo fmt