ACORDE · RUST AND WASM

A score library for Rust and WASM.

Acorde provides serializable scores, undoable edits, notation I/O, logical layout, deterministic SVG, playback events, and analysis. It has no UI and does not read or write files.

Quick start

Use the umbrella crate for score semantics, I/O, and layout. Add acorde-render-svg directly when rendering SVG.

[dependencies]
acorde = "1.3.15"
acorde-render-svg = "1.3.15"

Minimal edit

Commands are validated and recorded by the ScoreEngine; hosts keep ownership of UI and files.

use acorde::core::{Command, ScoreEngine, SetTempoCmd};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut engine = ScoreEngine::new();
    engine.apply(Command::SetTempo(SetTempoCmd { bpm: 144 }))?;
    engine.undo()?;
    println!("{} BPM", engine.score.settings.tempo_bpm);
    Ok(())
}

Crate boundaries

acorde-core owns score semantics and validation; acorde-io handles notation formats; acorde-layout provides pixel-free logical geometry; acorde-render-svg makes deterministic SVG; acorde-wasm exposes JavaScript bindings.