chord_pro 0.6.3 copy "chord_pro: ^0.6.3" to clipboard
chord_pro: ^0.6.3 copied to clipboard

A Dart parser for the ChordPro 6 song format. Extracts chords, lyrics, metadata, comments, layout hints and chord diagrams.

chord_pro #

pub package style: very good analysis License: MIT

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 Song model — what every field holds.
  • Transposing and selectors — shift chords, activate conditional directives.
  • Notes mode, strict, preprocessors — parser options.

Supported features

  • Chords
  • Directives
  • Sections
  • Conditional selectors
  • Source features

Reference

  • Non-spec extensions
  • Known limitations
  • Example songs
1
likes
0
points
201
downloads

Publisher

verified publisherryzizub.com

Weekly Downloads

A Dart parser for the ChordPro 6 song format. Extracts chords, lyrics, metadata, comments, layout hints and chord diagrams.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on chord_pro