Enum gabc_parser::NoteElem [−][src]
Any element that can appear in a gabc music string.
Variants
Spacer(&'a str)
A gabc spacer, e.g. "/"
Barline(&'a str)
A gabc bar separator, e.g. "::"
Note(Note<'a>)
A Note
struct
Methods
impl<'a> NoteElem<'a>
[src]
impl<'a> NoteElem<'a>
pub fn to_ly(&self) -> &str
[src]
pub fn to_ly(&self) -> &str
Get the Lilypond representation of this note element. gabc spacers (e.g. "/") are ignored;
Note
suffixes (e.g. ".") that have Lilypond equivalents are not yet implemented.
Examples
let n = NoteElem::Note(Note::new("h..", "c1")); assert_eq!(n.to_ly(), "g'"); let s = NoteElem::Spacer("/"); assert_eq!(s.to_ly(), ""); let b = NoteElem::Barline(":"); assert_eq!(b.to_ly(), "\\divisioMaior");