Expand description
§𝄐 Fermata
An S-expression DSL for working with MusicXML
Fermata is a Lisp-like domain-specific language for describing musical notation. It compiles to MusicXML, LilyPond, and Rust code.
§Quick Example
ⓘ
use fermata::{parse, compile_to_musicxml};
let source = r#"
(score
(part :piano
(measure
(note c4 :q)
(note d4 :q)
(note e4 :q)
(note f4 :q))))
"#;
let ast = parse(source)?;
let musicxml = compile_to_musicxml(&ast)?;§Status
This crate is under active development. The API will change.
Re-exports§
Modules§
- ast
- Abstract Syntax Tree for Fermata expressions.
- error
- Error handling for Fermata parsing and compilation.
- ir
- Fermata IR (Intermediate Representation) types.
- lang
- Fermata Language: Ergonomic S-expression syntax for music notation.
- musicxml
- MusicXML parsing and emission module.
- sexpr
- S-expression read/print support for music scores.
Constants§
- VERSION
- Library version
Functions§
- compile_
to_ lilypond - Compile a Fermata AST to LilyPond format.
- compile_
to_ musicxml - Compile a Fermata AST to MusicXML.
- format
- Format a Fermata AST as pretty-printed source code.
- parse
- Parse Fermata source code into an AST.
- parse_
musicxml - Parse MusicXML into a Fermata AST.
Type Aliases§
- Result
- Result type for Fermata operations