Struct gabc_parser::Note[][src]

pub struct Note<'a> {
    pub prefix: &'a str,
    pub position: char,
    pub suffix: &'a str,
    pub current_clef: &'a str,
}

Struct representing a gabc note.

Fields

Entire prefix of the note (usually empty)

Main character of the note: its position in the gabc staff (a-m)

Entire suffix string of the note, including shape indicators and rhythmic signs

Clef governing this note in its original context

Methods

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

Create a new note from well-formed gabc input.

Examples

let n = Note::new("h..", "c1");
assert_eq!(n.prefix, "");
assert_eq!(n.position, 'h');
assert_eq!(n.suffix, "..");
assert_eq!(n.current_clef, "c1");

Get the absolute pitch of this note in modern (Lilypond) notation, between a, and a'''. Assumes that the clef indicates middle C or the F above middle C.

Examples

let n = Note::new("h..", "c1");
assert_eq!(n.absolute_pitch(), "g'");

Trait Implementations

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

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a> Send for Note<'a>

impl<'a> Sync for Note<'a>