pub enum Dynamic {
Show 21 variants
Pppp,
Ppp,
Pp,
P,
Mp,
Mf,
F,
Ff,
Fff,
Ffff,
Sfz,
Rfz,
Fz,
Sf,
Fp,
Sfp,
Sfpp,
Pf,
Sffz,
Sfzp,
N,
}Variants§
Pppp
Ppp
Pp
P
Mp
Mf
F
Ff
Fff
Ffff
Sfz
Rfz
Fz
Sf
Fp
Forte-piano: loud attack, then piano.
Sfp
Sforzando-piano: accented attack, then piano.
Sfpp
Sforzando-pianissimo: accented attack, then pianissimo.
Pf
Piano-forte: soft attack, then forte.
Sffz
Sforzatissimo: a stronger sforzando.
Sfzp
Sforzato-piano: sforzato attack, then piano.
N
Niente: fading to nothing.
Implementations§
Source§impl Dynamic
impl Dynamic
Sourcepub fn from_musicxml_str(name: &str) -> Option<Dynamic>
pub fn from_musicxml_str(name: &str) -> Option<Dynamic>
Parse a MusicXML dynamics element name (also MEI <dynam> and MuseScore dynamic
text), folding the extreme ppppp/fffff levels into the nearest supported one.
Sourcepub fn sustained_level(&self) -> Option<Dynamic>
pub fn sustained_level(&self) -> Option<Dynamic>
The level that continues after this marking, until the next one: itself for a level
(p, f, …), the second level for a compound (fp → p, pf → f), and None for an
accent on one note (sf, sfz, fz, rfz), after which the previous level resumes.
pub fn to_musicxml_str(&self) -> &'static str
pub fn to_velocity(&self) -> u8
Trait Implementations§
impl Copy for Dynamic
Source§impl<'de> Deserialize<'de> for Dynamic
impl<'de> Deserialize<'de> for Dynamic
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Dynamic
impl StructuralPartialEq for Dynamic
Auto Trait Implementations§
impl Freeze for Dynamic
impl RefUnwindSafe for Dynamic
impl Send for Dynamic
impl Sync for Dynamic
impl Unpin for Dynamic
impl UnsafeUnpin for Dynamic
impl UnwindSafe for Dynamic
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more