Skip to main content

Record

Struct Record 

Source
pub struct Record<'a> { /* private fields */ }
Expand description

One line of a measure: music21’s MuseDataRecord.

Implementations§

Source§

impl<'a> Record<'a>

Source

pub fn new(line: &'a str, stage: Stage) -> Self

A record of line, written in stage.

Source§

impl Record<'_>

Source

pub fn is_rest(&self) -> bool

music21’s isRest.

Source

pub fn is_note(&self) -> bool

music21’s isNote.

Source

pub fn is_chord(&self) -> bool

music21’s isChord: a further pitch of the note before.

Source

pub fn is_back(&self) -> bool

music21’s isBack.

Source

pub fn is_tied(&self) -> bool

music21’s isTied.

Source

pub fn is_cue_or_grace(&self) -> bool

music21’s isCueOrGrace.

Source

pub fn pitch_parameters(&self) -> Result<String>

music21’s _getPitchParameters: the pitch’s name as music21 writes it, E-4.

§Errors

A record that is no note, chord tone, cue or grace note.

Source

pub fn pitch(&self) -> Result<Pitch>

music21’s getPitchObject: the pitch, with the accidental column 19 shows.

§Errors

As Record::pitch_parameters.

Source

pub fn has_cautionary_accidental(&self) -> bool

music21’s hasCautionaryAccidental: a + among the notations.

Source

pub fn dots(&self) -> Option<u8>

music21’s getDots: none for stage 1.

Source

pub fn shown_accidental(&self) -> Result<Option<Accidental>>

music21’s _getAccidentalObject: the accidental column 19 shows.

§Errors

None in practice: each name is one the crate knows.

Source

pub fn quarter_length(&self, divisions: FloatType) -> Result<FloatType>

music21’s getQuarterLength, at divisions to the quarter.

§Errors

A length that is no number.

Source

pub fn lyrics(&self) -> Option<Vec<String>>

music21’s getLyrics: each verse’s syllable.

Source

pub fn beams(&self) -> Option<String>

music21’s getBeams: the beam column, trailing spaces taken off.

Source

pub fn slur_marks(&self) -> String

getSlurSymbols: the slur marks among the notations, in the order they are written; a stage-1 record has none.

Source

pub fn notations(&self) -> Option<String>

music21’s _getAdditionalNotations: columns 32 to 43.

Source

pub fn articulations(&self) -> Vec<Articulation>

music21’s getArticulationObjects.

Source

pub fn expressions(&self) -> Vec<Expression>

music21’s getExpressionObjects.

Source

pub fn dynamics(&self) -> Vec<Dynamic>

getDynamicObjects: each mark found once, in music21’s order of looking, and taken out of what is left to look in.

Trait Implementations§

Source§

impl<'a> Clone for Record<'a>

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<'a> Copy for Record<'a>

Source§

impl<'a> Debug for Record<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Forget for Record<'a>

§

impl<'a> Freeze for Record<'a>

§

impl<'a> Move for Record<'a>

§

impl<'a> RefUnwindSafe for Record<'a>

§

impl<'a> Send for Record<'a>

§

impl<'a> Sync for Record<'a>

§

impl<'a> Unpin for Record<'a>

§

impl<'a> UnsafeUnpin for Record<'a>

§

impl<'a> UnwindSafe for Record<'a>

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.