musicxml/elements/grace.rs
1use crate::datatypes::{Divisions, Percent, YesNo};
2use alloc::{string::String, vec::Vec};
3use musicxml_internal::*;
4use musicxml_macros::*;
5
6/// Attributes pertaining to the [Grace] element.
7#[derive(Debug, Default, PartialEq, Eq, AttributeDeserialize, AttributeSerialize)]
8pub struct GraceAttributes {
9 /// Indicates to make time, not steal time, for grace note playback.
10 /// The units are in real-time divisions for the grace note.
11 pub make_time: Option<Divisions>,
12 /// The value is yes for slashed grace notes and no if no slash is present.
13 pub slash: Option<YesNo>,
14 /// Indicates the percentage of time to steal from the following note for the grace note playback, as for appoggiaturas.
15 pub steal_time_following: Option<Percent>,
16 /// The `steal_time_previous` attribute indicates the percentage of time to steal from the previous note for the grace note playback.
17 pub steal_time_previous: Option<Percent>,
18}
19
20/// The [Grace] element indicates the presence of a grace note.
21///
22/// 
23#[derive(Debug, PartialEq, Eq, ElementDeserialize, ElementSerialize)]
24pub struct Grace {
25 /// Element-specific attributes
26 pub attributes: GraceAttributes,
27 /// Element-specific content
28 pub content: (),
29}