pub struct ReductiveNote { /* private fields */ }Expand description
A note marked by a lyric for a reduction, with where it stands: music21’s
ReductiveNote.
Implementations§
Source§impl ReductiveNote
impl ReductiveNote
Sourcepub fn new(
spec: &str,
note: StreamElement,
measure_index: usize,
measure_offset: FloatType,
) -> Result<Self>
pub fn new( spec: &str, note: StreamElement, measure_index: usize, measure_offset: FloatType, ) -> Result<Self>
The note note, marked by the lyric spec, in the measure of that
index at that offset. A lyric not starting :: marks nothing, and
leaves the parameters at their defaults.
§Errors
A lyric ReductiveParameters::parse refuses.
Sourcepub fn parameters(&self) -> &ReductiveParameters
pub fn parameters(&self) -> &ReductiveParameters
What the lyric says.
Sourcepub fn note(&self) -> &StreamElement
pub fn note(&self) -> &StreamElement
The note marked.
Sourcepub fn measure_index(&self) -> usize
pub fn measure_index(&self) -> usize
Which measure of its part the note is in, counting from nought.
Sourcepub fn measure_offset(&self) -> FloatType
pub fn measure_offset(&self) -> FloatType
Where in its measure, or its voice, the note starts.
Sourcepub fn note_and_text_expression(&self) -> Result<(Note, Option<TextExpression>)>
pub fn note_and_text_expression(&self) -> Result<(Note, Option<TextExpression>)>
The note as the reduction writes it, and the text above it if any:
music21’s getNoteAndTextExpression.
A chord gives the last of its notes named as the p parameter says,
or its highest where none is said, the first of equally high ones.
The note keeps its pitch and length but loses
its lyrics, tie, expressions, articulations and dots; its accidental,
if written, is shown. The octave, stem direction and notehead fill
are then set as said, and the text below added as a lyric.
§Errors
A chord with no note of the name, or no note, an unpitched note or percussion chord, or a parameter music21 cannot read: an octave not a number, a stem direction or notehead fill it does not name.
Trait Implementations§
Source§impl Clone for ReductiveNote
impl Clone for ReductiveNote
Auto Trait Implementations§
impl Freeze for ReductiveNote
impl RefUnwindSafe for ReductiveNote
impl Send for ReductiveNote
impl Sync for ReductiveNote
impl Unpin for ReductiveNote
impl UnsafeUnpin for ReductiveNote
impl UnwindSafe for ReductiveNote
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