pub struct NoteDetectionResult {
pub actual_freq: f64,
pub note_name: NoteName,
pub note_freq: f64,
pub octave: i32,
pub cents_offset: f64,
pub previous_note_name: NoteName,
pub next_note_name: NoteName,
pub in_tune: bool,
}Expand description
The resut of a pitch detection expressed as a note.
You will rarely need to instantiate this struct directly. Most commonly this will be returned from
detect_note.
Fields§
§actual_freq: f64The predominant frequency detected from a signal.
note_name: NoteNameThe note name of the detected note.
note_freq: f64The expected frequency of the detected note.
octave: i32The octave of the detected note.
cents_offset: f64The degree to which the detected not is in tune, expressed in cents. The absolute maximum cents_offset is
50, since anything larger than 50 would be considered the next or previous note.
previous_note_name: NoteNameThe note name of the note that comes before the detected note. Not commonly used.
next_note_name: NoteNameThe note name of the note that comes after the detected note. Not commonly used.
in_tune: boolA NoteDetectionResult will be marked as in_tune if the cents_offset is less than
MAX_CENTS_OFFSET.
Trait Implementations§
Source§impl Clone for NoteDetectionResult
impl Clone for NoteDetectionResult
Source§fn clone(&self) -> NoteDetectionResult
fn clone(&self) -> NoteDetectionResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NoteDetectionResult
impl Debug for NoteDetectionResult
Source§impl PartialEq for NoteDetectionResult
impl PartialEq for NoteDetectionResult
Source§impl PartialOrd for NoteDetectionResult
impl PartialOrd for NoteDetectionResult
Source§impl TryFrom<f64> for NoteDetectionResult
impl TryFrom<f64> for NoteDetectionResult
impl StructuralPartialEq for NoteDetectionResult
Auto Trait Implementations§
impl Freeze for NoteDetectionResult
impl RefUnwindSafe for NoteDetectionResult
impl Send for NoteDetectionResult
impl Sync for NoteDetectionResult
impl Unpin for NoteDetectionResult
impl UnwindSafe for NoteDetectionResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more