pub struct PulsePhrase { /* private fields */ }Expand description
A reusable phrase containing layered sequences and drum grids.
Implementations§
Source§impl PulsePhrase
impl PulsePhrase
Sourcepub fn add_sequence(self, sequence: PulseSequence) -> Self
pub fn add_sequence(self, sequence: PulseSequence) -> Self
Appends one melodic sequence to this phrase.
Sourcepub fn add_drum_grid(self, grid: PulseDrumGrid) -> Self
pub fn add_drum_grid(self, grid: PulseDrumGrid) -> Self
Appends one drum grid to this phrase.
Sourcepub fn add_sample_clip(self, sample_clip: PulseSampleClip) -> Self
pub fn add_sample_clip(self, sample_clip: PulseSampleClip) -> Self
Appends one sample clip to this phrase.
Sourcepub fn add_midi_clip(self, midi_clip: PulseMidiClip) -> Self
pub fn add_midi_clip(self, midi_clip: PulseMidiClip) -> Self
Appends one imported MIDI clip to this phrase.
Sourcepub fn with_repeat_times(self, repeat_times: usize) -> PulseResult<Self>
pub fn with_repeat_times(self, repeat_times: usize) -> PulseResult<Self>
Sets how many total times the phrase should play.
Sourcepub fn duration(&self) -> PulseResult<f32>
pub fn duration(&self) -> PulseResult<f32>
Returns phrase duration for one play-through.
Sourcepub fn total_duration(&self) -> PulseResult<f32>
pub fn total_duration(&self) -> PulseResult<f32>
Returns phrase duration including repeats.
Sourcepub fn sequences(&self) -> &[PulseSequence]
pub fn sequences(&self) -> &[PulseSequence]
Returns all melodic sequences.
Sourcepub fn drum_grids(&self) -> &[PulseDrumGrid]
pub fn drum_grids(&self) -> &[PulseDrumGrid]
Returns all drum grids.
Sourcepub fn sample_clips(&self) -> &[PulseSampleClip]
pub fn sample_clips(&self) -> &[PulseSampleClip]
Returns all sample clips.
Sourcepub fn midi_clips(&self) -> &[PulseMidiClip]
pub fn midi_clips(&self) -> &[PulseMidiClip]
Returns all imported MIDI clips.
Sourcepub fn repeat_times(&self) -> usize
pub fn repeat_times(&self) -> usize
Returns how many total times this phrase plays.
Trait Implementations§
Source§impl Clone for PulsePhrase
impl Clone for PulsePhrase
Source§fn clone(&self) -> PulsePhrase
fn clone(&self) -> PulsePhrase
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 PulsePhrase
impl Debug for PulsePhrase
Source§impl Default for PulsePhrase
impl Default for PulsePhrase
Source§impl PartialEq for PulsePhrase
impl PartialEq for PulsePhrase
Source§fn eq(&self, other: &PulsePhrase) -> bool
fn eq(&self, other: &PulsePhrase) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PulsePhrase
Source§impl UserData for PulsePhrase
impl UserData for PulsePhrase
Source§fn add_methods<M: UserDataMethods<Self>>(methods: &mut M)
fn add_methods<M: UserDataMethods<Self>>(methods: &mut M)
Adds custom methods and operators specific to this userdata.
Source§fn add_fields<F>(fields: &mut F)where
F: UserDataFields<Self>,
fn add_fields<F>(fields: &mut F)where
F: UserDataFields<Self>,
Adds custom fields specific to this userdata.
Source§fn register(registry: &mut UserDataRegistry<Self>)
fn register(registry: &mut UserDataRegistry<Self>)
Registers this type for use in Lua. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for PulsePhrase
impl !Sync for PulsePhrase
impl !UnwindSafe for PulsePhrase
impl Freeze for PulsePhrase
impl Send for PulsePhrase
impl Unpin for PulsePhrase
impl UnsafeUnpin for PulsePhrase
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
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>
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 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>
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 moreSource§impl<T> IntoLuaMulti for Twhere
T: IntoLua,
impl<T> IntoLuaMulti for Twhere
T: IntoLua,
Source§fn into_lua_multi(self, lua: &Lua) -> Result<MultiValue, Error>
fn into_lua_multi(self, lua: &Lua) -> Result<MultiValue, Error>
Performs the conversion.