pub trait Scale {
// Required methods
fn sorted_pitch_of(&self, degree: i32) -> Pitch;
fn find_by_pitch_sorted(&self, pitch: Pitch) -> Approximation<i32>;
// Provided method
fn as_sorted_tuning(self) -> SortedTuning<Self>
where Self: Sized { ... }
}
Expand description
Required Methods§
sourcefn sorted_pitch_of(&self, degree: i32) -> Pitch
fn sorted_pitch_of(&self, degree: i32) -> Pitch
sourcefn find_by_pitch_sorted(&self, pitch: Pitch) -> Approximation<i32>
fn find_by_pitch_sorted(&self, pitch: Pitch) -> Approximation<i32>
Finds a closest scale degree Approximation
for the given Pitch
in the current Scale
.
Provided Methods§
sourcefn as_sorted_tuning(self) -> SortedTuning<Self>where
Self: Sized,
fn as_sorted_tuning(self) -> SortedTuning<Self>where
Self: Sized,
Wraps self
in a type adapter s.t. it can be used in functions that are generic over Tuning<i32>
.
Implementations on Foreign Types§
source§impl<S: Borrow<Scl>, K: Borrow<KbmRoot>> Scale for (S, K)
impl<S: Borrow<Scl>, K: Borrow<KbmRoot>> Scale for (S, K)
fn sorted_pitch_of(&self, degree: i32) -> Pitch
fn find_by_pitch_sorted(&self, pitch: Pitch) -> Approximation<i32>
source§impl<S: Scale + ?Sized> Scale for &S
impl<S: Scale + ?Sized> Scale for &S
impl
forwarding for references.