Struct gabc_parser::Syllable[][src]

pub struct Syllable<'a> {
    pub text: &'a str,
    pub music: Vec<NoteElem<'a>>,
}

Struct representing a gabc syllable with text and music, e.g. "Po(eh/hi)"

Fields

Text part of the syllable

Music part of the syllable

Methods

impl<'a> Syllable<'a>
[src]

Create a new syllable from well-formed gabc input.

Examples

let s = Syllable::new("Po(eh/hi)", "c3");
assert_eq!(s.text, "Po");
assert_eq!(s.music.len(), 5);

Translate this syllable's music string into a tied sequence of Lilypond notes.

Examples

let s = Syllable::new("Po(eh/hi)", "c3");
assert_eq!(s.ly_notes(), "g(c' c' d')");

Translate this syllable's text into valid Lilypond lyrics. If there are no Notes in this syllable's music string, add "\set stanza = " to prevent Lilypond matching this text to a note.

Examples

let s = Syllable::new("*()", "c3");
assert_eq!(s.ly_text(), " \\set stanza = \"*\" ");

Trait Implementations

impl<'a> Debug for Syllable<'a>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a> Send for Syllable<'a>

impl<'a> Sync for Syllable<'a>