pub struct Verticality<'t, 'a> { /* private fields */ }Expand description
What starts, stops and sounds across one offset of a TimespanTree:
music21’s Verticality.
Implementations§
Source§impl<'t, 'a> Verticality<'t, 'a>
impl<'t, 'a> Verticality<'t, 'a>
Sourcepub fn start_timespans(&self) -> &[&'t ElementTimespan<'a>]
pub fn start_timespans(&self) -> &[&'t ElementTimespan<'a>]
The timespans starting here: music21’s startTimespans.
Sourcepub fn overlap_timespans(&self) -> &[&'t ElementTimespan<'a>]
pub fn overlap_timespans(&self) -> &[&'t ElementTimespan<'a>]
The timespans sounding across: music21’s overlapTimespans.
Sourcepub fn stop_timespans(&self) -> &[&'t ElementTimespan<'a>]
pub fn stop_timespans(&self) -> &[&'t ElementTimespan<'a>]
The timespans ending here: music21’s stopTimespans.
Sourcepub fn start_and_overlap_timespans(&self) -> Vec<&'t ElementTimespan<'a>>
pub fn start_and_overlap_timespans(&self) -> Vec<&'t ElementTimespan<'a>>
Those starting, then those sounding across: music21’s
startAndOverlapTimespans.
Sourcepub fn pitch_set(&self) -> Vec<Pitch>
pub fn pitch_set(&self) -> Vec<Pitch>
Each pitch sounding, each name and octave once, lowest first:
music21’s pitchSet, ordered as its toChord orders it.
Sourcepub fn pitch_class_set(&self) -> Vec<u8> ⓘ
pub fn pitch_class_set(&self) -> Vec<u8> ⓘ
Each pitch class sounding, once, in order: music21’s
pitchClassSet, by its classes.
Sourcepub fn to_chord(&self) -> Result<Chord>
pub fn to_chord(&self) -> Result<Chord>
A chord of the pitches sounding, lowest first: music21’s toChord.
§Errors
None in practice; a chord of no pitches is an empty chord.
Sourcepub fn bass_timespan(&self) -> Option<&'t ElementTimespan<'a>>
pub fn bass_timespan(&self) -> Option<&'t ElementTimespan<'a>>
The timespan sounding the lowest pitch, the last of those sounding it
alike: music21’s bassTimespan.
Sourcepub fn measure_number(&self) -> Option<IntegerType>
pub fn measure_number(&self) -> Option<IntegerType>
The measure of the first timespan starting here: music21’s
measureNumber.
Sourcepub fn paired_motion(
&self,
include_rests: bool,
include_oblique: bool,
) -> Vec<(&'t ElementTimespan<'a>, &'t ElementTimespan<'a>)>
pub fn paired_motion( &self, include_rests: bool, include_oblique: bool, ) -> Vec<(&'t ElementTimespan<'a>, &'t ElementTimespan<'a>)>
Each pitched timespan starting here paired with the one before it in
its part, and, with include_oblique, each pitched one sounding
across paired with itself: music21’s getPairedMotion. Without
include_rests, a pair is kept only where the earlier one stops
here; without include_oblique, a pair of the same pitches is not
kept.
Sourcepub fn voice_leading_timespans(
&self,
include_rests: bool,
include_oblique: bool,
include_no_motion: bool,
part_pairs: Option<&[(usize, usize)]>,
) -> Result<Vec<[&'t ElementTimespan<'a>; 4]>>
pub fn voice_leading_timespans( &self, include_rests: bool, include_oblique: bool, include_no_motion: bool, part_pairs: Option<&[(usize, usize)]>, ) -> Result<Vec<[&'t ElementTimespan<'a>; 4]>>
Each two pairs of Self::paired_motion, the earlier pair first:
music21’s getAllVoiceLeadingQuartets(returnObjects=False). Without
include_no_motion, two pairs neither of which moves are left out;
with part_pairs, only those whose two parts are one of the pairs of
the source’s parts given, by their places among them.
§Errors
A part pair naming a part the source has not got.
Sourcepub fn voice_leading_quartets(
&self,
include_rests: bool,
include_oblique: bool,
include_no_motion: bool,
part_pairs: Option<&[(usize, usize)]>,
) -> Result<Vec<VoiceLeadingQuartet>>
pub fn voice_leading_quartets( &self, include_rests: bool, include_oblique: bool, include_no_motion: bool, part_pairs: Option<&[(usize, usize)]>, ) -> Result<Vec<VoiceLeadingQuartet>>
The same quartets as voice-leading quartets, where all four are
notes: music21’s getAllVoiceLeadingQuartets.
§Errors
As Self::voice_leading_timespans, or two pitches no interval can
be spelled between.
Sourcepub fn make_element(
&self,
length: Option<FloatType>,
add_ties: bool,
remove_redundant_pitches: bool,
) -> Result<StreamElement>
pub fn make_element( &self, length: Option<FloatType>, add_ties: bool, remove_redundant_pitches: bool, ) -> Result<StreamElement>
A chord of every pitch sounding here, lasting length or, without
one, until the next start – a quarter where nothing follows – or a
rest where nothing sounds: music21’s makeElement. With
add_ties, a note begun before or going on after is tied; with
remove_redundant_pitches, a pitch two timespans sound is one note.
§Errors
A length no duration can have, or a chord symbol whose pitches cannot be worked out.
Sourcepub fn next_start_offset(&self) -> Option<FloatType>
pub fn next_start_offset(&self) -> Option<FloatType>
The next offset a timespan starts at: music21’s nextStartOffset.
Sourcepub fn next(&self) -> Option<Verticality<'t, 'a>>
pub fn next(&self) -> Option<Verticality<'t, 'a>>
The verticality there: music21’s nextVerticality.
Sourcepub fn previous(&self) -> Option<Verticality<'t, 'a>>
pub fn previous(&self) -> Option<Verticality<'t, 'a>>
The verticality at the last offset before this one a timespan starts
at: music21’s previousVerticality.
Sourcepub fn time_to_next_event(&self) -> Option<FloatType>
pub fn time_to_next_event(&self) -> Option<FloatType>
How long until the next start, or the end of the tree after the
last: music21’s timeToNextEvent.
Trait Implementations§
Source§impl<'t, 'a> Clone for Verticality<'t, 'a>
impl<'t, 'a> Clone for Verticality<'t, 'a>
Auto Trait Implementations§
impl<'t, 'a> Freeze for Verticality<'t, 'a>
impl<'t, 'a> RefUnwindSafe for Verticality<'t, 'a>
impl<'t, 'a> Send for Verticality<'t, 'a>
impl<'t, 'a> Sync for Verticality<'t, 'a>
impl<'t, 'a> Unpin for Verticality<'t, 'a>
impl<'t, 'a> UnsafeUnpin for Verticality<'t, 'a>
impl<'t, 'a> UnwindSafe for Verticality<'t, '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