| Crates.io | chord-parser |
| lib.rs | chord-parser |
| version | 1.1.1 |
| created_at | 2023-08-13 17:59:27.446347+00 |
| updated_at | 2023-08-18 20:10:19.149303+00 |
| description | Utilities for parsing chord signatures |
| homepage | |
| repository | https://github.com/RealKrazy/chord-parser/ |
| max_upload_size | |
| id | 943484 |
| size | 73,345 |
Parser for musical chord signatures. Successful outputs return a parsed chord with a built-in abstract representation for chords.
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...
For more, visit the official documentation.