pub struct ScoreReduction { /* private fields */ }Expand description
A score with its marked notes drawn out into parts of their own:
music21’s ScoreReduction.
Each group the marks name has a part, made from the first part’s template, with the marked notes in the voices the marks name. The parts stand above the chord reduction’s parts, if one is given, and the score’s, whose marks are taken out of their lyrics.
Implementations§
Source§impl ScoreReduction
impl ScoreReduction
Sourcepub fn set_score(&mut self, score: Stream)
pub fn set_score(&mut self, score: Stream)
Sets the score reduced. A stream holding no parts is taken as the one part of a score.
Sourcepub fn chord_reduction(&self) -> Option<&Stream>
pub fn chord_reduction(&self) -> Option<&Stream>
A score of chords whose marked notes go in the reduction too, and
whose parts are written below it: music21’s chordReduction.
Sourcepub fn set_chord_reduction(&mut self, chords: Stream)
pub fn set_chord_reduction(&mut self, chords: Stream)
Sets the chord reduction. A stream holding no parts is taken as the one part of a score.
Sourcepub fn reduce(&self) -> Result<Stream>
pub fn reduce(&self) -> Result<Stream>
The reduction: music21’s reduce.
The marked notes are gathered, the chord reduction’s first and then
the score’s, part by part and measure by measure, each lyric of a
note once. Each group named has a part: the first part’s template
without its voices, its id and an instrument’s part name the group.
Where only one group is named, or none, every note goes in its part.
A measure given a note loses its rests for a voice for each voice
named, and each note is added into the voice its mark names, or the
first, as Stream::insert_into_note_or_chord adds it, with its text
above in the measure. Each voice given notes has its gaps filled with
rests; voices left empty go, and one left alone is flattened into its
measure; and every rest of the part is hidden.
§Errors
Nothing to reduce; a lyric with no text, or one marking a note
ReductiveNote cannot write; a mark in a measure the first part
has not got; or two notes added where music21 refuses them.
Trait Implementations§
Source§impl Clone for ScoreReduction
impl Clone for ScoreReduction
Source§impl Debug for ScoreReduction
impl Debug for ScoreReduction
Auto Trait Implementations§
impl Freeze for ScoreReduction
impl RefUnwindSafe for ScoreReduction
impl Send for ScoreReduction
impl Sync for ScoreReduction
impl Unpin for ScoreReduction
impl UnsafeUnpin for ScoreReduction
impl UnwindSafe for ScoreReduction
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