Struct pitch_calc::hz::Hz
[−]
[src]
pub struct Hz(pub Hz);
Pitch representation in the form of a frequency (hz).
Methods
impl Hz
[src]
fn hz(&self) -> Hz
Return the unit value of the Hz struct.
fn letter_octave(&self) -> (Letter, Octave)
Convert to (Letter, Octave) tuple.
fn letter(&self) -> Letter
Convert to Letter.
fn octave(&self) -> Octave
Convert to Octave.
fn to_letter_octave(&self) -> LetterOctave
Convert to a LetterOctave struct with the same pitch.
fn mel(&self) -> Mel
Convert to the unit value of a Mel.
fn to_mel(&self) -> Mel
Convert to a Mel struct.
fn perc(&self) -> Perc
Convert to the unit value of a Perc struct.
fn to_perc(&self) -> Perc
Convert to a percentage of the human hearing range.
fn scaled_perc_with_weight(&self, weight: ScaleWeight) -> Perc
Convert to a scaled percentage of the human hearing range with a given weight.
fn scaled_perc(&self) -> Perc
Convert to a scaled percentage of the human hearing range.
fn to_scaled_perc_with_weight(&self, weight: ScaleWeight) -> ScaledPerc
Convert to a scaled percentage of the human hearing range with a given weight.
fn to_scaled_perc(&self) -> ScaledPerc
Convert to a scaled percentage of the human hearing range.
fn step(&self) -> Step
Convert to the unit value of a Step.
fn to_step(&self) -> Step
Convert to a floating point MIDI-esque Step.
Trait Implementations
impl Decodable for Hz
[src]
impl Encodable for Hz
[src]
impl Clone for Hz
[src]
fn clone(&self) -> Hz
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for Hz
[src]
impl Debug for Hz
[src]
impl Add for Hz
[src]
type Output = Hz
The resulting type after applying the +
operator
fn add(self, rhs: Hz) -> Hz
The method for the +
operator
impl Sub for Hz
[src]
type Output = Hz
The resulting type after applying the -
operator
fn sub(self, rhs: Hz) -> Hz
The method for the -
operator
impl Mul for Hz
[src]
type Output = Hz
The resulting type after applying the *
operator
fn mul(self, rhs: Hz) -> Hz
The method for the *
operator
impl Div for Hz
[src]
type Output = Hz
The resulting type after applying the /
operator
fn div(self, rhs: Hz) -> Hz
The method for the /
operator
impl Rem for Hz
[src]
type Output = Hz
The resulting type after applying the %
operator
fn rem(self, rhs: Hz) -> Hz
The method for the %
operator
impl Neg for Hz
[src]
type Output = Hz
The resulting type after applying the -
operator
fn neg(self) -> Hz
The method for the unary -
operator
impl PartialEq for Hz
[src]
fn eq(&self, other: &Hz) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl Eq for Hz
[src]
impl PartialOrd for Hz
[src]
fn partial_cmp(&self, other: &Hz) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more