pub struct PatternGenerator {
pub settings_: [PatternGeneratorSettings; 3],
pub options_: Options,
/* private fields */
}Fields§
§settings_: [PatternGeneratorSettings; 3]§options_: OptionsImplementations§
Source§impl PatternGenerator
impl PatternGenerator
Sourcepub fn get_sequencer_state(&self) -> SequencerState
pub fn get_sequencer_state(&self) -> SequencerState
Returns internal generator seqauencer state to be stored in an app’s ManagedStorage so it can be restored later after a re-spwan
pub fn is_gate_mode_active(&self) -> bool
pub fn get_current_output_mode(&self) -> OutputMode
pub fn set_output_mode(&mut self, mode: OutputMode)
pub fn set_gate_mode(&mut self, active: bool)
pub fn set_global_chaos(&mut self, enabled: bool)
Sourcepub fn get_trigger_state(&self) -> u8
pub fn get_trigger_state(&self) -> u8
Provides the current trigger state for all parts (and accent). Bit 0: Part 1 (BD/EUC1), Bit 1: Part 2 (SD/EUC2), Bit 2: Part 3 (HH/EUC3) Bit 3: Accent (in Drum mode or chaotic Euclidean)
pub fn is_on_first_beat(&self) -> bool
pub fn is_on_beat(&self) -> bool
Sourcepub fn queue_dnb_pattern_change(&mut self, new_pattern: u8)
pub fn queue_dnb_pattern_change(&mut self, new_pattern: u8)
Queue up DnB pattern change on next bar (ie when first_beat_ = true)
Sourcepub fn reset_dnb_pattern_to_base(&mut self)
pub fn reset_dnb_pattern_to_base(&mut self)
Reset DnB pattern to default
Sourcepub fn get_dnb_24ppqn_pattern_division(&self) -> u32
pub fn get_dnb_24ppqn_pattern_division(&self) -> u32
Required per-step 24ppqn clock division for current DnB pattern
Sourcepub fn restore(&mut self, sequencer_state: SequencerState)
pub fn restore(&mut self, sequencer_state: SequencerState)
Restore the internal state of a running generator with supplied sequencer state
pub fn retrigger(&mut self)
Sourcepub fn tick(&mut self, clkn: u32, div: u32)
pub fn tick(&mut self, clkn: u32, div: u32)
Called on each tick of external clock.
For Drums Mode, this should be fixed to 1/32nd steps For Euclidean mode, should be in 1/16th steps by default For DnB mode, it depends on the selected DnB pattern #steps
Sourcepub fn set_length(&mut self, channel: usize, length: u8)
pub fn set_length(&mut self, channel: usize, length: u8)
Set Euclidean sequence length 1 - 32 steps
Sourcepub fn set_offset(&mut self, channel: usize, offset: u8)
pub fn set_offset(&mut self, channel: usize, offset: u8)
Set Euclidean sequence offset for one channel (phase rotation)
Source§impl PatternGenerator
impl PatternGenerator
Sourcepub fn generate_dnb_variation(&mut self)
pub fn generate_dnb_variation(&mut self)
Generates a random variation of the current dnb pattern, mutates the self.current_dnb_pattern
Trait Implementations§
Source§impl Clone for PatternGenerator
impl Clone for PatternGenerator
Source§fn clone(&self) -> PatternGenerator
fn clone(&self) -> PatternGenerator
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more