Skip to main content

ConsecutiveOptions

Struct ConsecutiveOptions 

Source
pub struct ConsecutiveOptions {
    pub skip_rests: bool,
    pub skip_chords: bool,
    pub skip_unisons: bool,
    pub skip_octaves: bool,
    pub skip_gaps: bool,
    pub get_overlaps: bool,
    pub no_none: bool,
}
Expand description

Which notes Stream::find_consecutive_notes passes over, and where it marks a break: music21’s keyword arguments to findConsecutiveNotes. Every option is off by default.

Fields§

§skip_rests: bool

Whether a rest is passed over rather than breaking the line: skipRests.

§skip_chords: bool

Whether a chord breaks the line rather than joining it: skipChords.

§skip_unisons: bool

Whether a note sounding the pitch of the note before, or a chord sounding the pitches of the chord before, is passed over: skipUnisons. Pitches are compared as sounded, so F# and G- are one. What is passed over still sounds until it ends, so no break follows it.

§skip_octaves: bool

Whether a note an octave or more from the note before, in the same pitch class, is passed over too: skipOctaves, which implies skip_unisons.

§skip_gaps: bool

Whether time with nothing in it is passed over rather than breaking the line: skipGaps.

§get_overlaps: bool

Whether a note starting before the one before it ends is kept: getOverlaps.

§no_none: bool

Whether the list leaves out its breaks: noNone.

Trait Implementations§

Source§

impl Clone for ConsecutiveOptions

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ConsecutiveOptions

Source§

impl Debug for ConsecutiveOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ConsecutiveOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for ConsecutiveOptions

Source§

impl PartialEq for ConsecutiveOptions

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ConsecutiveOptions

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.