Skip to main content

MusicTransformChange

Enum MusicTransformChange 

Source
pub enum MusicTransformChange {
    Onset {
        event_id: ObjectId,
        before: Time,
        after: Time,
    },
    Duration {
        event_id: ObjectId,
        before: Time,
        after: Time,
    },
    Articulation {
        event_id: ObjectId,
        before: Articulation,
        after: Articulation,
    },
    Pitch {
        event_id: ObjectId,
        before: Pitch,
        after: Pitch,
    },
    Voice {
        event_id: ObjectId,
        before: ObjectId,
        after: ObjectId,
    },
    CreatedVoice {
        voice_id: ObjectId,
        source_voice_id: ObjectId,
    },
    RepeatedIdentity {
        source_note_id: ObjectId,
        source_event_id: ObjectId,
        repeated_note_id: ObjectId,
        repeated_event_id: ObjectId,
        occurrence: usize,
    },
    Removed {
        note_id: ObjectId,
        event_id: ObjectId,
        reason: &'static str,
    },
    AddedVoice {
        voice_id: ObjectId,
    },
    AddedNote {
        voice_id: ObjectId,
        note_id: ObjectId,
        event_id: ObjectId,
    },
    RemovedVoice {
        voice_id: ObjectId,
    },
}
Expand description

One reversible or explicitly destructive change made by an exact transform.

Variants§

§

Onset

A note onset changed.

Fields

§event_id: ObjectId

Affected event.

§before: Time

Exact prior onset.

§after: Time

Exact new onset.

§

Duration

A note duration changed.

Fields

§event_id: ObjectId

Affected event.

§before: Time

Exact prior duration.

§after: Time

Exact new duration.

§

Articulation

A note articulation changed.

Fields

§event_id: ObjectId

Affected event.

§before: Articulation

Prior articulation.

§after: Articulation

New articulation.

§

Pitch

A note pitch changed while its pitch class stayed fixed.

Fields

§event_id: ObjectId

Affected event.

§before: Pitch

Prior pitch.

§after: Pitch

New pitch.

§

Voice

A note moved to another voice.

Fields

§event_id: ObjectId

Affected event.

§before: ObjectId

Prior voice identity.

§after: ObjectId

New voice identity.

§

CreatedVoice

Voice separation allocated a new voice identity.

Fields

§voice_id: ObjectId

New identity.

§source_voice_id: ObjectId

Original voice from which it was split.

§

RepeatedIdentity

Repetition derived fresh note/event identities for a later occurrence.

Fields

§source_note_id: ObjectId

Original logical note identity.

§source_event_id: ObjectId

Original event identity.

§repeated_note_id: ObjectId

Derived logical note identity.

§repeated_event_id: ObjectId

Derived event identity.

§occurrence: usize

Zero-based occurrence index, always greater than zero.

§

Removed

A rhythm mask or slice removed an event.

Fields

§note_id: ObjectId

Removed logical note identity.

§event_id: ObjectId

Removed event identity.

§reason: &'static str

Stable reason for removal.

§

AddedVoice

An additive transform introduced a new independent voice.

Fields

§voice_id: ObjectId

New voice identity.

§

AddedNote

An additive transform introduced a note without changing source notes.

Fields

§voice_id: ObjectId

Containing voice.

§note_id: ObjectId

New logical note identity.

§event_id: ObjectId

New event identity.

§

RemovedVoice

Reversing an additive transform removed its introduced voice.

Fields

§voice_id: ObjectId

Removed voice identity.

Trait Implementations§

Source§

impl Clone for MusicTransformChange

Source§

fn clone(&self) -> MusicTransformChange

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 Debug for MusicTransformChange

Source§

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

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

impl Eq for MusicTransformChange

Source§

impl PartialEq for MusicTransformChange

Source§

fn eq(&self, other: &MusicTransformChange) -> 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 MusicTransformChange

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> RealizationService for T
where T: Any + Send + Sync,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Returns a downcast hook for typed access.
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.