pub struct PulseDrumMachine { /* private fields */ }Expand description
Convenience builder for common 808 drum-machine patterns.
Implementations§
Source§impl PulseDrumMachine
impl PulseDrumMachine
Sourcepub fn new(kit: &str) -> PulseResult<Self>
pub fn new(kit: &str) -> PulseResult<Self>
Sourcepub fn steps(self, steps: usize) -> PulseResult<Self>
pub fn steps(self, steps: usize) -> PulseResult<Self>
Sourcepub fn step_duration(self, duration: f32) -> PulseResult<Self>
pub fn step_duration(self, duration: f32) -> PulseResult<Self>
Sourcepub fn kick(self, pattern: Vec<usize>) -> PulseResult<Self>
pub fn kick(self, pattern: Vec<usize>) -> PulseResult<Self>
Sourcepub fn snare(self, pattern: Vec<usize>) -> PulseResult<Self>
pub fn snare(self, pattern: Vec<usize>) -> PulseResult<Self>
Sourcepub fn hihat(self, pattern: Vec<usize>) -> PulseResult<Self>
pub fn hihat(self, pattern: Vec<usize>) -> PulseResult<Self>
Sourcepub fn open_hihat(self, pattern: Vec<usize>) -> PulseResult<Self>
pub fn open_hihat(self, pattern: Vec<usize>) -> PulseResult<Self>
Sourcepub fn clap(self, pattern: Vec<usize>) -> PulseResult<Self>
pub fn clap(self, pattern: Vec<usize>) -> PulseResult<Self>
Sourcepub fn grid(self) -> PulseDrumGrid
pub fn grid(self) -> PulseDrumGrid
Finishes the builder and returns its drum grid.
Trait Implementations§
Source§impl Clone for PulseDrumMachine
impl Clone for PulseDrumMachine
Source§fn clone(&self) -> PulseDrumMachine
fn clone(&self) -> PulseDrumMachine
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 PulseDrumMachine
impl Debug for PulseDrumMachine
Source§impl PartialEq for PulseDrumMachine
impl PartialEq for PulseDrumMachine
Source§fn eq(&self, other: &PulseDrumMachine) -> bool
fn eq(&self, other: &PulseDrumMachine) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PulseDrumMachine
Source§impl UserData for PulseDrumMachine
impl UserData for PulseDrumMachine
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 PulseDrumMachine
impl RefUnwindSafe for PulseDrumMachine
impl Send for PulseDrumMachine
impl Sync for PulseDrumMachine
impl Unpin for PulseDrumMachine
impl UnsafeUnpin for PulseDrumMachine
impl UnwindSafe for PulseDrumMachine
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.