pub enum MutationOp {
Reverse,
Rotate {
steps: i32,
},
Transpose {
semitones: i32,
},
Invert {
axis: Pitch,
},
ShuffleWithinBeat {
beat: Time,
},
Thin {
keep_percent: u8,
},
Thicken {
semitones: i32,
},
VelocityRemap {
low: u8,
high: u8,
},
RhythmDisplace {
offset: Time,
},
ScaleConform {
scale: Scale,
},
}Expand description
A single mutation operation applied to a pattern’s notes.
Variants§
Reverse
Reverse note onsets within the pattern span.
Rotate
Rotate notes across their distinct onset slots by steps.
Transpose
Transpose unlocked notes by semitones.
Invert
Invert unlocked notes about axis.
ShuffleWithinBeat
Shuffle note onsets within each beat-sized bucket.
Thin
Randomly drop notes, keeping roughly keep_percent of them.
Thicken
Duplicate notes transposed by semitones to thicken the texture.
VelocityRemap
Remap velocities into the [low, high] range.
RhythmDisplace
Displace note onsets forward or backward by offset.
ScaleConform
Conform note pitches to the nearest tone of scale.
Trait Implementations§
Source§impl Clone for MutationOp
impl Clone for MutationOp
Source§fn clone(&self) -> MutationOp
fn clone(&self) -> MutationOp
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MutationOp
impl Debug for MutationOp
impl Eq for MutationOp
Source§impl PartialEq for MutationOp
impl PartialEq for MutationOp
impl StructuralPartialEq for MutationOp
Auto Trait Implementations§
impl Freeze for MutationOp
impl RefUnwindSafe for MutationOp
impl Send for MutationOp
impl Sync for MutationOp
impl Unpin for MutationOp
impl UnsafeUnpin for MutationOp
impl UnwindSafe for MutationOp
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