Staff
Music theory and score rendering library with midi, notes, chords, scales, and more.
Install / Use
/learn @staff-rs/StaffREADME
Staff
Music theory and score rendering library with midi, notes, chords, scales, and more.
Usage
use staff::{midi, Chord, Pitch};
let chord = Chord::from_midi(
midi!(C, 4),
[midi!(E, 3), midi!(G, 3), midi!(C, 4)]
);
assert_eq!(chord.to_string(), "C/E");
let pitches = [Pitch::E, Pitch::G, Pitch::C];
assert!(chord.into_iter().eq(pitches));
Dioxus
Staff {
note {
natural: Natural::F,
accidental: Accidental::Sharp
}
note {
natural: Natural::G,
accidental: Accidental::Flat,
duration: Duration::from(DurationKind::Half)
}
note { natural: Natural::A }
hr {}
note {
natural: Natural::C,
octave: Octave::FIVE,
duration: Duration::from(DurationKind::Whole)
}
}
svg { width: "500px", height: "500px", xmlns: "http://www.w3.org/2000/svg",
FretDiagram {
fret { index: 1, string: 0 }
frets { from: 2, to: 4, string: 0 }
fret { index: 5, string: 0, is_muted: true }
}
}
Features
render: Enablerendermodulesvg: Enable rendering to SVG
synth: Enablesynthmodule forserde: Impl Deserialize and Serialize for many crate types
Related Skills
himalaya
352.0kCLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
node-connect
352.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
taskflow
352.0kname: taskflow description: Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layer
frontend-design
111.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
