pub struct TrillRecognizer {
pub check_nachschlag: bool,
pub acceptable_interval: IntegerType,
pub minimum_length_for_nachschlag: usize,
}Expand description
Recognizes busy notes as a trill: music21’s TrillRecognizer.
Fields§
§check_nachschlag: boolWhether the last notes may leave the trill as a nachschlag:
music21’s checkNachschlag.
acceptable_interval: IntegerTypeThe most semitones the two trilled notes may be apart:
acceptableInterval.
minimum_length_for_nachschlag: usizeThe fewest busy notes a trill with a nachschlag may have:
minimumLengthForNachschlag.
Implementations§
Source§impl TrillRecognizer
impl TrillRecognizer
Sourcepub fn recognize(
&self,
busy: &[StreamElement],
simple: &[StreamElement],
) -> Result<Option<Ornament>>
pub fn recognize( &self, busy: &[StreamElement], simple: &[StreamElement], ) -> Result<Option<Ornament>>
The trill the busy notes play, or nothing: music21’s recognize.
More than two notes, alternating between two pitches no more than
TrillRecognizer::acceptable_interval apart, are a trill up from
the first, or down where the second is lower; with
TrillRecognizer::check_nachschlag, the second half may leave the
alternation. Given a simple note sounding one of the two pitches,
the trill is from that pitch to the other. Each trilled note lasts
as long as ornament_note_quarter_length says, and the trill is
spelled with the accidental of the note it goes to.
§Errors
A simple note that is not a note, as music21 cannot read its pitch.
Trait Implementations§
Source§impl Clone for TrillRecognizer
impl Clone for TrillRecognizer
Source§impl Debug for TrillRecognizer
impl Debug for TrillRecognizer
Source§impl Default for TrillRecognizer
impl Default for TrillRecognizer
Source§impl<'de> Deserialize<'de> for TrillRecognizer
Available on crate feature serde only.
impl<'de> Deserialize<'de> for TrillRecognizer
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for TrillRecognizer
Source§impl PartialEq for TrillRecognizer
impl PartialEq for TrillRecognizer
Source§impl Serialize for TrillRecognizer
Available on crate feature serde only.
impl Serialize for TrillRecognizer
serde only.impl StructuralPartialEq for TrillRecognizer
Auto Trait Implementations§
impl Freeze for TrillRecognizer
impl RefUnwindSafe for TrillRecognizer
impl Send for TrillRecognizer
impl Sync for TrillRecognizer
impl Unpin for TrillRecognizer
impl UnsafeUnpin for TrillRecognizer
impl UnwindSafe for TrillRecognizer
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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