Skip to main content

Crate fermata

Crate fermata 

Source
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§

pub use error::Error;
pub use ast::*;

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