pub struct PulseMidiClip { /* private fields */ }Expand description
A MIDI file arranged as a reusable song or phrase clip.
Implementations§
Source§impl PulseMidiClip
impl PulseMidiClip
Sourcepub fn with_start_at(self, start_at: f32) -> PulseResult<Self>
pub fn with_start_at(self, start_at: f32) -> PulseResult<Self>
Sets the clip start offset relative to its song or phrase placement.
Sourcepub fn with_track(self, track_name: impl Into<String>) -> Self
pub fn with_track(self, track_name: impl Into<String>) -> Self
Sets the track-name prefix used when imported MIDI tracks are merged.
Sourcepub fn with_volume(self, volume: f32) -> PulseResult<Self>
pub fn with_volume(self, volume: f32) -> PulseResult<Self>
Sets a clip-level volume multiplier for all imported MIDI tracks.
Sourcepub fn with_pan(self, pan: f32) -> PulseResult<Self>
pub fn with_pan(self, pan: f32) -> PulseResult<Self>
Overrides the stereo pan for all imported MIDI tracks.
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 imported MIDI material should play inside this clip.
Sourcepub fn with_effect(self, effect: PulseEffect) -> Self
pub fn with_effect(self, effect: PulseEffect) -> Self
Appends one track-level effect to every imported MIDI track.
Sourcepub fn track_name(&self) -> Option<&str>
pub fn track_name(&self) -> Option<&str>
Returns the explicit track-name prefix, if one was set.
Sourcepub fn repeat_times(&self) -> usize
pub fn repeat_times(&self) -> usize
Returns how many total times the imported MIDI material plays inside this clip.
Sourcepub fn effects(&self) -> &[PulseEffect]
pub fn effects(&self) -> &[PulseEffect]
Returns track-level effects in insertion order.
Sourcepub fn duration(&self) -> PulseResult<f32>
pub fn duration(&self) -> PulseResult<f32>
Returns clip duration including start offset and internal repeats.
Trait Implementations§
Source§impl Clone for PulseMidiClip
impl Clone for PulseMidiClip
Source§fn clone(&self) -> PulseMidiClip
fn clone(&self) -> PulseMidiClip
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 PulseMidiClip
impl Debug for PulseMidiClip
Source§impl PartialEq for PulseMidiClip
impl PartialEq for PulseMidiClip
Source§impl UserData for PulseMidiClip
impl UserData for PulseMidiClip
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 !Freeze for PulseMidiClip
impl !RefUnwindSafe for PulseMidiClip
impl !Sync for PulseMidiClip
impl !UnwindSafe for PulseMidiClip
impl Send for PulseMidiClip
impl Unpin for PulseMidiClip
impl UnsafeUnpin for PulseMidiClip
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.