pub struct OrnamentFixer {
pub recognizers: Vec<Recognizer>,
pub mark_change_color: String,
}Expand description
Writes the ornaments a performance plays on the notes of a reading
that has none: music21’s OrnamentFixer.
Fields§
§recognizers: Vec<Recognizer>The recognizers tried, in order.
mark_change_color: StringThe colour a note given an ornament is marked in: music21’s
markChangeColor.
Implementations§
Source§impl OrnamentFixer
impl OrnamentFixer
Sourcepub fn trills() -> Self
pub fn trills() -> Self
Recognizes trills, plain and then with a nachschlag: music21’s
TrillFixer.
Sourcepub fn find_ornament(
&self,
busy: &[StreamElement],
simple: &[StreamElement],
) -> Result<Option<Ornament>>
pub fn find_ornament( &self, busy: &[StreamElement], simple: &[StreamElement], ) -> Result<Option<Ornament>>
The ornament the first recognizer to find one finds: music21’s
findOrnament.
§Errors
As the recognizers.
Sourcepub fn fix(
&self,
changes: &[Change],
midi: &Stream,
omr: &mut Stream,
mark: bool,
) -> Result<()>
pub fn fix( &self, changes: &[Change], midi: &Stream, omr: &mut Stream, mark: bool, ) -> Result<()>
Gives each note of the reading an inserted or substituted note
stands for the ornament the performance plays there, from the
performed note on for as long as the read note lasts: music21’s
fix in place. A read note given an ornament is not tried again,
nor are performed notes already made into one – each compared as
music21 compares notes, by what they are rather than which they are.
A note with an ornament already keeps it; with mark, one given an
ornament is coloured OrnamentFixer::mark_change_color.
§Errors
A change with no references or naming nothing, or a recognizer’s error.
Sourcepub fn fixed(&self, midi: &Stream, omr: &Stream) -> Result<Stream>
pub fn fixed(&self, midi: &Stream, omr: &Stream) -> Result<Stream>
The reading with its ornaments written, the two streams copied and
aligned afresh by a StreamAligner: music21’s fix with
inPlace=False, whose new fixer holds this reading.
§Errors
As OrnamentFixer::fix, or streams that cannot be aligned.
Trait Implementations§
Source§impl Clone for OrnamentFixer
impl Clone for OrnamentFixer
Source§impl Debug for OrnamentFixer
impl Debug for OrnamentFixer
Source§impl PartialEq for OrnamentFixer
impl PartialEq for OrnamentFixer
impl StructuralPartialEq for OrnamentFixer
Auto Trait Implementations§
impl Freeze for OrnamentFixer
impl RefUnwindSafe for OrnamentFixer
impl Send for OrnamentFixer
impl Sync for OrnamentFixer
impl Unpin for OrnamentFixer
impl UnsafeUnpin for OrnamentFixer
impl UnwindSafe for OrnamentFixer
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