#[repr(u32)]pub enum NamedPitch {
Show 108 variants
C0 = 16,
CS0 = 17,
D0 = 18,
DS0 = 19,
E0 = 20,
F0 = 21,
FS0 = 23,
G0 = 24,
GS0 = 25,
A0 = 27,
AS0 = 29,
B0 = 30,
C1 = 32,
CS1 = 34,
D1 = 36,
DS1 = 38,
E1 = 41,
F1 = 43,
FS1 = 46,
G1 = 49,
GS1 = 51,
A1 = 55,
AS1 = 58,
B1 = 61,
C2 = 65,
CS2 = 69,
D2 = 73,
DS2 = 77,
E2 = 82,
F2 = 87,
FS2 = 92,
G2 = 98,
GS2 = 103,
A2 = 110,
AS2 = 116,
B2 = 123,
C3 = 130,
CS3 = 138,
D3 = 146,
DS3 = 155,
E3 = 164,
F3 = 174,
FS3 = 185,
G3 = 196,
GS3 = 207,
A3 = 220,
AS3 = 233,
B3 = 246,
C4 = 261,
CS4 = 277,
D4 = 293,
DS4 = 311,
E4 = 329,
F4 = 349,
FS4 = 369,
G4 = 392,
GS4 = 415,
A4 = 440,
AS4 = 466,
B4 = 493,
C5 = 523,
CS5 = 554,
D5 = 587,
DS5 = 622,
E5 = 659,
F5 = 698,
FS5 = 739,
G5 = 783,
GS5 = 830,
A5 = 880,
AS5 = 932,
B5 = 987,
C6 = 1_046,
CS6 = 1_108,
D6 = 1_174,
DS6 = 1_244,
E6 = 1_318,
F6 = 1_396,
FS6 = 1_479,
G6 = 1_567,
GS6 = 1_661,
A6 = 1_760,
AS6 = 1_864,
B6 = 1_975,
C7 = 2_093,
CS7 = 2_217,
D7 = 2_349,
DS7 = 2_489,
E7 = 2_637,
F7 = 2_793,
FS7 = 2_959,
G7 = 3_135,
GS7 = 3_322,
A7 = 3_520,
AS7 = 3_729,
B7 = 3_951,
C8 = 4_186,
CS8 = 4_434,
D8 = 4_698,
DS8 = 4_978,
E8 = 5_274,
F8 = 5_587,
FS8 = 5_919,
G8 = 6_271,
GS8 = 6_644,
A8 = 7_040,
AS8 = 7_458,
B8 = 7_902,
}Expand description
Pitch for standard scale
Variants§
C0 = 16
CS0 = 17
D0 = 18
DS0 = 19
E0 = 20
F0 = 21
FS0 = 23
G0 = 24
GS0 = 25
A0 = 27
AS0 = 29
B0 = 30
C1 = 32
CS1 = 34
D1 = 36
DS1 = 38
E1 = 41
F1 = 43
FS1 = 46
G1 = 49
GS1 = 51
A1 = 55
AS1 = 58
B1 = 61
C2 = 65
CS2 = 69
D2 = 73
DS2 = 77
E2 = 82
F2 = 87
FS2 = 92
G2 = 98
GS2 = 103
A2 = 110
AS2 = 116
B2 = 123
C3 = 130
CS3 = 138
D3 = 146
DS3 = 155
E3 = 164
F3 = 174
FS3 = 185
G3 = 196
GS3 = 207
A3 = 220
AS3 = 233
B3 = 246
C4 = 261
CS4 = 277
D4 = 293
DS4 = 311
E4 = 329
F4 = 349
FS4 = 369
G4 = 392
GS4 = 415
A4 = 440
AS4 = 466
B4 = 493
C5 = 523
CS5 = 554
D5 = 587
DS5 = 622
E5 = 659
F5 = 698
FS5 = 739
G5 = 783
GS5 = 830
A5 = 880
AS5 = 932
B5 = 987
C6 = 1_046
CS6 = 1_108
D6 = 1_174
DS6 = 1_244
E6 = 1_318
F6 = 1_396
FS6 = 1_479
G6 = 1_567
GS6 = 1_661
A6 = 1_760
AS6 = 1_864
B6 = 1_975
C7 = 2_093
CS7 = 2_217
D7 = 2_349
DS7 = 2_489
E7 = 2_637
F7 = 2_793
FS7 = 2_959
G7 = 3_135
GS7 = 3_322
A7 = 3_520
AS7 = 3_729
B7 = 3_951
C8 = 4_186
CS8 = 4_434
D8 = 4_698
DS8 = 4_978
E8 = 5_274
F8 = 5_587
FS8 = 5_919
G8 = 6_271
GS8 = 6_644
A8 = 7_040
AS8 = 7_458
B8 = 7_902
Implementations§
Source§impl NamedPitch
impl NamedPitch
Sourcepub fn into_frequency(self) -> u32
pub fn into_frequency(self) -> u32
Turn into Hz
Trait Implementations§
Source§impl Clone for NamedPitch
impl Clone for NamedPitch
Source§fn clone(&self) -> NamedPitch
fn clone(&self) -> NamedPitch
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl From<NamedPitch> for Pitch
impl From<NamedPitch> for Pitch
Source§fn from(value: NamedPitch) -> Self
fn from(value: NamedPitch) -> Self
Converts to this type from the input type.
Source§impl PartialEq for NamedPitch
impl PartialEq for NamedPitch
impl Copy for NamedPitch
impl StructuralPartialEq for NamedPitch
Auto Trait Implementations§
impl Freeze for NamedPitch
impl RefUnwindSafe for NamedPitch
impl Send for NamedPitch
impl Sync for NamedPitch
impl Unpin for NamedPitch
impl UnwindSafe for NamedPitch
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.