[−][src]Enum musictheory::types::PitchClass
PitchClass is the unified representation of the 12 semitone harmonics used in western music.
X Axis on Note Table and the Matrix.
Variants
C Neutral
C Semitone
D Neutral
D Semitone
E Natural
F Natural
F Semitone
G Natural
G Semitone
A Natural
A Semitone
B Natural
Methods
impl PitchClass
[src]
pub fn wholetone(&self) -> bool
[src]
Is this PitchClass a wholetone.
pub fn semitone(&self) -> bool
[src]
Is this PitchClass a semitone.
pub fn name(&self, n: Note) -> Option<Note>
[src]
Get Note for a given PitchClass if available.
pub fn names(&self) -> &'static [Note]
[src]
Get a slice of Notes for a given PitchClass.
pub fn tones(&self) -> &'static [Pitch]
[src]
Get an slice of Pitches for a given PitchClasses.
pub fn group(&self) -> PitchGroup
[src]
Get PitchGroup this PitchClasses is the root of.
pub fn groups(&self) -> [PitchGroup; 7]
[src]
Get an unordered array of PitchGroups this PitchClass is a member of.
pub fn advance(&self) -> PitchClass
[src]
Advance to the next PitchClass.
pub fn distance(&self, other: &PitchClass) -> Steps
[src]
Get the distance between two PitchClasses.
Trait Implementations
impl Add<Interval> for PitchClass
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, interval: Interval) -> Self::Output
[src]
impl Add<Steps> for PitchClass
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, steps: Steps) -> Self::Output
[src]
impl Clone for PitchClass
[src]
fn clone(&self) -> PitchClass
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for PitchClass
[src]
impl Debug for PitchClass
[src]
impl Display for PitchClass
[src]
impl Hash for PitchClass
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<PitchClass> for PitchClass
[src]
fn eq(&self, other: &PitchClass) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialEq<PitchClass> for PitchGroup
[src]
fn eq(&self, other: &PitchClass) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialEq<PitchGroup> for PitchClass
[src]
fn eq(&self, other: &PitchGroup) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<PitchClass> for PitchClass
[src]
fn partial_cmp(&self, other: &PitchClass) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralPartialEq for PitchClass
[src]
impl Sub<Interval> for PitchClass
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, interval: Interval) -> Self::Output
[src]
impl Sub<Steps> for PitchClass
[src]
Auto Trait Implementations
impl RefUnwindSafe for PitchClass
impl Send for PitchClass
impl Sync for PitchClass
impl Unpin for PitchClass
impl UnwindSafe for PitchClass
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,