[][src]Struct pitch_calc::scaled_perc::ScaledPerc

pub struct ScaledPerc(pub Perc, pub ScaleWeight);

Pitch representation in the form of a scaled percentage between the min and max hz.

Methods

impl ScaledPerc[src]

pub fn new(perc: Perc) -> ScaledPerc[src]

A constructor for a ScaledPerc that uses the default weight.

pub fn scaled_perc(&self) -> Perc[src]

Return the value as a scaled percentage.

pub fn scale_weight(&self) -> ScaleWeight[src]

Return the scale weight.

pub fn hz(&self) -> Hz[src]

Convert to the unit value of the equivalent frequency in Hz.

pub fn to_hz(&self) -> Hz[src]

Convert to the equivalent frequency in Hz.

pub fn letter_octave(&self) -> (Letter, Octave)[src]

Convert to (Letter, Octave) tuple.

pub fn letter(&self) -> Letter[src]

Convert to Letter.

pub fn octave(&self) -> Octave[src]

Convert to Octave.

pub fn to_letter_octave(&self) -> LetterOctave[src]

Convert to LetterOctave.

pub fn mel(&self) -> Mel[src]

Convert to the unit value of a Mel.

pub fn to_mel(&self) -> Mel[src]

Convert to a Mel struct.

pub fn perc(&self) -> Perc[src]

Convert to the unit value of a Perc struct.

pub fn to_perc(&self) -> Perc[src]

Convert to Perc.

pub fn step(&self) -> Step[src]

Convert to the unit value of a Step.

pub fn to_step(&self) -> Step[src]

Convert to a floating point MIDI-esque Step.

Trait Implementations

impl Add<ScaledPerc> for ScaledPerc[src]

type Output = ScaledPerc

The resulting type after applying the + operator.

impl Clone for ScaledPerc[src]

impl Copy for ScaledPerc[src]

impl Debug for ScaledPerc[src]

impl Div<ScaledPerc> for ScaledPerc[src]

type Output = ScaledPerc

The resulting type after applying the / operator.

impl Eq for ScaledPerc[src]

impl From<Hz> for ScaledPerc[src]

impl From<LetterOctave> for ScaledPerc[src]

impl From<Mel> for ScaledPerc[src]

impl From<Perc> for ScaledPerc[src]

impl From<ScaledPerc> for Hz[src]

impl From<ScaledPerc> for Mel[src]

impl From<ScaledPerc> for LetterOctave[src]

impl From<ScaledPerc> for Perc[src]

impl From<ScaledPerc> for Step[src]

impl From<Step> for ScaledPerc[src]

impl Mul<ScaledPerc> for ScaledPerc[src]

type Output = ScaledPerc

The resulting type after applying the * operator.

impl Neg for ScaledPerc[src]

type Output = ScaledPerc

The resulting type after applying the - operator.

impl Ord for ScaledPerc[src]

impl PartialEq<ScaledPerc> for ScaledPerc[src]

impl PartialOrd<ScaledPerc> for ScaledPerc[src]

impl Rem<ScaledPerc> for ScaledPerc[src]

type Output = ScaledPerc

The resulting type after applying the % operator.

impl Sub<ScaledPerc> for ScaledPerc[src]

type Output = ScaledPerc

The resulting type after applying the - operator.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.