Struct monochord::tuning::MidiTuning
[−]
[src]
pub struct MidiTuning { /* fields omitted */ }
A map from MIDI notes to pitches
This is what your synth should actually use
Methods
impl MidiTuning
[src]
fn from_tuning<T: Tuning>(tuning: T, refkey: u8) -> Option<Self>
Lineary maps the tuning to MIDI steps. refkey
is a MIDI note of the reference pitch.
fn from_pitches(hzs: &[Hz]) -> Option<Self>
Creates MidiTuning
from a slice of pitches
Trait Implementations
impl Debug for MidiTuning
[src]
impl Clone for MidiTuning
[src]
fn clone(&self) -> MidiTuning
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 Default for MidiTuning
[src]
fn default() -> Self
Makes 12EDO tuning with A440 at MIDI note 69
impl Tuning for MidiTuning
[src]
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
fn interval(&self, from: i32, to: i32) -> Option<Cents>
Returns an interval from one step to another