chord_pro 0.6.2
chord_pro: ^0.6.2 copied to clipboard
A Dart parser for the ChordPro 6 song format. Extracts chords, lyrics, metadata, comments, layout hints and chord diagrams.
chord_pro #
A Dart parser for the ChordPro 6 song format.
Built for music apps and digital songbooks — parses .cho / .crd / .chopro files into typed chords, lyrics, metadata, comments, images, layout hints, and chord diagrams.
Installation #
dart pub add chord_pro
Quick start #
import 'package:chord_pro/chord_pro.dart';
final result = ChordPro.parse(source);
final song = result.songs.first;
print(song.metadata.titles.firstOrNull);
print(song.metadata.key); // first key (use `metadata.keys` for the full list)
ChordPro.parse returns a ParseResult with every song in the document (split on {new_song} / {ns}) plus any diagnostics. Use ChordPro.parseSong if you only want the first song.
Documentation #
Full docs live in doc/.
Usage
- Parsing — parse a document, walk sections and lines.
- The
Songmodel — what every field holds. - Transposing and selectors — shift chords, activate conditional directives.
- Notes mode, strict, preprocessors — parser options.
Supported features
Reference