Struct pitch_calc::letter_octave::LetterOctave [] [src]

pub struct LetterOctave(pub Letter, pub Octave);

Pitch representation in the form of a frequency (hz).

Methods

impl LetterOctave
[src]

fn letter_octave(&self) -> (Letter, Octave)

Return the value as (Letter, Octave).

fn letter(&self) -> Letter

Return just the Letter.

fn octave(&self) -> Octave

Return just the octave.

fn hz(&self) -> Hz

Convert to the unit value of Hz with the equivalent pitch.

fn to_hz(&self) -> Hz

Convert to a Hz with the equivalent pitch.

fn mel(&self) -> Mel

Convert to the unit value of a Mel with equivalent pitch.

fn to_mel(&self) -> Mel

Convert to a Mel struct.

fn perc(&self) -> Perc

Convert to the unit value of a Perc.

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 LetterOctave
[src]

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<LetterOctave, __D::Error>

impl Encodable for LetterOctave
[src]

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>

impl Clone for LetterOctave
[src]

fn clone(&self) -> LetterOctave

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 LetterOctave
[src]

impl Debug for LetterOctave
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Add for LetterOctave
[src]

type Output = LetterOctave

The resulting type after applying the + operator

fn add(self, rhs: LetterOctave) -> LetterOctave

The method for the + operator

impl Sub for LetterOctave
[src]

type Output = LetterOctave

The resulting type after applying the - operator

fn sub(self, rhs: LetterOctave) -> LetterOctave

The method for the - operator

impl Mul for LetterOctave
[src]

type Output = LetterOctave

The resulting type after applying the * operator

fn mul(self, rhs: LetterOctave) -> LetterOctave

The method for the * operator

impl Div for LetterOctave
[src]

type Output = LetterOctave

The resulting type after applying the / operator

fn div(self, rhs: LetterOctave) -> LetterOctave

The method for the / operator

impl Rem for LetterOctave
[src]

type Output = LetterOctave

The resulting type after applying the % operator

fn rem(self, rhs: LetterOctave) -> LetterOctave

The method for the % operator

impl Neg for LetterOctave
[src]

type Output = LetterOctave

The resulting type after applying the - operator

fn neg(self) -> LetterOctave

The method for the unary - operator

impl PartialEq for LetterOctave
[src]

fn eq(&self, other: &LetterOctave) -> 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 LetterOctave
[src]

impl PartialOrd for LetterOctave
[src]

fn partial_cmp(&self, other: &LetterOctave) -> 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

impl Ord for LetterOctave
[src]

fn cmp(&self, other: &LetterOctave) -> Ordering

This method returns an Ordering between self and other. Read more