Enum klib::core::interval::Interval

source ·
#[repr(u8)]
pub enum Interval {
Show 48 variants PerfectUnison = 0, DiminishedSecond = 1, AugmentedUnison = 2, MinorSecond = 3, MajorSecond = 4, DiminishedThird = 5, AugmentedSecond = 6, MinorThird = 7, MajorThird = 8, DiminishedFourth = 9, AugmentedThird = 10, PerfectFourth = 11, AugmentedFourth = 12, DiminishedFifth = 13, PerfectFifth = 14, DiminishedSixth = 15, AugmentedFifth = 16, MinorSixth = 17, MajorSixth = 18, DiminishedSeventh = 19, AugmentedSixth = 20, MinorSeventh = 21, MajorSeventh = 22, DiminishedOctave = 23, AugmentedSeventh = 24, PerfectOctave = 25, MinorNinth = 26, MajorNinth = 27, AugmentedNinth = 28, DiminishedEleventh = 29, PerfectEleventh = 30, AugmentedEleventh = 31, MinorThirteenth = 32, MajorThirteenth = 33, AugmentedThirteenth = 34, PerfectOctaveAndPerfectFifth = 35, TwoPerfectOctaves = 36, TwoPerfectOctavesAndMajorThird = 37, TwoPerfectOctavesAndPerfectFifth = 38, TwoPerfectOctavesAndMinorSeventh = 39, ThreePerfectOctaves = 40, ThreePerfectOctavesAndMajorSecond = 41, ThreePerfectOctavesAndMajorThird = 42, ThreePerfectOctavesAndAugmentedFourth = 43, ThreePerfectOctavesAndPerfectFifth = 44, ThreePerfectOctavesAndMinorSixth = 45, ThreePerfectOctavesAndMinorSeventh = 46, ThreePerfectOctavesAndMajorSeventh = 47,
}
Expand description

An enum representing the interval between two notes.

Variants§

§

PerfectUnison = 0

A perfect unison interval.

§

DiminishedSecond = 1

A diminished second interval.

§

AugmentedUnison = 2

An augmented unison interval.

§

MinorSecond = 3

A minor second interval.

§

MajorSecond = 4

A major second interval.

§

DiminishedThird = 5

A diminished third interval.

§

AugmentedSecond = 6

An augmented second interval.

§

MinorThird = 7

A minor third interval.

§

MajorThird = 8

A major third interval.

§

DiminishedFourth = 9

A diminished fourth interval.

§

AugmentedThird = 10

An augmented third interval.

§

PerfectFourth = 11

A perfect fourth interval.

§

AugmentedFourth = 12

An augmented fourth interval.

§

DiminishedFifth = 13

A diminished fifth interval.

§

PerfectFifth = 14

A perfect fifth interval.

§

DiminishedSixth = 15

A diminished sixth interval.

§

AugmentedFifth = 16

An augmented fifth interval.

§

MinorSixth = 17

A minor sixth interval.

§

MajorSixth = 18

A major sixth interval.

§

DiminishedSeventh = 19

A diminished seventh interval.

§

AugmentedSixth = 20

An augmented sixth interval.

§

MinorSeventh = 21

A minor seventh interval.

§

MajorSeventh = 22

A major seventh interval.

§

DiminishedOctave = 23

A diminished octave interval.

§

AugmentedSeventh = 24

An augmented seventh interval.

§

PerfectOctave = 25

A perfect octave interval.

§

MinorNinth = 26

An minor ninth interval.

§

MajorNinth = 27

A major ninth interval.

§

AugmentedNinth = 28

An augmented ninth interval.

§

DiminishedEleventh = 29

A diminished eleventh interval.

§

PerfectEleventh = 30

A perfect eleventh interval.

§

AugmentedEleventh = 31

An augmented eleventh interval.

§

MinorThirteenth = 32

A minor thirteenth interval.

§

MajorThirteenth = 33

A major thirteenth interval.

§

AugmentedThirteenth = 34

An augmented thirteenth interval.

§

PerfectOctaveAndPerfectFifth = 35

A perfect octave and perfect fifth interval.

§

TwoPerfectOctaves = 36

Two perfect octaves.

§

TwoPerfectOctavesAndMajorThird = 37

Two perfect octaves and a major third.

§

TwoPerfectOctavesAndPerfectFifth = 38

Two perfect octaves and a perfect fifth.

§

TwoPerfectOctavesAndMinorSeventh = 39

Two perfect octaves and a minor sixth.

§

ThreePerfectOctaves = 40

Three perfect octaves.

§

ThreePerfectOctavesAndMajorSecond = 41

Three perfect octaves and a major second.

§

ThreePerfectOctavesAndMajorThird = 42

Three perfect octaves and a major third.

§

ThreePerfectOctavesAndAugmentedFourth = 43

Three perfect octaves and an augmented fourth.

§

ThreePerfectOctavesAndPerfectFifth = 44

Three perfect octaves and a perfect fifth.

§

ThreePerfectOctavesAndMinorSixth = 45

Three perfect octaves and a minor sixth.

§

ThreePerfectOctavesAndMinorSeventh = 46

Three perfect octaves and a minor seventh.

§

ThreePerfectOctavesAndMajorSeventh = 47

Three perfect octaves and a major seventh.

Trait Implementations§

source§

impl Add<Interval> for Note

§

type Output = Note

The resulting type after applying the + operator.
source§

fn add(self, rhs: Interval) -> Self::Output

Performs the + operation. Read more
source§

impl AddAssign<Interval> for Note

source§

fn add_assign(&mut self, rhs: Interval)

Performs the += operation. Read more
source§

impl Clone for Interval

source§

fn clone(&self) -> Interval

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Interval

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for Interval

source§

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 Interval

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl HasEnharmonicDistance for Interval

source§

fn enharmonic_distance(&self) -> i8

Returns the enharmonic distance of the type (most likely an interval). Read more
source§

impl HasOctave for Interval

source§

fn octave(&self) -> Octave

Returns the octave of the type.
source§

impl Hash for Interval

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for Interval

source§

fn cmp(&self, other: &Interval) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Interval

source§

fn eq(&self, other: &Interval) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Interval

source§

fn partial_cmp(&self, other: &Interval) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Serialize for Interval

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Sub<Interval> for Note

§

type Output = Note

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Interval) -> Self::Output

Performs the - operation. Read more
source§

impl Copy for Interval

source§

impl Eq for Interval

source§

impl StructuralEq for Interval

source§

impl StructuralPartialEq for Interval

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

§

fn into_sample(self) -> T

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

§

fn to_sample_(self) -> U

source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

source§

impl<T> RuleType for T
where T: Copy + Debug + Eq + Hash + Ord,