pub struct PulseSequence { /* private fields */ }Expand description
A Lua-friendly melodic sequence with one duration per event.
Implementations§
Source§impl PulseSequence
impl PulseSequence
Sourcepub fn with_notes(self, notes: Vec<f32>) -> Self
pub fn with_notes(self, notes: Vec<f32>) -> Self
Replaces the sequence note frequencies.
Sourcepub fn with_chords(self, chords: Vec<Vec<f32>>) -> Self
pub fn with_chords(self, chords: Vec<Vec<f32>>) -> Self
Replaces the sequence with polyphonic note events.
Sourcepub fn with_durations(self, durations: Vec<f32>) -> Self
pub fn with_durations(self, durations: Vec<f32>) -> Self
Replaces the sequence durations.
Sourcepub fn with_instrument(self, instrument: impl Into<String>) -> Self
pub fn with_instrument(self, instrument: impl Into<String>) -> Self
Sets the instrument alias for this sequence.
Sourcepub fn with_synth(self, synth: PulseSynth) -> Self
pub fn with_synth(self, synth: PulseSynth) -> Self
Sets an explicit synthesis algorithm for this sequence.
Sourcepub fn with_start_at(self, start_at: f32) -> PulseResult<Self>
pub fn with_start_at(self, start_at: f32) -> PulseResult<Self>
Sets a sequence start offset relative to the song or phrase placement.
Sourcepub fn with_volume(self, volume: f32) -> PulseResult<Self>
pub fn with_volume(self, volume: f32) -> PulseResult<Self>
Sets track volume for this sequence.
Sourcepub fn with_pan(self, pan: f32) -> PulseResult<Self>
pub fn with_pan(self, pan: f32) -> PulseResult<Self>
Sets stereo pan for this sequence.
Sourcepub fn with_velocity(self, velocity: f32) -> PulseResult<Self>
pub fn with_velocity(self, velocity: f32) -> PulseResult<Self>
Sets velocity for notes exported from this sequence.
Sourcepub fn transposed(&self, semitones: i32) -> Self
pub fn transposed(&self, semitones: i32) -> Self
Returns a transposed copy without mutating the original sequence.
Sourcepub fn with_effect(self, effect: PulseEffect) -> Self
pub fn with_effect(self, effect: PulseEffect) -> Self
Appends a track-level effect to the sequence.
Sourcepub fn validate(&self) -> PulseResult<()>
pub fn validate(&self) -> PulseResult<()>
Validates sequence shape and instrument name.
Sourcepub fn events(&self) -> PulseResult<Vec<PulseNoteEvent>>
pub fn events(&self) -> PulseResult<Vec<PulseNoteEvent>>
Returns note/chord events with the current durations applied.
Sourcepub fn instrument(&self) -> &str
pub fn instrument(&self) -> &str
Returns the instrument alias.
Sourcepub fn synth(&self) -> Option<&PulseSynth>
pub fn synth(&self) -> Option<&PulseSynth>
Returns the explicit synthesis algorithm, if one was selected.
Sourcepub fn effects(&self) -> &[PulseEffect]
pub fn effects(&self) -> &[PulseEffect]
Returns track-level effects in insertion order.
Trait Implementations§
Source§impl Clone for PulseSequence
impl Clone for PulseSequence
Source§fn clone(&self) -> PulseSequence
fn clone(&self) -> PulseSequence
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PulseSequence
impl Debug for PulseSequence
Source§impl Default for PulseSequence
impl Default for PulseSequence
Source§impl PartialEq for PulseSequence
impl PartialEq for PulseSequence
Source§fn eq(&self, other: &PulseSequence) -> bool
fn eq(&self, other: &PulseSequence) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PulseSequence
Source§impl UserData for PulseSequence
impl UserData for PulseSequence
Source§fn add_methods<M: UserDataMethods<Self>>(methods: &mut M)
fn add_methods<M: UserDataMethods<Self>>(methods: &mut M)
Source§fn add_fields<F>(fields: &mut F)where
F: UserDataFields<Self>,
fn add_fields<F>(fields: &mut F)where
F: UserDataFields<Self>,
Source§fn register(registry: &mut UserDataRegistry<Self>)
fn register(registry: &mut UserDataRegistry<Self>)
Auto Trait Implementations§
impl Freeze for PulseSequence
impl RefUnwindSafe for PulseSequence
impl Send for PulseSequence
impl Sync for PulseSequence
impl Unpin for PulseSequence
impl UnsafeUnpin for PulseSequence
impl UnwindSafe for PulseSequence
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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