pub struct ModelRun { /* private fields */ }Expand description
The posteriorgrams of one model run over a stem.
Implementations§
Source§impl ModelRun
impl ModelRun
Sourcepub fn posteriorgrams(&self) -> &Posteriorgrams
pub fn posteriorgrams(&self) -> &Posteriorgrams
Returns the note, onset and contour activations.
Sourcepub fn onset_strength(&self, time: Seconds, pitch: MidiPitch) -> Option<f64>
pub fn onset_strength(&self, time: Seconds, pitch: MidiPitch) -> Option<f64>
Returns the strongest onset activation of a key, 0 to 1, over the
frames that start within one frame of time, or None outside the
run or the model’s keys. The decoder starts a note on an onset peak,
or grows one from the note activations when no onset fires.
Sourcepub fn decode(
&self,
settings: &DecodeSettings,
) -> Result<NoteList, TranscribeError>
pub fn decode( &self, settings: &DecodeSettings, ) -> Result<NoteList, TranscribeError>
Decodes the notes with one set of settings, without running the model again.
Each note takes its times from the decoder’s seconds, never from frame indices, and its velocity from the decoder. That velocity is the mean activation, a confidence and not a loudness. A note whose end does not follow its start carries no sound and is left out.
§Errors
Returns a TranscribeError when the decoder rejects the settings.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModelRun
impl RefUnwindSafe for ModelRun
impl Send for ModelRun
impl Sync for ModelRun
impl Unpin for ModelRun
impl UnsafeUnpin for ModelRun
impl UnwindSafe for ModelRun
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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