pub struct ContiguousSegment<'a> {
pub notes: Vec<SegmentNote<'a>>,
pub part: Option<usize>,
pub active: Vec<u8>,
pub matched: Option<Vec<IntegerType>>,
}Expand description
A run of notes and chords of one part: music21’s
ContiguousSegmentOfNotes.
Fields§
§notes: Vec<SegmentNote<'a>>The notes and chords, in order.
part: Option<usize>The part they are in, counted from nought, or nothing where the stream searched has no parts.
active: Vec<u8>The pitch classes a SegmentMatcher read the run as, where it
matched one: music21’s activeSegment, by its pitch classes.
matched: Option<Vec<IntegerType>>What the run was matched to, where it was: music21’s
matchedSegment.
Implementations§
Source§impl ContiguousSegment<'_>
impl ContiguousSegment<'_>
Sourcepub fn start_measure(&self) -> Option<IntegerType>
pub fn start_measure(&self) -> Option<IntegerType>
The measure of the first note: music21’s startMeasureNumber.
Sourcepub fn start_offset(&self) -> Option<FloatType>
pub fn start_offset(&self) -> Option<FloatType>
The offset of the first note in the stream holding it: music21’s
startOffset.
Sourcepub fn pitch_classes_from_bottom(&self) -> Vec<u8> ⓘ
pub fn pitch_classes_from_bottom(&self) -> Vec<u8> ⓘ
Every pitch class of every note and chord, each chord from its
bottom: music21’s readPitchClassesFromBottom.
Sourcepub fn distinct_pitch_classes(&self) -> Vec<u8> ⓘ
pub fn distinct_pitch_classes(&self) -> Vec<u8> ⓘ
The same, each pitch class once: music21’s
getDistinctPitchClasses.
Sourcepub fn zero_centered_transformations_from_matched(
&self,
) -> Vec<IndexedTransformation> ⓘ
pub fn zero_centered_transformations_from_matched( &self, ) -> Vec<IndexedTransformation> ⓘ
The zero-centred transformations taking the row matched to the row
found: music21’s zeroCenteredTransformationsFromMatched. Nothing
for a run not matched.
Sourcepub fn original_centered_transformations_from_matched(
&self,
) -> Vec<IndexedTransformation> ⓘ
pub fn original_centered_transformations_from_matched( &self, ) -> Vec<IndexedTransformation> ⓘ
The original-centred transformations taking the row matched to the
row found: music21’s originalCenteredTransformationsFromMatched.
Trait Implementations§
Source§impl<'a> Clone for ContiguousSegment<'a>
impl<'a> Clone for ContiguousSegment<'a>
Auto Trait Implementations§
impl<'a> Freeze for ContiguousSegment<'a>
impl<'a> RefUnwindSafe for ContiguousSegment<'a>
impl<'a> Send for ContiguousSegment<'a>
impl<'a> Sync for ContiguousSegment<'a>
impl<'a> Unpin for ContiguousSegment<'a>
impl<'a> UnsafeUnpin for ContiguousSegment<'a>
impl<'a> UnwindSafe for ContiguousSegment<'a>
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