pub struct OctaveShift { /* private fields */ }Expand description
How far and which way an octave line moves the notes under it:
music21’s Ottava.type.
Implementations§
Source§impl OctaveShift
impl OctaveShift
Sourcepub fn from_name(name: &str, transposing: bool) -> Result<Self>
pub fn from_name(name: &str, transposing: bool) -> Result<Self>
A shift by music21’s name for it: 8va, 8vb, 15ma, 15mb,
22da or 22db. transposing says whether the notes under it are
written where they sound, as music21’s transposing says.
Sourcepub fn transposing(&self) -> bool
pub fn transposing(&self) -> bool
Whether the notes under the line are written where they sound:
music21’s transposing.
Sourcepub fn set_transposing(&mut self, transposing: bool)
pub fn set_transposing(&mut self, transposing: bool)
Says whether the notes under the line are written where they sound.
This moves no notes; crate::Stream::to_sounding_pitch and
crate::Stream::to_written_pitch move them and say so.
Trait Implementations§
Source§impl Clone for OctaveShift
impl Clone for OctaveShift
impl Copy for OctaveShift
Source§impl Debug for OctaveShift
impl Debug for OctaveShift
Source§impl<'de> Deserialize<'de> for OctaveShift
Available on crate feature serde only.
impl<'de> Deserialize<'de> for OctaveShift
Available on crate feature
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for OctaveShift
Source§impl Hash for OctaveShift
impl Hash for OctaveShift
Source§impl PartialEq for OctaveShift
impl PartialEq for OctaveShift
Source§impl Serialize for OctaveShift
Available on crate feature serde only.
impl Serialize for OctaveShift
Available on crate feature
serde only.impl StructuralPartialEq for OctaveShift
Auto Trait Implementations§
impl Freeze for OctaveShift
impl RefUnwindSafe for OctaveShift
impl Send for OctaveShift
impl Sync for OctaveShift
impl Unpin for OctaveShift
impl UnsafeUnpin for OctaveShift
impl UnwindSafe for OctaveShift
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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