Struct pitch_calc::perc::Perc
[−]
[src]
pub struct Perc(pub Perc);
Pitch representation in the form of a percentage between the min and max hz.
Methods
impl Perc
[src]
fn perc(&self) -> Perc
Return the value as a percentage.
fn hz(&self) -> Hz
Convert to unit value of the equivalent frequency in Hz.
fn to_hz(&self) -> Hz
Convert to the equivalent frequency in Hz.
fn letter_octave(&self) -> (Letter, Octave)
Convert to a (Letter, Octave).
fn letter(&self) -> Letter
Convert to Letter.
fn octave(&self) -> Octave
Convert to Octave.
fn to_letter_octave(&self) -> LetterOctave
Convert to LetterOctave.
fn mel(&self) -> Mel
Convert to the unit value of a Mel.
fn to_mel(&self) -> Mel
Convert to a Mel struct.
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 Perc
[src]
impl Encodable for Perc
[src]
impl Clone for Perc
[src]
fn clone(&self) -> Perc
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 Perc
[src]
impl Debug for Perc
[src]
impl Add for Perc
[src]
type Output = Perc
The resulting type after applying the +
operator
fn add(self, rhs: Perc) -> Perc
The method for the +
operator
impl Sub for Perc
[src]
type Output = Perc
The resulting type after applying the -
operator
fn sub(self, rhs: Perc) -> Perc
The method for the -
operator
impl Mul for Perc
[src]
type Output = Perc
The resulting type after applying the *
operator
fn mul(self, rhs: Perc) -> Perc
The method for the *
operator
impl Div for Perc
[src]
type Output = Perc
The resulting type after applying the /
operator
fn div(self, rhs: Perc) -> Perc
The method for the /
operator
impl Rem for Perc
[src]
type Output = Perc
The resulting type after applying the %
operator
fn rem(self, rhs: Perc) -> Perc
The method for the %
operator
impl Neg for Perc
[src]
type Output = Perc
The resulting type after applying the -
operator
fn neg(self) -> Perc
The method for the unary -
operator
impl PartialEq for Perc
[src]
fn eq(&self, other: &Perc) -> 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 Perc
[src]
impl PartialOrd for Perc
[src]
fn partial_cmp(&self, other: &Perc) -> 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