pub struct MelodicInterval { /* private fields */ }Expand description
The interval from one note of a line to the next, as
Stream::melodic_intervals finds it.
Implementations§
Source§impl MelodicInterval
impl MelodicInterval
Sourcepub fn interval(&self) -> &Interval
pub fn interval(&self) -> &Interval
The interval, from the first note to the second; to a chord’s first note where either is a chord.
Sourcepub fn start(&self) -> usize
pub fn start(&self) -> usize
The position in Stream::leaves of the note the interval leaves.
Sourcepub fn end(&self) -> usize
pub fn end(&self) -> usize
The position in Stream::leaves of the note the interval reaches.
Sourcepub fn offset(&self) -> FloatType
pub fn offset(&self) -> FloatType
Where the interval begins, counted from the stream’s start: where the note it leaves ends.
Sourcepub fn quarter_length(&self) -> FloatType
pub fn quarter_length(&self) -> FloatType
How long the interval lasts: from where the first note ends to where the second starts, nothing for notes that touch.
Trait Implementations§
Source§impl Clone for MelodicInterval
impl Clone for MelodicInterval
Source§impl Debug for MelodicInterval
impl Debug for MelodicInterval
Source§impl PartialEq for MelodicInterval
impl PartialEq for MelodicInterval
impl StructuralPartialEq for MelodicInterval
Auto Trait Implementations§
impl Freeze for MelodicInterval
impl RefUnwindSafe for MelodicInterval
impl Send for MelodicInterval
impl Sync for MelodicInterval
impl Unpin for MelodicInterval
impl UnsafeUnpin for MelodicInterval
impl UnwindSafe for MelodicInterval
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
Mutably borrows from an owned value. Read more
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> ⓘ
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 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> ⓘ
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