gabc-parser 0.1.0

A library for parsing, manipulating, and converting gabc files
Documentation

gabc-parser

gabc-parser is a Rust library to parse and analyze gabc, a typesetting language for Gregorian chant. It provides functions to parse a gabc file, represent and manipulate it as a Rust struct, and automatically convert to JSON and Lilypond.

Using this library

To use this library, you will need to include it in a Rust project's cargo.toml:

[dependencies]
gabc-parser = "0.1.0"

and load it in a Rust file:

extern crate gabc-parser;

If you're looking for a standalone program to convert gabc files to JSON or Lilypond, try gabc-converter, a simple command-line program that uses this library. gabctk is another good option for Lilypond conversion.

Example gabc files

The gabc files in /examples should all play nicely with this library. populus_sion.gabc is the canonical example in the gabc documentation, and the other examples are from gregobase.

Limitations

This library is under development and doesn't yet recognize all gabc syntax. Major gabc features not yet supported include:

  • Accidentals and flat clefs (e.g. "cb2")
  • gabc comments
  • Text above or below the staff

Auto-generated Lilypond may require adjustments, especially to the transposition range (which is c -> c' by default) or to correct formatting and alignment of lyrics.

Resources

Other gabc tools

  • gabctk: A toolkit for gabc, including conversion to Lilypond, abc, midi, and others. Written in Python and documented (only) in French.
  • gabc2mid: An earlier iteration of gabctk with midi conversion only. Written in Python with English documentation available.
  • gabc-to-ly: Conversion from gabc to Lilypond via a .csv file, which can be manually edited to add organ accompaniment chords. Written in Python.
  • lygre: Conversion from gabc to Lilypond. Written in Ruby.

Gregorio and gabc

Lilypond


Copyright (c) 2018 Lydia Simmons
This software is licensed under the GNU General Public License v3.0. See the LICENSE file in this distribution for license terms.