𝄐 Fermata
An S-expression DSL for working with MusicXML
In music, a fermata (𝄐) indicates that a note should be held longer than its written value — a pause, a moment of expressiveness left to the performer's discretion.
Fermata is a Lisp-like domain-specific language for describing musical notation. It compiles to MusicXML, LilyPond, and Rust, enabling precise musical communication between humans and machines.
Status: 🚧 Under Construction
This crate is in early development. The API will change significantly.
Vision
;; Describe music naturally
Output Targets
| Target | Use Case |
|---|---|
| MusicXML | Import into Finale, Sibelius, MuseScore, Dorico |
| LilyPond | Publication-quality PDF engraving |
| Rust | Embed notation generation in Rust applications |
| SVG | Direct rendering via verovioxide |
Planned Features
- REPL — Interactive
fermata>prompt for experimentation - Macros — Define reusable patterns like
(cadence :authentic :key c-major) - Transformations —
(transpose +2 ...),(invert ...),(retrograde ...) - Bidirectional — Parse MusicXML back into Fermata expressions
- Theory-aware — Built-in knowledge of scales, chords, intervals, voice leading
Installation
Or add to your Cargo.toml:
[]
= "0.0.1"
Usage
As a CLI
# Start the REPL
# Compile to MusicXML
# Compile to LilyPond
# Render directly to SVG (requires verovioxide)
As a Library
use ;
Language Reference
Coming soon — see LANGUAGE.md for the developing specification.
Quick Reference
;; Notes
; C4 quarter note
; D#5 dotted half
; Bb3 eighth, staccato
;; Rests
; quarter rest
; whole rest
;; Chords
; C major triad, quarter
;; Durations
:w ; whole
:h ; half
:q ; quarter
:8 ; eighth
:16 ; sixteenth
:32 ; thirty-second
;; Articulations & Ornaments
:staccato :accent :tenuto :fermata
:trill :mordent :turn
;; Dynamics
:pp :p :mp :mf :f :ff
; 4 measures
;; Structure
;; Clefs
:treble :bass :alto :tenor :percussion
;; Key signatures
;; Time signatures
;; Theory macros (planned)
; => (c4 d4 e4 f4 g4 a4 b4 c5)
; => (c4 e4 g4 bb4)
; => V-I progression
Related Projects
- verovioxide — Rust bindings for Verovio music engraving
- Verovio — Fast, lightweight music notation engraving library
- LilyPond — Music engraving program for publication-quality scores
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
"Music is the space between the notes." — Claude Debussy
