Trait monochord::tuning::Tuning
[−]
[src]
pub trait Tuning { fn reference_pitch(&self) -> Hz; fn pitch(&self, step: i32) -> Option<Hz>; fn interval(&self, from: i32, to: i32) -> Option<Cents> { ... } }
A general trait for tunings.
tun.pitch(0)
should be the same as Some(tun.reference_pitch())
Required Methods
fn reference_pitch(&self) -> Hz
Returns the reference pitch of the tuning
fn pitch(&self, step: i32) -> Option<Hz>
Returns the pitch of a step
Provided Methods
Implementors
impl Tuning for Edo
impl Tuning for EqualSteps
impl Tuning for CyclicTuning
impl Tuning for MidiTuning