pub enum Interval {
Show 17 variants
PerfectUnison,
MajorSecond,
MinorThird,
MajorThird,
PerfectFourth,
DiminishedFifth,
PerfectFifth,
AugmentedFifth,
MajorSixth,
DiminishedSeventh,
MinorSeventh,
MajorSeventh,
MinorNinth,
MajorNinth,
AugmentedNinth,
PerfectEleventh,
MajorThirteenth,
}
Expand description
An interval is the difference between two notes. https://en.wikipedia.org/wiki/Interval_(music)
Variants
PerfectUnison
MajorSecond
MinorThird
MajorThird
PerfectFourth
DiminishedFifth
PerfectFifth
AugmentedFifth
MajorSixth
DiminishedSeventh
MinorSeventh
MajorSeventh
MinorNinth
MajorNinth
AugmentedNinth
PerfectEleventh
MajorThirteenth
Implementations
sourceimpl Interval
impl Interval
sourcepub fn to_semitones(self) -> Semitones
pub fn to_semitones(self) -> Semitones
Return the number of semitones that the interval encompasses.
sourcepub fn to_number(self) -> StaffSteps
pub fn to_number(self) -> StaffSteps
Return the interval’s number. It corresponds to the number of staff positions that the intervall encompasses.
Trait Implementations
impl Copy for Interval
impl Eq for Interval
impl StructuralEq for Interval
impl StructuralPartialEq for Interval
Auto Trait Implementations
impl RefUnwindSafe for Interval
impl Send for Interval
impl Sync for Interval
impl Unpin for Interval
impl UnwindSafe for Interval
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.