Enum persichetti::primitives::IntervalQuality [−][src]
Represents a chromatic alteration up or down that is applied to a pure IntervalSize
.
Similar to Accidental
, Diminished
or Augmented
are zero-indexed.
Due to a quirk of nomenclature, the value of Diminished(n)
will vary depending on whether an interval
is Perfect
or Major
. For example, a diminished fifth has an alteration of −1, but a diminished
third has an alteration of −2.
Quality | Size | Chromatic Alteration |
---|---|---|
Major | Second, Third, Sixth, Seventh | 0 |
Minor | Second, Third, Sixth, Seventh | −1 |
Perfect | Unison, Fourth, Fifth | 0 |
Diminished(N) | Second, Third, Sixth, Seventh | −(N+2) |
Diminished(N) | Unison, Fourth, Fifth | −(N+1) |
Augmented(N) | All Intervals | N+1 |
Variants
Diminished(usize)
Augmented(usize)
Implementations
impl IntervalQuality
[src]
impl IntervalQuality
[src]pub fn from_chromatic_span(size: &IntervalSize, span: isize) -> IntervalQuality
[src]
pub fn from_chromatic_span(size: &IntervalSize, span: isize) -> IntervalQuality
[src]Given the interval size, (how many note names are between the top and bottom) calculate an interval
quality that will make the Interval
span the correct number of whole steps.
Trait Implementations
impl Clone for IntervalQuality
[src]
impl Clone for IntervalQuality
[src]fn clone(&self) -> IntervalQuality
[src]
fn clone(&self) -> IntervalQuality
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for IntervalQuality
[src]
impl Debug for IntervalQuality
[src]impl Display for IntervalQuality
[src]
impl Display for IntervalQuality
[src]impl Hash for IntervalQuality
[src]
impl Hash for IntervalQuality
[src]impl PartialEq<IntervalQuality> for IntervalQuality
[src]
impl PartialEq<IntervalQuality> for IntervalQuality
[src]fn eq(&self, other: &IntervalQuality) -> bool
[src]
fn eq(&self, other: &IntervalQuality) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &IntervalQuality) -> bool
[src]
fn ne(&self, other: &IntervalQuality) -> bool
[src]This method tests for !=
.
impl Eq for IntervalQuality
[src]
impl StructuralEq for IntervalQuality
[src]
impl StructuralPartialEq for IntervalQuality
[src]
Auto Trait Implementations
impl RefUnwindSafe for IntervalQuality
impl Send for IntervalQuality
impl Sync for IntervalQuality
impl Unpin for IntervalQuality
impl UnwindSafe for IntervalQuality
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more