Skip to main content

Crate sim_lib_music_notation

Crate sim_lib_music_notation 

Source
Expand description

Score and notation model for the SIM music libraries.

This crate is the notation codec surface: it converts between a sim_lib_music_core::Score (and related music objects such as melodies, progressions, and counterpoint) and a LilyPond-subset text rendering. The NotationCodec type is the codec entry point, exposing import and export in both plain and report (diagnostic-carrying) forms, and install_music_notation_lib registers the codec as a loadable runtime lib.

Structs§

MusicNotationLib
Host-registered lib exporting the LilyPond subset notation-codec card, built on the shared SurfacePackLib substrate.
NotationCodec
Codec converting between a Score and its LilyPond-subset text rendering.
NotationReport
Result of a notation operation paired with any diagnostics produced.

Enums§

NotationError
Error raised while importing or exporting LilyPond-subset notation.

Functions§

export_counterpoint_lilypond
Renders counterpoint as parallel LilyPond voices, spelling pitches in key.
export_lilypond
Renders a score as a LilyPond \score block, discarding diagnostics.
export_lilypond_report
Renders a score as a LilyPond \score block, returning the text with diagnostics.
export_melody_lilypond
Renders a melody as a LilyPond note sequence, spelling pitches in key.
export_progression_lilypond
Renders a chord progression as a LilyPond chord sequence, spelling pitches in key.
import_lilypond
Parses LilyPond-subset text into a score, discarding diagnostics.
import_lilypond_report
Parses LilyPond-subset text into a score, returning it with diagnostics.
install_music_notation_lib
Installs the music-notation lib into cx and records its codec export.