Enum gabc_parser::NoteElem [−][src]
Any element that can appear in the music for a given syllable, including bars (e.g. ":"), separators (e.g. "/"), and Notes
Variants
Spacer(&'a str)
Barline(&'a str)
Note(Note<'a>)
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.
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");