pub struct Notes { /* private fields */ }
Expand description
Notes detection object
Implementations§
Source§impl Notes
impl Notes
Sourcepub fn new(buf_size: usize, hop_size: usize, sample_rate: u32) -> Result<Self>
pub fn new(buf_size: usize, hop_size: usize, sample_rate: u32) -> Result<Self>
Create notes detection object
buf_size
Buffer size for phase vocoderhop_size
Hop size for phase vocodersamplerate
Sampling rate of the input signal
Sourcepub fn with_silence(self, silence: Smpl) -> Self
pub fn with_silence(self, silence: Smpl) -> Self
Set notes detection silence threshold
Sourcepub fn with_minioi_ms(self, minioi: Smpl) -> Self
pub fn with_minioi_ms(self, minioi: Smpl) -> Self
Set notes detection minimum inter-onset interval, in millisecond
Sourcepub fn with_release_drop(self, release_drop: Smpl) -> Self
pub fn with_release_drop(self, release_drop: Smpl) -> Self
Set note release drop level, in dB
Sourcepub fn do_<'i, 'o, I, O>(&mut self, input: I, output: O) -> Status
pub fn do_<'i, 'o, I, O>(&mut self, input: I, output: O) -> Status
Execute note detection on an input signal frame
input
Input signal of sizehop_size
output
Output notes, fvec of length 3
The notes output is a vector of length 3 containing:
- the midi note value, or 0 if no note was found
- the note velocity
- the midi note to turn off
Sourcepub fn do_result<'i, I>(&mut self, input: I) -> Result<Vec<Note>>
pub fn do_result<'i, I>(&mut self, input: I) -> Result<Vec<Note>>
Execute note detection on an input signal frame
Sourcepub fn set_silence(&mut self, silence: Smpl)
pub fn set_silence(&mut self, silence: Smpl)
Set notes detection silence threshold
Sourcepub fn get_silence(&self) -> Smpl
pub fn get_silence(&self) -> Smpl
Get notes detection silence threshold
Sourcepub fn set_minioi_ms(&mut self, minioi: Smpl)
pub fn set_minioi_ms(&mut self, minioi: Smpl)
Set notes detection minimum inter-onset interval, in millisecond
Sourcepub fn get_minioi_ms(&self) -> Smpl
pub fn get_minioi_ms(&self) -> Smpl
Get notes detection minimum inter-onset interval, in millisecond
Sourcepub fn set_release_drop(&mut self, release_drop: Smpl)
pub fn set_release_drop(&mut self, release_drop: Smpl)
Set note release drop level, in dB
Sourcepub fn get_release_drop(&self) -> Smpl
pub fn get_release_drop(&self) -> Smpl
Get notes release drop level, in dB
Trait Implementations§
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> 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
Mutably borrows from an owned value. Read more