pub enum Transformation {
Prime,
Inversion,
Retrograde,
RetrogradeInversion,
}Expand description
A serial transformation of a tone row.
Variants§
Prime
The row itself, transposed. music21 writes this P in the
zero-centered convention and T in the original-centered one.
Inversion
The row inverted about its first pitch class.
Retrograde
The row backwards.
RetrogradeInversion
The inversion backwards.
Implementations§
Source§impl Transformation
impl Transformation
Sourcepub const ALL: [Transformation; 4]
pub const ALL: [Transformation; 4]
The four transformations in music21’s order.
Sourcepub fn label(self, convention: TransformationConvention) -> &'static str
pub fn label(self, convention: TransformationConvention) -> &'static str
music21’s label under the given convention: P/T, I, R, RI.
Sourcepub fn from_name(name: &str) -> Result<Self>
pub fn from_name(name: &str) -> Result<Self>
Parses music21’s label. P and T both mean Transformation::Prime.
Trait Implementations§
Source§impl Clone for Transformation
impl Clone for Transformation
Source§fn clone(&self) -> Transformation
fn clone(&self) -> Transformation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Transformation
Source§impl Debug for Transformation
impl Debug for Transformation
Source§impl<'de> Deserialize<'de> for Transformation
Available on crate feature serde only.
impl<'de> Deserialize<'de> for Transformation
Available on crate feature
serde only.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
Source§impl Display for Transformation
impl Display for Transformation
impl Eq for Transformation
Source§impl FromStr for Transformation
impl FromStr for Transformation
Source§impl Hash for Transformation
impl Hash for Transformation
Source§impl PartialEq for Transformation
impl PartialEq for Transformation
Source§impl Serialize for Transformation
Available on crate feature serde only.
impl Serialize for Transformation
Available on crate feature
serde only.impl StructuralPartialEq for Transformation
Auto Trait Implementations§
impl Freeze for Transformation
impl RefUnwindSafe for Transformation
impl Send for Transformation
impl Sync for Transformation
impl Unpin for Transformation
impl UnsafeUnpin for Transformation
impl UnwindSafe for Transformation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more