[−][src]Struct musictheory::types::Pitch
Pitch is the unique Combination of PitchClass and Octave.
Midi Note Table
- X - PitchClass
- Y - Octave
- C - Midi Note Id
Cn | Cs | Dn | Ds | En | Fn | Fs | Gn | Gs | An | As | Bn | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
-1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
0 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
1 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 |
2 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
3 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
4 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 |
5 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 |
6 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 |
7 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 |
8 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 |
9 | 120 | 122 | 123 | 124 | 125 | 126 | 127 | 128! | 129! | 130! | 131! | 132! |
10 | 133! | 134! | 135! | 136! | 137! | 138! | 139! | 140! | 141! | 142! | 143! | 144! |
Note: Pitches marked with a ! are not translatable to Midi
Methods
impl Pitch
[src]
pub fn note(&self) -> Note
[src]
Get Natural Note for this Pitch
pub fn tone(&self) -> Tone
[src]
Get Natural Tone for this Pitch
pub fn names(&self) -> &'static [Note]
[src]
pub fn pitch_class(&self) -> PitchClass
[src]
Get PitchClass of this Pitch
pub fn octave(&self) -> Octave
[src]
pub fn distance(&self, other: &Pitch) -> Steps
[src]
Get the semitone steps between two Pitches.
pub fn frequency(&self, tuning: Tuning) -> f32
[src]
Get Frequency of Pitch.
Trait Implementations
impl Add<Interval> for Pitch
[src]
type Output = Option<Self>
The resulting type after applying the +
operator.
fn add(self, interval: Interval) -> Self::Output
[src]
impl Add<Steps> for Pitch
[src]
type Output = Option<Self>
The resulting type after applying the +
operator.
fn add(self, steps: Steps) -> Self::Output
[src]
impl Clone for Pitch
[src]
impl Copy for Pitch
[src]
impl Debug for Pitch
[src]
impl From<u8> for Pitch
[src]
impl Hash for Pitch
[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<Pitch> for Pitch
[src]
impl StructuralPartialEq for Pitch
[src]
impl Sub<Interval> for Pitch
[src]
type Output = Option<Self>
The resulting type after applying the -
operator.
fn sub(self, interval: Interval) -> Self::Output
[src]
impl Sub<Steps> for Pitch
[src]
Auto Trait Implementations
impl RefUnwindSafe for Pitch
impl Send for Pitch
impl Sync for Pitch
impl Unpin for Pitch
impl UnwindSafe for Pitch
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, 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>,