Notes

Struct Notes 

Source
pub struct Notes { /* private fields */ }
Expand description

Notes detection object

Implementations§

Source§

impl Notes

Source

pub fn new(buf_size: usize, hop_size: usize, sample_rate: u32) -> Result<Self>

Create notes detection object

  • buf_size Buffer size for phase vocoder
  • hop_size Hop size for phase vocoder
  • samplerate Sampling rate of the input signal
Source

pub fn with_silence(self, silence: Smpl) -> Self

Set notes detection silence threshold

Source

pub fn with_minioi_ms(self, minioi: Smpl) -> Self

Set notes detection minimum inter-onset interval, in millisecond

Source

pub fn with_release_drop(self, release_drop: Smpl) -> Self

Set note release drop level, in dB

Source

pub fn get_hop(&self) -> usize

Get hop size

Source

pub fn do_<'i, 'o, I, O>(&mut self, input: I, output: O) -> Status
where I: Into<FVec<'i>>, O: Into<FVecMut<'o>>,

Execute note detection on an input signal frame

  • input Input signal of size hop_size
  • output Output notes, fvec of length 3

The notes output is a vector of length 3 containing:

  1. the midi note value, or 0 if no note was found
  2. the note velocity
  3. the midi note to turn off
Source

pub fn do_result<'i, I>(&mut self, input: I) -> Result<Vec<Note>>
where I: Into<FVec<'i>>,

Execute note detection on an input signal frame

Source

pub fn set_silence(&mut self, silence: Smpl)

Set notes detection silence threshold

Source

pub fn get_silence(&self) -> Smpl

Get notes detection silence threshold

Source

pub fn set_minioi_ms(&mut self, minioi: Smpl)

Set notes detection minimum inter-onset interval, in millisecond

Source

pub fn get_minioi_ms(&self) -> Smpl

Get notes detection minimum inter-onset interval, in millisecond

Source

pub fn set_release_drop(&mut self, release_drop: Smpl)

Set note release drop level, in dB

Source

pub fn get_release_drop(&self) -> Smpl

Get notes release drop level, in dB

Trait Implementations§

Source§

impl Drop for Notes

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl Freeze for Notes

§

impl RefUnwindSafe for Notes

§

impl !Send for Notes

§

impl !Sync for Notes

§

impl Unpin for Notes

§

impl UnwindSafe for Notes

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.