chord-parser 1.1.1

Utilities for parsing chord signatures
Documentation
  • Coverage
  • 100%
    90 out of 90 items documented15 out of 40 items with examples
  • Size
  • Source code size: 73.34 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.46 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 7s Average build duration of successful builds.
  • all releases: 7s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • RealKrazy/chord-parser
    4 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • RealKrazy

Chord Parser

Parser for musical chord signatures. Successful outputs return a parsed chord with a built-in abstract representation for chords.

Features

  • Full chord parsing with additional support for unicode symbols! (i.e. Δ, °)
  • Ambiguous notation to concrete notes conversion (maj13 -> maj7 + 9 + 13, sus -> sus4, etc.)
  • Input normalization (space trimming, etc.)
  • Fully documented and convenient to use!

Usage

use chord_parser::*;

let mut parser = ChordParser::new();
 
let result = parser.parse("Cmaj9");
 
match result {
    ChordParseResult::Success(chord) => println!("{:?}", chord.alteraations.seventh),
    ChordParseResult::Failure(kind) => panic!("Expected successful parse!"),
};
 
let result = parser.parse("E7(b9,b13)");
 
// Do something else...

Advanced

For more, visit the official documentation.