pub struct Beams { /* private fields */ }Expand description
The beams of one note, one for each level it is beamed at: music21’s
beam.Beams.
Implementations§
Source§impl Beams
impl Beams
Sourcepub const LEVELS: usize
pub const LEVELS: usize
How many beams a written value carries, where it carries any:
How many beams a written value can carry at the most: music21’s
beamableDurationTypes, an eighth through a 2048th. It is how many
depths a run of notes is beamed at.
Sourcepub fn set_feathered(&mut self, feathered: bool)
pub fn set_feathered(&mut self, feathered: bool)
Draws the group fanned out, or stops doing so.
Sourcepub fn append(
&mut self,
beam_type: impl Into<Option<BeamType>>,
direction: Option<BeamDirection>,
)
pub fn append( &mut self, beam_type: impl Into<Option<BeamType>>, direction: Option<BeamDirection>, )
Adds a beam at the next level down: music21’s append.
Sourcepub fn levels_for(duration_type: DurationType) -> Option<u32>
pub fn levels_for(duration_type: DurationType) -> Option<u32>
music21’s beamableDurationTypes read as a count of levels.
Sourcepub fn fill(
&mut self,
duration_type: DurationType,
beam_type: Option<BeamType>,
) -> Result<()>
pub fn fill( &mut self, duration_type: DurationType, beam_type: Option<BeamType>, ) -> Result<()>
Gives the note as many beams as its written value has, all of the same
type: music21’s fill.
A value that carries no beam — anything a quarter or longer — is an error, as it is upstream.
Sourcepub fn fill_levels(
&mut self,
levels: u32,
beam_type: Option<BeamType>,
) -> Result<()>
pub fn fill_levels( &mut self, levels: u32, beam_type: Option<BeamType>, ) -> Result<()>
The same, counting the levels rather than naming the written value:
music21 takes either, and fill(2) is a sixteenth.
The beams are left with nothing said about what they do, unless a type is given — music21 counts the lines first and decides them after.
Sourcepub fn set_all(&mut self, beam_type: BeamType, direction: Option<BeamDirection>)
pub fn set_all(&mut self, beam_type: BeamType, direction: Option<BeamDirection>)
Sets every beam to the same type: music21’s setAll.
Sourcepub fn by_number(&self, number: u32) -> Option<&Beam>
pub fn by_number(&self, number: u32) -> Option<&Beam>
The beam at a level, counting from one: music21’s getByNumber.
Sourcepub fn set_by_number(
&mut self,
number: u32,
beam_type: BeamType,
direction: Option<BeamDirection>,
) -> Result<()>
pub fn set_by_number( &mut self, number: u32, beam_type: BeamType, direction: Option<BeamDirection>, ) -> Result<()>
Sets the beam at a level, which must already be there.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Beams
Available on crate feature serde only.
impl<'de> Deserialize<'de> for Beams
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>,
impl Eq for Beams
impl StructuralPartialEq for Beams
Auto Trait Implementations§
impl Freeze for Beams
impl RefUnwindSafe for Beams
impl Send for Beams
impl Sync for Beams
impl Unpin for Beams
impl UnsafeUnpin for Beams
impl UnwindSafe for Beams
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,
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> ⓘ
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