Enum abc_parser::datatypes::MusicSymbol [−][src]
pub enum MusicSymbol { Note { decoration: Option<Decoration>, accidental: Option<Accidental>, note: char, octave: i8, length: f32, }, Chord { decoration: Option<Decoration>, notes: Vec<MusicSymbol>, length: f32, }, GraceNotes { acciaccatura: Option<()>, notes: Vec<MusicSymbol>, }, Tuplet { p: u32, q: u32, r: u32, notes: Vec<MusicSymbol>, }, Bar(String), Rest(Rest), Ending(u32), VisualBreak(), }
Variants
Note
Fields of Note
decoration: Option<Decoration> | |
accidental: Option<Accidental> | |
note: char | |
octave: i8 | |
length: f32 |
Chord
Fields of Chord
decoration: Option<Decoration> | |
notes: Vec<MusicSymbol> | |
length: f32 |
GraceNotes
Fields of GraceNotes
acciaccatura: Option<()> | |
notes: Vec<MusicSymbol> |
Tuplet
An r
value of 0 indicates that the parser does not have enough information and it must
be determined from the time signature.
Fields of Tuplet
p: u32 | |
q: u32 | |
r: u32 | |
notes: Vec<MusicSymbol> |
Bar(String)
Rest(Rest)
Ending(u32)
VisualBreak()
Methods
impl MusicSymbol
[src]
impl MusicSymbol
pub fn new_note(
decoration: Option<Decoration>,
accidental: Option<Accidental>,
note: char,
octave: i8,
length: f32
) -> MusicSymbol
[src]
pub fn new_note(
decoration: Option<Decoration>,
accidental: Option<Accidental>,
note: char,
octave: i8,
length: f32
) -> MusicSymbol
pub fn note(note: char) -> MusicSymbol
[src]
pub fn note(note: char) -> MusicSymbol
pub fn note_from_length(note: char, length: f32) -> MusicSymbol
[src]
pub fn note_from_length(note: char, length: f32) -> MusicSymbol
pub fn tuplet_with_defaults(
p: u32,
q: Option<u32>,
r: Option<u32>,
notes: Vec<MusicSymbol>
) -> Result<MusicSymbol, &'static str>
[src]
pub fn tuplet_with_defaults(
p: u32,
q: Option<u32>,
r: Option<u32>,
notes: Vec<MusicSymbol>
) -> Result<MusicSymbol, &'static str>
Panics
If the number of notes is not equal to p
pub fn new_tuplet(
p: u32,
q: u32,
r: u32,
notes: Vec<MusicSymbol>
) -> Result<MusicSymbol, &'static str>
[src]
pub fn new_tuplet(
p: u32,
q: u32,
r: u32,
notes: Vec<MusicSymbol>
) -> Result<MusicSymbol, &'static str>
Trait Implementations
impl ToABC for MusicSymbol
[src]
impl ToABC for MusicSymbol
impl Debug for MusicSymbol
[src]
impl Debug for MusicSymbol
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for MusicSymbol
[src]
impl PartialEq for MusicSymbol
fn eq(&self, other: &MusicSymbol) -> bool
[src]
fn eq(&self, other: &MusicSymbol) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &MusicSymbol) -> bool
[src]
fn ne(&self, other: &MusicSymbol) -> bool
This method tests for !=
.
Auto Trait Implementations
impl Send for MusicSymbol
impl Send for MusicSymbol
impl Sync for MusicSymbol
impl Sync for MusicSymbol