Sonx - Parse and format chord sheets (ChordSheetJS port)

Sonx is an Elixir port of ChordSheetJS (v14) for parsing and formatting chord sheets.

Parse an input string into an intermediate Song struct, then format it into any supported output format.
It adds additional formatters that ChordSheetJS does not support (notably LaTeX)

Supported parsers:

  • ChordPro
  • Chords over words
  • Ultimate Guitar

Supported formatters:

  • Plain text
  • ChordPro
  • Chords over words
  • Ultimate Guitar
  • HTML (div and table layouts)
  • LaTeX (songs package)

Other features:

  • Transpose songs by any interval
  • Change key with automatic chord adjustment
  • Switch between sharp and flat accidentals
  • Metadata and conditional directives

Usage example:

song = Sonx.parse!(input, :chord_pro)

song
|> Sonx.transpose(3)
|> Sonx.format!(:html_div)

Links:

4 Likes