Struct Pitch Copy item path Source #[repr(transparent)]
pub struct Pitch(pub PitchTy );Expand description A pitch is a discrete tone with an individual frequency that may be
classified as a pitch class .
Consumes the object, returning the assigned pitch value.
A functional accessor for the pitch value.
returns a mutable reference to the inner value of the pitch;
A functional mutator for the pitch value.
Returns a new instance of the class representing the given pitch.
Consumes the pitch; returns a new instance of the class representing the given pitch.
Consumes the current instance and applies the given function to the pitch value, returning
a new instance of Pitch .
Consumes the current instance and computes the absolute value of the pitch, returning
a new instance of Pitch .
Returns the absolute value of the remainder of the pitch divided by the modulus.
The octmod method computes the modulus of the current pitch using
Python’s modulo operator, %. This method is useful for pitch arithmetic due to its
unique sign-handling behavior.
The resulting type after applying the + operator.
The resulting type after applying the + operator.
The resulting type after applying the + operator.
The resulting type after applying the + operator.
The resulting type after applying the + operator.
The resulting type after applying the + operator.
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Formats the value using the given formatter.
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more Performs copy-assignment from
source.
Read more Formats the value using the given formatter.
Read more Returns the “default value” for a type.
Read more Mutably dereferences the value.
Deserialize this value from the given Serde deserializer.
Read more Formats the value using the given formatter.
Read more The resulting type after applying the / operator.
The resulting type after applying the / operator.
The resulting type after applying the / operator.
The resulting type after applying the / operator.
The resulting type after applying the / operator.
The resulting type after applying the / operator.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Formats the value using the given formatter.
Read more The resulting type after applying the * operator.
The resulting type after applying the * operator.
The resulting type after applying the * operator.
The resulting type after applying the * operator.
The resulting type after applying the * operator.
The resulting type after applying the * operator.
The resulting type after applying the - operator.
The resulting type after applying the - operator.
The resulting type after applying the ! operator.
The resulting type after applying the ! operator.
Classify the pitch into a pitch class
Find the modular index of the given pitch
Convert from a string and radix (typically
2..=36).
Read more Formats the value using the given formatter.
Read more Returns the multiplicative identity element of
Self,
1.
Read more Sets self to the multiplicative identity element of Self, 1.
Returns
true if
self is equal to the multiplicative identity.
Read more Compares and returns the maximum of two values.
Read more Compares and returns the minimum of two values.
Read more Restrict a value to a certain interval.
Read more Tests for self and other values to be equal, and is used by ==.
Tests for !=. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
This method returns an ordering between
self and
other values if one exists.
Read more Tests less than (for
self and
other) and is used by the
< operator.
Read more Tests less than or equal to (for
self and
other) and is used by the
<= operator.
Read more Tests greater than (for
self and
other) and is used by the
>
operator.
Read more Tests greater than or equal to (for
self and
other) and is used by
the
>= operator.
Read more The resulting type after applying the % operator.
The resulting type after applying the % operator.
The resulting type after applying the % operator.
The resulting type after applying the % operator.
The resulting type after applying the % operator.
The resulting type after applying the % operator.
Serialize this value into the given Serde serializer.
Read more The resulting type after applying the - operator.
The resulting type after applying the - operator.
The resulting type after applying the - operator.
The resulting type after applying the - operator.
The resulting type after applying the - operator.
The resulting type after applying the - operator.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Formats the value using the given formatter.
Read more Returns the additive identity element of
Self,
0.
Read more Returns true if self is equal to the additive identity.
Sets self to the additive identity element of Self, 0.
The resulting type after dereferencing.
Dereferences the value.
Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
🔬 This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more Converts the given value to a
String.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.